Documentation
¶
Index ¶
- Variables
- type Data
- func (d *Data) Bool() (bool, error)
- func (d *Data) Bytes() ([]byte, error)
- func (d *Data) Delete(key string)
- func (d *Data) Float64() (float64, error)
- func (d *Data) Get(keys ...any) *Data
- func (d *Data) Int() (int, error)
- func (d *Data) Int64() (int64, error)
- func (d *Data) Interface() any
- func (d *Data) Iterator() iter.Seq[*Data]
- func (d *Data) Len() int
- func (d *Data) Map() (map[string]any, error)
- func (d *Data) MarshalJSON() ([]byte, error)
- func (d *Data) MustBool(args ...bool) bool
- func (d *Data) MustBytes(args ...[]byte) []byte
- func (d *Data) MustFloat64(args ...float64) float64
- func (d *Data) MustInt(args ...int) int
- func (d *Data) MustInt64(args ...int64) int64
- func (d *Data) MustMap(args ...map[string]any) map[string]any
- func (d *Data) MustSlice(args ...[]any) []any
- func (d *Data) MustString(args ...string) string
- func (d *Data) MustStringSlice(args ...[]string) []string
- func (d *Data) MustUint64(args ...uint64) uint64
- func (d *Data) Set(key string, val any)
- func (d *Data) SetPath(branch []any, val any)
- func (d *Data) Slice() ([]any, error)
- func (d *Data) String() (string, error)
- func (d *Data) StringSlice() ([]string, error)
- func (d *Data) Uint64() (uint64, error)
- func (d *Data) UnmarshalJSON(data []byte) error
Constants ¶
This section is empty.
Variables ¶
var ErrTypeMismatch = errors.New("jester: type assertion failed (type mismatch)")
Functions ¶
This section is empty.
Types ¶
type Data ¶
type Data struct {
// contains filtered or unexported fields
}
func (*Data) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface.
func (*Data) MustBytes ¶
MustBytes returns the underlying data as a []byte with optional default value.
func (*Data) MustFloat64 ¶
MustFloat64 returns the underlying data as a float64 with optional default value.
func (*Data) MustInt64 ¶
MustInt64 returns the underlying data as an int64 with optional default value.
func (*Data) MustMap ¶
MustMap returns the underlying data as a map[string]any with optional default value.
func (*Data) MustSlice ¶
MustSlice returns the underlying data as a []any with optional default value.
func (*Data) MustString ¶
MustString returns the underlying data as a string with optional default value.
func (*Data) MustStringSlice ¶
MustStringSlice returns the underlying data as a []string with optional default value.
func (*Data) MustUint64 ¶
MustUint64 returns the underlying data as a uint64 with optional default value.
func (*Data) SetPath ¶
SetPath modifies the data structure by setting the value for the specified path.
func (*Data) StringSlice ¶
StringSlice returns the underlying data as a []string.
func (*Data) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.