Documentation ¶
Index ¶
- type Mongo
- func (m *Mongo) Aggregate(ctx context.Context, project, col string, req *model.AggregateRequest) (interface{}, error)
- func (m *Mongo) Batch(ctx context.Context, project string, txRequest *model.BatchRequest) error
- func (m *Mongo) Close() error
- func (m *Mongo) Create(ctx context.Context, project, col string, req *model.CreateRequest) error
- func (m *Mongo) Delete(ctx context.Context, project, col string, req *model.DeleteRequest) error
- func (m *Mongo) GetDBType() utils.DBType
- func (m *Mongo) Read(ctx context.Context, project, col string, req *model.ReadRequest) (interface{}, error)
- func (m *Mongo) Update(ctx context.Context, project, col string, req *model.UpdateRequest) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mongo ¶
type Mongo struct {
// contains filtered or unexported fields
}
Mongo holds the mongo session
func (*Mongo) Aggregate ¶
func (m *Mongo) Aggregate(ctx context.Context, project, col string, req *model.AggregateRequest) (interface{}, error)
Aggregate performs a mongo db pipeline aggregation
Source Files ¶
Click to show internal directories.
Click to hide internal directories.