Documentation ¶
Index ¶
- Variables
- func AnimalStrings() []string
- func BirdStrings() []string
- func FishStrings() []string
- func MammalStrings() []string
- func ReptileStrings() []string
- type Animal
- func (_a Animal) IsValid() bool
- func (_a Animal) MarshalBinary() ([]byte, error)
- func (_a Animal) MarshalGQL(w io.Writer)
- func (_a Animal) MarshalJSON() ([]byte, error)
- func (_a Animal) MarshalText() ([]byte, error)
- func (_a Animal) MarshalYAML() (interface{}, error)
- func (_a *Animal) Scan(value interface{}) error
- func (_a Animal) String() string
- func (_a *Animal) UnmarshalBinary(text []byte) error
- func (_a *Animal) UnmarshalGQL(value interface{}) error
- func (_a *Animal) UnmarshalJSON(data []byte) error
- func (_a *Animal) UnmarshalText(text []byte) error
- func (_a *Animal) UnmarshalYAML(n *yaml.Node) error
- func (_a Animal) Validate() error
- func (_a Animal) Value() (driver.Value, error)
- type Bird
- func (_b Bird) IsValid() bool
- func (_b Bird) MarshalBinary() ([]byte, error)
- func (_b Bird) MarshalGQL(w io.Writer)
- func (_b Bird) MarshalJSON() ([]byte, error)
- func (_b Bird) MarshalText() ([]byte, error)
- func (_b Bird) MarshalYAML() (interface{}, error)
- func (_b *Bird) Scan(value interface{}) error
- func (_b Bird) String() string
- func (_b *Bird) UnmarshalBinary(text []byte) error
- func (_b *Bird) UnmarshalGQL(value interface{}) error
- func (_b *Bird) UnmarshalJSON(data []byte) error
- func (_b *Bird) UnmarshalText(text []byte) error
- func (_b *Bird) UnmarshalYAML(n *yaml.Node) error
- func (_b Bird) Validate() error
- func (_b Bird) Value() (driver.Value, error)
- type Fish
- func (_f Fish) IsValid() bool
- func (_f Fish) MarshalBinary() ([]byte, error)
- func (_f Fish) MarshalGQL(w io.Writer)
- func (_f Fish) MarshalJSON() ([]byte, error)
- func (_f Fish) MarshalText() ([]byte, error)
- func (_f Fish) MarshalYAML() (interface{}, error)
- func (_f *Fish) Scan(value interface{}) error
- func (_f Fish) String() string
- func (_f *Fish) UnmarshalBinary(text []byte) error
- func (_f *Fish) UnmarshalGQL(value interface{}) error
- func (_f *Fish) UnmarshalJSON(data []byte) error
- func (_f *Fish) UnmarshalText(text []byte) error
- func (_f *Fish) UnmarshalYAML(n *yaml.Node) error
- func (_f Fish) Validate() error
- func (_f Fish) Value() (driver.Value, error)
- type Mammal
- func (_m Mammal) IsValid() bool
- func (_m Mammal) MarshalBinary() ([]byte, error)
- func (_m Mammal) MarshalGQL(w io.Writer)
- func (_m Mammal) MarshalJSON() ([]byte, error)
- func (_m Mammal) MarshalText() ([]byte, error)
- func (_m Mammal) MarshalYAML() (interface{}, error)
- func (_m *Mammal) Scan(value interface{}) error
- func (_m Mammal) String() string
- func (_m *Mammal) UnmarshalBinary(text []byte) error
- func (_m *Mammal) UnmarshalGQL(value interface{}) error
- func (_m *Mammal) UnmarshalJSON(data []byte) error
- func (_m *Mammal) UnmarshalText(text []byte) error
- func (_m *Mammal) UnmarshalYAML(n *yaml.Node) error
- func (_m Mammal) Validate() error
- func (_m Mammal) Value() (driver.Value, error)
- type Reptile
- func (_r Reptile) IsValid() bool
- func (_r Reptile) MarshalBinary() ([]byte, error)
- func (_r Reptile) MarshalGQL(w io.Writer)
- func (_r Reptile) MarshalJSON() ([]byte, error)
- func (_r Reptile) MarshalText() ([]byte, error)
- func (_r Reptile) MarshalYAML() (interface{}, error)
- func (_r *Reptile) Scan(value interface{}) error
- func (_r Reptile) String() string
- func (_r *Reptile) UnmarshalBinary(text []byte) error
- func (_r *Reptile) UnmarshalGQL(value interface{}) error
- func (_r *Reptile) UnmarshalJSON(data []byte) error
- func (_r *Reptile) UnmarshalText(text []byte) error
- func (_r *Reptile) UnmarshalYAML(n *yaml.Node) error
- func (_r Reptile) Validate() error
- func (_r Reptile) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
var (
ErrNoValidEnum = errors.New("not a valid enum")
)
Functions ¶
func AnimalStrings ¶
func AnimalStrings() []string
AnimalStrings returns a slice of all String values of the enum.
func BirdStrings ¶
func BirdStrings() []string
BirdStrings returns a slice of all String values of the enum.
func FishStrings ¶
func FishStrings() []string
FishStrings returns a slice of all String values of the enum.
func MammalStrings ¶
func MammalStrings() []string
MammalStrings returns a slice of all String values of the enum.
func ReptileStrings ¶
func ReptileStrings() []string
ReptileStrings returns a slice of all String values of the enum.
Types ¶
type Animal ¶
type Animal uint8
func AnimalFromString ¶
AnimalFromString determines the enum value with an exact case match.
func AnimalFromStringIgnoreCase ¶
AnimalFromStringIgnoreCase determines the enum value with a case-insensitive match.
func (Animal) MarshalBinary ¶
MarshalBinary implements the encoding.BinaryMarshaler interface for Animal.
func (Animal) MarshalGQL ¶
MarshalGQL implements the graphql.Marshaler interface for Animal.
func (Animal) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface for Animal.
func (Animal) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for Animal.
func (Animal) MarshalYAML ¶
MarshalYAML implements a YAML Marshaler for Animal.
func (Animal) String ¶
String returns the string of the enum value. If the enum value is invalid, it will produce a string of the following pattern Animal(%d) instead.
func (*Animal) UnmarshalBinary ¶
UnmarshalBinary implements the encoding.BinaryUnmarshaler interface for Animal.
func (*Animal) UnmarshalGQL ¶
UnmarshalGQL implements the graphql.Unmarshaler interface for Animal.
func (*Animal) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface for Animal.
func (*Animal) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for Animal.
func (*Animal) UnmarshalYAML ¶
UnmarshalYAML implements a YAML Unmarshaler for Animal.
type Bird ¶
type Bird uint8
func BirdFromString ¶
BirdFromString determines the enum value with an exact case match.
func BirdFromStringIgnoreCase ¶
BirdFromStringIgnoreCase determines the enum value with a case-insensitive match.
func (Bird) MarshalBinary ¶
MarshalBinary implements the encoding.BinaryMarshaler interface for Bird.
func (Bird) MarshalGQL ¶
MarshalGQL implements the graphql.Marshaler interface for Bird.
func (Bird) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface for Bird.
func (Bird) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for Bird.
func (Bird) MarshalYAML ¶
MarshalYAML implements a YAML Marshaler for Bird.
func (Bird) String ¶
String returns the string of the enum value. If the enum value is invalid, it will produce a string of the following pattern Bird(%d) instead.
func (*Bird) UnmarshalBinary ¶
UnmarshalBinary implements the encoding.BinaryUnmarshaler interface for Bird.
func (*Bird) UnmarshalGQL ¶
UnmarshalGQL implements the graphql.Unmarshaler interface for Bird.
func (*Bird) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface for Bird.
func (*Bird) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for Bird.
func (*Bird) UnmarshalYAML ¶
UnmarshalYAML implements a YAML Unmarshaler for Bird.
type Fish ¶
type Fish uint8
func FishFromString ¶
FishFromString determines the enum value with an exact case match.
func FishFromStringIgnoreCase ¶
FishFromStringIgnoreCase determines the enum value with a case-insensitive match.
func (Fish) MarshalBinary ¶
MarshalBinary implements the encoding.BinaryMarshaler interface for Fish.
func (Fish) MarshalGQL ¶
MarshalGQL implements the graphql.Marshaler interface for Fish.
func (Fish) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface for Fish.
func (Fish) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for Fish.
func (Fish) MarshalYAML ¶
MarshalYAML implements a YAML Marshaler for Fish.
func (Fish) String ¶
String returns the string of the enum value. If the enum value is invalid, it will produce a string of the following pattern Fish(%d) instead.
func (*Fish) UnmarshalBinary ¶
UnmarshalBinary implements the encoding.BinaryUnmarshaler interface for Fish.
func (*Fish) UnmarshalGQL ¶
UnmarshalGQL implements the graphql.Unmarshaler interface for Fish.
func (*Fish) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface for Fish.
func (*Fish) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for Fish.
func (*Fish) UnmarshalYAML ¶
UnmarshalYAML implements a YAML Unmarshaler for Fish.
type Mammal ¶
type Mammal uint8
func MammalFromString ¶
MammalFromString determines the enum value with an exact case match.
func MammalFromStringIgnoreCase ¶
MammalFromStringIgnoreCase determines the enum value with a case-insensitive match.
func (Mammal) MarshalBinary ¶
MarshalBinary implements the encoding.BinaryMarshaler interface for Mammal.
func (Mammal) MarshalGQL ¶
MarshalGQL implements the graphql.Marshaler interface for Mammal.
func (Mammal) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface for Mammal.
func (Mammal) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for Mammal.
func (Mammal) MarshalYAML ¶
MarshalYAML implements a YAML Marshaler for Mammal.
func (Mammal) String ¶
String returns the string of the enum value. If the enum value is invalid, it will produce a string of the following pattern Mammal(%d) instead.
func (*Mammal) UnmarshalBinary ¶
UnmarshalBinary implements the encoding.BinaryUnmarshaler interface for Mammal.
func (*Mammal) UnmarshalGQL ¶
UnmarshalGQL implements the graphql.Unmarshaler interface for Mammal.
func (*Mammal) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface for Mammal.
func (*Mammal) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for Mammal.
func (*Mammal) UnmarshalYAML ¶
UnmarshalYAML implements a YAML Unmarshaler for Mammal.
type Reptile ¶
type Reptile uint8
func ReptileFromString ¶
ReptileFromString determines the enum value with an exact case match.
func ReptileFromStringIgnoreCase ¶
ReptileFromStringIgnoreCase determines the enum value with a case-insensitive match.
func (Reptile) MarshalBinary ¶
MarshalBinary implements the encoding.BinaryMarshaler interface for Reptile.
func (Reptile) MarshalGQL ¶
MarshalGQL implements the graphql.Marshaler interface for Reptile.
func (Reptile) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface for Reptile.
func (Reptile) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for Reptile.
func (Reptile) MarshalYAML ¶
MarshalYAML implements a YAML Marshaler for Reptile.
func (Reptile) String ¶
String returns the string of the enum value. If the enum value is invalid, it will produce a string of the following pattern Reptile(%d) instead.
func (*Reptile) UnmarshalBinary ¶
UnmarshalBinary implements the encoding.BinaryUnmarshaler interface for Reptile.
func (*Reptile) UnmarshalGQL ¶
UnmarshalGQL implements the graphql.Unmarshaler interface for Reptile.
func (*Reptile) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface for Reptile.
func (*Reptile) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for Reptile.
func (*Reptile) UnmarshalYAML ¶
UnmarshalYAML implements a YAML Unmarshaler for Reptile.