Documentation ¶
Index ¶
- func ComposeEnvName(appName, group, name string) string
- func IfErrNotNilPanic(err error)
- func Item(m *types.Metadata) (t types.Item)
- func List(items ...string) []string
- func NewBool(m *types.Metadata) (b *types.BooT)
- func NewDuration(m *types.Metadata) (b *types.DurT)
- func NewFloat(m *types.Metadata) (b *types.FltT)
- func NewInt(m *types.Metadata) (b *types.IntT)
- func NewList(m *types.Metadata) (b *types.LstT)
- func NewString(m *types.Metadata) (b *types.StrT)
- func NewUint(m *types.Metadata) (b *types.UinT)
- type Configs
- func (c *Configs) Get(group, name string) (t types.Item, err error)
- func (c *Configs) GetByName(name string) (t Types)
- func (c *Configs) GetEnvString(group, name string) (envName string, err error)
- func (c *Configs) GetGroup(group string) (t TypeGroup)
- func (c *Configs) GetGroups() (tg TypesGrouped)
- func (c *Configs) GetHelp(name, group string, detailed bool) (text string, err error)
- func (c *Configs) Load(filename string) (err error)
- func (c *Configs) LoadAllFromEnv()
- func (c *Configs) LoadFromEnv(group, name string) (err error)
- func (c *Configs) MarshalJSON() ([]byte, error)
- func (c *Configs) Save(filename string) (err error)
- func (c *Configs) UnmarshalJSON(bytes []byte) error
- type TypeGroup
- type Types
- type TypesGrouped
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComposeEnvName ¶
func IfErrNotNilPanic ¶
func IfErrNotNilPanic(err error)
IfErrNotNilPanic is a helper for functions that should never error as errors are purely programmer errors and not error conditions.
func NewDuration ¶
NewDuration creates a new duration types.Item
Types ¶
type Configs ¶
func (*Configs) GetEnvString ¶
func (*Configs) GetGroups ¶
func (c *Configs) GetGroups() (tg TypesGrouped)
func (*Configs) LoadAllFromEnv ¶
func (c *Configs) LoadAllFromEnv()
func (*Configs) LoadFromEnv ¶
func (*Configs) MarshalJSON ¶
MarshalJSON returns the JSON for the current state of a Configs
func (*Configs) UnmarshalJSON ¶
UnmarshalJSON loads a Configs with the values in a JSON string
type TypesGrouped ¶
type TypesGrouped []TypeGroup
func (TypesGrouped) Len ¶
func (t TypesGrouped) Len() int
func (TypesGrouped) Less ¶
func (t TypesGrouped) Less(i, j int) bool
func (TypesGrouped) Swap ¶
func (t TypesGrouped) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.