Documentation ¶ Index ¶ type Client func NewClient(conf Config) (*Client, error) func (c *Client) GenerateID() primitive.ObjectID func (c *Client) GetClient() *mongo.Client func (c *Client) GetDb() *mongo.Database func (c *Client) Ping() error type Config Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Client ¶ type Client struct { // contains filtered or unexported fields } func NewClient ¶ func NewClient(conf Config) (*Client, error) NewClient method takes a config map argument func (*Client) GenerateID ¶ func (c *Client) GenerateID() primitive.ObjectID func (*Client) GetClient ¶ added in v1.1.15 func (c *Client) GetClient() *mongo.Client func (*Client) GetDb ¶ func (c *Client) GetDb() *mongo.Database func (*Client) Ping ¶ func (c *Client) Ping() error type Config ¶ type Config struct { AuthSource string Username string Password string Opts string Database string Hosts []string } Source Files ¶ View all Source files db.go Click to show internal directories. Click to hide internal directories.