values

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Value

type Value any

type ValueMap

type ValueMap map[string]any

字典类型

func NewValueMapArray

func NewValueMapArray(data []byte) ([]ValueMap, error)

NewValueMapArray creates a new array of ValueMap objects from a byte array.

It takes a byte array as input and returns an array of ValueMap objects and an error.

func NewValuesFromJSON

func NewValuesFromJSON(data []byte) (ValueMap, error)

NewValuesFromJSON creates a new ValueMap from JSON data.

It takes a byte slice of JSON data as a parameter and returns a ValueMap and an error.

func (ValueMap) GetBool

func (vm ValueMap) GetBool(name string) bool

GetBool retrieves a boolean value from the ValueMap.

func (ValueMap) GetFloat64

func (vm ValueMap) GetFloat64(name string) float64

GetFloat64 returns the float64 value associated with the given name in the ValueMap.

func (ValueMap) GetInt

func (vm ValueMap) GetInt(key string) int

GetInt returns the integer value associated with the given name in the ValueMap.

func (ValueMap) GetInt64

func (vm ValueMap) GetInt64(key string) int64

GetInt64 returns the int64 value associated with the given name in the ValueMap.

func (ValueMap) GetIntArray

func (vm ValueMap) GetIntArray(key string) []int

GetIntArray returns an array of integers from the given key in the ValueMap.

func (ValueMap) GetString

func (vm ValueMap) GetString(key string) string

GetString returns the string value associated with the given name in the ValueMap.

func (ValueMap) GetStringArray

func (vm ValueMap) GetStringArray(key string) []string

GetStringArray returns an array of strings from the given key in the ValueMap.

func (ValueMap) GetValueMap

func (vm ValueMap) GetValueMap(key string) ValueMap

GetValueMap returns a ValueMap for the given name.

func (ValueMap) ToJSON

func (vm ValueMap) ToJSON() []byte

ToJSON converts the ValueMap to a JSON byte slice.

It returns a byte slice containing the JSON representation of the ValueMap.

Jump to

Keyboard shortcuts

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