util

package
v1.3.89 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Key       = "key"
	Auto      = "auto"
	UUID      = "uuid"
	SnowFlake = "snowflake"
	DateTime  = "dateTime"
)

Variables

This section is empty.

Functions

func GetBool

func GetBool(val any) (ret bool, err *cd.Result)

func GetCurrentDateTime

func GetCurrentDateTime() (ret time.Time)

func GetCurrentDateTimeStr

func GetCurrentDateTimeStr() (ret string)

func GetDateTimeDt

func GetDateTimeDt(val any) (ret time.Time, err *cd.Result)

func GetDateTimeStr

func GetDateTimeStr(val any) (ret string, err *cd.Result)

func GetFloat32

func GetFloat32(val any) (ret float32, err *cd.Result)

func GetFloat64

func GetFloat64(val any) (ret float64, err *cd.Result)

func GetInt

func GetInt(val any) (ret int, err *cd.Result)

func GetInt16

func GetInt16(val any) (ret int16, err *cd.Result)

func GetInt32

func GetInt32(val any) (ret int32, err *cd.Result)

func GetInt64

func GetInt64(val any) (ret int64, err *cd.Result)

func GetInt8

func GetInt8(val any) (ret int8, err *cd.Result)

func GetNewSnowFlakeID

func GetNewSnowFlakeID() (ret int64)

func GetNewUUID

func GetNewUUID() (ret string)

func GetString

func GetString(val any) (ret string, err *cd.Result)

func GetTypeEnum

func GetTypeEnum(val reflect.Type) (ret model.TypeDeclare, err *cd.Result)

func GetUint

func GetUint(val any) (ret uint, err *cd.Result)

func GetUint16

func GetUint16(val any) (ret uint16, err *cd.Result)

func GetUint32

func GetUint32(val any) (ret uint32, err *cd.Result)

func GetUint64

func GetUint64(val any) (ret uint64, err *cd.Result)

func GetUint8

func GetUint8(val any) (ret uint8, err *cd.Result)

func IsBool

func IsBool(tType reflect.Type) bool

func IsDateTime

func IsDateTime(tType reflect.Type) bool

func IsFloat

func IsFloat(tType reflect.Type) bool

func IsInteger

func IsInteger(tType reflect.Type) bool

func IsMap

func IsMap(tType reflect.Type) bool

func IsNil

func IsNil(val reflect.Value) (ret bool)

IsNil check value if nil

func IsNumber

func IsNumber(tType reflect.Type) bool

func IsPtr

func IsPtr(tType reflect.Type) bool

func IsSameVal

func IsSameVal(firstVal, secondVal reflect.Value) (ret bool, err *cd.Result)

IsSameVal is same value

func IsSlice

func IsSlice(tType reflect.Type) bool

func IsString

func IsString(tType reflect.Type) bool

func IsStruct

func IsStruct(tType reflect.Type) bool

func IsUInteger

func IsUInteger(tType reflect.Type) bool

func IsZero

func IsZero(val reflect.Value) (ret bool)

Types

This section is empty.

Jump to

Keyboard shortcuts

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