environment

package
v0.1.19 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

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

Jump to

Keyboard shortcuts

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