Versions in this module Expand all Collapse all v0 v0.1.1 Mar 28, 2022 v0.1.0 Mar 28, 2022 Changes in this version + var DBInit Init + var DBService DBHelper + type DBHelper interface + Aggregate func(ctx context.Context, collname string, pipeline []map[string]interface{}, ...) error + CountDocuments func(ctx context.Context, collname string, filter map[string]interface{}) (int64, error) + CreateMany func(ctx context.Context, collname string, recs ...interface{}) error + CreateOne func(ctx context.Context, collname string, rec interface{}) error + FindOne func(ctx context.Context, collname string, value interface{}, options ...FindOption) error + FindOneAndDelete func(ctx context.Context, collname string, filter map[string]interface{}, ...) error + List func(ctx context.Context, collname string, value interface{}, options ...FindOption) (*Page, error) + Pull func(ctx context.Context, collname string, filter map[string]interface{}, ...) error + RemoveMany func(ctx context.Context, collname string, filter map[string]interface{}) error + Unmark func(ctx context.Context, collname string, filter map[string]interface{}, ...) error + UpdateMany func(ctx context.Context, collname string, filter interface{}, update interface{}) (*mongo.UpdateResult, error) + UpdateOne func(ctx context.Context, collname string, filter map[string]interface{}, ...) error + UpdateOneMore func(ctx context.Context, collname string, filter map[string]interface{}, ...) error + type FindOption func(*FindOptions) + func WithExactLabels() FindOption + func WithFilters(filter map[string]interface{}) FindOption + func WithLabels(labels map[string]string) FindOption + func WithLimit(limit int64) FindOption + func WithOffset(offset int64) FindOption + func WithProjection(projection map[string]interface{}) FindOption + func WithSort(sort map[string]int32) FindOption + func WithTimeout(d time.Duration) FindOption + type FindOptions struct + ExactLabels bool + Filters map[string]interface{} + Labels map[string]string + Limit int64 + Offset int64 + Projection map[string]interface{} + Sort map[string]int32 + Timeout time.Duration + func NewDefaultFindOpts() FindOptions + type Init func(t ...reflect.Type) error + type Page struct + PageNum int64 + PageSize int64 + Pages int64 + Total int64 + func (r *Page) CorrectPagination(offset, limit int64, count int) + func (r *Page) StartRecord() int64