enum

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JSONNull string = "null"
)

Variables

View Source
var (
	CountriesIso31661AR = CountriesIso31661{stringEnumValue{"Ar", countriesIso31661Key}}
	CountriesIso31661CA = CountriesIso31661{stringEnumValue{"Ca", countriesIso31661Key}}
	CountriesIso31661US = CountriesIso31661{stringEnumValue{"Us", countriesIso31661Key}}
	CountriesIso31661UY = CountriesIso31661{stringEnumValue{"Uy", countriesIso31661Key}}

	EnumCountriesIso31661 = countriesIso31661Enum{countriesIso31661List{
		CountriesIso31661AR,
		CountriesIso31661CA,
		CountriesIso31661US,
		CountriesIso31661UY,
	}}
)
View Source
var (
	GhostBlinky = Ghost{stringEnumValue{"Blinky", ghostKey}}
	GhostClyde  = Ghost{stringEnumValue{"Clyde", ghostKey}}
	GhostInky   = Ghost{stringEnumValue{"Inky", ghostKey}}
	GhostPinky  = Ghost{stringEnumValue{"Pinky", ghostKey}}

	EnumGhost = ghostEnum{ghostList{
		GhostBlinky,
		GhostClyde,
		GhostInky,
		GhostPinky,
	}}
)
View Source
var (
	SpecialThingBar  = SpecialThing{stringEnumValue{"Bar", specialThingKey}}
	SpecialThingBaz  = SpecialThing{stringEnumValue{"Baz", specialThingKey}}
	SpecialThingFoo  = SpecialThing{stringEnumValue{"Foo", specialThingKey}}
	SpecialThingQuux = SpecialThing{stringEnumValue{"Quux", specialThingKey}}

	EnumSpecialThing = specialThingEnum{specialThingList{
		SpecialThingBar,
		SpecialThingBaz,
		SpecialThingFoo,
		SpecialThingQuux,
	}}
)

Functions

This section is empty.

Types

type CountriesIso31661

type CountriesIso31661 struct {
	// contains filtered or unexported fields
}

func CountriesIso31661FromValue

func CountriesIso31661FromValue(value string, ignoreCase bool) (CountriesIso31661, bool)

func (CountriesIso31661) Equals

func (e CountriesIso31661) Equals(s string) bool

Equals does a case sensitive comparison against a string value

func (CountriesIso31661) EqualsIgnoreCase

func (e CountriesIso31661) EqualsIgnoreCase(s string) bool

Equals does a case insensitive comparison against a string value

func (*CountriesIso31661) GobDecode

func (e *CountriesIso31661) GobDecode(data []byte) error

func (CountriesIso31661) GobEncode

func (e CountriesIso31661) GobEncode() ([]byte, error)

GobEncode implements the gob.GobEncoder interface.

func (CountriesIso31661) IsEmpty

func (e CountriesIso31661) IsEmpty() bool

IsEmpty returns whether the value is empty. Such values are permitted in order to support empty values on compile and (un)marshaling time without pointer fields

func (CountriesIso31661) IsUndefined

func (e CountriesIso31661) IsUndefined() bool

IsUndefined returns whether the value is manually initialized, thus being undefined (MyEnumType{}). Such values are permitted in order to support empty values on compile and (un)marshaling time without pointer fields

func (CountriesIso31661) MarshalBSON

func (e CountriesIso31661) MarshalBSON() ([]byte, error)

MarshalBSON implements the bson.Marshaler interface.

func (CountriesIso31661) MarshalBinary

func (e CountriesIso31661) MarshalBinary() ([]byte, error)

MarshalBinary implements the encoding.BinaryMarshaler interface.

func (CountriesIso31661) MarshalJSON

func (e CountriesIso31661) MarshalJSON() ([]byte, error)

MarshalJSON returns the stringEnumValue value as JSON

func (CountriesIso31661) MarshalText

func (e CountriesIso31661) MarshalText() ([]byte, error)

MarshalText serializes this date types to string

func (*CountriesIso31661) Scan

func (e *CountriesIso31661) Scan(raw interface{}) error

func (CountriesIso31661) String

func (e CountriesIso31661) String() string

Stringer implementation

func (*CountriesIso31661) UnmarshalBSON

func (e *CountriesIso31661) UnmarshalBSON(data []byte) error

func (*CountriesIso31661) UnmarshalBinary

func (e *CountriesIso31661) UnmarshalBinary(data []byte) error

func (*CountriesIso31661) UnmarshalJSON

func (e *CountriesIso31661) UnmarshalJSON(data []byte) error

func (*CountriesIso31661) UnmarshalText

func (e *CountriesIso31661) UnmarshalText(text []byte) error

func (CountriesIso31661) Value

func (e CountriesIso31661) Value() (driver.Value, error)

Value converts stringEnumValue to a primitive value ready to written to a database.

type Ghost

type Ghost struct {
	// contains filtered or unexported fields
}

func GhostFromValue

func GhostFromValue(value string, ignoreCase bool) (Ghost, bool)

func (Ghost) Equals

func (e Ghost) Equals(s string) bool

Equals does a case sensitive comparison against a string value

func (Ghost) EqualsIgnoreCase

func (e Ghost) EqualsIgnoreCase(s string) bool

Equals does a case insensitive comparison against a string value

func (*Ghost) GobDecode

func (e *Ghost) GobDecode(data []byte) error

func (Ghost) GobEncode

func (e Ghost) GobEncode() ([]byte, error)

GobEncode implements the gob.GobEncoder interface.

func (Ghost) IsEmpty

func (e Ghost) IsEmpty() bool

IsEmpty returns whether the value is empty. Such values are permitted in order to support empty values on compile and (un)marshaling time without pointer fields

func (Ghost) IsUndefined

func (e Ghost) IsUndefined() bool

IsUndefined returns whether the value is manually initialized, thus being undefined (MyEnumType{}). Such values are permitted in order to support empty values on compile and (un)marshaling time without pointer fields

func (Ghost) MarshalBSON

func (e Ghost) MarshalBSON() ([]byte, error)

MarshalBSON implements the bson.Marshaler interface.

func (Ghost) MarshalBinary

func (e Ghost) MarshalBinary() ([]byte, error)

MarshalBinary implements the encoding.BinaryMarshaler interface.

func (Ghost) MarshalJSON

func (e Ghost) MarshalJSON() ([]byte, error)

MarshalJSON returns the stringEnumValue value as JSON

func (Ghost) MarshalText

func (e Ghost) MarshalText() ([]byte, error)

MarshalText serializes this date types to string

func (*Ghost) Scan

func (e *Ghost) Scan(raw interface{}) error

func (Ghost) String

func (e Ghost) String() string

Stringer implementation

func (*Ghost) UnmarshalBSON

func (e *Ghost) UnmarshalBSON(data []byte) error

func (*Ghost) UnmarshalBinary

func (e *Ghost) UnmarshalBinary(data []byte) error

func (*Ghost) UnmarshalJSON

func (e *Ghost) UnmarshalJSON(data []byte) error

func (*Ghost) UnmarshalText

func (e *Ghost) UnmarshalText(text []byte) error

func (Ghost) Value

func (e Ghost) Value() (driver.Value, error)

Value converts stringEnumValue to a primitive value ready to written to a database.

type SpecialThing

type SpecialThing struct {
	// contains filtered or unexported fields
}

func SpecialThingFromValue

func SpecialThingFromValue(value string, ignoreCase bool) (SpecialThing, bool)

func (SpecialThing) Equals

func (e SpecialThing) Equals(s string) bool

Equals does a case sensitive comparison against a string value

func (SpecialThing) EqualsIgnoreCase

func (e SpecialThing) EqualsIgnoreCase(s string) bool

Equals does a case insensitive comparison against a string value

func (*SpecialThing) GobDecode

func (e *SpecialThing) GobDecode(data []byte) error

func (SpecialThing) GobEncode

func (e SpecialThing) GobEncode() ([]byte, error)

GobEncode implements the gob.GobEncoder interface.

func (SpecialThing) IsEmpty

func (e SpecialThing) IsEmpty() bool

IsEmpty returns whether the value is empty. Such values are permitted in order to support empty values on compile and (un)marshaling time without pointer fields

func (SpecialThing) IsUndefined

func (e SpecialThing) IsUndefined() bool

IsUndefined returns whether the value is manually initialized, thus being undefined (MyEnumType{}). Such values are permitted in order to support empty values on compile and (un)marshaling time without pointer fields

func (SpecialThing) MarshalBSON

func (e SpecialThing) MarshalBSON() ([]byte, error)

MarshalBSON implements the bson.Marshaler interface.

func (SpecialThing) MarshalBinary

func (e SpecialThing) MarshalBinary() ([]byte, error)

MarshalBinary implements the encoding.BinaryMarshaler interface.

func (SpecialThing) MarshalJSON

func (e SpecialThing) MarshalJSON() ([]byte, error)

MarshalJSON returns the stringEnumValue value as JSON

func (SpecialThing) MarshalText

func (e SpecialThing) MarshalText() ([]byte, error)

MarshalText serializes this date types to string

func (*SpecialThing) Scan

func (e *SpecialThing) Scan(raw interface{}) error

func (SpecialThing) String

func (e SpecialThing) String() string

Stringer implementation

func (*SpecialThing) UnmarshalBSON

func (e *SpecialThing) UnmarshalBSON(data []byte) error

func (*SpecialThing) UnmarshalBinary

func (e *SpecialThing) UnmarshalBinary(data []byte) error

func (*SpecialThing) UnmarshalJSON

func (e *SpecialThing) UnmarshalJSON(data []byte) error

func (*SpecialThing) UnmarshalText

func (e *SpecialThing) UnmarshalText(text []byte) error

func (SpecialThing) Value

func (e SpecialThing) Value() (driver.Value, error)

Value converts stringEnumValue to a primitive value ready to written to a database.

Jump to

Keyboard shortcuts

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