planets

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 PlanetStrings

func PlanetStrings() []string

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

func PlanetSupportUndefinedStrings

func PlanetSupportUndefinedStrings() []string

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

func PlanetSupportUndefinedWithDefaultStrings

func PlanetSupportUndefinedWithDefaultStrings() []string

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

func PlanetWithDefaultStrings

func PlanetWithDefaultStrings() []string

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

Types

type Planet

type Planet uint8

Planet has NO default value here.

const (
	PlanetMars Planet = iota + 1
	PlanetPluto
	PlanetVenus
	PlanetMercury
	PlanetJupiter
	PlanetSaturn
	PlanetUranus
	PlanetNeptune
)

func PlanetFromString

func PlanetFromString(raw string) (Planet, bool)

PlanetFromString determines the enum value with an exact case match.

func PlanetFromStringIgnoreCase

func PlanetFromStringIgnoreCase(raw string) (Planet, bool)

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

func PlanetValues

func PlanetValues() []Planet

PlanetValues returns all values of the enum.

func (Planet) IsValid

func (_p Planet) IsValid() bool

IsValid tests whether the value is a valid enum value.

func (Planet) MarshalBSONValue

func (_p Planet) MarshalBSONValue() (bsontype.Type, []byte, error)

MarshalBSONValue implements the bson.ValueMarshaler interface for Planet.

func (Planet) MarshalBinary

func (_p Planet) MarshalBinary() ([]byte, error)

MarshalBinary implements the encoding.BinaryMarshaler interface for Planet.

func (Planet) MarshalGQL

func (_p Planet) MarshalGQL(w io.Writer)

MarshalGQL implements the graphql.Marshaler interface for Planet.

func (Planet) MarshalJSON

func (_p Planet) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for Planet.

func (Planet) MarshalText

func (_p Planet) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface for Planet.

func (Planet) MarshalYAML

func (_p Planet) MarshalYAML() (interface{}, error)

MarshalYAML implements a YAML Marshaler for Planet.

func (*Planet) Scan

func (_p *Planet) Scan(value interface{}) error

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

func (Planet) String

func (_p Planet) 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 Planet(%d) instead.

func (*Planet) UnmarshalBSONValue

func (_p *Planet) UnmarshalBSONValue(t bsontype.Type, data []byte) error

UnmarshalBSONValue implements the bson.ValueUnmarshaler interface for Planet.

func (*Planet) UnmarshalBinary

func (_p *Planet) UnmarshalBinary(text []byte) error

UnmarshalBinary implements the encoding.BinaryUnmarshaler interface for Planet.

func (*Planet) UnmarshalGQL

func (_p *Planet) UnmarshalGQL(value interface{}) error

UnmarshalGQL implements the graphql.Unmarshaler interface for Planet.

func (*Planet) UnmarshalJSON

func (_p *Planet) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Planet.

func (*Planet) UnmarshalText

func (_p *Planet) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for Planet.

func (*Planet) UnmarshalYAML

func (_p *Planet) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements a YAML Unmarshaler for Planet.

func (Planet) Validate

func (_p Planet) Validate() error

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

func (Planet) Value

func (_p Planet) Value() (driver.Value, error)

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

type PlanetSupportUndefined

type PlanetSupportUndefined uint8

Planet has NO default value here. But it supports deserialization from "undefined"/zero values and serialization to an "" (empty string). For this scenario a special const will be generated "<type>Undefined"

const (
	PlanetSupportUndefinedMars PlanetSupportUndefined = iota + 1
	PlanetSupportUndefinedPluto
	PlanetSupportUndefinedVenus
	PlanetSupportUndefinedMercury
	PlanetSupportUndefinedJupiter
	PlanetSupportUndefinedSaturn
	PlanetSupportUndefinedUranus
	PlanetSupportUndefinedNeptune
)

func PlanetSupportUndefinedFromString

func PlanetSupportUndefinedFromString(raw string) (PlanetSupportUndefined, bool)

PlanetSupportUndefinedFromString determines the enum value with an exact case match.

func PlanetSupportUndefinedFromStringIgnoreCase

func PlanetSupportUndefinedFromStringIgnoreCase(raw string) (PlanetSupportUndefined, bool)

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

func PlanetSupportUndefinedValues

func PlanetSupportUndefinedValues() []PlanetSupportUndefined

PlanetSupportUndefinedValues returns all values of the enum.

func (PlanetSupportUndefined) IsValid

func (_p PlanetSupportUndefined) IsValid() bool

IsValid tests whether the value is a valid enum value.

func (PlanetSupportUndefined) MarshalBSONValue

func (_p PlanetSupportUndefined) MarshalBSONValue() (bsontype.Type, []byte, error)

MarshalBSONValue implements the bson.ValueMarshaler interface for PlanetSupportUndefined.

func (PlanetSupportUndefined) MarshalBinary

func (_p PlanetSupportUndefined) MarshalBinary() ([]byte, error)

MarshalBinary implements the encoding.BinaryMarshaler interface for PlanetSupportUndefined.

func (PlanetSupportUndefined) MarshalGQL

func (_p PlanetSupportUndefined) MarshalGQL(w io.Writer)

MarshalGQL implements the graphql.Marshaler interface for PlanetSupportUndefined.

func (PlanetSupportUndefined) MarshalJSON

func (_p PlanetSupportUndefined) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for PlanetSupportUndefined.

func (PlanetSupportUndefined) MarshalText

func (_p PlanetSupportUndefined) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface for PlanetSupportUndefined.

func (PlanetSupportUndefined) MarshalYAML

func (_p PlanetSupportUndefined) MarshalYAML() (interface{}, error)

MarshalYAML implements a YAML Marshaler for PlanetSupportUndefined.

func (*PlanetSupportUndefined) Scan

func (_p *PlanetSupportUndefined) Scan(value interface{}) error

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

func (PlanetSupportUndefined) String

func (_p PlanetSupportUndefined) 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 PlanetSupportUndefined(%d) instead.

func (*PlanetSupportUndefined) UnmarshalBSONValue

func (_p *PlanetSupportUndefined) UnmarshalBSONValue(t bsontype.Type, data []byte) error

UnmarshalBSONValue implements the bson.ValueUnmarshaler interface for PlanetSupportUndefined.

func (*PlanetSupportUndefined) UnmarshalBinary

func (_p *PlanetSupportUndefined) UnmarshalBinary(text []byte) error

UnmarshalBinary implements the encoding.BinaryUnmarshaler interface for PlanetSupportUndefined.

func (*PlanetSupportUndefined) UnmarshalGQL

func (_p *PlanetSupportUndefined) UnmarshalGQL(value interface{}) error

UnmarshalGQL implements the graphql.Unmarshaler interface for PlanetSupportUndefined.

func (*PlanetSupportUndefined) UnmarshalJSON

func (_p *PlanetSupportUndefined) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PlanetSupportUndefined.

func (*PlanetSupportUndefined) UnmarshalText

func (_p *PlanetSupportUndefined) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for PlanetSupportUndefined.

func (*PlanetSupportUndefined) UnmarshalYAML

func (_p *PlanetSupportUndefined) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements a YAML Unmarshaler for PlanetSupportUndefined.

func (PlanetSupportUndefined) Validate

func (_p PlanetSupportUndefined) Validate() error

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

func (PlanetSupportUndefined) Value

func (_p PlanetSupportUndefined) Value() (driver.Value, error)

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

type PlanetSupportUndefinedWithDefault

type PlanetSupportUndefinedWithDefault uint8

PlanetSupportUndefinedWithDefault has a default value Earth and it supports deserialization from "undefined"/zero values.

const (
	PlanetSupportUndefinedWithDefaultEarth PlanetSupportUndefinedWithDefault = iota
	PlanetSupportUndefinedWithDefaultMars
	PlanetSupportUndefinedWithDefaultPluto
	PlanetSupportUndefinedWithDefaultVenus
	PlanetSupportUndefinedWithDefaultMercury
	PlanetSupportUndefinedWithDefaultJupiter
	PlanetSupportUndefinedWithDefaultSaturn
	PlanetSupportUndefinedWithDefaultUranus
	PlanetSupportUndefinedWithDefaultNeptune
)

func PlanetSupportUndefinedWithDefaultFromString

func PlanetSupportUndefinedWithDefaultFromString(raw string) (PlanetSupportUndefinedWithDefault, bool)

PlanetSupportUndefinedWithDefaultFromString determines the enum value with an exact case match.

func PlanetSupportUndefinedWithDefaultFromStringIgnoreCase

func PlanetSupportUndefinedWithDefaultFromStringIgnoreCase(raw string) (PlanetSupportUndefinedWithDefault, bool)

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

func PlanetSupportUndefinedWithDefaultValues

func PlanetSupportUndefinedWithDefaultValues() []PlanetSupportUndefinedWithDefault

PlanetSupportUndefinedWithDefaultValues returns all values of the enum.

func (PlanetSupportUndefinedWithDefault) IsValid

IsValid tests whether the value is a valid enum value.

func (PlanetSupportUndefinedWithDefault) MarshalBSONValue

func (_p PlanetSupportUndefinedWithDefault) MarshalBSONValue() (bsontype.Type, []byte, error)

MarshalBSONValue implements the bson.ValueMarshaler interface for PlanetSupportUndefinedWithDefault.

func (PlanetSupportUndefinedWithDefault) MarshalBinary

func (_p PlanetSupportUndefinedWithDefault) MarshalBinary() ([]byte, error)

MarshalBinary implements the encoding.BinaryMarshaler interface for PlanetSupportUndefinedWithDefault.

func (PlanetSupportUndefinedWithDefault) MarshalGQL

func (_p PlanetSupportUndefinedWithDefault) MarshalGQL(w io.Writer)

MarshalGQL implements the graphql.Marshaler interface for PlanetSupportUndefinedWithDefault.

func (PlanetSupportUndefinedWithDefault) MarshalJSON

func (_p PlanetSupportUndefinedWithDefault) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for PlanetSupportUndefinedWithDefault.

func (PlanetSupportUndefinedWithDefault) MarshalText

func (_p PlanetSupportUndefinedWithDefault) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface for PlanetSupportUndefinedWithDefault.

func (PlanetSupportUndefinedWithDefault) MarshalYAML

func (_p PlanetSupportUndefinedWithDefault) MarshalYAML() (interface{}, error)

MarshalYAML implements a YAML Marshaler for PlanetSupportUndefinedWithDefault.

func (*PlanetSupportUndefinedWithDefault) Scan

func (_p *PlanetSupportUndefinedWithDefault) Scan(value interface{}) error

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

func (PlanetSupportUndefinedWithDefault) String

String returns the string of the enum value. If the enum value is invalid, it will produce a string of the following pattern PlanetSupportUndefinedWithDefault(%d) instead.

func (*PlanetSupportUndefinedWithDefault) UnmarshalBSONValue

func (_p *PlanetSupportUndefinedWithDefault) UnmarshalBSONValue(t bsontype.Type, data []byte) error

UnmarshalBSONValue implements the bson.ValueUnmarshaler interface for PlanetSupportUndefinedWithDefault.

func (*PlanetSupportUndefinedWithDefault) UnmarshalBinary

func (_p *PlanetSupportUndefinedWithDefault) UnmarshalBinary(text []byte) error

UnmarshalBinary implements the encoding.BinaryUnmarshaler interface for PlanetSupportUndefinedWithDefault.

func (*PlanetSupportUndefinedWithDefault) UnmarshalGQL

func (_p *PlanetSupportUndefinedWithDefault) UnmarshalGQL(value interface{}) error

UnmarshalGQL implements the graphql.Unmarshaler interface for PlanetSupportUndefinedWithDefault.

func (*PlanetSupportUndefinedWithDefault) UnmarshalJSON

func (_p *PlanetSupportUndefinedWithDefault) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PlanetSupportUndefinedWithDefault.

func (*PlanetSupportUndefinedWithDefault) UnmarshalText

func (_p *PlanetSupportUndefinedWithDefault) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for PlanetSupportUndefinedWithDefault.

func (*PlanetSupportUndefinedWithDefault) UnmarshalYAML

func (_p *PlanetSupportUndefinedWithDefault) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements a YAML Unmarshaler for PlanetSupportUndefinedWithDefault.

func (PlanetSupportUndefinedWithDefault) Validate

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

func (PlanetSupportUndefinedWithDefault) Value

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

type PlanetWithDefault

type PlanetWithDefault uint8

PlanetWithDefault has a default value Earth.

const (
	PlanetWithDefaultEarth PlanetWithDefault = iota
	PlanetWithDefaultMars
	PlanetWithDefaultPluto
	PlanetWithDefaultVenus
	PlanetWithDefaultMercury
	PlanetWithDefaultJupiter
	PlanetWithDefaultSaturn
	PlanetWithDefaultUranus
	PlanetWithDefaultNeptune
)

func PlanetWithDefaultFromString

func PlanetWithDefaultFromString(raw string) (PlanetWithDefault, bool)

PlanetWithDefaultFromString determines the enum value with an exact case match.

func PlanetWithDefaultFromStringIgnoreCase

func PlanetWithDefaultFromStringIgnoreCase(raw string) (PlanetWithDefault, bool)

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

func PlanetWithDefaultValues

func PlanetWithDefaultValues() []PlanetWithDefault

PlanetWithDefaultValues returns all values of the enum.

func (PlanetWithDefault) IsValid

func (_p PlanetWithDefault) IsValid() bool

IsValid tests whether the value is a valid enum value.

func (PlanetWithDefault) MarshalBSONValue

func (_p PlanetWithDefault) MarshalBSONValue() (bsontype.Type, []byte, error)

MarshalBSONValue implements the bson.ValueMarshaler interface for PlanetWithDefault.

func (PlanetWithDefault) MarshalBinary

func (_p PlanetWithDefault) MarshalBinary() ([]byte, error)

MarshalBinary implements the encoding.BinaryMarshaler interface for PlanetWithDefault.

func (PlanetWithDefault) MarshalGQL

func (_p PlanetWithDefault) MarshalGQL(w io.Writer)

MarshalGQL implements the graphql.Marshaler interface for PlanetWithDefault.

func (PlanetWithDefault) MarshalJSON

func (_p PlanetWithDefault) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for PlanetWithDefault.

func (PlanetWithDefault) MarshalText

func (_p PlanetWithDefault) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface for PlanetWithDefault.

func (PlanetWithDefault) MarshalYAML

func (_p PlanetWithDefault) MarshalYAML() (interface{}, error)

MarshalYAML implements a YAML Marshaler for PlanetWithDefault.

func (*PlanetWithDefault) Scan

func (_p *PlanetWithDefault) Scan(value interface{}) error

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

func (PlanetWithDefault) String

func (_p PlanetWithDefault) 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 PlanetWithDefault(%d) instead.

func (*PlanetWithDefault) UnmarshalBSONValue

func (_p *PlanetWithDefault) UnmarshalBSONValue(t bsontype.Type, data []byte) error

UnmarshalBSONValue implements the bson.ValueUnmarshaler interface for PlanetWithDefault.

func (*PlanetWithDefault) UnmarshalBinary

func (_p *PlanetWithDefault) UnmarshalBinary(text []byte) error

UnmarshalBinary implements the encoding.BinaryUnmarshaler interface for PlanetWithDefault.

func (*PlanetWithDefault) UnmarshalGQL

func (_p *PlanetWithDefault) UnmarshalGQL(value interface{}) error

UnmarshalGQL implements the graphql.Unmarshaler interface for PlanetWithDefault.

func (*PlanetWithDefault) UnmarshalJSON

func (_p *PlanetWithDefault) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PlanetWithDefault.

func (*PlanetWithDefault) UnmarshalText

func (_p *PlanetWithDefault) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for PlanetWithDefault.

func (*PlanetWithDefault) UnmarshalYAML

func (_p *PlanetWithDefault) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements a YAML Unmarshaler for PlanetWithDefault.

func (PlanetWithDefault) Validate

func (_p PlanetWithDefault) Validate() error

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

func (PlanetWithDefault) Value

func (_p PlanetWithDefault) Value() (driver.Value, error)

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

Jump to

Keyboard shortcuts

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