authenums

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoValidEnum = errors.New("not a valid enum")
)

Functions

func AuthHandlerTypeStrings

func AuthHandlerTypeStrings() []string

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

func AuthTokenStyleStrings

func AuthTokenStyleStrings() []string

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

func AuthTypeStrings

func AuthTypeStrings() []string

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

Types

type AuthHandlerType

type AuthHandlerType uint
const (
	None AuthHandlerType = iota
	Inbuilt
	Custom
)

func AuthHandlerTypeFromString

func AuthHandlerTypeFromString(raw string) (AuthHandlerType, bool)

AuthHandlerTypeFromString determines the enum value with an exact case match.

func AuthHandlerTypeFromStringIgnoreCase

func AuthHandlerTypeFromStringIgnoreCase(raw string) (AuthHandlerType, bool)

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

func AuthHandlerTypeValues

func AuthHandlerTypeValues() []AuthHandlerType

AuthHandlerTypeValues returns all values of the enum.

func (AuthHandlerType) IsValid

func (_a AuthHandlerType) IsValid() bool

IsValid tests whether the value is a valid enum value.

func (AuthHandlerType) MarshalBinary

func (_a AuthHandlerType) MarshalBinary() ([]byte, error)

MarshalBinary implements the encoding.BinaryMarshaler interface for AuthHandlerType.

func (AuthHandlerType) MarshalGQL

func (_a AuthHandlerType) MarshalGQL(w io.Writer)

MarshalGQL implements the graphql.Marshaler interface for AuthHandlerType.

func (AuthHandlerType) MarshalJSON

func (_a AuthHandlerType) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for AuthHandlerType.

func (AuthHandlerType) MarshalText

func (_a AuthHandlerType) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface for AuthHandlerType.

func (AuthHandlerType) MarshalYAML

func (_a AuthHandlerType) MarshalYAML() (interface{}, error)

MarshalYAML implements a YAML Marshaler for AuthHandlerType.

func (AuthHandlerType) SQLTypeName

func (AuthHandlerType) SQLTypeName() string

func (*AuthHandlerType) Scan

func (_a *AuthHandlerType) Scan(value interface{}) error

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

func (AuthHandlerType) String

func (_a AuthHandlerType) 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 AuthHandlerType(%d) instead.

func (*AuthHandlerType) UnmarshalBinary

func (_a *AuthHandlerType) UnmarshalBinary(text []byte) error

UnmarshalBinary implements the encoding.BinaryUnmarshaler interface for AuthHandlerType.

func (*AuthHandlerType) UnmarshalGQL

func (_a *AuthHandlerType) UnmarshalGQL(value interface{}) error

UnmarshalGQL implements the graphql.Unmarshaler interface for AuthHandlerType.

func (*AuthHandlerType) UnmarshalJSON

func (_a *AuthHandlerType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AuthHandlerType.

func (*AuthHandlerType) UnmarshalText

func (_a *AuthHandlerType) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for AuthHandlerType.

func (*AuthHandlerType) UnmarshalYAML

func (_a *AuthHandlerType) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements a YAML Unmarshaler for AuthHandlerType.

func (AuthHandlerType) Validate

func (_a AuthHandlerType) Validate() error

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

func (AuthHandlerType) Value

func (_a AuthHandlerType) Value() (driver.Value, error)

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

func (AuthHandlerType) Values

func (AuthHandlerType) Values() []string

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

type AuthTokenStyle

type AuthTokenStyle uint
const (
	Header AuthTokenStyle = iota
	QueryParams
	Cookie
)

func AuthTokenStyleFromString

func AuthTokenStyleFromString(raw string) (AuthTokenStyle, bool)

AuthTokenStyleFromString determines the enum value with an exact case match.

func AuthTokenStyleFromStringIgnoreCase

func AuthTokenStyleFromStringIgnoreCase(raw string) (AuthTokenStyle, bool)

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

func AuthTokenStyleValues

func AuthTokenStyleValues() []AuthTokenStyle

AuthTokenStyleValues returns all values of the enum.

func (AuthTokenStyle) IsValid

func (_a AuthTokenStyle) IsValid() bool

IsValid tests whether the value is a valid enum value.

func (AuthTokenStyle) MarshalBinary

func (_a AuthTokenStyle) MarshalBinary() ([]byte, error)

MarshalBinary implements the encoding.BinaryMarshaler interface for AuthTokenStyle.

func (AuthTokenStyle) MarshalGQL

func (_a AuthTokenStyle) MarshalGQL(w io.Writer)

MarshalGQL implements the graphql.Marshaler interface for AuthTokenStyle.

func (AuthTokenStyle) MarshalJSON

func (_a AuthTokenStyle) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for AuthTokenStyle.

func (AuthTokenStyle) MarshalText

func (_a AuthTokenStyle) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface for AuthTokenStyle.

func (AuthTokenStyle) MarshalYAML

func (_a AuthTokenStyle) MarshalYAML() (interface{}, error)

MarshalYAML implements a YAML Marshaler for AuthTokenStyle.

func (*AuthTokenStyle) Scan

func (_a *AuthTokenStyle) Scan(value interface{}) error

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

func (AuthTokenStyle) String

func (_a AuthTokenStyle) 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 AuthTokenStyle(%d) instead.

func (*AuthTokenStyle) UnmarshalBinary

func (_a *AuthTokenStyle) UnmarshalBinary(text []byte) error

UnmarshalBinary implements the encoding.BinaryUnmarshaler interface for AuthTokenStyle.

func (*AuthTokenStyle) UnmarshalGQL

func (_a *AuthTokenStyle) UnmarshalGQL(value interface{}) error

UnmarshalGQL implements the graphql.Unmarshaler interface for AuthTokenStyle.

func (*AuthTokenStyle) UnmarshalJSON

func (_a *AuthTokenStyle) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AuthTokenStyle.

func (*AuthTokenStyle) UnmarshalText

func (_a *AuthTokenStyle) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for AuthTokenStyle.

func (*AuthTokenStyle) UnmarshalYAML

func (_a *AuthTokenStyle) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements a YAML Unmarshaler for AuthTokenStyle.

func (AuthTokenStyle) Validate

func (_a AuthTokenStyle) Validate() error

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

func (AuthTokenStyle) Value

func (_a AuthTokenStyle) Value() (driver.Value, error)

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

func (AuthTokenStyle) Values

func (AuthTokenStyle) Values() []string

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

type AuthType

type AuthType uint
const (
	Basic AuthType = iota
	Digest
	OAuth
	APIKey
	BearerToken
)

func AuthTypeFromString

func AuthTypeFromString(raw string) (AuthType, bool)

AuthTypeFromString determines the enum value with an exact case match.

func AuthTypeFromStringIgnoreCase

func AuthTypeFromStringIgnoreCase(raw string) (AuthType, bool)

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

func AuthTypeValues

func AuthTypeValues() []AuthType

AuthTypeValues returns all values of the enum.

func (AuthType) IsValid

func (_a AuthType) IsValid() bool

IsValid tests whether the value is a valid enum value.

func (AuthType) MarshalBinary

func (_a AuthType) MarshalBinary() ([]byte, error)

MarshalBinary implements the encoding.BinaryMarshaler interface for AuthType.

func (AuthType) MarshalGQL

func (_a AuthType) MarshalGQL(w io.Writer)

MarshalGQL implements the graphql.Marshaler interface for AuthType.

func (AuthType) MarshalJSON

func (_a AuthType) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for AuthType.

func (AuthType) MarshalText

func (_a AuthType) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface for AuthType.

func (AuthType) MarshalYAML

func (_a AuthType) MarshalYAML() (interface{}, error)

MarshalYAML implements a YAML Marshaler for AuthType.

func (*AuthType) Scan

func (_a *AuthType) Scan(value interface{}) error

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

func (AuthType) String

func (_a AuthType) 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 AuthType(%d) instead.

func (*AuthType) UnmarshalBinary

func (_a *AuthType) UnmarshalBinary(text []byte) error

UnmarshalBinary implements the encoding.BinaryUnmarshaler interface for AuthType.

func (*AuthType) UnmarshalGQL

func (_a *AuthType) UnmarshalGQL(value interface{}) error

UnmarshalGQL implements the graphql.Unmarshaler interface for AuthType.

func (*AuthType) UnmarshalJSON

func (_a *AuthType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AuthType.

func (*AuthType) UnmarshalText

func (_a *AuthType) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for AuthType.

func (*AuthType) UnmarshalYAML

func (_a *AuthType) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements a YAML Unmarshaler for AuthType.

func (AuthType) Validate

func (_a AuthType) Validate() error

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

func (AuthType) Value

func (_a AuthType) Value() (driver.Value, error)

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

func (AuthType) Values

func (AuthType) 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