Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrDriverNotExists = errors.New("store: driver does not exists")
)
errors
Functions ¶
Types ¶
type Store ¶
type Store interface { // Get retrieves a value from the storage and unmarshals it to the required type Get(ctx context.Context, collection, id string, value interface{}) (err error) // GetAll retrieves all the items for the required dataset GetAll(ctx context.Context, collection string) (values []map[string]interface{}, err error) // Set inserts/updates a item in the dataset Set(ctx context.Context, collection, id string, value interface{}) (err error) // Delete removes the required ID on the dataset Delete(ctx context.Context, collection, id string) (ok bool, err error) // Ping returns a non-nil error if the Store is not healthy or if the // connection to the persistence is compromised. Ping(ctx context.Context) error // Close releases the resources associated with the Store. Close() error }
Store defines an interface that will be used to interact with the different data stores
Click to show internal directories.
Click to hide internal directories.