{"modulePath":"github.com/infinitbyte/framework","version":"v1.1.5","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package param\n\n## Constants\n\n```go\nconst (\n\tFieldsKey = \"fields\"\n\tTagsKey   = \"tags\"\n)\n```\n\n## Variables\n\n```go\nvar (\n\tErrKeyNotFound = errors.New(\"key not found\")\n)\n```\n\n## Functions\n\n```go\nfunc GetInt64OrDefault(v interface{}, defaultV int64) (int64, bool)\n```\n\n## Types\n\n```go\ntype ParaKey string\n```\n\n```go\ntype Parameters struct {\n\tTimestamp time.Time\n\tData      util.MapStr `json:\"data,omitempty\"`\n\tMeta      util.MapStr `json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (para *Parameters) AddTags(tags []string) error\n```\nAddTags appends a tag to the tags field of ms. If the tags field does not exist then it will be created. If the tags field exists and is not a \\[]string then an error will be returned. It does not deduplicate the list of tags.\n\n```go\nfunc (para *Parameters) AddTagsWithKey(key string, tags []string) error\n```\nAddTagsWithKey appends a tag to the key field of ms. If the field does not exist then it will be created. If the field exists and is not a \\[]string then an error will be returned. It does not deduplicate the list.\n\n```go\nfunc (para *Parameters) CloneData() util.MapStr\n```\n\n```go\nfunc (para *Parameters) Config(key ParaKey, obj interface{})\n```\n\n```go\nfunc (newPara *Parameters) ConfigBinding(key ParaKey, rt reflect.Type, mutable *reflect.Value)\n```\n\n```go\nfunc (e *Parameters) Delete(key string) error\n```\n\n```go\nfunc (para *Parameters) Get(key ParaKey) interface{}\n```\n\n```go\nfunc (para *Parameters) GetArray(key ParaKey) ([]interface{}, bool)\n```\nGetArray will return a array which type of the items are interface {}\n\n```go\nfunc (para *Parameters) GetBool(key ParaKey, defaultV bool) bool\n```\n\n```go\nfunc (para *Parameters) GetBytes(key ParaKey) ([]byte, bool)\n```\n\n```go\nfunc (para *Parameters) GetDurationOrDefault(key ParaKey, defaultV string) time.Duration\n```\n\n```go\nfunc (para *Parameters) GetFloat32(key ParaKey, defaultV float32) (float32, bool)\n```\n\n```go\nfunc (para *Parameters) GetFloat32OrDefault(key ParaKey, defaultV float32) float32\n```\n\n```go\nfunc (para *Parameters) GetFloat64(key ParaKey, defaultV float64) (float64, bool)\n```\n\n```go\nfunc (para *Parameters) GetFloat64OrDefault(key ParaKey, defaultV float64) float64\n```\n\n```go\nfunc (para *Parameters) GetInt(key ParaKey, defaultV int) (int, bool)\n```\n\n```go\nfunc (para *Parameters) GetInt64(key ParaKey, defaultV int64) (int64, bool)\n```\n\n```go\nfunc (para *Parameters) GetInt64Array(key ParaKey) ([]int64, bool)\n```\n\n```go\nfunc (para *Parameters) GetInt64OrDefault(key ParaKey, defaultV int64) int64\n```\n\n```go\nfunc (para *Parameters) GetIntMapOrInit(key ParaKey) (map[string]int, bool)\n```\n\n```go\nfunc (para *Parameters) GetIntOrDefault(key ParaKey, defaultV int) int\n```\n\n```go\nfunc (para *Parameters) GetMap(key ParaKey) (map[string]interface{}, bool)\n```\n\n```go\nfunc (para *Parameters) GetMapArray(key ParaKey) ([]map[string]interface{}, bool)\n```\n\n```go\nfunc (para *Parameters) GetOrDefault(key ParaKey, val interface{}) interface{}\n```\n\n```go\nfunc (para *Parameters) GetString(key ParaKey) (string, bool)\n```\n\n```go\nfunc (para *Parameters) GetStringArray(key ParaKey) ([]string, bool)\n```\n\n```go\nfunc (para *Parameters) GetStringMap(key ParaKey) (result map[string]string, ok bool)\n```\n\n```go\nfunc (para *Parameters) GetStringOrDefault(key ParaKey, val string) string\n```\n\n```go\nfunc (para *Parameters) GetTags() (map[string]string, bool)\n```\n\n```go\nfunc (para *Parameters) GetTime(key ParaKey) (time.Time, bool)\n```\n\n```go\nfunc (e *Parameters) GetValue(key string) (interface{}, error)\n```\n\n```go\nfunc (para *Parameters) Has(key ParaKey) bool\n```\n\n```go\nfunc (para *Parameters) HasTag(key string) bool\n```\n\n```go\nfunc (e *Parameters) Increment(key string, v int)\n```\n\n```go\nfunc (para *Parameters) MustGet(key ParaKey) interface{}\n```\n\n```go\nfunc (para *Parameters) MustGetArray(key ParaKey) []interface{}\n```\n\n```go\nfunc (para *Parameters) MustGetBytes(key ParaKey) []byte\n```\n\n```go\nfunc (para *Parameters) MustGetInt(key ParaKey) int\n```\nMustGetInt return 0 if not key was found\n\n```go\nfunc (para *Parameters) MustGetInt64(key ParaKey) int64\n```\n\n```go\nfunc (para *Parameters) MustGetMap(key ParaKey) map[string]interface{}\n```\n\n```go\nfunc (para *Parameters) MustGetString(key ParaKey) string\n```\n\n```go\nfunc (para *Parameters) MustGetStringArray(key ParaKey) []string\n```\n\n```go\nfunc (para *Parameters) MustGetTime(key ParaKey) time.Time\n```\n\n```go\nfunc (e *Parameters) PutValue(key string, v interface{}) (interface{}, error)\n```\n\n```go\nfunc (para *Parameters) ResetParameters()\n```\n\n```go\nfunc (para *Parameters) Set(key ParaKey, value interface{})\n```\nTODO remove lock async, channel\n\n```go\nfunc (e *Parameters) SetErrorWithOption(jsonErr util.MapStr, addErrKey bool)\n```\nSetErrorWithOption sets jsonErr value in the event fields according to addErrKey value.\n\n```go\nfunc (e *Parameters) Stats(key string) int\n```\n\n```go\nfunc (para *Parameters) UpdateTags(addTags, removeTags []string)\n```\n\n","path":"github.com/infinitbyte/framework/core/param","name":"param","synopsis":"","isRedistributable":true}
