Documentation ¶
Index ¶
- type Connection
- func (c *Connection) GetCollection(collName string) *mongo.Collection
- func (c *Connection) GetCollectionNames(filter interface{}) ([]string, error)
- func (c *Connection) GetDatabaseNames(filter interface{}) ([]string, error)
- func (c *Connection) NewCollection(collName string) (*mongo.Collection, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
func NewConnection ¶
func NewConnection(ctx context.Context, uri, dbName string) (Connection, error)
func (*Connection) GetCollection ¶
func (c *Connection) GetCollection(collName string) *mongo.Collection
func (*Connection) GetCollectionNames ¶
func (c *Connection) GetCollectionNames(filter interface{}) ([]string, error)
func (*Connection) GetDatabaseNames ¶
func (c *Connection) GetDatabaseNames(filter interface{}) ([]string, error)
func (*Connection) NewCollection ¶
func (c *Connection) NewCollection(collName string) (*mongo.Collection, error)
Click to show internal directories.
Click to hide internal directories.