config

package
v1.72.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(structPtr Config)

func Load added in v1.71.0

func Load(dst Config, filename string) error

func Marshal added in v1.71.0

func Marshal(src Config, w io.Writer) error

func Save added in v1.71.0

func Save(src Config, filename string) error

func Unmarshal added in v1.71.0

func Unmarshal(dst Config, r io.Reader) error

Types

type Config added in v1.71.0

type Config interface {
	GetValue() *Value
	SetValue(path, value string, decode bool) (ok bool)
	SetDefaults()
	ScanValues(encode bool, iter valueField) error
	ManualEncoding(path, value string, encode bool) (result string)
}

type Value

type Value struct {
	// contains filtered or unexported fields
}

func (*Value) GetValue

func (val *Value) GetValue() *Value

func (*Value) ManualEncoding added in v1.71.0

func (val *Value) ManualEncoding(path, value string, encode bool) (result string)

func (*Value) ScanValues

func (val *Value) ScanValues(encode bool, iter valueField) error

func (*Value) SetDefaults added in v1.71.0

func (val *Value) SetDefaults()

func (*Value) SetValue

func (val *Value) SetValue(path, value string, decode bool) (ok bool)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL