repositories

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chapter

type Chapter interface {
	Create(ctx context.Context, entity *models.Chapter) error
	Get(ctx context.Context, id string) (*models.Chapter, error)
	Update(ctx context.Context, entity *models.Chapter) error
	Delete(ctx context.Context, id string) error
	Search(ctx context.Context, filter *ChapterSearchFilter, pagination *db.Pagination, sortParams *db.SortParameters) ([]*models.Chapter, int, error)
	FindByName(ctx context.Context, name string) (*models.Chapter, error)
}

Chapter describes chapter repository contract

type ChapterSearchFilter

type ChapterSearchFilter struct {
	ChapterID string
	Name      string
	Slug      string
}

ChapterSearchFilter represents chapter entity collection search criteria

type Guild

type Guild interface {
	Create(ctx context.Context, entity *models.Guild) error
	Get(ctx context.Context, id string) (*models.Guild, error)
	Update(ctx context.Context, entity *models.Guild) error
	Delete(ctx context.Context, id string) error
	Search(ctx context.Context, filter *GuildSearchFilter, pagination *db.Pagination, sortParams *db.SortParameters) ([]*models.Guild, int, error)
	FindByName(ctx context.Context, name string) (*models.Guild, error)
}

Guild describes guild repository contract

type GuildSearchFilter

type GuildSearchFilter struct {
	GuildID string
	Name    string
	Slug    string
}

GuildSearchFilter represents guild entity collection search criteria

type Squad

type Squad interface {
	Create(ctx context.Context, entity *models.Squad) error
	Get(ctx context.Context, id string) (*models.Squad, error)
	Update(ctx context.Context, entity *models.Squad) error
	Delete(ctx context.Context, id string) error
	Search(ctx context.Context, filter *SquadSearchFilter, pagination *db.Pagination, sortParams *db.SortParameters) ([]*models.Squad, int, error)
	FindByName(ctx context.Context, name string) (*models.Squad, error)
}

Squad describes squad repository contract

type SquadSearchFilter

type SquadSearchFilter struct {
	SquadID string
	Name    string
	Slug    string
}

SquadSearchFilter represents squad entity collection search criteria

type Tribe

type Tribe interface {
	Create(ctx context.Context, entity *models.Tribe) error
	Get(ctx context.Context, id string) (*models.Tribe, error)
	Update(ctx context.Context, entity *models.Tribe) error
	Delete(ctx context.Context, id string) error
	Search(ctx context.Context, filter *TribeSearchFilter, pagination *db.Pagination, sortParams *db.SortParameters) ([]*models.Tribe, int, error)
	FindByName(ctx context.Context, name string) (*models.Tribe, error)
}

Tribe describes tribe repository contract

type TribeSearchFilter

type TribeSearchFilter struct {
	TribeID string
	Name    string
	Slug    string
}

TribeSearchFilter represents tribe entity collection search criteria

type User

type User interface {
	Create(ctx context.Context, entity *models.User) error
	Get(ctx context.Context, id string) (*models.User, error)
	Update(ctx context.Context, entity *models.User) error
	Delete(ctx context.Context, id string) error
	Search(ctx context.Context, filter *UserSearchFilter, pagination *db.Pagination, sortParams *db.SortParameters) ([]*models.User, int, error)
	FindByPrincipal(ctx context.Context, principal string) (*models.User, error)
}

User describes user repository contract

type UserSearchFilter

type UserSearchFilter struct {
	UserID    string
	Principal string
}

UserSearchFilter represents user entity collection search criteria

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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