Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CRUD ¶
type CRUD interface { GetItem(id primitive.ObjectID, t reflect.Type) (interface{}, error) SaveItem(id primitive.ObjectID, d interface{}) error UpdateOne(filter interface{}, d interface{}) (int64, error) Insert(d ...interface{}) ([]interface{}, error) Find(filter interface{}, opts ...*options.FindOptions) (*mongo.Cursor, error) FindOne(filter interface{}, opts ...*options.FindOneOptions) *mongo.SingleResult DeleteOne(filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error) Count(filter interface{}) int64 EnsureIndex(key string) EnsureIndexesRaw(idx mongo.IndexModel) error }
CRUD interface
type DbStorage ¶
type DbStorage struct {
// contains filtered or unexported fields
}
DbStorage struct
func NewMongoStorage ¶
NewMongoStorage initialize connection to storage
func (*DbStorage) GetDbCollection ¶
GetDbCollection func
Click to show internal directories.
Click to hide internal directories.