Documentation ¶
Index ¶
- func Disconnect(client *Client)
- type Client
- type Collection
- func (c Collection) Add(ctx context.Context, filters []repository.Filter, key string) (float64, error)
- func (c Collection) Count(ctx context.Context, filters []repository.Filter) (int64, error)
- func (c Collection) Create(ctx context.Context, model interface{}) (repository.Copier, error)
- func (c Collection) Delete(ctx context.Context, id primitive.Id) (int64, error)
- func (c Collection) FindById(ctx context.Context, id primitive.Id) (repository.Copier, error)
- func (c Collection) FindSingle(ctx context.Context, filters []repository.Filter) (repository.Copier, error)
- func (c Collection) IncrementById(ctx context.Context, id primitive.Id, Key string, incrementBy int) error
- func (c Collection) Patch(ctx context.Context, id primitive.Id, patches []repository.Patch) error
- func (c Collection) Replace(ctx context.Context, id primitive.Id, value interface{}) (repository.Copier, error)
- func (c Collection) Set(ctx context.Context, filters []repository.Filter, Key string, ...) error
- func (c Collection) SetAll(ctx context.Context, filters []repository.Filter, ...) error
- func (c Collection) SetAllById(ctx context.Context, id primitive.Id, keyValues []repository.KeyValue) error
- func (c Collection) SetById(ctx context.Context, id primitive.Id, Key string, Value interface{}) error
- func (c Collection) UnSet(ctx context.Context, filters []repository.Filter, Key string) error
- type Copier
- type ListCopier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Collection ¶
type Collection struct {
*mongo.Collection
}
func (Collection) Add ¶
func (c Collection) Add(ctx context.Context, filters []repository.Filter, key string) (float64, error)
func (Collection) Count ¶
func (c Collection) Count(ctx context.Context, filters []repository.Filter) (int64, error)
func (Collection) Create ¶
func (c Collection) Create(ctx context.Context, model interface{}) (repository.Copier, error)
func (Collection) FindById ¶
func (c Collection) FindById(ctx context.Context, id primitive.Id) (repository.Copier, error)
func (Collection) FindSingle ¶
func (c Collection) FindSingle(ctx context.Context, filters []repository.Filter) (repository.Copier, error)
func (Collection) IncrementById ¶
func (Collection) Patch ¶
func (c Collection) Patch(ctx context.Context, id primitive.Id, patches []repository.Patch) error
func (Collection) Replace ¶
func (c Collection) Replace(ctx context.Context, id primitive.Id, value interface{}) (repository.Copier, error)
func (Collection) Set ¶
func (c Collection) Set(ctx context.Context, filters []repository.Filter, Key string, value interface{}) error
func (Collection) SetAll ¶
func (c Collection) SetAll(ctx context.Context, filters []repository.Filter, keyValues []repository.KeyValue) error
func (Collection) SetAllById ¶
func (c Collection) SetAllById(ctx context.Context, id primitive.Id, keyValues []repository.KeyValue) error
func (Collection) UnSet ¶
func (c Collection) UnSet(ctx context.Context, filters []repository.Filter, Key string) error
type ListCopier ¶
type ListCopier struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.