 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
      View Source
      
  var ErrInvalidArgument = errors.New("ErrorInvalidArgument")
    ErrInvalidArgument is returned when the argument type does not match the expected type
      View Source
      
  var ErrNotFound = errors.New("ErrorNotFound")
    ErrNotFound is returned when no results are returned from the database
Functions ¶
This section is empty.
Types ¶
type DBStore ¶
type DBStore struct {
	// contains filtered or unexported fields
}
    DBStore uses LevelDB to store values.
func NewDBStore ¶
NewDBStore creates a new instance of DBStore.
type InmemoryStore ¶
type InmemoryStore struct {
	// contains filtered or unexported fields
}
    InmemoryStore is the reference implementation of Store interface that is supposed to be used in tests.
func NewInmemoryStore ¶
func NewInmemoryStore() *InmemoryStore
NewInmemoryStore returns a new instance of InmemoryStore.
func (*InmemoryStore) Delete ¶
func (s *InmemoryStore) Delete(key string) (err error)
Delete removes value stored under a specific key.
func (*InmemoryStore) Get ¶
func (s *InmemoryStore) Get(key string, i interface{}) (err error)
Get retrieves a value stored for a specific key. If there is no value found, ErrNotFound is returned.
func (*InmemoryStore) Put ¶
func (s *InmemoryStore) Put(key string, i interface{}) (err error)
Put stores a value for a specific key.
 Click to show internal directories. 
   Click to hide internal directories.