Documentation
¶
Index ¶
- Variables
- type Joneva
- func (j *Joneva) Bool(key string) (bool, error)
- func (j *Joneva) Duration(key string) (time.Duration, error)
- func (j *Joneva) Float64(key string) (float64, error)
- func (j *Joneva) Get(key string) interface{}
- func (j *Joneva) Load(override ...string) error
- func (j *Joneva) Map(key string) (map[string]interface{}, error)
- func (j *Joneva) MustBool(key string) bool
- func (j *Joneva) MustDuration(key string) time.Duration
- func (j *Joneva) MustFloat64(key string) float64
- func (j *Joneva) MustMap(key string) map[string]interface{}
- func (j *Joneva) MustSlice(key string) []interface{}
- func (j *Joneva) MustSliceBool(key string) []bool
- func (j *Joneva) MustSliceFloat64(key string) []float64
- func (j *Joneva) MustSliceString(key string) []string
- func (j *Joneva) MustString(key string) string
- func (j *Joneva) Save() error
- func (j *Joneva) Set(key string, value interface{})
- func (j *Joneva) SetDuration(key string, value time.Duration)
- func (j *Joneva) Slice(key string) ([]interface{}, error)
- func (j *Joneva) SliceBool(key string) ([]bool, error)
- func (j *Joneva) SliceFloat64(key string) ([]float64, error)
- func (j *Joneva) SliceString(key string) ([]string, error)
- func (j *Joneva) String(key string) (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("not found") ErrTypeMismatch = errors.New("type mismatch") )
Functions ¶
This section is empty.
Types ¶
type Joneva ¶
type Joneva struct {
// contains filtered or unexported fields
}
func (*Joneva) Duration ¶
Duration gets the key value as time.Duration. Supports standard Go formats: "300ms", "1.5h", "2h45m", "30s", "5m", etc. Also supports numbers like nanoseconds.
func (*Joneva) MustDuration ¶
MustDuration gets the key value as time.Duration or panics on error.
func (*Joneva) MustFloat64 ¶
func (*Joneva) MustSliceBool ¶
func (*Joneva) MustSliceFloat64 ¶
func (*Joneva) MustSliceString ¶
func (*Joneva) MustString ¶
func (*Joneva) SetDuration ¶
SetDuration sets the value of a key as a duration in string format.
Click to show internal directories.
Click to hide internal directories.