util

package
v0.0.0-...-9edbc40 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assert

func Assert(name string, context interface{}, value interface{}, op string) bool

func CompareValue

func CompareValue(src, dst interface{}, op string) (bool, error)

func Decode

func Decode(input, output interface{}) error

func DecodeJSON

func DecodeJSON(input, output interface{}) error

func DecodeString

func DecodeString(str string) (interface{}, error)

func DecodeTag

func DecodeTag(input, output interface{}, tag string) error

func FieldExist

func FieldExist(name string, val interface{}) bool

func FindFieldByTag

func FindFieldByTag(obj interface{}, tag, key string) (string, error)

func FindFieldTypeByTag

func FindFieldTypeByTag(obj interface{}, tag, key string) (reflect.Type, error)

func FromTimeHookFunc

func FromTimeHookFunc() mapstructure.DecodeHookFunc

func Hash

func Hash(v interface{}) []byte

Hash calculate value hash

func Hash58

func Hash58(v interface{}) string

func Hash64

func Hash64(v interface{}) string

func HashHex

func HashHex(v interface{}) string

func IsMap

func IsMap(obj interface{}) bool

func IsMapStringInterface

func IsMapStringInterface(obj interface{}) bool

func IsNumber

func IsNumber(val interface{}) bool

func IsPointerOfSlice

func IsPointerOfSlice(obj interface{}) bool

func IsPointerOfStruct

func IsPointerOfStruct(obj interface{}) bool

func IsSlice

func IsSlice(obj interface{}) bool

func IsStruct

func IsStruct(obj interface{}) bool

func IsStructOrPointerOf

func IsStructOrPointerOf(obj interface{}) bool

func IsTime

func IsTime(val interface{}) bool

func ListTag

func ListTag(obj interface{}, tag string) ([]string, error)

func Lookup

func Lookup(name string, context ...interface{}) (interface{}, bool)

Lookup lookup value from interface

func Match

func Match(name string, context interface{}, value interface{}) bool

Match check if value is match with given context and path

func Reverse

func Reverse(s interface{})

func SetValue

func SetValue(obj interface{}, key string, value interface{}) error

func ToTimeHookFunc

func ToTimeHookFunc(format string) mapstructure.DecodeHookFunc

Types

This section is empty.

Jump to

Keyboard shortcuts

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