Documentation ¶
Index ¶
Constants ¶
const ( // LifecycleEnumSandBox Used for testing and development in an isolated environment. LifecycleEnumSandBox _LifecycleEnum = "sb" // LifecycleEnumNonProd Non-production environment for pre-production testing and validation. LifecycleEnumNonProd _LifecycleEnum = "np" // LifecycleEnumReleaseCandidate A candidate for release, typically the last testing stage before production. LifecycleEnumReleaseCandidate _LifecycleEnum = "rc" // LifecycleEnumProduction The live and operational environment where the application is accessible to users. LifecycleEnumProduction _LifecycleEnum = "pr" )
Variables ¶
This section is empty.
Functions ¶
func LifecycleEnumStrings ¶
func LifecycleEnumStrings() []string
LifecycleEnumStrings returns a slice of all enum values as strings. This could be useful for validation with something like slices.Contains or quickly seeing all values of an enum. Each string matches the index of LifecycleEnumValues.
Types ¶
type InvalidLifecycleEnumError ¶
type InvalidLifecycleEnumError struct {
// contains filtered or unexported fields
}
InvalidLifecycleEnumError is returned by ToLifecycleEnum if the passed in string isn't one of the enum values.
func (InvalidLifecycleEnumError) Error ¶
func (e InvalidLifecycleEnumError) Error() string
Error exposes the invalid string used and shows all the possible values.
func (InvalidLifecycleEnumError) Is ¶
func (e InvalidLifecycleEnumError) Is(err error) bool
Is tells you if target can be unwrapped to be an InvalidLifecycleEnumError.
type LifecycleEnum ¶
type LifecycleEnum interface { fmt.Stringer encoding.TextMarshaler // contains filtered or unexported methods }
LifecycleEnum is a true enum, i.e. using this as a parameter in a function declaration requires the use of one of the constants defined in this package.
func LifecycleEnumValues ¶
func LifecycleEnumValues() []LifecycleEnum
LifecycleEnumValues returns a slice of values of the LifecycleEnum enum. Each enum value matches the index of LifecycleEnumStrings.
func ToLifecycleEnum ¶
func ToLifecycleEnum(s string) (LifecycleEnum, error)
ToLifecycleEnum retrieves an enum value from the constants defined in this package. It tries it's best to find s in the enum by using the original-case, uppercase and lowercase.
type LifecycleEnumUnmarshaler ¶
type LifecycleEnumUnmarshaler string
func (LifecycleEnumUnmarshaler) Extract ¶
func (x LifecycleEnumUnmarshaler) Extract() LifecycleEnum
func (*LifecycleEnumUnmarshaler) UnmarshalText ¶
func (x *LifecycleEnumUnmarshaler) UnmarshalText(text []byte) error