data

package
v0.0.0-...-16d05a1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CRUDRepo

type CRUDRepo[T any] interface {
	GORMDBGetter
	CreatorRepo[T]
	GetterRepo[T]
	UpdaterRepo[T]
	DeleterRepo[T]
}

type CreatorRepo

type CreatorRepo[T any] interface {
	Add(obj *T) error
	AddMany(objs []*T) error
}

type DeleterRepo

type DeleterRepo[T any] interface {
	Delete(obj T, conds ...any) error
	DeleteAll(conds ...any) error
}

type GORMDBGetter

type GORMDBGetter interface {
	GetDB() *gorm.DB
}

type GetterRepo

type GetterRepo[T any] interface {
	Exists(id uint) bool
	Get(id uint) (T, error)
	GetByConds(conds ...any) ([]T, error)
	GetAll() ([]T, error)
	Count() (int64, error)
}

type Many2ManyCRUDRepo

type Many2ManyCRUDRepo[T any, T2 any] interface {
	CRUDRepo[T]
	// AppendMany2Many(src T, associated T2) error
	GetByAssociation(associated T2) ([]T, error)
}

type OrganizeContestCRUDRepo

OrganizeContestCRUDRepo is an interface that allows full CRUD operations of a organzier on a contest on a certain data source :)

type OrganizeContestCreatorRepo

type OrganizeContestCreatorRepo interface {
	Add(contest *models.OrganizeContest) error
}

OrganizeContestCreatorRepo is an interface that allows creation of a organizer on a contest into a certain data source :)

type OrganizeContestDeleterRepo

type OrganizeContestDeleterRepo interface {
	Delete(oc models.OrganizeContest) error
	DeleteAll() error
}

OrganizeContestDeleterRepo is an interface that allows deleting values of a organizer on a contest from a certain data source :)

type OrganizeContestGetterRepo

type OrganizeContestGetterRepo interface {
	Exists(oc models.OrganizeContest) (bool, error)
	Get(oc models.OrganizeContest) (models.OrganizeContest, error)
	GetOrgs(contest models.Contest) ([]models.Organizer, error)
	GetContests(org models.Organizer) ([]models.Contest, error)
	Count() (int64, error)
}

OrganizeContestGetterRepo is an interface that allows getting values of a organizer on a contest from a certain data source :)

type OrganizeContestUpdaterRepo

type OrganizeContestUpdaterRepo interface {
	Update(oc *models.OrganizeContest) error
}

OrganizeContestUpdaterRepo is an interface that allows updating values of a organizer on a contest in a certain data source :)

type UpdaterRepo

type UpdaterRepo[T any] interface {
	Update(obj *T, conds ...any) error
	UpdateAll(objs []*T, conds ...any) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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