Documentation ¶
Index ¶
- Constants
- func Bool(v bool) *bool
- func BoolMap(src map[string]bool) map[string]*bool
- func BoolSlice(src []bool) []*bool
- func BoolValue(v *bool) bool
- func BoolValueMap(src map[string]*bool) map[string]bool
- func BoolValueSlice(src []*bool) []bool
- func Float32(v float32) *float32
- func Float32Map(src map[string]float32) map[string]*float32
- func Float32Slice(src []float32) []*float32
- func Float32Value(v *float32) float32
- func Float32ValueMap(src map[string]*float32) map[string]float32
- func Float32ValueSlice(src []*float32) []float32
- func Float64(v float64) *float64
- func Float64Map(src map[string]float64) map[string]*float64
- func Float64Slice(src []float64) []*float64
- func Float64Value(v *float64) float64
- func Float64ValueMap(src map[string]*float64) map[string]float64
- func Float64ValueSlice(src []*float64) []float64
- func Int(v int) *int
- func Int32(v int32) *int32
- func Int32Map(src map[string]int32) map[string]*int32
- func Int32Slice(src []int32) []*int32
- func Int32Value(v *int32) int32
- func Int32ValueMap(src map[string]*int32) map[string]int32
- func Int32ValueSlice(src []*int32) []int32
- func Int64(v int64) *int64
- func Int64Map(src map[string]int64) map[string]*int64
- func Int64Slice(src []int64) []*int64
- func Int64Uint(src int64) *uint
- func Int64Value(v *int64) int64
- func Int64ValueMap(src map[string]*int64) map[string]int64
- func Int64ValueSlice(src []*int64) []int64
- func IntMap(src map[string]int) map[string]*int
- func IntSlice(src []int) []*int
- func IntValue(v *int) int
- func IntValueMap(src map[string]*int) map[string]int
- func IntValueSlice(src []*int) []int
- func String(v string) *string
- func StringMap(src map[string]string) map[string]*string
- func StringSlice(src []string) []*string
- func StringSliceWithConverter(s []string, c func(string) string) []string
- func StringToTime(timeString string, format string) (time.Time, error)
- func StringToTimestamp(timeString string, format string) int64
- func StringValue(v *string) string
- func StringValueMap(src map[string]*string) map[string]string
- func StringValueSlice(src []*string) []string
- func Time(v time.Time) *time.Time
- func TimeMap(src map[string]time.Time) map[string]*time.Time
- func TimePointerToTimestamp(t *time.Time) int64
- func TimeSlice(src []time.Time) []*time.Time
- func TimeToString(timeValue time.Time, format string) string
- func TimeToTimestamp(t time.Time) int64
- func TimeValue(v *time.Time) time.Time
- func TimeValueMap(src map[string]*time.Time) map[string]time.Time
- func TimeValueSlice(src []*time.Time) []time.Time
- func TimestampToString(unix int64, format string) string
- func TimestampToTime(unix int64) time.Time
- func TimestampToTimePointer(unix int64) *time.Time
- func Uint32(src uint32) *uint32
- func Uint32Value(v *uint32) uint32
- func Uint64(src uint64) *uint64
- func Uint64Slice(src []uint64) []*uint64
- func Uint64Value(v *uint64) uint64
- func Uint64ValueSlice(src []*uint64) []uint64
- func Uint8(src uint8) *uint8
- func Uint8Value(v *uint8) uint8
Constants ¶
const ( RFC822 = "Mon, 02 Jan 2006 15:04:05 GMT" ISO8601 = "2006-01-02T15:04:05Z" ISO8601Milli = "2006-01-02T15:04:05.000Z" NGINXTime = "02/Jan/2006:15:04:05 -0700" )
Supported time layouts
Variables ¶
This section is empty.
Functions ¶
func BoolValue ¶
BoolValue returns the value of the given bool pointer or false if the pointer is nil.
func BoolValueMap ¶
BoolValueMap converts a string map of bool pointers into a string map of bool values.
func BoolValueSlice ¶
BoolValueSlice converts a slice of bool pointers into a slice of bool values.
func Float32Map ¶
Float32Map converts a string map of float32 values into a string map of float32 pointers.
func Float32Slice ¶
Float32Slice converts a slice of float32 values into a slice of float32 pointers.
func Float32Value ¶
Float32Value returns the value of the given float32 pointer or 0 if the pointer is nil.
func Float32ValueMap ¶
Float32ValueMap converts a string map of float32 pointers into a string map of float32 values.
func Float32ValueSlice ¶
Float32ValueSlice converts a slice of float32 pointers into a slice of float32 values.
func Float64Map ¶
Float64Map converts a string map of float64 values into a string map of float64 pointers.
func Float64Slice ¶
Float64Slice converts a slice of float64 values into a slice of float64 pointers.
func Float64Value ¶
Float64Value returns the value of the given float64 pointer or 0 if the pointer is nil.
func Float64ValueMap ¶
Float64ValueMap converts a string map of float64 pointers into a string map of float64 values.
func Float64ValueSlice ¶
Float64ValueSlice converts a slice of float64 pointers into a slice of float64 values.
func Int32Slice ¶
Int32Slice converts a slice of int32 values into a slice of int32 pointers.
func Int32Value ¶
Int32Value returns the value of the given int32 pointer or 0 if the pointer is nil.
func Int32ValueMap ¶
Int32ValueMap converts a string map of int32 pointers into a string map of int32 values.
func Int32ValueSlice ¶
Int32ValueSlice converts a slice of int32 pointers into a slice of int32 values.
func Int64Slice ¶
Int64Slice converts a slice of int64 values into a slice of int64 pointers.
func Int64Value ¶
Int64Value returns the value of the given int64 pointer or 0 if the pointer is nil.
func Int64ValueMap ¶
Int64ValueMap converts a string map of int64 pointers into a string map of int64 values.
func Int64ValueSlice ¶
Int64ValueSlice converts a slice of int64 pointers into a slice of int64 values.
func IntValueMap ¶
IntValueMap converts a string map of int pointers into a string map of int values.
func IntValueSlice ¶
IntValueSlice converts a slice of int pointers into a slice of int values.
func StringMap ¶
StringMap converts a string map of string values into a string map of string pointers.
func StringSlice ¶
StringSlice converts a slice of string values into a slice of string pointers.
func StringSliceWithConverter ¶
StringSliceWithConverter converts a list of string using the passed converter function
func StringToTime ¶
StringToTime transforms given string to time.
func StringToTimestamp ¶ added in v0.1.2
StringToTimestamp transforms given string to unix time int64. It will return -1 when time string parse error.
func StringValue ¶
StringValue returns the value of the given string pointer or "" if the pointer is nil.
func StringValueMap ¶
StringValueMap converts a string map of string pointers into a string map of string values.
func StringValueSlice ¶
StringValueSlice converts a slice of string pointers into a slice of string values.
func TimeMap ¶
TimeMap converts a string map of time.Time values into a string map of time.Time pointers.
func TimePointerToTimestamp ¶ added in v0.1.2
TimePointerToTimestamp transforms given time pointer to unix time int64.
func TimeToString ¶
TimeToString transforms given time to string.
func TimeToTimestamp ¶
TimeToTimestamp transforms given time to unix time int.
func TimeValue ¶
TimeValue returns the value of the given time.Time pointer or time.Time{} if the pointer is nil.
func TimeValueMap ¶
TimeValueMap converts a string map of time.Time pointers into a string map of time.Time values.
func TimeValueSlice ¶
TimeValueSlice converts a slice of time.Time pointers into a slice of time.Time values.
func TimestampToString ¶ added in v0.1.2
TimestampToString converts unix timestamp to formatted string.
func TimestampToTime ¶
TimestampToTime transforms given unix time int64 to time in UTC.
func TimestampToTimePointer ¶ added in v0.1.2
TimestampToTimePointer transforms given unix time int64 to time pointer in UTC.
func Uint32Value ¶
Uint32Value returns the value of the given uint32 pointer or 0 if the pointer is nil.
func Uint64Slice ¶
Uint64Slice converts a slice of uint64 values into a slice of uint64 pointers.
func Uint64Value ¶
Uint64Value returns the value of the given uint64 pointer or 0 if the pointer is nil.
func Uint64ValueSlice ¶
Uint64ValueSlice converts a slice of uint64 pointers into a slice of uint64 values.
func Uint8Value ¶
Uint8Value returns the value of the given uint8 pointer or 0 if the pointer is nil.
Types ¶
This section is empty.