support

package
v0.0.0-...-83255ff Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AUintToAInt

func AUintToAInt(au []uint) []int

func Atou

func Atou(a string) (uint, error)

func CamelToSnake

func CamelToSnake(s string) string

func Capitalize

func Capitalize(s string) string

func DurationInMs

func DurationInMs(start, end time.Time) int64

func IntPtr

func IntPtr(i int) *int

func InterfaceToFloat64

func InterfaceToFloat64(i interface{}) (float64, error)

func IsTypelessEqual

func IsTypelessEqual(a, b interface{}) bool

func IsZeroStruct

func IsZeroStruct(item interface{}) bool

func JsonName

func JsonName(f reflect.StructField) string

func MaxInt

func MaxInt(a, b int) int

func MicroToNano

func MicroToNano(ms int64) int64

func MinInt

func MinInt(a, b int) int

func NanoToMicro

func NanoToMicro(n int64) int64

func NewInstance

func NewInstance(item interface{}) interface{}

func Round

func Round(f float64) float64

func RoundToDecimal

func RoundToDecimal(f float64, decimals int) float64

func SetValue

func SetValue(v reflect.Value, destType reflect.Type, newVal interface{})

func SetZeroValue

func SetZeroValue(v reflect.Value)

func SnakeToCamel

func SnakeToCamel(s string) string

SnakeToCamel returns a string converted from snake case to uppercase

func StringPtr

func StringPtr(s string) *string

func TimePtr

func TimePtr(t time.Time) *time.Time

func UintPtr

func UintPtr(u uint) *uint

func Utoa

func Utoa(u uint) string

Types

type NullableTimestamp

type NullableTimestamp struct {
	Time time.Time
}

func NewNullableTimestamp

func NewNullableTimestamp(val int64) *NullableTimestamp

func (*NullableTimestamp) SetTimestamp

func (ts *NullableTimestamp) SetTimestamp(val int64)

func (NullableTimestamp) Timestamp

func (ts NullableTimestamp) Timestamp() int64

type Timestamp

type Timestamp struct {
	Time time.Time
}

func NewTimestamp

func NewTimestamp(val int64) Timestamp

func (*Timestamp) SetTimestamp

func (ts *Timestamp) SetTimestamp(val int64)

func (Timestamp) Timestamp

func (ts Timestamp) Timestamp() int64

Jump to

Keyboard shortcuts

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