greetings

package
v0.0.0-...-0821d35 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: BSD-2-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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
const (
	GreetingРоссия Greeting = iota + 1
	Greeting中國
	Greeting日本
	Greeting한국
	GreetingČeskáRepublika
	Greeting𝜋
)

func GreetingFromString

func GreetingFromString(raw string) (Greeting, bool)

GreetingFromString determines the enum value with an exact case match.

func GreetingFromStringIgnoreCase

func GreetingFromStringIgnoreCase(raw string) (Greeting, bool)

GreetingFromStringIgnoreCase determines the enum value with a case-insensitive match.

func GreetingValues

func GreetingValues() []Greeting

GreetingValues returns all values of the enum.

func (Greeting) IsValid

func (_g Greeting) IsValid() bool

IsValid tests whether the value is a valid enum value.

func (Greeting) MarshalBSONValue

func (_g Greeting) MarshalBSONValue() (bsontype.Type, []byte, error)

MarshalBSONValue implements the bson.ValueMarshaler interface for Greeting.

func (Greeting) MarshalBinary

func (_g Greeting) MarshalBinary() ([]byte, error)

MarshalBinary implements the encoding.BinaryMarshaler interface for Greeting.

func (Greeting) MarshalGQL

func (_g Greeting) MarshalGQL(w io.Writer)

MarshalGQL implements the graphql.Marshaler interface for Greeting.

func (Greeting) MarshalJSON

func (_g Greeting) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for Greeting.

func (Greeting) MarshalText

func (_g Greeting) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface for Greeting.

func (Greeting) MarshalYAML

func (_g Greeting) MarshalYAML() (interface{}, error)

MarshalYAML implements a YAML Marshaler for Greeting.

func (*Greeting) Scan

func (_g *Greeting) Scan(value interface{}) error

Scan implements the sql/driver.Scanner interface for Greeting.

func (Greeting) String

func (_g Greeting) 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 Greeting(%d) instead.

func (*Greeting) UnmarshalBSONValue

func (_g *Greeting) UnmarshalBSONValue(t bsontype.Type, data []byte) error

UnmarshalBSONValue implements the bson.ValueUnmarshaler interface for Greeting.

func (*Greeting) UnmarshalBinary

func (_g *Greeting) UnmarshalBinary(text []byte) error

UnmarshalBinary implements the encoding.BinaryUnmarshaler interface for Greeting.

func (*Greeting) UnmarshalGQL

func (_g *Greeting) UnmarshalGQL(value interface{}) error

UnmarshalGQL implements the graphql.Unmarshaler interface for Greeting.

func (*Greeting) UnmarshalJSON

func (_g *Greeting) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Greeting.

func (*Greeting) UnmarshalText

func (_g *Greeting) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for Greeting.

func (*Greeting) UnmarshalYAML

func (_g *Greeting) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements a YAML Unmarshaler for Greeting.

func (Greeting) Validate

func (_g Greeting) Validate() error

Validate whether the value is within the range of enum values.

func (Greeting) Value

func (_g Greeting) Value() (driver.Value, error)

Value implements the sql/driver.Valuer interface for Greeting.

func (Greeting) Values

func (Greeting) Values() []string

Values returns a slice of all String values of the enum.

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.

Jump to

Keyboard shortcuts

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