Documentation
¶
Index ¶
- func Init(mongoURI string)
- type Client
- func (d *Client) DeleteMany(filter interface{}, db, collection string) error
- func (d *Client) DeleteOne(filter interface{}, db, collection string) error
- func (d *Client) FindMany(filter interface{}, db, collection string) (*mongo.Cursor, error)
- func (d *Client) FindOne(filter interface{}, toDecode interface{}, db, collection string) error
- func (d *Client) InsertMany(data []interface{}, db, collection string) error
- func (d *Client) InsertOne(data interface{}, db, collection string) error
- func (d *Client) UpdateOne(filter interface{}, update interface{}, db, collection string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
Client has Mutex to provide access for multiple goroutines
var (
DefaultClient *Client
)
func (*Client) DeleteMany ¶
DeleteMany deletes many items
func (*Client) InsertMany ¶
InsertMany inserts multiple values
Click to show internal directories.
Click to hide internal directories.