enums

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const AnimeLatestOrderByDEFAULT = AnimeLatestOrderByCREATEDAT
View Source
const AnimeOrderByDEFAULT = AnimeOrderByID
View Source
const EpisodeLatestOrderByDEFAULT = EpisodeLatestOrderByCREATEDAT
View Source
const OrderByDirectionDEFAULT = OrderByDirectionDESCENDING
View Source
const TitleOrderByDEFAULT = TitleOrderByCREATEDAT

Variables

View Source
var (
	PossibleAnimeLatestOrderBy = [...]string{
		AnimeLatestOrderByID.String(),
		AnimeLatestOrderByCREATEDAT.String(),
		AnimeLatestOrderBySCORE.String(),
	}

	ErrUnexpectedAnimeLatestOrderByValue = apperror.NewError(
		http.StatusBadRequest,
		`unexpected_anime_latest_order_by_value`,
		fmt.Errorf(
			"expected one of the following values: [`%s`]",
			sliceutil.SurroundWith(',', PossibleAnimeLatestOrderBy),
		),
	)
)
View Source
var (
	PossibleAnimeOrderBy = [...]string{
		AnimeOrderByID.String(),
		AnimeOrderByTITLE.String(),
		AnimeOrderBySCORE.String(),
		AnimeOrderByNEXTAIRINGDATE.String(),
		AnimeOrderBySTARTDATE.String(),
	}

	ErrUnexpectedAnimeOrderByValue = apperror.NewError(
		http.StatusBadRequest,
		`unexpected_anime_order_by_value`,
		fmt.Errorf(
			"expected one of the following values: [`%s`]",
			sliceutil.SurroundWith(',', PossibleAnimeOrderBy),
		),
	)
)
View Source
var (
	PossibleEpisodeLatestOrderBy = [...]string{
		EpisodeLatestOrderByCREATEDAT.String(),
		EpisodeLatestOrderBySIZE.String(),
		EpisodeLatestOrderBySCORE.String(),
		EpisodeLatestOrderByDURATION.String(),
	}

	ErrUnexpectedEpisodeLatestOrderByValue = apperror.NewError(
		http.StatusBadRequest,
		`unexpected_episode_latest_order_by_value`,
		fmt.Errorf(
			"expected one of the following values: [`%s`]",
			sliceutil.SurroundWith(',', PossibleEpisodeLatestOrderBy),
		),
	)
)
View Source
var (
	PossibleTitleOrderBy = [...]string{
		TitleOrderByID.String(),
		TitleOrderByCREATEDAT.String(),
	}

	ErrUnexpectedTitleOrderByValue = apperror.NewError(
		http.StatusBadRequest,
		`unexpected_title_order_by_value`,
		fmt.Errorf(
			"expected one of the following values: [`%s`]",
			sliceutil.SurroundWith(',', PossibleTitleOrderBy),
		),
	)
)
View Source
var (
	PossibleOrderByDirection = [...]string{
		OrderByDirectionASCENDING.String(),
		OrderByDirectionDESCENDING.String(),
	}

	ErrUnexpectedOrderByDirectionValue = apperror.NewError(
		http.StatusBadRequest,
		`unexpected_order_by_direction_value`,
		fmt.Errorf(
			"expected one of the following values: [`%s`]",
			sliceutil.SurroundWith(',', PossibleOrderByDirection),
		),
	)
)

Functions

func OrderByDirectionIsDescending

func OrderByDirectionIsDescending(direction string) bool

func ValidateAnimeLatestOrderBy

func ValidateAnimeLatestOrderBy(orderBy *string) error

func ValidateAnimeOrderBy

func ValidateAnimeOrderBy(orderBy *string) error

func ValidateEpisodeLatestOrderBy

func ValidateEpisodeLatestOrderBy(orderBy *string) error

func ValidateOrderByDirection

func ValidateOrderByDirection(direction *string) error

func ValidateTitleOrderBy

func ValidateTitleOrderBy(orderBy *string) error

Types

type AnimeFormat

type AnimeFormat string
const (
	AnimeFormatUNDEFINED AnimeFormat = "UNDEFINED"
	AnimeFormatTV        AnimeFormat = "TV"
	AnimeFormatTVSHORT   AnimeFormat = "TV_SHORT"
	AnimeFormatOVA       AnimeFormat = "OVA"
	AnimeFormatMOVIE     AnimeFormat = "MOVIE"
	AnimeFormatSPECIAL   AnimeFormat = "SPECIAL"
	AnimeFormatONA       AnimeFormat = "ONA"
	AnimeFormatMUSIC     AnimeFormat = "MUSIC"
)

func (AnimeFormat) Enum

func (e AnimeFormat) Enum() *AnimeFormat

func (*AnimeFormat) Scan

func (e *AnimeFormat) Scan(src interface{}) error

type AnimeFormats

type AnimeFormats []*AnimeFormat

type AnimeFormatsSortByValue

type AnimeFormatsSortByValue AnimeFormats

func (AnimeFormatsSortByValue) Len

func (a AnimeFormatsSortByValue) Len() int

func (AnimeFormatsSortByValue) Less

func (a AnimeFormatsSortByValue) Less(i, j int) bool

func (AnimeFormatsSortByValue) Swap

func (a AnimeFormatsSortByValue) Swap(i, j int)

type AnimeLatestOrderBy

type AnimeLatestOrderBy string
const (
	AnimeLatestOrderByID        AnimeLatestOrderBy = "id"
	AnimeLatestOrderByCREATEDAT AnimeLatestOrderBy = "createdAt"
	AnimeLatestOrderBySCORE     AnimeLatestOrderBy = "score"
)

func (AnimeLatestOrderBy) Enum

func (AnimeLatestOrderBy) String

func (a AnimeLatestOrderBy) String() string

type AnimeOrderBy

type AnimeOrderBy string
const (
	AnimeOrderByID             AnimeOrderBy = "id"
	AnimeOrderByTITLE          AnimeOrderBy = "title"
	AnimeOrderBySCORE          AnimeOrderBy = "score"
	AnimeOrderByNEXTAIRINGDATE AnimeOrderBy = "nextAiringDate"
	AnimeOrderBySTARTDATE      AnimeOrderBy = "startDate"
)

func (AnimeOrderBy) Enum

func (a AnimeOrderBy) Enum() *AnimeOrderBy

func (AnimeOrderBy) String

func (a AnimeOrderBy) String() string

type AnimeSeason

type AnimeSeason string
const (
	AnimeSeasonUNDEFINED AnimeSeason = "UNDEFINED"
	AnimeSeasonWINTER    AnimeSeason = "WINTER"
	AnimeSeasonFALL      AnimeSeason = "FALL"
	AnimeSeasonSUMMER    AnimeSeason = "SUMMER"
	AnimeSeasonSPRING    AnimeSeason = "SPRING"
)

func (AnimeSeason) Enum

func (e AnimeSeason) Enum() *AnimeSeason

func (AnimeSeason) Index

func (season AnimeSeason) Index() int

func (*AnimeSeason) Scan

func (e *AnimeSeason) Scan(src interface{}) error

type AnimeSeasons

type AnimeSeasons []*AnimeSeason

type AnimeSeasonsSortBySeason

type AnimeSeasonsSortBySeason AnimeSeasons

func (AnimeSeasonsSortBySeason) Len

func (a AnimeSeasonsSortBySeason) Len() int

func (AnimeSeasonsSortBySeason) Less

func (a AnimeSeasonsSortBySeason) Less(i, j int) bool

func (AnimeSeasonsSortBySeason) Swap

func (a AnimeSeasonsSortBySeason) Swap(i, j int)

type AnimeStatus

type AnimeStatus string
const (
	AnimeStatusUNDEFINED      AnimeStatus = "UNDEFINED"
	AnimeStatusFINISHED       AnimeStatus = "FINISHED"
	AnimeStatusRELEASING      AnimeStatus = "RELEASING"
	AnimeStatusNOTYETRELEASED AnimeStatus = "NOT_YET_RELEASED"
	AnimeStatusCANCELLED      AnimeStatus = "CANCELLED"
	AnimeStatusHIATUS         AnimeStatus = "HIATUS"
)

func (AnimeStatus) Enum

func (e AnimeStatus) Enum() *AnimeStatus

func (*AnimeStatus) Scan

func (e *AnimeStatus) Scan(src interface{}) error

type AnimeStatuses

type AnimeStatuses []*AnimeStatus

type AnimeStatusesSortByValue

type AnimeStatusesSortByValue AnimeStatuses

func (AnimeStatusesSortByValue) Len

func (a AnimeStatusesSortByValue) Len() int

func (AnimeStatusesSortByValue) Less

func (a AnimeStatusesSortByValue) Less(i, j int) bool

func (AnimeStatusesSortByValue) Swap

func (a AnimeStatusesSortByValue) Swap(i, j int)

type EpisodeLatestOrderBy

type EpisodeLatestOrderBy string
const (
	EpisodeLatestOrderByCREATEDAT EpisodeLatestOrderBy = "createdAt"
	EpisodeLatestOrderBySIZE      EpisodeLatestOrderBy = "size"
	EpisodeLatestOrderBySCORE     EpisodeLatestOrderBy = "score"
	EpisodeLatestOrderByDURATION  EpisodeLatestOrderBy = "duration"
)

func (EpisodeLatestOrderBy) Enum

func (EpisodeLatestOrderBy) String

func (a EpisodeLatestOrderBy) String() string

type OrderByDirection

type OrderByDirection string
const (
	OrderByDirectionASCENDING  OrderByDirection = "asc"
	OrderByDirectionDESCENDING OrderByDirection = "desc"
)

func (OrderByDirection) Enum

func (OrderByDirection) IsDescending

func (o OrderByDirection) IsDescending() bool

func (OrderByDirection) String

func (o OrderByDirection) String() string

type TitleOrderBy

type TitleOrderBy string
const (
	TitleOrderByID        TitleOrderBy = "id"
	TitleOrderByCREATEDAT TitleOrderBy = "createdAt"
)

func (TitleOrderBy) Enum

func (a TitleOrderBy) Enum() *TitleOrderBy

func (TitleOrderBy) String

func (a TitleOrderBy) String() string

type XDCCRemoveReason

type XDCCRemoveReason string
const (
	XDCCRemoveReasonNONE             XDCCRemoveReason = "NONE"
	XDCCRemoveReasonGROUPPARSEFAILED XDCCRemoveReason = "GROUP_PARSE_FAILED"
	XDCCRemoveReasonPACKNOTFOUND     XDCCRemoveReason = "PACK_NOT_FOUND"
)

func (XDCCRemoveReason) Enum

func (XDCCRemoveReason) String

func (s XDCCRemoveReason) String() string

Jump to

Keyboard shortcuts

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