Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Collection ¶
type Collection interface {
FindOne(ctx context.Context, filter interface{}, v interface{}) error
InsertOne(ctx context.Context, document interface{}) (id interface{}, error error)
UpdateOne(ctx context.Context, filter interface{}, update interface{}) (modified int64, error error)
Find(ctx context.Context, filter interface{}) (cur Cursor, err error)
ReplaceOne(ctx context.Context, filter interface{}, replacement interface{}) (modified int64, error error)
}
func NewCollection ¶
func NewCollection( log log.LogRusEntry, database *mongo.Database, collectionName string, onError func(error), indexes ...string, ) (col Collection, err error)
Click to show internal directories.
Click to hide internal directories.