Documentation
¶
Index ¶
- Variables
- type DataStore
- func (s *DataStore) Delete(key string) error
- func (s *DataStore) FlushAll() error
- func (s *DataStore) Get(key string) (interface{}, error)
- func (s *DataStore) GetAll() map[string]interface{}
- func (s *DataStore) Set(key string, value interface{}) error
- func (s *DataStore) Update(key string, value interface{}) error
- type DataStoreError
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrOutOfMemory = &DataStoreError{Message: "Out of memory"} ErrEmptyKey = &DataStoreError{Message: "Empty key is not allowed"} ErrNilValue = &DataStoreError{Message: "Nil value is not allowed"} ErrKeyNotFound = &DataStoreError{Message: "Key not found"} ErrDuplicateKey = &DataStoreError{Message: "Key already exists"} ErrSpecialCharactersKey = &DataStoreError{Message: "Key with special characters is not allowed"} )
Declared Errors
Functions ¶
This section is empty.
Types ¶
type DataStore ¶
type DataStore struct { Data map[string]interface{} // contains filtered or unexported fields }
func NewDataStore ¶
func NewDataStore() *DataStore
type DataStoreError ¶
func (*DataStoreError) Error ¶
func (e *DataStoreError) Error() string
Click to show internal directories.
Click to hide internal directories.