mongo

package
v0.0.0-...-5d22fbd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

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 (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

func (GenericBaseMongoRepo[T, J]) Update

func (g GenericBaseMongoRepo[T, J]) Update(ctx context.Context, id string, j J) error

type GenericMongoRepo

type GenericMongoRepo[T database.Document] struct {
	// contains filtered or unexported fields
}

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

func (GenericMongoRepo[T]) Update

func (r GenericMongoRepo[T]) Update(ctx context.Context, id string, entry T) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL