Documentation
¶
Index ¶
- func CloseSingletonClient(url string, ctx context.Context)
- func GetMongoSingletonClient(url string, ctx context.Context) (*mongo.Client, error)
- type LazyMongoFilter
- func All() LazyMongoFilter
- func And(filters ...LazyMongoFilter) LazyMongoFilter
- func Eq(key string, value any) LazyMongoFilter
- func Gt(key string, value any) LazyMongoFilter
- func Gte(key string, value any) LazyMongoFilter
- func In(key string, values ...any) LazyMongoFilter
- func Lt(key string, value any) LazyMongoFilter
- func Lte(key string, value any) LazyMongoFilter
- func MarshalToFilter(data any) (LazyMongoFilter, error)
- func Ne(key string, value any) LazyMongoFilter
- func Nin(key string, values ...any) LazyMongoFilter
- func Nor(filters ...LazyMongoFilter) LazyMongoFilter
- func Not(filter LazyMongoFilter) LazyMongoFilter
- func Or(filters ...LazyMongoFilter) LazyMongoFilter
- func (uE LazyMongoFilter) Build() any
- func (f LazyMongoFilter) Eq(key string, value any) LazyMongoFilter
- func (f LazyMongoFilter) Gt(key string, value any) LazyMongoFilter
- func (f LazyMongoFilter) Gte(key string, value any) LazyMongoFilter
- func (f LazyMongoFilter) In(key string, values ...any) LazyMongoFilter
- func (f LazyMongoFilter) Lt(key string, value any) LazyMongoFilter
- func (f LazyMongoFilter) Lte(key string, value any) LazyMongoFilter
- func (f LazyMongoFilter) Ne(key string, value any) LazyMongoFilter
- func (f LazyMongoFilter) Nin(key string, values ...any) LazyMongoFilter
- type LazyMongoRepository
- func (r *LazyMongoRepository) Add(ctx context.Context, data any, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error)
- func (r *LazyMongoRepository) AddMany(ctx context.Context, data []any, opts ...*options.InsertManyOptions) (*mongo.InsertManyResult, error)
- func (r *LazyMongoRepository) Count(ctx context.Context, filter LazyMongoFilter, opts ...*options.CountOptions) (int64, error)
- func (r *LazyMongoRepository) CreateIndex(ctx context.Context, model mongo.IndexModel, ...) (string, error)
- func (r *LazyMongoRepository) CreateSimpleAscendingIndex(ctx context.Context, key string, opts ...*options.CreateIndexesOptions) (string, error)
- func (r *LazyMongoRepository) CreateSimpleUniqueAscendingIndex(ctx context.Context, key string, opts ...*options.CreateIndexesOptions) (string, error)
- func (r *LazyMongoRepository) Delete(ctx context.Context, filter LazyMongoFilter, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
- func (r *LazyMongoRepository) DeleteIndex(ctx context.Context, indexName string, opts ...*options.DropIndexesOptions) (bson.Raw, error)
- func (r *LazyMongoRepository) DeleteMany(ctx context.Context, filter LazyMongoFilter, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
- func (r *LazyMongoRepository) Exist(ctx context.Context, filter LazyMongoFilter, opts ...*options.CountOptions) (bool, error)
- func (r *LazyMongoRepository) Get(ctx context.Context, filter LazyMongoFilter, out any, ...) error
- func (r *LazyMongoRepository) GetCollection(ctx context.Context) (*mongo.Collection, error)
- func (r *LazyMongoRepository) Select(ctx context.Context, filter LazyMongoFilter, opts ...*options.FindOptions) (*mongo.Cursor, error)
- func (r *LazyMongoRepository) Update(ctx context.Context, filter LazyMongoFilter, update LazyMongoUpdater, ...) (*mongo.UpdateResult, error)
- func (r *LazyMongoRepository) UpdateMany(ctx context.Context, filter LazyMongoFilter, update LazyMongoUpdater, ...) (*mongo.UpdateResult, error)
- func (r *LazyMongoRepository) Upsert(ctx context.Context, filter LazyMongoFilter, update LazyMongoUpdater) (*mongo.UpdateResult, error)
- type LazyMongoUpdater
- func AddToSet(key string, values ...any) LazyMongoUpdater
- func Inc(key string, value int) LazyMongoUpdater
- func MarshalToUpdater(data any) LazyMongoUpdater
- func Pop(key string, head bool) LazyMongoUpdater
- func Pull(key string, values ...any) LazyMongoUpdater
- func Push(key string, values ...any) LazyMongoUpdater
- func Set(doc any) LazyMongoUpdater
- func SetKey(key string, value any) LazyMongoUpdater
- func (update LazyMongoUpdater) AddToSet(key string, values ...any) LazyMongoUpdater
- func (uE LazyMongoUpdater) Build() any
- func (update LazyMongoUpdater) Inc(key string, value int) LazyMongoUpdater
- func (update LazyMongoUpdater) Pop(key string, head bool) LazyMongoUpdater
- func (update LazyMongoUpdater) Pull(key string, values ...any) LazyMongoUpdater
- func (update LazyMongoUpdater) Push(key string, values ...any) LazyMongoUpdater
- func (update LazyMongoUpdater) Set(doc any) LazyMongoUpdater
- func (update LazyMongoUpdater) SetKey(key string, value any) LazyMongoUpdater
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseSingletonClient ¶
Types ¶
type LazyMongoFilter ¶
func All ¶
func All() LazyMongoFilter
func And ¶
func And(filters ...LazyMongoFilter) LazyMongoFilter
func Eq ¶
func Eq(key string, value any) LazyMongoFilter
func Gt ¶
func Gt(key string, value any) LazyMongoFilter
func Gte ¶
func Gte(key string, value any) LazyMongoFilter
func In ¶
func In(key string, values ...any) LazyMongoFilter
func Lt ¶
func Lt(key string, value any) LazyMongoFilter
func Lte ¶
func Lte(key string, value any) LazyMongoFilter
func MarshalToFilter ¶
func MarshalToFilter(data any) (LazyMongoFilter, error)
func Ne ¶
func Ne(key string, value any) LazyMongoFilter
func Nin ¶
func Nin(key string, values ...any) LazyMongoFilter
func Nor ¶
func Nor(filters ...LazyMongoFilter) LazyMongoFilter
func Not ¶
func Not(filter LazyMongoFilter) LazyMongoFilter
func Or ¶
func Or(filters ...LazyMongoFilter) LazyMongoFilter
func (LazyMongoFilter) Build ¶
func (uE LazyMongoFilter) Build() any
func (LazyMongoFilter) Eq ¶
func (f LazyMongoFilter) Eq(key string, value any) LazyMongoFilter
func (LazyMongoFilter) Gt ¶
func (f LazyMongoFilter) Gt(key string, value any) LazyMongoFilter
func (LazyMongoFilter) Gte ¶
func (f LazyMongoFilter) Gte(key string, value any) LazyMongoFilter
func (LazyMongoFilter) In ¶
func (f LazyMongoFilter) In(key string, values ...any) LazyMongoFilter
func (LazyMongoFilter) Lt ¶
func (f LazyMongoFilter) Lt(key string, value any) LazyMongoFilter
func (LazyMongoFilter) Lte ¶
func (f LazyMongoFilter) Lte(key string, value any) LazyMongoFilter
func (LazyMongoFilter) Ne ¶
func (f LazyMongoFilter) Ne(key string, value any) LazyMongoFilter
func (LazyMongoFilter) Nin ¶
func (f LazyMongoFilter) Nin(key string, values ...any) LazyMongoFilter
type LazyMongoRepository ¶
func (*LazyMongoRepository) Add ¶
func (r *LazyMongoRepository) Add(ctx context.Context, data any, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error)
func (*LazyMongoRepository) AddMany ¶
func (r *LazyMongoRepository) AddMany(ctx context.Context, data []any, opts ...*options.InsertManyOptions) (*mongo.InsertManyResult, error)
func (*LazyMongoRepository) Count ¶
func (r *LazyMongoRepository) Count(ctx context.Context, filter LazyMongoFilter, opts ...*options.CountOptions) (int64, error)
func (*LazyMongoRepository) CreateIndex ¶
func (r *LazyMongoRepository) CreateIndex(ctx context.Context, model mongo.IndexModel, opts ...*options.CreateIndexesOptions) (string, error)
func (*LazyMongoRepository) CreateSimpleAscendingIndex ¶
func (r *LazyMongoRepository) CreateSimpleAscendingIndex(ctx context.Context, key string, opts ...*options.CreateIndexesOptions) (string, error)
func (*LazyMongoRepository) CreateSimpleUniqueAscendingIndex ¶
func (r *LazyMongoRepository) CreateSimpleUniqueAscendingIndex(ctx context.Context, key string, opts ...*options.CreateIndexesOptions) (string, error)
func (*LazyMongoRepository) Delete ¶
func (r *LazyMongoRepository) Delete(ctx context.Context, filter LazyMongoFilter, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
func (*LazyMongoRepository) DeleteIndex ¶
func (r *LazyMongoRepository) DeleteIndex(ctx context.Context, indexName string, opts ...*options.DropIndexesOptions) (bson.Raw, error)
func (*LazyMongoRepository) DeleteMany ¶
func (r *LazyMongoRepository) DeleteMany(ctx context.Context, filter LazyMongoFilter, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
func (*LazyMongoRepository) Exist ¶
func (r *LazyMongoRepository) Exist(ctx context.Context, filter LazyMongoFilter, opts ...*options.CountOptions) (bool, error)
func (*LazyMongoRepository) Get ¶
func (r *LazyMongoRepository) Get(ctx context.Context, filter LazyMongoFilter, out any, opts ...*options.FindOneOptions) error
func (*LazyMongoRepository) GetCollection ¶
func (r *LazyMongoRepository) GetCollection(ctx context.Context) (*mongo.Collection, error)
func (*LazyMongoRepository) Select ¶
func (r *LazyMongoRepository) Select(ctx context.Context, filter LazyMongoFilter, opts ...*options.FindOptions) (*mongo.Cursor, error)
func (*LazyMongoRepository) Update ¶
func (r *LazyMongoRepository) Update(ctx context.Context, filter LazyMongoFilter, update LazyMongoUpdater, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)
func (*LazyMongoRepository) UpdateMany ¶
func (r *LazyMongoRepository) UpdateMany(ctx context.Context, filter LazyMongoFilter, update LazyMongoUpdater, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)
func (*LazyMongoRepository) Upsert ¶
func (r *LazyMongoRepository) Upsert(ctx context.Context, filter LazyMongoFilter, update LazyMongoUpdater) (*mongo.UpdateResult, error)
type LazyMongoUpdater ¶
func AddToSet ¶
func AddToSet(key string, values ...any) LazyMongoUpdater
func Inc ¶
func Inc(key string, value int) LazyMongoUpdater
func MarshalToUpdater ¶
func MarshalToUpdater(data any) LazyMongoUpdater
func Pop ¶
func Pop(key string, head bool) LazyMongoUpdater
func Pull ¶
func Pull(key string, values ...any) LazyMongoUpdater
func Push ¶
func Push(key string, values ...any) LazyMongoUpdater
func Set ¶
func Set(doc any) LazyMongoUpdater
func SetKey ¶
func SetKey(key string, value any) LazyMongoUpdater
func (LazyMongoUpdater) AddToSet ¶
func (update LazyMongoUpdater) AddToSet(key string, values ...any) LazyMongoUpdater
func (LazyMongoUpdater) Build ¶
func (uE LazyMongoUpdater) Build() any
func (LazyMongoUpdater) Inc ¶
func (update LazyMongoUpdater) Inc(key string, value int) LazyMongoUpdater
func (LazyMongoUpdater) Pop ¶
func (update LazyMongoUpdater) Pop(key string, head bool) LazyMongoUpdater
func (LazyMongoUpdater) Pull ¶
func (update LazyMongoUpdater) Pull(key string, values ...any) LazyMongoUpdater
func (LazyMongoUpdater) Push ¶
func (update LazyMongoUpdater) Push(key string, values ...any) LazyMongoUpdater
func (LazyMongoUpdater) Set ¶
func (update LazyMongoUpdater) Set(doc any) LazyMongoUpdater
func (LazyMongoUpdater) SetKey ¶
func (update LazyMongoUpdater) SetKey(key string, value any) LazyMongoUpdater
Click to show internal directories.
Click to hide internal directories.