Documentation
¶
Overview ¶
Package datamap
Index ¶
- Constants
- type DecoderConfig
- type Option
- type Value
- func (v *Value) Data() map[string]any
- func (v *Value) Decode(out any, keys ...string) error
- func (v *Value) DecodeWithConfig(dc *DecoderConfig, out any, keys ...string) error
- func (v *Value) Exists(keys ...string) bool
- func (v *Value) Get(keys ...string) (any, error)
- func (v *Value) GetBool(strict bool, keys ...string) (bool, error)
- func (v *Value) GetDuration(strict bool, keys ...string) (time.Duration, error)
- func (v *Value) GetInt(strict bool, keys ...string) (int, error)
- func (v *Value) GetString(strict bool, keys ...string) (string, error)
- func (v *Value) Merge(in map[string]any) error
- func (v *Value) Set(value any, keys ...string)
Constants ¶
View Source
const (
ErrKeyNotFound = errors.Sentinel("key not found")
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DecoderConfig ¶
type DecoderConfig struct {
Tag string
DecoderConfig *mapstructure.DecoderConfig
}
type Value ¶
type Value struct {
// contains filtered or unexported fields
}
func (*Value) DecodeWithConfig ¶
func (v *Value) DecodeWithConfig(dc *DecoderConfig, out any, keys ...string) error
func (*Value) GetDuration ¶
Click to show internal directories.
Click to hide internal directories.