Documentation ¶
Index ¶
- func ChapterMustExists(chapters repositories.Chapter, id string, entity *models.Chapter) func(ctx context.Context) error
- func ChapterNameMustBeUnique(chapters repositories.Chapter, name string) func(ctx context.Context) error
- func GuildMustExists(guilds repositories.Guild, id string, entity *models.Guild) func(ctx context.Context) error
- func GuildNameMustBeUnique(guilds repositories.Guild, name string) func(ctx context.Context) error
- func MustBeAName(value string) func(context.Context) error
- func MustBeAnIdentifier(value string) func(context.Context) error
- func MustBeValid(validable Validable) func(context.Context) error
- func MustNotBeNil(object interface{}, message string) func(context.Context) error
- func SquadMustExists(squads repositories.Squad, id string, entity *models.Squad) func(ctx context.Context) error
- func SquadNameMustBeUnique(squads repositories.Squad, name string) func(ctx context.Context) error
- func TribeMustExists(tribes repositories.Tribe, id string, entity *models.Tribe) func(ctx context.Context) error
- func TribeNameMustBeUnique(tribes repositories.Tribe, name string) func(ctx context.Context) error
- func UserMustExists(users repositories.User, id string, entity *models.User) func(ctx context.Context) error
- func UserPrincipalMustBeUnique(users repositories.User, principal string) func(ctx context.Context) error
- func Validate(ctx context.Context, constraints ...Builder) error
- type Builder
- type EntityRetrieverFunc
- type Validable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChapterMustExists ¶
func ChapterMustExists(chapters repositories.Chapter, id string, entity *models.Chapter) func(ctx context.Context) error
ChapterMustExists specification checks if given chapter exists
func ChapterNameMustBeUnique ¶
func ChapterNameMustBeUnique(chapters repositories.Chapter, name string) func(ctx context.Context) error
ChapterNameMustBeUnique returns specification for chapter name uniqueness
func GuildMustExists ¶
func GuildMustExists(guilds repositories.Guild, id string, entity *models.Guild) func(ctx context.Context) error
GuildMustExists specification checks if given guild exists
func GuildNameMustBeUnique ¶
GuildNameMustBeUnique returns specification for chapter name uniqueness
func MustBeAName ¶
MustBeAName returns a ID contraint validator
func MustBeAnIdentifier ¶
MustBeAnIdentifier returns a ID contraint validator
func MustBeValid ¶
MustBeValid specification checks that given object is valid
func MustNotBeNil ¶
MustNotBeNil specification checks that given object is not nil
func SquadMustExists ¶
func SquadMustExists(squads repositories.Squad, id string, entity *models.Squad) func(ctx context.Context) error
SquadMustExists specification checks if given squad exists
func SquadNameMustBeUnique ¶
SquadNameMustBeUnique returns specification for squad name uniqueness
func TribeMustExists ¶
func TribeMustExists(tribes repositories.Tribe, id string, entity *models.Tribe) func(ctx context.Context) error
TribeMustExists specification checks if given tribe exists
func TribeNameMustBeUnique ¶
TribeNameMustBeUnique returns specification for tribe name uniqueness
func UserMustExists ¶
func UserMustExists(users repositories.User, id string, entity *models.User) func(ctx context.Context) error
UserMustExists specification checks if given user exists
Types ¶
type EntityRetrieverFunc ¶
EntityRetrieverFunc describes function indirection for repositories