Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMissingResumeToken = mongo.ErrMissingResumeToken ErrNilCursor = mongo.ErrNilCursor ErrUnacknowledgedWrite = mongo.ErrUnacknowledgedWrite ErrClientDisconnected = mongo.ErrClientDisconnected ErrNilDocument = mongo.ErrNilDocument ErrEmptySlice = mongo.ErrEmptySlice ErrInvalidIndexValue = mongo.ErrInvalidIndexValue ErrNonStringIndexName = mongo.ErrNonStringIndexName ErrMultipleIndexDrop = mongo.ErrMultipleIndexDrop ErrWrongClient = mongo.ErrWrongClient ErrNoDocuments = mongo.ErrNoDocuments )
Reexported mongo errors
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database interface { Client() *Client Context() context.Context Name() string New(ctx context.Context) Database GetCollectionOf(document interface{}) *Collection Count(target interface{}, filters ...interface{}) (int64, error) DeleteArray(target interface{}) error DeleteOne(target interface{}, filters ...interface{}) error LoadArray(target interface{}, filters ...interface{}) error LoadOne(target interface{}, filters ...interface{}) error LoadStream(target interface{}, filters ...interface{}) (StreamLoader, error) SaveOne(source interface{}) error IndexEnsure(cfg interface{}, document interface{}) error }
Database is the mongox database interface
type InterfaceBased ¶
type InterfaceBased interface { GetID() interface{} SetID(id interface{}) }
InterfaceBased is an interface for documents that have custom declated type for the _id field
type StreamLoader ¶
type StreamLoader interface { Cursor() *Cursor DecodeNext() error Decode() error Next() error Close() error Err() error }
StreamLoader is a interface to control database cursor
type StringBased ¶
StringBased is an interface for documents that have string type for the _id field
Click to show internal directories.
Click to hide internal directories.