Documentation ¶
Index ¶
- Constants
- Variables
- func Bind(value interface{}, opts ...Option) error
- func Bool(names ...string) bool
- func BoolP(names ...string) *bool
- func Complex128(names ...string) complex128
- func Complex128P(names ...string) *complex128
- func Complex128Slice(names ...string) []complex128
- func Complex64(names ...string) complex64
- func Complex64P(names ...string) *complex64
- func Complex64Slice(names ...string) []complex64
- func Duration(names ...string) time.Duration
- func DurationP(names ...string) *time.Duration
- func Float32(names ...string) float32
- func Float32P(names ...string) *float32
- func Float32Slice(names ...string) []float32
- func Float64(names ...string) float64
- func Float64P(names ...string) *float64
- func Float64Slice(names ...string) []float64
- func GetHostname(defaultName string) string
- func Has(names ...string) bool
- func Int(names ...string) int
- func Int16(names ...string) int16
- func Int16P(names ...string) *int16
- func Int16Slice(names ...string) []int16
- func Int32(names ...string) int32
- func Int32P(names ...string) *int32
- func Int32Slice(names ...string) []int32
- func Int64(names ...string) int64
- func Int64P(names ...string) *int64
- func Int64Slice(names ...string) []int64
- func Int8(names ...string) int8
- func Int8P(names ...string) *int8
- func Int8Slice(names ...string) []int8
- func IntP(names ...string) *int
- func IntSlice(names ...string) []int
- func Is(deployEnv DeployEnv) bool
- func Load(filenames ...string) error
- func Reader(names ...string) *os.File
- func Split(names ...string) []string
- func String(names ...string) string
- func StringP(names ...string) *string
- func ToLower(names ...string) string
- func ToUpper(names ...string) string
- func Uint(names ...string) uint
- func Uint16(names ...string) uint16
- func Uint16P(names ...string) *uint16
- func Uint16Slice(names ...string) []uint16
- func Uint32(names ...string) uint32
- func Uint32P(names ...string) *uint32
- func Uint32Slice(names ...string) []uint32
- func Uint64(names ...string) uint64
- func Uint64P(names ...string) *uint64
- func Uint64Slice(names ...string) []uint64
- func Uint8(names ...string) uint8
- func Uint8P(names ...string) *uint8
- func Uint8Slice(names ...string) []uint8
- func UintP(names ...string) *uint
- func UintSlice(names ...string) []uint
- func Writer(names ...string) *os.File
- type Bytes
- type DeployEnv
- type Env
- func (e Env) Bool(defaultValue bool) bool
- func (e Env) BoolP(defaultValue bool) *bool
- func (e Env) ByteSlice(defaultValue []byte, sep string) []byte
- func (e Env) Bytes(defaultValue string) []byte
- func (e Env) Complex128(defaultValue complex128) complex128
- func (e Env) Complex128P(defaultValue complex128) *complex128
- func (e Env) Complex128Slice(defaultValue []complex128, sep string) []complex128
- func (e Env) Complex64(defaultValue complex64) complex64
- func (e Env) Complex64P(defaultValue complex64) *complex64
- func (e Env) Complex64Slice(defaultValue []complex64, sep string) []complex64
- func (e Env) Duration(defaultValue time.Duration) time.Duration
- func (e Env) DurationP(defaultValue time.Duration) *time.Duration
- func (e Env) Float32(defaultValue float32) float32
- func (e Env) Float32P(defaultValue float32) *float32
- func (e Env) Float32Slice(defaultValue []float32, sep string) []float32
- func (e Env) Float64(defaultValue float64) float64
- func (e Env) Float64P(defaultValue float64) *float64
- func (e Env) Float64Slice(defaultValue []float64, sep string) []float64
- func (e Env) Has() bool
- func (e Env) Int(defaultValue int) int
- func (e Env) Int16(defaultValue int16) int16
- func (e Env) Int16P(defaultValue int16) *int16
- func (e Env) Int16Slice(defaultValue []int16, sep string) []int16
- func (e Env) Int32(defaultValue int32) int32
- func (e Env) Int32P(defaultValue int32) *int32
- func (e Env) Int32Slice(defaultValue []int32, sep string) []int32
- func (e Env) Int64(defaultValue int64) int64
- func (e Env) Int64P(defaultValue int64) *int64
- func (e Env) Int64Slice(defaultValue []int64, sep string) []int64
- func (e Env) Int8(defaultValue int8) int8
- func (e Env) Int8P(defaultValue int8) *int8
- func (e Env) Int8Slice(defaultValue []int8, sep string) []int8
- func (e Env) IntP(defaultValue int) *int
- func (e Env) IntSlice(defaultValue []int, sep string) []int
- func (e Env) Reader(defaultValue string) *os.File
- func (e Env) Split(defaultValue, sep string) []string
- func (e Env) String(defaultValue string) string
- func (e Env) StringP(defaultValue string) *string
- func (e Env) ToLower(defaultValue string) string
- func (e Env) ToUpper(defaultValue string) string
- func (e Env) Uint(defaultValue uint) uint
- func (e Env) Uint16(defaultValue uint16) uint16
- func (e Env) Uint16P(defaultValue uint16) *uint16
- func (e Env) Uint16Slice(defaultValue []uint16, sep string) []uint16
- func (e Env) Uint32(defaultValue uint32) uint32
- func (e Env) Uint32P(defaultValue uint32) *uint32
- func (e Env) Uint32Slice(defaultValue []uint32, sep string) []uint32
- func (e Env) Uint64(defaultValue uint64) uint64
- func (e Env) Uint64P(defaultValue uint64) *uint64
- func (e Env) Uint64Slice(defaultValue []uint64, sep string) []uint64
- func (e Env) Uint8(defaultValue uint8) uint8
- func (e Env) Uint8P(defaultValue uint8) *uint8
- func (e Env) Uint8Slice(defaultValue []uint8, sep string) []uint8
- func (e Env) UintP(defaultValue uint) *uint
- func (e Env) UintSlice(defaultValue []uint, sep string) []uint
- func (e Env) Writer(defaultValue string) *os.File
- type Option
- type Ref
- func (ref Ref) Bool(v *bool) bool
- func (ref Ref) Complex128(v *complex128) complex128
- func (ref Ref) Complex64(v *complex64) complex64
- func (ref Ref) Duration(v time.Duration) time.Duration
- func (ref Ref) Float32(v *float32) float32
- func (ref Ref) Float64(v *float64) float64
- func (ref Ref) Has() bool
- func (ref Ref) Int(v *int) int
- func (ref Ref) Int16(v *int16) int16
- func (ref Ref) Int32(v *int32) int32
- func (ref Ref) Int64(v *int64) int64
- func (ref Ref) Int8(v *int8) int8
- func (ref Ref) String(v string) string
- func (ref Ref) Uint(v *uint) uint
- func (ref Ref) Uint16(v *uint16) uint16
- func (ref Ref) Uint32(v *uint32) uint32
- func (ref Ref) Uint64(v *uint64) uint64
- func (ref Ref) Uint8(v *uint8) uint8
Constants ¶
View Source
const DefaultEnvName = "DEPLOY_ENV"
View Source
const PrefixDefine = "_DEFINE_DEPLOY_ENV_"
Variables ¶
View Source
var EnvName = DefaultEnvName
Functions ¶
func Complex128 ¶
func Complex128(names ...string) complex128
func Complex128P ¶ added in v0.2.2
func Complex128P(names ...string) *complex128
func Complex128Slice ¶
func Complex128Slice(names ...string) []complex128
func Complex64P ¶ added in v0.2.2
func Complex64Slice ¶
func Float32Slice ¶
func Float64Slice ¶
func GetHostname ¶
func Int16Slice ¶
func Int32Slice ¶
func Int64Slice ¶
func Uint16Slice ¶
func Uint32Slice ¶
func Uint64Slice ¶
func Uint8Slice ¶
Types ¶
type DeployEnv ¶ added in v0.3.0
type DeployEnv int
func GetDeployEnv ¶ added in v0.3.0
func GetDeployEnv() DeployEnv
func NewDeployEnv ¶ added in v0.3.0
type Env ¶
type Env struct { Name string // contains filtered or unexported fields }
func (Env) Complex128 ¶
func (e Env) Complex128(defaultValue complex128) complex128
func (Env) Complex128P ¶ added in v0.2.2
func (e Env) Complex128P(defaultValue complex128) *complex128
func (Env) Complex128Slice ¶
func (e Env) Complex128Slice(defaultValue []complex128, sep string) []complex128
func (Env) Complex64P ¶ added in v0.2.2
func (Env) Complex64Slice ¶
type Option ¶ added in v0.3.0
type Option func(*binder)
func WithPrefix ¶ added in v0.3.0
func WithValidation ¶ added in v0.3.0
func WithValidation(v ...*validator.Validate) Option
type Ref ¶
type Ref struct {
Names []string
}
func (Ref) Complex128 ¶
func (ref Ref) Complex128(v *complex128) complex128
Click to show internal directories.
Click to hide internal directories.