Documentation ¶
Index ¶
- Variables
- func GreetingStrings() []string
- func GreetingWithDefaultStrings() []string
- type Greeting
- func (_g Greeting) IsValid() bool
- func (_g Greeting) MarshalBSONValue() (bsontype.Type, []byte, error)
- func (_g Greeting) MarshalBinary() ([]byte, error)
- func (_g Greeting) MarshalGQL(w io.Writer)
- func (_g Greeting) MarshalJSON() ([]byte, error)
- func (_g Greeting) MarshalText() ([]byte, error)
- func (_g Greeting) MarshalYAML() (interface{}, error)
- func (_g *Greeting) Scan(value interface{}) error
- func (_g Greeting) String() string
- func (_g *Greeting) UnmarshalBSONValue(t bsontype.Type, data []byte) error
- func (_g *Greeting) UnmarshalBinary(text []byte) error
- func (_g *Greeting) UnmarshalGQL(value interface{}) error
- func (_g *Greeting) UnmarshalJSON(data []byte) error
- func (_g *Greeting) UnmarshalText(text []byte) error
- func (_g *Greeting) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (_g Greeting) Validate() error
- func (_g Greeting) Value() (driver.Value, error)
- func (Greeting) Values() []string
- type GreetingWithDefault
- func (_g GreetingWithDefault) IsValid() bool
- func (_g GreetingWithDefault) MarshalBSONValue() (bsontype.Type, []byte, error)
- func (_g GreetingWithDefault) MarshalBinary() ([]byte, error)
- func (_g GreetingWithDefault) MarshalGQL(w io.Writer)
- func (_g GreetingWithDefault) MarshalJSON() ([]byte, error)
- func (_g GreetingWithDefault) MarshalText() ([]byte, error)
- func (_g GreetingWithDefault) MarshalYAML() (interface{}, error)
- func (_g *GreetingWithDefault) Scan(value interface{}) error
- func (_g GreetingWithDefault) String() string
- func (_g *GreetingWithDefault) UnmarshalBSONValue(t bsontype.Type, data []byte) error
- func (_g *GreetingWithDefault) UnmarshalBinary(text []byte) error
- func (_g *GreetingWithDefault) UnmarshalGQL(value interface{}) error
- func (_g *GreetingWithDefault) UnmarshalJSON(data []byte) error
- func (_g *GreetingWithDefault) UnmarshalText(text []byte) error
- func (_g *GreetingWithDefault) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (_g GreetingWithDefault) Validate() error
- func (_g GreetingWithDefault) Value() (driver.Value, error)
- func (GreetingWithDefault) Values() []string
Constants ¶
This section is empty.
Variables ¶
var (
ErrNoValidEnum = errors.New("not a valid enum")
)
Functions ¶
func GreetingStrings ¶
func GreetingStrings() []string
GreetingStrings returns a slice of all String values of the enum.
func GreetingWithDefaultStrings ¶
func GreetingWithDefaultStrings() []string
GreetingWithDefaultStrings returns a slice of all String values of the enum.
Types ¶
type Greeting ¶
type Greeting uint8
func GreetingFromString ¶
GreetingFromString determines the enum value with an exact case match.
func GreetingFromStringIgnoreCase ¶
GreetingFromStringIgnoreCase determines the enum value with a case-insensitive match.
func GreetingValues ¶
func GreetingValues() []Greeting
GreetingValues returns all values of the enum.
func (Greeting) MarshalBSONValue ¶
MarshalBSONValue implements the bson.ValueMarshaler interface for Greeting.
func (Greeting) MarshalBinary ¶
MarshalBinary implements the encoding.BinaryMarshaler interface for Greeting.
func (Greeting) MarshalGQL ¶
MarshalGQL implements the graphql.Marshaler interface for Greeting.
func (Greeting) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface for Greeting.
func (Greeting) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for Greeting.
func (Greeting) MarshalYAML ¶
MarshalYAML implements a YAML Marshaler for Greeting.
func (Greeting) String ¶
String returns the string of the enum value. If the enum value is invalid, it will produce a string of the following pattern Greeting(%d) instead.
func (*Greeting) UnmarshalBSONValue ¶
UnmarshalBSONValue implements the bson.ValueUnmarshaler interface for Greeting.
func (*Greeting) UnmarshalBinary ¶
UnmarshalBinary implements the encoding.BinaryUnmarshaler interface for Greeting.
func (*Greeting) UnmarshalGQL ¶
UnmarshalGQL implements the graphql.Unmarshaler interface for Greeting.
func (*Greeting) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface for Greeting.
func (*Greeting) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for Greeting.
func (*Greeting) UnmarshalYAML ¶
UnmarshalYAML implements a YAML Unmarshaler for Greeting.
type GreetingWithDefault ¶
type GreetingWithDefault uint8
const ( GreetingWithDefaultWorld GreetingWithDefault = iota GreetingWithDefaultРоссия GreetingWithDefault中國 GreetingWithDefault日本 GreetingWithDefault한국 GreetingWithDefaultČeskáRepublika GreetingWithDefault𝜋 )
func GreetingWithDefaultFromString ¶
func GreetingWithDefaultFromString(raw string) (GreetingWithDefault, bool)
GreetingWithDefaultFromString determines the enum value with an exact case match.
func GreetingWithDefaultFromStringIgnoreCase ¶
func GreetingWithDefaultFromStringIgnoreCase(raw string) (GreetingWithDefault, bool)
GreetingWithDefaultFromStringIgnoreCase determines the enum value with a case-insensitive match.
func GreetingWithDefaultValues ¶
func GreetingWithDefaultValues() []GreetingWithDefault
GreetingWithDefaultValues returns all values of the enum.
func (GreetingWithDefault) IsValid ¶
func (_g GreetingWithDefault) IsValid() bool
IsValid tests whether the value is a valid enum value.
func (GreetingWithDefault) MarshalBSONValue ¶
func (_g GreetingWithDefault) MarshalBSONValue() (bsontype.Type, []byte, error)
MarshalBSONValue implements the bson.ValueMarshaler interface for GreetingWithDefault.
func (GreetingWithDefault) MarshalBinary ¶
func (_g GreetingWithDefault) MarshalBinary() ([]byte, error)
MarshalBinary implements the encoding.BinaryMarshaler interface for GreetingWithDefault.
func (GreetingWithDefault) MarshalGQL ¶
func (_g GreetingWithDefault) MarshalGQL(w io.Writer)
MarshalGQL implements the graphql.Marshaler interface for GreetingWithDefault.
func (GreetingWithDefault) MarshalJSON ¶
func (_g GreetingWithDefault) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface for GreetingWithDefault.
func (GreetingWithDefault) MarshalText ¶
func (_g GreetingWithDefault) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for GreetingWithDefault.
func (GreetingWithDefault) MarshalYAML ¶
func (_g GreetingWithDefault) MarshalYAML() (interface{}, error)
MarshalYAML implements a YAML Marshaler for GreetingWithDefault.
func (*GreetingWithDefault) Scan ¶
func (_g *GreetingWithDefault) Scan(value interface{}) error
Scan implements the sql/driver.Scanner interface for GreetingWithDefault.
func (GreetingWithDefault) String ¶
func (_g GreetingWithDefault) String() string
String returns the string of the enum value. If the enum value is invalid, it will produce a string of the following pattern GreetingWithDefault(%d) instead.
func (*GreetingWithDefault) UnmarshalBSONValue ¶
func (_g *GreetingWithDefault) UnmarshalBSONValue(t bsontype.Type, data []byte) error
UnmarshalBSONValue implements the bson.ValueUnmarshaler interface for GreetingWithDefault.
func (*GreetingWithDefault) UnmarshalBinary ¶
func (_g *GreetingWithDefault) UnmarshalBinary(text []byte) error
UnmarshalBinary implements the encoding.BinaryUnmarshaler interface for GreetingWithDefault.
func (*GreetingWithDefault) UnmarshalGQL ¶
func (_g *GreetingWithDefault) UnmarshalGQL(value interface{}) error
UnmarshalGQL implements the graphql.Unmarshaler interface for GreetingWithDefault.
func (*GreetingWithDefault) UnmarshalJSON ¶
func (_g *GreetingWithDefault) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for GreetingWithDefault.
func (*GreetingWithDefault) UnmarshalText ¶
func (_g *GreetingWithDefault) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for GreetingWithDefault.
func (*GreetingWithDefault) UnmarshalYAML ¶
func (_g *GreetingWithDefault) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements a YAML Unmarshaler for GreetingWithDefault.
func (GreetingWithDefault) Validate ¶
func (_g GreetingWithDefault) Validate() error
Validate whether the value is within the range of enum values.
func (GreetingWithDefault) Value ¶
func (_g GreetingWithDefault) Value() (driver.Value, error)
Value implements the sql/driver.Valuer interface for GreetingWithDefault.
func (GreetingWithDefault) Values ¶
func (GreetingWithDefault) Values() []string
Values returns a slice of all String values of the enum.