enums

package
v0.0.0-...-b5d40b6 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EntityAddressType

type EntityAddressType int
const (
	User   EntityAddressType = 1
	Cinema EntityAddressType = 2
)

type FlaggedEnum

type FlaggedEnum[T ~uint64] uint64

func (FlaggedEnum[T]) Add

func (f FlaggedEnum[T]) Add(values ...T) T

func (FlaggedEnum[T]) GetType

func (f FlaggedEnum[T]) GetType() T

func (FlaggedEnum[T]) Has

func (f FlaggedEnum[T]) Has(source T, value T) bool

func (FlaggedEnum[T]) IsEqualTo

func (f FlaggedEnum[T]) IsEqualTo(val1 T, val2 T) bool

func (FlaggedEnum[T]) IsGreaterThan

func (f FlaggedEnum[T]) IsGreaterThan(val1 T, val2 T) bool

func (FlaggedEnum[T]) IsLesserThan

func (f FlaggedEnum[T]) IsLesserThan(val1 T, val2 T) bool

func (FlaggedEnum[T]) Max

func (f FlaggedEnum[T]) Max(values []T) T

func (FlaggedEnum[T]) Min

func (f FlaggedEnum[T]) Min(values []T) T

func (FlaggedEnum[T]) New

func (FlaggedEnum[T]) New() FlaggedEnum[T]

func (FlaggedEnum[T]) Remove

func (f FlaggedEnum[T]) Remove(source T, values ...T) T

func (FlaggedEnum[T]) TypePossibleValues

func (f FlaggedEnum[T]) TypePossibleValues() []T

type Genre

type Genre uint64
const (
	None           Genre = iota + 0
	Action         Genre = 1 << 0
	Adventure      Genre = 1 << 1
	Animation      Genre = 1 << 2
	Comedy         Genre = 1 << 3
	Crime          Genre = 1 << 4
	Documentary    Genre = 1 << 5
	Drama          Genre = 1 << 6
	Family         Genre = 1 << 7
	Fantasy        Genre = 1 << 8
	History        Genre = 1 << 9
	Horror         Genre = 1 << 10
	Music          Genre = 1 << 11
	Mystery        Genre = 1 << 12
	Romance        Genre = 1 << 13
	ScienceFiction Genre = 1 << 14
	TVMovie        Genre = 1 << 15
	Thriller       Genre = 1 << 16
	War            Genre = 1 << 17
	Western        Genre = 1 << 18
)

func (Genre) GetFlaggedValues

func (genre Genre) GetFlaggedValues() []string

func (Genre) GetKeyValues

func (genre Genre) GetKeyValues() map[Genre]string

TODO:If you ever need to add a new Genre constant value above, dont forget to add the key value to the map as there is not way in golang to interate and get the string values of that

func (Genre) GetValue

func (genre Genre) GetValue() string

func (Genre) GetValues

func (genre Genre) GetValues() []string

type SeatType

type SeatType int
const (
	Premium SeatType = iota + 1
	Standard
	Gold
)

Jump to

Keyboard shortcuts

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