Documentation
¶
Index ¶
- Variables
- func InitGlobalConfig(opts ...Option) error
- type Bool
- type Duration
- type Float
- type Int
- type Option
- type String
- type Time
- type UInt
- type Value
- type ValueBool
- type ValueDuration
- type ValueFloat
- type ValueInt
- type ValueNone
- type ValueString
- type ValueTime
- type ValueType
- type ValueUInt
- type WithAcceptEnvironment
- type WithDefValue
- type WithSource
- type WithSourceFile
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("not found") //nolint
)
Functions ¶
func InitGlobalConfig ¶
InitGlobalConfig init global config
Types ¶
type Bool ¶
type Bool interface { Value Must(ctx context.Context) bool Maybe(ctx context.Context) (bool, error) }
Bool bool value reader
type Duration ¶
type Duration interface { Value Must(ctx context.Context) time.Duration Maybe(ctx context.Context) (time.Duration, error) }
Duration time duration value reader
type Float ¶
type Float interface { Value Must(ctx context.Context) float64 Maybe(ctx context.Context) (float64, error) }
Float float point value reader
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option config init option
type String ¶
type String interface { Value Must(ctx context.Context) string Maybe(ctx context.Context) (string, error) }
String string value reader
type Time ¶
type Time interface { Value Must(ctx context.Context) time.Time Maybe(ctx context.Context) (time.Time, error) }
Time date time value readr
type UInt ¶
type UInt interface { Value Must(ctx context.Context) uint Maybe(ctx context.Context) (uint, error) }
UInt unsigned int value reader
type ValueDuration ¶
type ValueDuration string
ValueDuration duration accessor
type ValueType ¶
type ValueType int
ValueType value type ID
const ( //NoneType none value NoneType ValueType = iota //BoolType bool value BoolType //IntType int value IntType //UIntType unsigned int value UIntType //StringType string value StringType //TimeType date time value TimeType //DurationType time duration value DurationType //FloatType float point value FloatType )
type WithAcceptEnvironment ¶
WithAcceptEnvironment option
type WithDefValue ¶
type WithDefValue struct { Option Key interface{} Val interface{} }
WithDefValue option
Click to show internal directories.
Click to hide internal directories.