Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
Collection(c string) Collection
}
Client represents a database connection.
type Collection ¶
type Collection interface { FindOne(ctx context.Context, filter interface{}, opts ...*options.FindOneOptions) SingleResult InsertOne(ctx context.Context, document interface{}, opts ...*options.InsertOneOptions) (interface{}, error) }
Collection represents a MongoDB collection.
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
Database is the connection to the database.
func (Database) Collection ¶
func (d Database) Collection(name string) Collection
Collection gets a handle for a collection with the given name.
type SingleResult ¶
type SingleResult interface {
Decode(v interface{}) error
}
SingleResult represents a single result returned by an operation.
Click to show internal directories.
Click to hide internal directories.