repositories

package
v0.0.0-...-b0a7446 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCollection

func GetCollection(ientity models.IEntity) *mongo.Collection

Types

type Repository

type Repository[T models.IEntity] struct {
	// contains filtered or unexported fields
}

func NewRepository

func NewRepository[T models.IEntity]() Repository[T]

func (*Repository[T]) Delete

func (repository *Repository[T]) Delete(entity T) error

func (*Repository[T]) FindAll

func (repository *Repository[T]) FindAll() ([]T, error)

func (*Repository[T]) FindByID

func (repository *Repository[T]) FindByID(id string) (T, error)

func (*Repository[T]) Insert

func (repository *Repository[T]) Insert(entity T) error

func (*Repository[T]) Update

func (repository *Repository[T]) Update(entity T) error

Jump to

Keyboard shortcuts

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