Documentation ¶
Overview ¶
GOlang value <--> pointer
##Acknowledgements This repo was started as a fork of https://github.com/aws/aws-sdk-go/blob/master/aws/convert_types.go
Index ¶
- func Bool(v *bool) bool
- func BoolMap(src map[string]*bool) map[string]bool
- func BoolP(v bool) *bool
- func BoolPMap(src map[string]bool) map[string]*bool
- func BoolPSlice(src []bool) []*bool
- func BoolSlice(src []*bool) []bool
- func FalseP() *bool
- func Float64(v *float64) float64
- func Float64Map(src map[string]*float64) map[string]float64
- func Float64P(v float64) *float64
- func Float64PMap(src map[string]float64) map[string]*float64
- func Float64PSlice(src []float64) []*float64
- func Float64Slice(src []*float64) []float64
- func Int(v *int) int
- func Int32(v *int32) int32
- func Int32Map(src map[string]*int32) map[string]int32
- func Int32P(v int32) *int32
- func Int32PMap(src map[string]int32) map[string]*int32
- func Int32PSlice(src []int32) []*int32
- func Int32Slice(src []*int32) []int32
- func Int64(v *int64) int64
- func Int64Map(src map[string]*int64) map[string]int64
- func Int64P(v int64) *int64
- func Int64PMap(src map[string]int64) map[string]*int64
- func Int64PSlice(src []int64) []*int64
- func Int64Slice(src []*int64) []int64
- func IntMap(src map[string]*int) map[string]int
- func IntP(v int) *int
- func IntPMap(src map[string]int) map[string]*int
- func IntPSlice(src []int) []*int
- func IntSlice(src []*int) []int
- func String(v *string) string
- func StringMap(src map[string]*string) map[string]string
- func StringP(v string) *string
- func StringPMap(src map[string]string) map[string]*string
- func StringPSlice(src []string) []*string
- func StringSlice(src []*string) []string
- func Time(v *time.Time) time.Time
- func TimeMap(src map[string]*time.Time) map[string]time.Time
- func TimeP(v time.Time) *time.Time
- func TimePMap(src map[string]time.Time) map[string]*time.Time
- func TimePSlice(src []time.Time) []*time.Time
- func TimeSlice(src []*time.Time) []time.Time
- func TimeUnixMilli(t time.Time) int64
- func TrueP() *bool
- func UInt(v *uint) uint
- func UIntMap(src map[string]*uint) map[string]uint
- func UIntP(v uint) *uint
- func UIntPMap(src map[string]uint) map[string]*uint
- func UIntPSlice(src []uint) []*uint
- func UIntSlice(src []*uint) []uint
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoolPSlice ¶
BoolPSlice converts a slice of bool values into a slice of bool pointers
func Float64 ¶
Float64 returns the value of the float64 pointer passed in or 0 if the pointer is nil.
func Float64Map ¶
Float64Map converts a string map of float64 pointers into a string map of float64 values
func Float64PMap ¶
Float64PMap converts a string map of float64 values into a string map of float64 pointers
func Float64PSlice ¶
Float64PSlice converts a slice of float64 values into a slice of float64 pointers
func Float64Slice ¶
Float64Slice converts a slice of float64 pointers into a slice of float64 values
func Int32PMap ¶
Int32PMap converts a string map of int32 values into a string map of int32 pointers
func Int32PSlice ¶
Int32PSlice converts a slice of int32 values into a slice of int32 pointers
func Int32Slice ¶
Int32Slice converts a slice of int32 pointers into a slice of int32 values
func Int64PMap ¶
Int64PMap converts a string map of int64 values into a string map of int64 pointers
func Int64PSlice ¶
Int64PSlice converts a slice of int64 values into a slice of int64 pointers
func Int64Slice ¶
Int64Slice converts a slice of int64 pointers into a slice of int64 values
func StringMap ¶
StringMap converts a string map of string pointers into a string map of string values
func StringPMap ¶
StringPMap converts a string map of string values into a string map of string pointers
func StringPSlice ¶
StringPSlice converts a slice of string values into a slice of string pointers
func StringSlice ¶
StringSlice converts a slice of string pointers into a slice of string values
func Time ¶
Time returns the value of the time.Time pointer passed in or time.Time{} if the pointer is nil.
func TimeMap ¶
TimeMap converts a string map of time.Time pointers into a string map of time.Time values
func TimePMap ¶
TimePMap converts a string map of time.Time values into a string map of time.Time pointers
func TimePSlice ¶
TimePSlice converts a slice of time.Time values into a slice of time.Time pointers
func TimeUnixMilli ¶
TimeUnixMilli returns a Unix timestamp in milliseconds from "January 1, 1970 UTC". The result is undefined if the Unix time cannot be represented by an int64. Which includes calling TimeUnixMilli on a zero Time is undefined.
This utility is useful for service API's such as CloudWatch Logs which require their unix time values to be in milliseconds.
See Go stdlib https://golang.org/pkg/time/#Time.UnixNano for more information.
func UIntPSlice ¶
UIntPSlice converts a slice of uint values into a slice of uint pointers
Types ¶
This section is empty.