Documentation ¶
Overview ¶
mongo provides the Mongo implementation of the StoreClient interface.
Index ¶
- func NewClient(config db.DatabaseInfo) (client interfaces.StoreClient, err error)
- type Client
- func (c Client) Disconnect() error
- func (c Client) RemoveFromStore(o contracts.StoredObject) error
- func (c Client) RetrieveFromStore(appServiceKey string) (objects []contracts.StoredObject, err error)
- func (c Client) Store(o contracts.StoredObject) (string, error)
- func (c Client) Update(o contracts.StoredObject) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClient ¶
func NewClient(config db.DatabaseInfo) (client interfaces.StoreClient, err error)
NewClient provides a factory for building a StoreClient
Types ¶
type Client ¶
type Client struct { Timeout time.Duration Client *mongo.Database // contains filtered or unexported fields }
Client provides a wrapper for Mongo's Client type
func (Client) Disconnect ¶
func (Client) RemoveFromStore ¶
func (c Client) RemoveFromStore(o contracts.StoredObject) error
RemoveFromStore removes an object from the data store.
func (Client) RetrieveFromStore ¶
func (c Client) RetrieveFromStore(appServiceKey string) (objects []contracts.StoredObject, err error)
RetrieveFromStore gets an object from the data store.
Click to show internal directories.
Click to hide internal directories.