Documentation
¶
Index ¶
- func AddParamInt(m map[string]any, key string, value int, targetType definition.ParamType) error
- func AddParamString(m map[string]any, key string, value string, targetType definition.ParamType) error
- func DisableInlining() int
- func JsonMarshal(v any) (*json.RawMessage, error)
- func JsonUnmarshal(data []byte, v any) error
- func ParseJsonPath(input *json.RawMessage, path string) (*json.RawMessage, error)
- func ParseJsonPathList(input *json.RawMessage, path string, bObjAsList bool) ([]*json.RawMessage, error)
- func ParseJsonPathStr(input *json.RawMessage, path string) (string, error)
- type SyncMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddParamInt ¶
AddParamInt: Insert a int into map[string]any as targetType
func AddParamString ¶
func AddParamString(m map[string]any, key string, value string, targetType definition.ParamType) error
AddParamString: Insert a string into map[string]any as targetType
func DisableInlining ¶ added in v0.2.1
func DisableInlining() int
func JsonMarshal ¶
func JsonMarshal(v any) (*json.RawMessage, error)
JsonMarshal: Convert interface{} to *json.RawMessage
func JsonUnmarshal ¶
JsonUnmarshal: Unmarshal json string and treat number as json.Number
func ParseJsonPath ¶
func ParseJsonPath(input *json.RawMessage, path string) (*json.RawMessage, error)
func ParseJsonPathList ¶
func ParseJsonPathList(input *json.RawMessage, path string, bObjAsList bool) ([]*json.RawMessage, error)
ParseJsonPathList: Parse JsonPath and try to return the result as a list
func ParseJsonPathStr ¶
func ParseJsonPathStr(input *json.RawMessage, path string) (string, error)
ParseJsonPathStr: Parse JsonPath and try to convert result to single string
Types ¶
type SyncMap ¶ added in v0.2.0
SyncMap[T]: Generics type of wrapper of sync.Map
func (*SyncMap[T]) LoadOrCreate ¶ added in v0.2.0
LoadOrCreate: Load an object of type T, and create a new one if it does not exist in the sync.map. @param: key: Key of object in the map @param: fnCreate: Function to create an object, normally a closure @param: nilVal: Nil value if fnCreate failed. Generics type does not support return nil as T @return: Actual object of type T loaded or created @return: Error
Directories
¶
| Path | Synopsis |
|---|---|
|
Package server Cloud Bench Checker API
|
Package server Cloud Bench Checker API |