repository

package
v0.0.0-...-ed03793 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2024 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FindManyOptions

type FindManyOptions struct {
	Orderings []Ordering
	Limit     int
	Offset    int
	Relations []string
}

type FindOptions

type FindOptions struct {
	Relations []string
}

type Ordering

type Ordering struct {
	By   string
	Desc bool
}

type Repository

type Repository[T any] interface {
	Exists(context.Context, entity.Clause) (bool, error)
	Count(context.Context, entity.Clause) (int, error)
	FindMany(context.Context, entity.Clause, FindManyOptions) ([]*T, error)
	Find(context.Context, entity.Clause, FindOptions) (*T, error)
	Create(context.Context, *T) (*T, error)
	Update(context.Context, *T) error
	Delete(context.Context, entity.Clause) error
}

Directories

Path Synopsis
Package repositorymock is a generated GoMock package.
Package repositorymock is a generated GoMock package.

Jump to

Keyboard shortcuts

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