Documentation ¶
Index ¶
- type Configurable
- func (c *Configurable) Bool(name string) *bool
- func (c *Configurable) Duration(name string) *time.Duration
- func (c *Configurable) Float64(name string) *float64
- func (c *Configurable) Int(name string) *int
- func (c *Configurable) Int64(name string) *int64
- func (c *Configurable) List(name string) *[]string
- func (c *Configurable) LoadFile(filename string) error
- func (c *Configurable) Map(name string) *map[string]string
- func (c *Configurable) NewBool(name string, value bool, usage string) *bool
- func (c *Configurable) NewDuration(name string, value time.Duration, usage string) *time.Duration
- func (c *Configurable) NewFloat64(name string, value float64, usage string) *float64
- func (c *Configurable) NewInt(name string, value int, usage string) *int
- func (c *Configurable) NewInt64(name string, value int64, usage string) *int64
- func (c *Configurable) NewList(name string, value []string, usage string) *[]string
- func (c *Configurable) NewMap(name string, value map[string]string, usage string) *map[string]string
- func (c *Configurable) NewString(name string, value string, usage string) *string
- func (c *Configurable) Parse(filename string) error
- func (c *Configurable) String(name string) *string
- func (c *Configurable) Usage() string
- type IConfigurable
- type ListFlag
- type MapFlag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configurable ¶
type Configurable struct {
// contains filtered or unexported fields
}
func (*Configurable) Bool ¶
func (c *Configurable) Bool(name string) *bool
func (*Configurable) Float64 ¶
func (c *Configurable) Float64(name string) *float64
func (*Configurable) Int ¶
func (c *Configurable) Int(name string) *int
func (*Configurable) Int64 ¶
func (c *Configurable) Int64(name string) *int64
func (*Configurable) List ¶ added in v0.0.9
func (c *Configurable) List(name string) *[]string
func (*Configurable) LoadFile ¶
func (c *Configurable) LoadFile(filename string) error
func (*Configurable) Map ¶ added in v0.0.9
func (c *Configurable) Map(name string) *map[string]string
func (*Configurable) NewBool ¶
func (c *Configurable) NewBool(name string, value bool, usage string) *bool
func (*Configurable) NewDuration ¶
func (*Configurable) NewFloat64 ¶
func (c *Configurable) NewFloat64(name string, value float64, usage string) *float64
func (*Configurable) NewInt ¶
func (c *Configurable) NewInt(name string, value int, usage string) *int
func (*Configurable) NewInt64 ¶
func (c *Configurable) NewInt64(name string, value int64, usage string) *int64
func (*Configurable) NewList ¶ added in v0.0.9
func (c *Configurable) NewList(name string, value []string, usage string) *[]string
func (*Configurable) NewString ¶
func (c *Configurable) NewString(name string, value string, usage string) *string
func (*Configurable) Parse ¶
func (c *Configurable) Parse(filename string) error
func (*Configurable) String ¶
func (c *Configurable) String(name string) *string
func (*Configurable) Usage ¶
func (c *Configurable) Usage() string
type IConfigurable ¶
type IConfigurable interface { // Existing methods Int(name string) *int NewInt(name string, value int, usage string) *int Int64(name string) *int64 NewInt64(name string, value int64, usage string) *int64 Float64(name string) *float64 NewFloat64(name string, value float64, usage string) *float64 String(name string) *string NewString(name, value, usage string) *string Bool(name string) *bool NewBool(name string, value bool, usage string) *bool Duration(name string) *time.Duration NewDuration(name string, value time.Duration, usage string) *time.Duration List(name string) *[]string NewList(name string, value []string, usage string) *[]string Map(name string) *map[string]string NewMap(name string, value map[string]string, usage string) *map[string]string LoadFile(filename string) error Parse(filename string) error Usage() string }
IConfigurable defines the interface for configuration management.
func New ¶
func New() IConfigurable
Click to show internal directories.
Click to hide internal directories.