Documentation
¶
Index ¶
- type MongoAdapter
- func (m *MongoAdapter) Create(entity any) error
- func (m *MongoAdapter) Delete(id string, entity any) error
- func (m *MongoAdapter) FindAll(entity any, filters map[string]any, pagination db.Pagination, sort []db.Sort) (any, error)
- func (m *MongoAdapter) FindByID(id string, entity any) (any, error)
- func (m *MongoAdapter) Init() error
- func (m *MongoAdapter) Migrate(entities []any) error
- func (m *MongoAdapter) Update(entity any) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoAdapter ¶
type MongoAdapter struct {
// contains filtered or unexported fields
}
func New ¶
func New(uri string, dbName string) *MongoAdapter
func (*MongoAdapter) Create ¶
func (m *MongoAdapter) Create(entity any) error
func (*MongoAdapter) FindAll ¶
func (m *MongoAdapter) FindAll(entity any, filters map[string]any, pagination db.Pagination, sort []db.Sort) (any, error)
func (*MongoAdapter) Init ¶
func (m *MongoAdapter) Init() error
func (*MongoAdapter) Migrate ¶
func (m *MongoAdapter) Migrate(entities []any) error
func (*MongoAdapter) Update ¶
func (m *MongoAdapter) Update(entity any) error
Click to show internal directories.
Click to hide internal directories.