Documentation ¶
Index ¶
- Constants
- Variables
- func ArrayToInterface(arr ...interface{}) []interface{}
- func InterfaceToPropType(val interface{}) interface{}
- func InterfaceToString(val interface{}) (res string, err error)
- func MapToPropMap(m map[string]interface{}) map[string]interface{}
- type Properties
- func (p *Properties) Compare(other *Properties) bool
- func (p *Properties) Copy(other *Properties)
- func (p *Properties) Delete(key string)
- func (p *Properties) Get(key string) interface{}
- func (p *Properties) GetArray(key string) (res []interface{}, err error)
- func (p *Properties) GetArrayAt(key string, idx int) (interface{}, error)
- func (p *Properties) GetBool(key string) (res bool, err error)
- func (p *Properties) GetFloat(key string) (res float64, err error)
- func (p *Properties) GetInt(key string) (res int64, err error)
- func (p *Properties) GetInternalMap() map[string]interface{}
- func (p *Properties) GetMap(key string) (res map[string]interface{}, err error)
- func (p *Properties) GetString(key string) (res string, err error)
- func (p *Properties) GetStruct(key string, val any) error
- func (p *Properties) Init()
- func (p *Properties) InitFromMap(val map[string]interface{})
- func (p *Properties) IsArray(key string) bool
- func (p *Properties) IsBool(key string) bool
- func (p *Properties) IsFloat(key string) bool
- func (p *Properties) IsInt(key string) bool
- func (p *Properties) IsMap(key string) bool
- func (p *Properties) IsNil(key string) bool
- func (p *Properties) IsNumber(key string) bool
- func (p *Properties) IsSet(key string) bool
- func (p *Properties) IsString(key string) bool
- func (p *Properties) List(key ...string) []string
- func (p *Properties) Load(data []byte) error
- func (p *Properties) MarshalJSON() ([]byte, error)
- func (p *Properties) MustArray(key string) []interface{}
- func (p *Properties) MustBool(key string) bool
- func (p *Properties) MustFloat(key string) float64
- func (p *Properties) MustInt(key string) int64
- func (p *Properties) MustMap(key string) map[string]interface{}
- func (p *Properties) MustString(key string) string
- func (p *Properties) Save() ([]byte, error)
- func (p *Properties) SaveStruct(key string) ([]byte, error)
- func (p *Properties) Set(key string, val interface{})
- func (p *Properties) SetMap(key []string, val interface{})
- func (p *Properties) SetStruct(key string, val interface{})
- func (p *Properties) UnmarshalJSON(data []byte) error
Constants ¶
View Source
const SplitSeparator string = "."
Variables ¶
Functions ¶
func ArrayToInterface ¶
func ArrayToInterface(arr ...interface{}) []interface{}
func InterfaceToPropType ¶
func InterfaceToPropType(val interface{}) interface{}
Types ¶
type Properties ¶
type Properties map[string]interface{}
func (*Properties) Compare ¶
func (p *Properties) Compare(other *Properties) bool
func (*Properties) Copy ¶
func (p *Properties) Copy(other *Properties)
func (*Properties) Delete ¶
func (p *Properties) Delete(key string)
func (*Properties) Get ¶
func (p *Properties) Get(key string) interface{}
func (*Properties) GetArray ¶
func (p *Properties) GetArray(key string) (res []interface{}, err error)
func (*Properties) GetArrayAt ¶
func (p *Properties) GetArrayAt(key string, idx int) (interface{}, error)
func (*Properties) GetBool ¶
func (p *Properties) GetBool(key string) (res bool, err error)
func (*Properties) GetFloat ¶
func (p *Properties) GetFloat(key string) (res float64, err error)
func (*Properties) GetInt ¶
func (p *Properties) GetInt(key string) (res int64, err error)
func (*Properties) GetInternalMap ¶
func (p *Properties) GetInternalMap() map[string]interface{}
func (*Properties) GetMap ¶
func (p *Properties) GetMap(key string) (res map[string]interface{}, err error)
func (*Properties) GetString ¶
func (p *Properties) GetString(key string) (res string, err error)
func (*Properties) GetStruct ¶
func (p *Properties) GetStruct(key string, val any) error
func (*Properties) Init ¶
func (p *Properties) Init()
func (*Properties) InitFromMap ¶
func (p *Properties) InitFromMap(val map[string]interface{})
func (*Properties) IsArray ¶
func (p *Properties) IsArray(key string) bool
func (*Properties) IsBool ¶
func (p *Properties) IsBool(key string) bool
func (*Properties) IsFloat ¶
func (p *Properties) IsFloat(key string) bool
func (*Properties) IsInt ¶
func (p *Properties) IsInt(key string) bool
func (*Properties) IsMap ¶
func (p *Properties) IsMap(key string) bool
func (*Properties) IsNil ¶
func (p *Properties) IsNil(key string) bool
func (*Properties) IsNumber ¶
func (p *Properties) IsNumber(key string) bool
func (*Properties) IsSet ¶
func (p *Properties) IsSet(key string) bool
func (*Properties) IsString ¶
func (p *Properties) IsString(key string) bool
func (*Properties) List ¶
func (p *Properties) List(key ...string) []string
func (*Properties) Load ¶
func (p *Properties) Load(data []byte) error
func (*Properties) MarshalJSON ¶
func (p *Properties) MarshalJSON() ([]byte, error)
func (*Properties) MustArray ¶
func (p *Properties) MustArray(key string) []interface{}
func (*Properties) MustBool ¶
func (p *Properties) MustBool(key string) bool
func (*Properties) MustFloat ¶
func (p *Properties) MustFloat(key string) float64
func (*Properties) MustInt ¶
func (p *Properties) MustInt(key string) int64
func (*Properties) MustMap ¶
func (p *Properties) MustMap(key string) map[string]interface{}
func (*Properties) MustString ¶
func (p *Properties) MustString(key string) string
func (*Properties) Save ¶
func (p *Properties) Save() ([]byte, error)
func (*Properties) SaveStruct ¶
func (p *Properties) SaveStruct(key string) ([]byte, error)
func (*Properties) Set ¶
func (p *Properties) Set(key string, val interface{})
func (*Properties) SetMap ¶
func (p *Properties) SetMap(key []string, val interface{})
func (*Properties) SetStruct ¶
func (p *Properties) SetStruct(key string, val interface{})
func (*Properties) UnmarshalJSON ¶
func (p *Properties) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.