Documentation ¶
Index ¶
- Constants
- func ConvertArrToMap(list []string) map[string]bool
- func ConvertBool(obj interface{}) (bool, bool)
- func ConvertDataType(obj interface{}, dataType string) (interface{}, error)
- func ConvertFloat64(obj interface{}) (float64, bool)
- func ConvertInt64(obj interface{}) (int64, bool)
- func ConvertMSToUnit(t int64) (value int64, unit string)
- func ConvertString(obj interface{}) (string, bool)
- func ConvertStringArr(obj interface{}) ([]string, bool)
- func ConvertStringArrToInterfaceArr(list []string) []interface{}
- func ConvertStringToMS(value string, now int64) (int64, error)
- func ConvertStructToMap(obj interface{}) map[string]interface{}
- func ConvertTimeToMS(t time.Time) int64
- func ConvertUint64(obj interface{}) (uint64, bool)
- func ConvertUnitToMS(value int64, unit string) int64
- func GetMapValue(key string, data map[string]interface{}) interface{}
- func GetMapValueArr(m map[string]interface{}, key string) ([]interface{}, bool)
- func GetMapValueBool(m map[string]interface{}, key string) (bool, bool)
- func GetMapValueFloat64(m map[string]interface{}, key string) (float64, bool)
- func GetMapValueInt64(m map[string]interface{}, key string) (int64, bool)
- func GetMapValueMap(m map[string]interface{}, key string) (map[string]interface{}, bool)
- func GetMapValueString(m map[string]interface{}, key ...string) (string, bool)
- func GetMapValueUint64(m map[string]interface{}, key string) (uint64, bool)
- func NewContextWithHeader(ctx context.Context) context.Context
- func RandomString(n int) string
- func TypeOf(obj interface{}) string
- type Duration
Constants ¶
View Source
const ( StringType = "string" NumberType = "number" BoolType = "bool" Unknown = "unknown" )
View Source
const ( Seconds = "seconds" Minutes = "minutes" Hours = "hours" )
Variables ¶
This section is empty.
Functions ¶
func ConvertArrToMap ¶
func ConvertBool ¶
func ConvertDataType ¶
func ConvertFloat64 ¶
func ConvertInt64 ¶
func ConvertMSToUnit ¶
func ConvertString ¶
func ConvertStringArr ¶
ConvertStringArr interface转字符串数组
func ConvertStringArrToInterfaceArr ¶
func ConvertStringArrToInterfaceArr(list []string) []interface{}
func ConvertStructToMap ¶
func ConvertStructToMap(obj interface{}) map[string]interface{}
func ConvertTimeToMS ¶
func ConvertUint64 ¶
func ConvertUnitToMS ¶
func GetMapValue ¶
func GetMapValueArr ¶
func GetMapValueFloat64 ¶
func GetMapValueMap ¶
func GetMapValueString ¶
func GetMapValueUint64 ¶
func RandomString ¶
Types ¶
type Duration ¶
func (Duration) FormatDuration ¶
Keep the specified decimal places.
func (Duration) MarshalYAML ¶
func (*Duration) UnmarshalYAML ¶
Click to show internal directories.
Click to hide internal directories.