Documentation
¶
Index ¶
- Variables
- type Conf
- func (c *Conf) CopyTree(t map[string]any)
- func (c *Conf) Get(k ...string) (any, bool)
- func (c *Conf) GetBool(k ...string) (bool, bool)
- func (c *Conf) GetDBool(d bool, k ...string) bool
- func (c *Conf) GetDFloat64(d float64, k ...string) float64
- func (c *Conf) GetDInt(d int, k ...string) int
- func (c *Conf) GetDInt64(d int64, k ...string) int64
- func (c *Conf) GetDSBool(d bool, k ...string) bool
- func (c *Conf) GetDSFloat64(d float64, k ...string) float64
- func (c *Conf) GetDSInt(d int, k ...string) int
- func (c *Conf) GetDSInt64(d int64, k ...string) int64
- func (c *Conf) GetDSString(d string, k ...string) string
- func (c *Conf) GetDString(d string, k ...string) string
- func (c *Conf) GetFloat64(k ...string) (float64, bool)
- func (c *Conf) GetInt(k ...string) (int, bool)
- func (c *Conf) GetInt64(k ...string) (int64, bool)
- func (c *Conf) GetKeys(k ...string) ([]string, bool)
- func (c *Conf) GetMapStringAny(k ...string) (map[string]any, bool)
- func (c *Conf) GetString(k ...string) (string, bool)
- func (c *Conf) GetToStruct(t any, k ...string) error
- func (c *Conf) Set(v any, k ...string)
- func (c *Conf) SetFromBytesJSON(b []byte) error
- func (c *Conf) SetFromFileJSON(path string) error
- func (c *Conf) SetTree(t map[string]any)
- func (c *Conf) SubTree(path ...string) *ConfSubtree
- func (c *Conf) ToBytesIndentJSON() ([]byte, error)
- func (c *Conf) ToBytesJSON() ([]byte, error)
- func (c *Conf) ToFileIndentJSON(path string, perm os.FileMode) error
- func (c *Conf) ToFileJSON(path string, perm os.FileMode) error
- func (c *Conf) Walk(f ConfWalkFunc)
- type ConfSubtree
- func (c *ConfSubtree) Get(k ...string) (any, bool)
- func (c *ConfSubtree) GetBool(k ...string) (bool, bool)
- func (c *ConfSubtree) GetDBool(d bool, k ...string) bool
- func (c *ConfSubtree) GetDFloat64(d float64, k ...string) float64
- func (c *ConfSubtree) GetDInt(d int, k ...string) int
- func (c *ConfSubtree) GetDInt64(d int64, k ...string) int64
- func (c *ConfSubtree) GetDSBool(d bool, k ...string) bool
- func (c *ConfSubtree) GetDSFloat64(d float64, k ...string) float64
- func (c *ConfSubtree) GetDSInt(d int, k ...string) int
- func (c *ConfSubtree) GetDSInt64(d int64, k ...string) int64
- func (c *ConfSubtree) GetDSString(d string, k ...string) string
- func (c *ConfSubtree) GetDString(d string, k ...string) string
- func (c *ConfSubtree) GetFloat64(k ...string) (float64, bool)
- func (c *ConfSubtree) GetInt(k ...string) (int, bool)
- func (c *ConfSubtree) GetInt64(k ...string) (int64, bool)
- func (c *ConfSubtree) GetKeys(k ...string) ([]string, bool)
- func (c *ConfSubtree) GetMapStringAny(k ...string) (map[string]any, bool)
- func (c *ConfSubtree) GetString(k ...string) (string, bool)
- func (c *ConfSubtree) GetToStruct(t any, k ...string) error
- func (c *ConfSubtree) Set(v any, k ...string)
- func (c *ConfSubtree) SubTree(path ...string) *ConfSubtree
- type ConfWalkFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoKey = errors.New("key not found")
)
Functions ¶
This section is empty.
Types ¶
type Conf ¶
type Conf struct {
// contains filtered or unexported fields
}
func FromBytesJSON ¶
func FromFileJSON ¶
func (*Conf) SetFromBytesJSON ¶
func (*Conf) SetFromFileJSON ¶
func (*Conf) SubTree ¶
func (c *Conf) SubTree(path ...string) *ConfSubtree
func (*Conf) ToBytesIndentJSON ¶
func (*Conf) ToBytesJSON ¶
func (*Conf) ToFileIndentJSON ¶
func (*Conf) Walk ¶
func (c *Conf) Walk(f ConfWalkFunc)
type ConfSubtree ¶
type ConfSubtree struct {
// contains filtered or unexported fields
}
func NewSubTree ¶
func NewSubTree(c *Conf, path ...string) *ConfSubtree
func (*ConfSubtree) GetDFloat64 ¶
func (c *ConfSubtree) GetDFloat64(d float64, k ...string) float64
func (*ConfSubtree) GetDSFloat64 ¶
func (c *ConfSubtree) GetDSFloat64(d float64, k ...string) float64
func (*ConfSubtree) GetDSInt64 ¶
func (c *ConfSubtree) GetDSInt64(d int64, k ...string) int64
func (*ConfSubtree) GetDSString ¶
func (c *ConfSubtree) GetDSString(d string, k ...string) string
func (*ConfSubtree) GetDString ¶
func (c *ConfSubtree) GetDString(d string, k ...string) string
func (*ConfSubtree) GetFloat64 ¶
func (c *ConfSubtree) GetFloat64(k ...string) (float64, bool)
func (*ConfSubtree) GetMapStringAny ¶
func (c *ConfSubtree) GetMapStringAny(k ...string) (map[string]any, bool)
func (*ConfSubtree) GetToStruct ¶
func (c *ConfSubtree) GetToStruct(t any, k ...string) error
func (*ConfSubtree) Set ¶
func (c *ConfSubtree) Set(v any, k ...string)
func (*ConfSubtree) SubTree ¶
func (c *ConfSubtree) SubTree(path ...string) *ConfSubtree
type ConfWalkFunc ¶
Click to show internal directories.
Click to hide internal directories.