Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrIsInvalid the given environment is not valid (i.e. is unknown). ErrIsInvalid = errors.New("invalid environment") )
Functions ¶
This section is empty.
Types ¶
type Environment ¶
type Environment uint8
An Environment represents a software deployment environment used in enterprise systems. It defines the context in which an application operates, such as development, testing, or production.
This structure implements encoding.TextMarshaler, encoding.TextUnmarshaler and fmt.Stringer for easier integration with external components.
const ( Unknown Environment = iota Production Staging Development Local )
func Parse ¶
func Parse(value string) (Environment, error)
Parse allocates a new Environment instance based on its string value.
func (Environment) MarshalText ¶
func (e Environment) MarshalText() (text []byte, err error)
func (Environment) String ¶
func (e Environment) String() string
func (*Environment) UnmarshalText ¶
func (e *Environment) UnmarshalText(text []byte) error
Click to show internal directories.
Click to hide internal directories.