Documentation

Overview

Package ptr provides utilities for converting scalar literal type values to and from pointers inline.

Code generated by smithy-go/ptr/generate.go DO NOT EDIT.

Code generated by smithy-go/ptr/generate.go DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(v bool) *bool

Bool returns a pointer value for the bool value passed in.

func BoolMap

func BoolMap(vs map[string]bool) map[string]*bool

BoolMap returns a map of bool pointers from the values passed in.

func BoolSlice

func BoolSlice(vs []bool) []*bool

BoolSlice returns a slice of bool pointers from the values passed in.

func Byte

func Byte(v byte) *byte

Byte returns a pointer value for the byte value passed in.

func ByteMap

func ByteMap(vs map[string]byte) map[string]*byte

ByteMap returns a map of byte pointers from the values passed in.

func ByteSlice

func ByteSlice(vs []byte) []*byte

ByteSlice returns a slice of byte pointers from the values passed in.

func Float32

func Float32(v float32) *float32

Float32 returns a pointer value for the float32 value passed in.

func Float32Map

func Float32Map(vs map[string]float32) map[string]*float32

Float32Map returns a map of float32 pointers from the values passed in.

func Float32Slice

func Float32Slice(vs []float32) []*float32

Float32Slice returns a slice of float32 pointers from the values passed in.

func Float64

func Float64(v float64) *float64

Float64 returns a pointer value for the float64 value passed in.

func Float64Map

func Float64Map(vs map[string]float64) map[string]*float64

Float64Map returns a map of float64 pointers from the values passed in.

func Float64Slice

func Float64Slice(vs []float64) []*float64

Float64Slice returns a slice of float64 pointers from the values passed in.

func Int

func Int(v int) *int

Int returns a pointer value for the int value passed in.

func Int16

func Int16(v int16) *int16

Int16 returns a pointer value for the int16 value passed in.

func Int16Map

func Int16Map(vs map[string]int16) map[string]*int16

Int16Map returns a map of int16 pointers from the values passed in.

func Int16Slice

func Int16Slice(vs []int16) []*int16

Int16Slice returns a slice of int16 pointers from the values passed in.

func Int32

func Int32(v int32) *int32

Int32 returns a pointer value for the int32 value passed in.

func Int32Map

func Int32Map(vs map[string]int32) map[string]*int32

Int32Map returns a map of int32 pointers from the values passed in.

func Int32Slice

func Int32Slice(vs []int32) []*int32

Int32Slice returns a slice of int32 pointers from the values passed in.

func Int64

func Int64(v int64) *int64

Int64 returns a pointer value for the int64 value passed in.

func Int64Map

func Int64Map(vs map[string]int64) map[string]*int64

Int64Map returns a map of int64 pointers from the values passed in.

func Int64Slice

func Int64Slice(vs []int64) []*int64

Int64Slice returns a slice of int64 pointers from the values passed in.

func Int8

func Int8(v int8) *int8

Int8 returns a pointer value for the int8 value passed in.

func Int8Map

func Int8Map(vs map[string]int8) map[string]*int8

Int8Map returns a map of int8 pointers from the values passed in.

func Int8Slice

func Int8Slice(vs []int8) []*int8

Int8Slice returns a slice of int8 pointers from the values passed in.

func IntMap

func IntMap(vs map[string]int) map[string]*int

IntMap returns a map of int pointers from the values passed in.

func IntSlice

func IntSlice(vs []int) []*int

IntSlice returns a slice of int pointers from the values passed in.

func String

func String(v string) *string

String returns a pointer value for the string value passed in.

func StringMap

func StringMap(vs map[string]string) map[string]*string

StringMap returns a map of string pointers from the values passed in.

func StringSlice

func StringSlice(vs []string) []*string

StringSlice returns a slice of string pointers from the values passed in.

func Time

func Time(v time.Time) *time.Time

Time returns a pointer value for the time.Time value passed in.

func TimeMap

func TimeMap(vs map[string]time.Time) map[string]*time.Time

TimeMap returns a map of time.Time pointers from the values passed in.

func TimeSlice

func TimeSlice(vs []time.Time) []*time.Time

TimeSlice returns a slice of time.Time pointers from the values passed in.

func ToBool

func ToBool(p *bool) (v bool)

ToBool returns bool value dereferenced if the passed in pointer was not nil. Returns a bool zero value if the pointer was nil.

func ToBoolMap

func ToBoolMap(vs map[string]*bool) map[string]bool

ToBoolMap returns a map of bool values, that are dereferenced if the passed in pointer was not nil. The bool zero value is used if the pointer was nil.

func ToBoolSlice

func ToBoolSlice(vs []*bool) []bool

ToBoolSlice returns a slice of bool values, that are dereferenced if the passed in pointer was not nil. Returns a bool zero value if the pointer was nil.

func ToByte

func ToByte(p *byte) (v byte)

ToByte returns byte value dereferenced if the passed in pointer was not nil. Returns a byte zero value if the pointer was nil.

func ToByteMap

func ToByteMap(vs map[string]*byte) map[string]byte

ToByteMap returns a map of byte values, that are dereferenced if the passed in pointer was not nil. The byte zero value is used if the pointer was nil.

func ToByteSlice

func ToByteSlice(vs []*byte) []byte

ToByteSlice returns a slice of byte values, that are dereferenced if the passed in pointer was not nil. Returns a byte zero value if the pointer was nil.

func ToFloat32

func ToFloat32(p *float32) (v float32)

ToFloat32 returns float32 value dereferenced if the passed in pointer was not nil. Returns a float32 zero value if the pointer was nil.

func ToFloat32Map

func ToFloat32Map(vs map[string]*float32) map[string]float32

ToFloat32Map returns a map of float32 values, that are dereferenced if the passed in pointer was not nil. The float32 zero value is used if the pointer was nil.

func ToFloat32Slice

func ToFloat32Slice(vs []*float32) []float32

ToFloat32Slice returns a slice of float32 values, that are dereferenced if the passed in pointer was not nil. Returns a float32 zero value if the pointer was nil.

func ToFloat64

func ToFloat64(p *float64) (v float64)

ToFloat64 returns float64 value dereferenced if the passed in pointer was not nil. Returns a float64 zero value if the pointer was nil.

func ToFloat64Map

func ToFloat64Map(vs map[string]*float64) map[string]float64

ToFloat64Map returns a map of float64 values, that are dereferenced if the passed in pointer was not nil. The float64 zero value is used if the pointer was nil.

func ToFloat64Slice

func ToFloat64Slice(vs []*float64) []float64

ToFloat64Slice returns a slice of float64 values, that are dereferenced if the passed in pointer was not nil. Returns a float64 zero value if the pointer was nil.

func ToInt

func ToInt(p *int) (v int)

ToInt returns int value dereferenced if the passed in pointer was not nil. Returns a int zero value if the pointer was nil.

func ToInt16

func ToInt16(p *int16) (v int16)

ToInt16 returns int16 value dereferenced if the passed in pointer was not nil. Returns a int16 zero value if the pointer was nil.

func ToInt16Map

func ToInt16Map(vs map[string]*int16) map[string]int16

ToInt16Map returns a map of int16 values, that are dereferenced if the passed in pointer was not nil. The int16 zero value is used if the pointer was nil.

func ToInt16Slice

func ToInt16Slice(vs []*int16) []int16

ToInt16Slice returns a slice of int16 values, that are dereferenced if the passed in pointer was not nil. Returns a int16 zero value if the pointer was nil.

func ToInt32

func ToInt32(p *int32) (v int32)

ToInt32 returns int32 value dereferenced if the passed in pointer was not nil. Returns a int32 zero value if the pointer was nil.

func ToInt32Map

func ToInt32Map(vs map[string]*int32) map[string]int32

ToInt32Map returns a map of int32 values, that are dereferenced if the passed in pointer was not nil. The int32 zero value is used if the pointer was nil.

func ToInt32Slice

func ToInt32Slice(vs []*int32) []int32

ToInt32Slice returns a slice of int32 values, that are dereferenced if the passed in pointer was not nil. Returns a int32 zero value if the pointer was nil.

func ToInt64

func ToInt64(p *int64) (v int64)

ToInt64 returns int64 value dereferenced if the passed in pointer was not nil. Returns a int64 zero value if the pointer was nil.

func ToInt64Map

func ToInt64Map(vs map[string]*int64) map[string]int64

ToInt64Map returns a map of int64 values, that are dereferenced if the passed in pointer was not nil. The int64 zero value is used if the pointer was nil.

func ToInt64Slice

func ToInt64Slice(vs []*int64) []int64

ToInt64Slice returns a slice of int64 values, that are dereferenced if the passed in pointer was not nil. Returns a int64 zero value if the pointer was nil.

func ToInt8

func ToInt8(p *int8) (v int8)

ToInt8 returns int8 value dereferenced if the passed in pointer was not nil. Returns a int8 zero value if the pointer was nil.

func ToInt8Map

func ToInt8Map(vs map[string]*int8) map[string]int8

ToInt8Map returns a map of int8 values, that are dereferenced if the passed in pointer was not nil. The int8 zero value is used if the pointer was nil.

func ToInt8Slice

func ToInt8Slice(vs []*int8) []int8

ToInt8Slice returns a slice of int8 values, that are dereferenced if the passed in pointer was not nil. Returns a int8 zero value if the pointer was nil.

func ToIntMap

func ToIntMap(vs map[string]*int) map[string]int

ToIntMap returns a map of int values, that are dereferenced if the passed in pointer was not nil. The int zero value is used if the pointer was nil.

func ToIntSlice

func ToIntSlice(vs []*int) []int

ToIntSlice returns a slice of int values, that are dereferenced if the passed in pointer was not nil. Returns a int zero value if the pointer was nil.

func ToString

func ToString(p *string) (v string)

ToString returns string value dereferenced if the passed in pointer was not nil. Returns a string zero value if the pointer was nil.

func ToStringMap

func ToStringMap(vs map[string]*string) map[string]string

ToStringMap returns a map of string values, that are dereferenced if the passed in pointer was not nil. The string zero value is used if the pointer was nil.

func ToStringSlice

func ToStringSlice(vs []*string) []string

ToStringSlice returns a slice of string values, that are dereferenced if the passed in pointer was not nil. Returns a string zero value if the pointer was nil.

func ToTime

func ToTime(p *time.Time) (v time.Time)

ToTime returns time.Time value dereferenced if the passed in pointer was not nil. Returns a time.Time zero value if the pointer was nil.

func ToTimeMap

func ToTimeMap(vs map[string]*time.Time) map[string]time.Time

ToTimeMap returns a map of time.Time values, that are dereferenced if the passed in pointer was not nil. The time.Time zero value is used if the pointer was nil.

func ToTimeSlice

func ToTimeSlice(vs []*time.Time) []time.Time

ToTimeSlice returns a slice of time.Time values, that are dereferenced if the passed in pointer was not nil. Returns a time.Time zero value if the pointer was nil.

func ToUint

func ToUint(p *uint) (v uint)

ToUint returns uint value dereferenced if the passed in pointer was not nil. Returns a uint zero value if the pointer was nil.

func ToUint16

func ToUint16(p *uint16) (v uint16)

ToUint16 returns uint16 value dereferenced if the passed in pointer was not nil. Returns a uint16 zero value if the pointer was nil.

func ToUint16Map

func ToUint16Map(vs map[string]*uint16) map[string]uint16

ToUint16Map returns a map of uint16 values, that are dereferenced if the passed in pointer was not nil. The uint16 zero value is used if the pointer was nil.

func ToUint16Slice

func ToUint16Slice(vs []*uint16) []uint16

ToUint16Slice returns a slice of uint16 values, that are dereferenced if the passed in pointer was not nil. Returns a uint16 zero value if the pointer was nil.

func ToUint32

func ToUint32(p *uint32) (v uint32)

ToUint32 returns uint32 value dereferenced if the passed in pointer was not nil. Returns a uint32 zero value if the pointer was nil.

func ToUint32Map

func ToUint32Map(vs map[string]*uint32) map[string]uint32

ToUint32Map returns a map of uint32 values, that are dereferenced if the passed in pointer was not nil. The uint32 zero value is used if the pointer was nil.

func ToUint32Slice

func ToUint32Slice(vs []*uint32) []uint32

ToUint32Slice returns a slice of uint32 values, that are dereferenced if the passed in pointer was not nil. Returns a uint32 zero value if the pointer was nil.

func ToUint64

func ToUint64(p *uint64) (v uint64)

ToUint64 returns uint64 value dereferenced if the passed in pointer was not nil. Returns a uint64 zero value if the pointer was nil.

func ToUint64Map

func ToUint64Map(vs map[string]*uint64) map[string]uint64

ToUint64Map returns a map of uint64 values, that are dereferenced if the passed in pointer was not nil. The uint64 zero value is used if the pointer was nil.

func ToUint64Slice

func ToUint64Slice(vs []*uint64) []uint64

ToUint64Slice returns a slice of uint64 values, that are dereferenced if the passed in pointer was not nil. Returns a uint64 zero value if the pointer was nil.

func ToUint8

func ToUint8(p *uint8) (v uint8)

ToUint8 returns uint8 value dereferenced if the passed in pointer was not nil. Returns a uint8 zero value if the pointer was nil.

func ToUint8Map

func ToUint8Map(vs map[string]*uint8) map[string]uint8

ToUint8Map returns a map of uint8 values, that are dereferenced if the passed in pointer was not nil. The uint8 zero value is used if the pointer was nil.

func ToUint8Slice

func ToUint8Slice(vs []*uint8) []uint8

ToUint8Slice returns a slice of uint8 values, that are dereferenced if the passed in pointer was not nil. Returns a uint8 zero value if the pointer was nil.

func ToUintMap

func ToUintMap(vs map[string]*uint) map[string]uint

ToUintMap returns a map of uint values, that are dereferenced if the passed in pointer was not nil. The uint zero value is used if the pointer was nil.

func ToUintSlice

func ToUintSlice(vs []*uint) []uint

ToUintSlice returns a slice of uint values, that are dereferenced if the passed in pointer was not nil. Returns a uint zero value if the pointer was nil.

func Uint

func Uint(v uint) *uint

Uint returns a pointer value for the uint value passed in.

func Uint16

func Uint16(v uint16) *uint16

Uint16 returns a pointer value for the uint16 value passed in.

func Uint16Map

func Uint16Map(vs map[string]uint16) map[string]*uint16

Uint16Map returns a map of uint16 pointers from the values passed in.

func Uint16Slice

func Uint16Slice(vs []uint16) []*uint16

Uint16Slice returns a slice of uint16 pointers from the values passed in.

func Uint32

func Uint32(v uint32) *uint32

Uint32 returns a pointer value for the uint32 value passed in.

func Uint32Map

func Uint32Map(vs map[string]uint32) map[string]*uint32

Uint32Map returns a map of uint32 pointers from the values passed in.

func Uint32Slice

func Uint32Slice(vs []uint32) []*uint32

Uint32Slice returns a slice of uint32 pointers from the values passed in.

func Uint64

func Uint64(v uint64) *uint64

Uint64 returns a pointer value for the uint64 value passed in.

func Uint64Map

func Uint64Map(vs map[string]uint64) map[string]*uint64

Uint64Map returns a map of uint64 pointers from the values passed in.

func Uint64Slice

func Uint64Slice(vs []uint64) []*uint64

Uint64Slice returns a slice of uint64 pointers from the values passed in.

func Uint8

func Uint8(v uint8) *uint8

Uint8 returns a pointer value for the uint8 value passed in.

func Uint8Map

func Uint8Map(vs map[string]uint8) map[string]*uint8

Uint8Map returns a map of uint8 pointers from the values passed in.

func Uint8Slice

func Uint8Slice(vs []uint8) []*uint8

Uint8Slice returns a slice of uint8 pointers from the values passed in.

func UintMap

func UintMap(vs map[string]uint) map[string]*uint

UintMap returns a map of uint pointers from the values passed in.

func UintSlice

func UintSlice(vs []uint) []*uint

UintSlice returns a slice of uint pointers from the values passed in.

Types

This section is empty.