Documentation ¶
Index ¶
- Constants
- func New(ctx context.Context, config cmap.CustomMap) (storageTY.Plugin, error)
- type Client
- func (c *Client) ClearDatabase() error
- func (c *Client) Close() error
- func (c *Client) Count(entityName string, filters []storageTY.Filter) (int64, error)
- func (c *Client) Delete(entityName string, filters []storageTY.Filter) (int64, error)
- func (s *Client) DoStartupImport() (bool, string, string)
- func (c *Client) Find(entityName string, out interface{}, filters []storageTY.Filter, ...) (*storageTY.Result, error)
- func (c *Client) FindOne(entityName string, out interface{}, filters []storageTY.Filter) error
- func (c *Client) Insert(entityName string, data interface{}) error
- func (s *Client) Name() string
- func (c *Client) Pause() error
- func (c *Client) Ping() error
- func (c *Client) Resume() error
- func (c *Client) Update(entityName string, data interface{}, filters []storageTY.Filter) error
- func (c *Client) Upsert(entityName string, data interface{}, filters []storageTY.Filter) error
- type Config
Constants ¶
View Source
const ( PluginMongoDB = storageTY.TypeMongoDB DefaultCollectionPrefix = "mc_" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct { Client *mongoDriver.Client Config Config // contains filtered or unexported fields }
Client of the mongo db
func (*Client) ClearDatabase ¶
ClearDatabase removes all the data from the database
func (*Client) DoStartupImport ¶
DoStartupImport returns the needs, files location, and file format
func (*Client) Find ¶
func (c *Client) Find(entityName string, out interface{}, filters []storageTY.Filter, pagination *storageTY.Pagination) (*storageTY.Result, error)
Find returns data
Click to show internal directories.
Click to hide internal directories.