Documentation ¶
Index ¶
- Variables
- type Config
- func (c *Config) Bool(name string, idx int, opts ...Option) (bool, error)
- func (c *Config) Child(name string, idx int, opts ...Option) (*Config, error)
- func (c *Config) CountField(name string) (int, error)
- func (c *Config) Float(name string, idx int, opts ...Option) (float64, error)
- func (c *Config) GetFields() []string
- func (c *Config) HasField(name string) bool
- func (c *Config) Int(name string, idx int, opts ...Option) (int64, error)
- func (c *Config) Merge(from interface{}, options ...Option) error
- func (c *Config) Parent() *Config
- func (c *Config) Path(sep string) string
- func (c *Config) PathOf(field, sep string) string
- func (c *Config) SetBool(name string, idx int, value bool, opts ...Option) error
- func (c *Config) SetChild(name string, idx int, value *Config, opts ...Option) error
- func (c *Config) SetFloat(name string, idx int, value float64, opts ...Option) error
- func (c *Config) SetInt(name string, idx int, value int64, opts ...Option) error
- func (c *Config) SetString(name string, idx int, value string, opts ...Option) error
- func (c *Config) String(name string, idx int, opts ...Option) (string, error)
- func (c *Config) Unpack(to interface{}, options ...Option) error
- type Error
- type Meta
- type Option
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMissing = errors.New("missing field") ErrTypeNoArray = errors.New("field is no array") ErrTypeMismatch = errors.New("type mismatch") ErrKeyTypeNotString = errors.New("key must be a string") ErrIndexOutOfRange = errors.New("out of range index") ErrPointerRequired = errors.New("pointer required for unpacking configurations") ErrArraySizeMistach = errors.New("Array size mismatch") ErrExpectedObject = errors.New("expected object") ErrNilConfig = errors.New("config is nil") ErrNilValue = errors.New("nil value is invalid") ErrTODO = errors.New("TODO - implement me") ErrDuplicateKeey = errors.New("duplicate key") )
error Reasons
View Source
var ( ErrConfig = errors.New("Configuration error") ErrImplementation = errors.New("Implementation error") ErrUnknown = errors.New("Unspecified") )
error classes
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) CountField ¶
number of elements for this field. If config value is a list, returns number of elements in list
Source Files ¶
Click to show internal directories.
Click to hide internal directories.