config

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GenericConfig

type GenericConfig struct {
	// Export this field to make "apiequality.Semantic.DeepEqual" happy now.
	// User of GenericConfig should not directly access this field.
	MP map[string]interface{}
}

func New

func New(o map[string]interface{}) *GenericConfig

func (*GenericConfig) DeepCopy

func (c *GenericConfig) DeepCopy() *GenericConfig

func (*GenericConfig) DeepCopyInto

func (c *GenericConfig) DeepCopyInto(out *GenericConfig)

func (*GenericConfig) DeepCopyJsonObject

func (c *GenericConfig) DeepCopyJsonObject() *GenericConfig

func (*GenericConfig) Del added in v1.1.6

func (c *GenericConfig) Del(key string)

func (*GenericConfig) Get added in v1.1.6

func (c *GenericConfig) Get(key string) (value *Value)

func (*GenericConfig) Inner added in v1.1.6

func (c *GenericConfig) Inner() map[string]interface{}

func (*GenericConfig) MarshalJSON added in v1.1.6

func (c *GenericConfig) MarshalJSON() ([]byte, error)

func (*GenericConfig) MarshalTOML added in v1.1.6

func (c *GenericConfig) MarshalTOML() ([]byte, error)

func (*GenericConfig) Set added in v1.1.6

func (c *GenericConfig) Set(key string, value interface{})

func (*GenericConfig) SetIfNil added in v1.1.6

func (c *GenericConfig) SetIfNil(key string, value interface{})

func (*GenericConfig) SetTable added in v1.2.0

func (c *GenericConfig) SetTable(table string, kvs ...interface{})

SetTable set multiple KV of a table

For example: c.SetTable("root", "key1", "val1", "key2", 10)

Invalid KV will will be ignored

func (*GenericConfig) UnmarshalJSON added in v1.1.6

func (c *GenericConfig) UnmarshalJSON(data []byte) error

func (*GenericConfig) UnmarshalTOML added in v1.1.6

func (c *GenericConfig) UnmarshalTOML(data []byte) error

type Value added in v1.1.6

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

func (*Value) AsFloat added in v1.1.6

func (v *Value) AsFloat() (float64, error)

func (*Value) AsInt added in v1.1.6

func (v *Value) AsInt() (int64, error)

func (*Value) AsString added in v1.1.6

func (v *Value) AsString() (string, error)

func (*Value) AsStringSlice added in v1.1.6

func (v *Value) AsStringSlice() ([]string, error)

func (*Value) Interface added in v1.1.6

func (v *Value) Interface() interface{}

func (*Value) MustFloat added in v1.1.6

func (v *Value) MustFloat() float64

func (*Value) MustInt added in v1.1.6

func (v *Value) MustInt() int64

func (*Value) MustString added in v1.1.6

func (v *Value) MustString() string

func (*Value) MustStringSlice added in v1.1.6

func (v *Value) MustStringSlice() []string

Jump to

Keyboard shortcuts

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