Documentation
¶
Index ¶
- type GenericBaseMongoRepo
- func (g GenericBaseMongoRepo[T, J]) Create(ctx context.Context, j J) (string, error)
- func (g GenericBaseMongoRepo[T, J]) Delete(ctx context.Context, id string) error
- func (g GenericBaseMongoRepo[T, J]) FindBy(ctx context.Context, spec specification.Set) ([]J, error)
- func (g GenericBaseMongoRepo[T, J]) FindOneBy(ctx context.Context, spec specification.Set) (J, error)
- func (g GenericBaseMongoRepo[T, J]) NewSpecification(ctx context.Context) specification.Set
- func (g GenericBaseMongoRepo[T, J]) Update(ctx context.Context, id string, j J) error
- type GenericMongoRepo
- func (r GenericMongoRepo[T]) Create(ctx context.Context, entry T) (string, error)
- func (r GenericMongoRepo[T]) Delete(ctx context.Context, id string) error
- func (r GenericMongoRepo[T]) FindBy(ctx context.Context, spec specification.Set) ([]T, error)
- func (r GenericMongoRepo[T]) FindOneBy(ctx context.Context, spec specification.Set) (T, error)
- func (r GenericMongoRepo[T]) ToModel(a T) T
- func (r GenericMongoRepo[T]) Update(ctx context.Context, id string, entry T) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GenericBaseMongoRepo ¶
type GenericBaseMongoRepo[T database.Document, J database.Document] struct { GenericMongoRepo[T] // contains filtered or unexported fields }
func NewRepo ¶
func NewRepo[T database.Document, J database.Document](getter database.DataContextGetter, mapper database.Mapper[T, J]) GenericBaseMongoRepo[T, J]
func (GenericBaseMongoRepo[T, J]) Create ¶
func (g GenericBaseMongoRepo[T, J]) Create(ctx context.Context, j J) (string, error)
func (GenericBaseMongoRepo[T, J]) Delete ¶
func (g GenericBaseMongoRepo[T, J]) Delete(ctx context.Context, id string) error
func (GenericBaseMongoRepo[T, J]) FindBy ¶
func (g GenericBaseMongoRepo[T, J]) FindBy(ctx context.Context, spec specification.Set) ([]J, error)
func (GenericBaseMongoRepo[T, J]) FindOneBy ¶
func (g GenericBaseMongoRepo[T, J]) FindOneBy(ctx context.Context, spec specification.Set) (J, error)
func (GenericBaseMongoRepo[T, J]) NewSpecification ¶
func (g GenericBaseMongoRepo[T, J]) NewSpecification(ctx context.Context) specification.Set
type GenericMongoRepo ¶
func NewGenericMongoRepo ¶
func NewGenericMongoRepo[T database.Document](getter database.DataContextGetter) GenericMongoRepo[T]
func (GenericMongoRepo[T]) Create ¶
func (r GenericMongoRepo[T]) Create(ctx context.Context, entry T) (string, error)
func (GenericMongoRepo[T]) Delete ¶
func (r GenericMongoRepo[T]) Delete(ctx context.Context, id string) error
func (GenericMongoRepo[T]) FindBy ¶
func (r GenericMongoRepo[T]) FindBy(ctx context.Context, spec specification.Set) ([]T, error)
func (GenericMongoRepo[T]) FindOneBy ¶
func (r GenericMongoRepo[T]) FindOneBy(ctx context.Context, spec specification.Set) (T, error)
func (GenericMongoRepo[T]) ToModel ¶
func (r GenericMongoRepo[T]) ToModel(a T) T
Click to show internal directories.
Click to hide internal directories.