Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type Collection interface { Find(ctx context.Context, filter interface{}) (Cursor, error) InsertOne(ctx context.Context, document interface{}) (*mongo.InsertOneResult, error) UpdateOrAddOne(ctx context.Context, filter, update interface{}) (*mongo.UpdateResult, error) DeleteOne(ctx context.Context, filter interface{}) (*mongo.DeleteResult, error) }
type Database ¶
type Database interface {
Collection(name string) Collection
}
type MongoDB ¶
type MongoDB interface { Put(ctx context.Context, database, collection string, filter, update interface{}) error GetAll(ctx context.Context, database, collection string, data interface{}) error Delete(ctx context.Context, database, collection string, filter interface{}) error Close(ctx context.Context) error }
Click to show internal directories.
Click to hide internal directories.