Documentation
¶
Index ¶
- type MongoDBStorage
- func (m *MongoDBStorage) Add(ctx context.Context, collection string, data any) error
- func (m *MongoDBStorage) Delete(ctx context.Context, collection string, filter any) error
- func (m *MongoDBStorage) Exists(ctx context.Context, collection string, filter any) (bool, error)
- func (m *MongoDBStorage) Get(ctx context.Context, collection string, data, filter any) error
- func (m *MongoDBStorage) GetAll(ctx context.Context, collection string, data, filter any) error
- func (m *MongoDBStorage) GetAndDelete(ctx context.Context, collection string, data, filter any) error
- func (m *MongoDBStorage) GetAndUpdate(ctx context.Context, collection string, data, filter, update any) error
- func (m *MongoDBStorage) Init(dbName string) error
- func (m *MongoDBStorage) Update(ctx context.Context, collection string, filter, update any) error
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoDBStorage ¶
type MongoDBStorage struct {
// contains filtered or unexported fields
}
func (*MongoDBStorage) GetAndDelete ¶
func (*MongoDBStorage) GetAndUpdate ¶
func (*MongoDBStorage) Init ¶
func (m *MongoDBStorage) Init(dbName string) error
type Storage ¶
type Storage interface { Init(string) error Get(context.Context, string, any, any) error Add(context.Context, string, any) error GetAndDelete(context.Context, string, any, any) error GetAndUpdate(context.Context, string, any, any, any) error Delete(context.Context, string, any) error Update(context.Context, string, any, any) error GetAll(context.Context, string, any, any) error Exists(context.Context, string, any) (bool, error) }
Click to show internal directories.
Click to hide internal directories.