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 = func() CountriesIso31661 { return CountriesIso31661{stringEnumValue{"Ar", countriesIso31661Key}} }
	CountriesIso31661CA = func() CountriesIso31661 { return CountriesIso31661{stringEnumValue{"Ca", countriesIso31661Key}} }
	CountriesIso31661US = func() CountriesIso31661 { return CountriesIso31661{stringEnumValue{"Us", countriesIso31661Key}} }
	CountriesIso31661UY = func() CountriesIso31661 { return CountriesIso31661{stringEnumValue{"Uy", countriesIso31661Key}} }

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

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

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

Functions

This section is empty.

Types

type CountriesIso31661 added in v0.4.0

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

func CountriesIso31661FromValue added in v0.4.0

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

func (CountriesIso31661) Equals added in v0.4.0

func (e CountriesIso31661) Equals(s string) bool

Equals does a case sensitive comparison against a string value

func (CountriesIso31661) EqualsIgnoreCase added in v0.4.0

func (e CountriesIso31661) EqualsIgnoreCase(s string) bool

Equals does a case insensitive comparison against a string value

func (*CountriesIso31661) GobDecode added in v0.4.0

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

func (CountriesIso31661) GobEncode added in v0.4.0

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

GobEncode implements the gob.GobEncoder interface.

func (CountriesIso31661) IsEmpty added in v0.4.0

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 added in v0.4.0

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 added in v0.4.0

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

MarshalBSON implements the bson.Marshaler interface.

func (CountriesIso31661) MarshalBinary added in v0.4.0

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

MarshalBinary implements the encoding.BinaryMarshaler interface.

func (CountriesIso31661) MarshalJSON added in v0.4.0

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

MarshalJSON returns the stringEnumValue value as JSON

func (CountriesIso31661) MarshalText added in v0.4.0

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

MarshalText serializes this date types to string

func (*CountriesIso31661) Scan added in v0.4.0

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

func (CountriesIso31661) String added in v0.4.0

func (e CountriesIso31661) String() string

Stringer implementation

func (*CountriesIso31661) UnmarshalBSON added in v0.4.0

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

func (*CountriesIso31661) UnmarshalBinary added in v0.4.0

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

func (*CountriesIso31661) UnmarshalJSON added in v0.4.0

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

func (*CountriesIso31661) UnmarshalText added in v0.4.0

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

func (CountriesIso31661) Value added in v0.4.0

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 added in v0.1.0

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 added in v0.2.1

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

func SpecialThingFromValue added in v0.2.1

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

func (SpecialThing) Equals added in v0.2.1

func (e SpecialThing) Equals(s string) bool

Equals does a case sensitive comparison against a string value

func (SpecialThing) EqualsIgnoreCase added in v0.2.1

func (e SpecialThing) EqualsIgnoreCase(s string) bool

Equals does a case insensitive comparison against a string value

func (*SpecialThing) GobDecode added in v0.2.1

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

func (SpecialThing) GobEncode added in v0.2.1

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

GobEncode implements the gob.GobEncoder interface.

func (SpecialThing) IsEmpty added in v0.2.1

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 added in v0.2.1

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 added in v0.2.1

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

MarshalBSON implements the bson.Marshaler interface.

func (SpecialThing) MarshalBinary added in v0.2.1

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

MarshalBinary implements the encoding.BinaryMarshaler interface.

func (SpecialThing) MarshalJSON added in v0.2.1

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

MarshalJSON returns the stringEnumValue value as JSON

func (SpecialThing) MarshalText added in v0.2.1

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

MarshalText serializes this date types to string

func (*SpecialThing) Scan added in v0.2.1

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

func (SpecialThing) String added in v0.2.1

func (e SpecialThing) String() string

Stringer implementation

func (*SpecialThing) UnmarshalBSON added in v0.2.1

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

func (*SpecialThing) UnmarshalBinary added in v0.2.1

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

func (*SpecialThing) UnmarshalJSON added in v0.2.1

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

func (*SpecialThing) UnmarshalText added in v0.2.1

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

func (SpecialThing) Value added in v0.2.1

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