Documentation
¶
Index ¶
- type ParserFunc
- type ProviderFunc
- type Repository
- func (r *Repository) Any(path string, defaultValue ...any) any
- func (r *Repository) AnyMap(path string, defaultValue ...map[string]any) map[string]any
- func (r *Repository) Anys(path string, defaultValue ...[]any) []any
- func (r *Repository) Bool(path string, defaultValue ...bool) bool
- func (r *Repository) BoolMap(path string, defaultValue ...map[string]bool) map[string]bool
- func (r *Repository) Bools(path string, defaultValue ...[]bool) []bool
- func (r *Repository) Bytes(path string, defaultValue ...[]byte) []byte
- func (r *Repository) Cut(path string) repository.Repository
- func (r *Repository) Delete(path string) error
- func (r *Repository) Duration(path string, defaultValue ...time.Duration) time.Duration
- func (r *Repository) Float64(path string, defaultValue ...float64) float64
- func (r *Repository) Float64Map(path string, defaultValue ...map[string]float64) map[string]float64
- func (r *Repository) Float64s(path string, defaultValue ...[]float64) []float64
- func (r *Repository) Get(path string) (any, error)
- func (r *Repository) Has(path string) bool
- func (r *Repository) Int(path string, defaultValue ...int) int
- func (r *Repository) Int64(path string, defaultValue ...int64) int64
- func (r *Repository) Int64Map(path string, defaultValue ...map[string]int64) map[string]int64
- func (r *Repository) Int64s(path string, defaultValue ...[]int64) []int64
- func (r *Repository) IntMap(path string, defaultValue ...map[string]int) map[string]int
- func (r *Repository) Ints(path string, defaultValue ...[]int) []int
- func (r *Repository) Keys() []string
- func (r *Repository) Load(provider repository.Provider, parser repository.Parser) error
- func (r *Repository) LoadAt(path string, provider repository.Provider, parser repository.Parser) error
- func (r *Repository) Merge(repo repository.Repository) (repository.Repository, error)
- func (r *Repository) MergeAt(path string, repo repository.Repository) (repository.Repository, error)
- func (r *Repository) Paths() []string
- func (r *Repository) Set(path string, value any) error
- func (r *Repository) String(path string, defaultValue ...string) string
- func (r *Repository) StringMap(path string, defaultValue ...map[string]string) map[string]string
- func (r *Repository) Strings(path string, defaultValue ...[]string) []string
- func (r *Repository) StringsMap(path string, defaultValue ...map[string][]string) map[string][]string
- func (r *Repository) Time(path string, layout string, defaultValue ...time.Time) time.Time
- func (r *Repository) ToMap() map[string]any
- func (r *Repository) Unmarshal(path string, v any, conf *mapstructure.DecoderConfig) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ParserFunc ¶
type ProviderFunc ¶
func (ProviderFunc) Read ¶
func (f ProviderFunc) Read() ([]byte, error)
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository() *Repository
func (*Repository) Cut ¶
func (r *Repository) Cut(path string) repository.Repository
func (*Repository) Delete ¶
func (r *Repository) Delete(path string) error
func (*Repository) Float64 ¶
func (r *Repository) Float64(path string, defaultValue ...float64) float64
func (*Repository) Float64Map ¶
func (*Repository) Float64s ¶
func (r *Repository) Float64s(path string, defaultValue ...[]float64) []float64
func (*Repository) Has ¶
func (r *Repository) Has(path string) bool
func (*Repository) Int64s ¶
func (r *Repository) Int64s(path string, defaultValue ...[]int64) []int64
func (*Repository) Keys ¶
func (r *Repository) Keys() []string
func (*Repository) Load ¶
func (r *Repository) Load(provider repository.Provider, parser repository.Parser) error
func (*Repository) LoadAt ¶
func (r *Repository) LoadAt(path string, provider repository.Provider, parser repository.Parser) error
func (*Repository) Merge ¶
func (r *Repository) Merge(repo repository.Repository) (repository.Repository, error)
func (*Repository) MergeAt ¶
func (r *Repository) MergeAt(path string, repo repository.Repository) (repository.Repository, error)
func (*Repository) Paths ¶
func (r *Repository) Paths() []string
func (*Repository) Strings ¶
func (r *Repository) Strings(path string, defaultValue ...[]string) []string
func (*Repository) StringsMap ¶
func (*Repository) ToMap ¶
func (r *Repository) ToMap() map[string]any
func (*Repository) Unmarshal ¶
func (r *Repository) Unmarshal(path string, v any, conf *mapstructure.DecoderConfig) error
Click to show internal directories.
Click to hide internal directories.