Documentation ¶
Index ¶
- func BoolOrDefault(b *bool, def bool) *bool
- func BoolPtr(p bool) *bool
- func BoolValue(v *bool) bool
- func DeleteSecret(ctx context.Context, k client.Client, ref *xpv1.SecretKeySelector) error
- func GetConfigMapValue(ctx context.Context, kube client.Client, ref *ConfigMapKeySelector) (string, error)
- func GetSecret(ctx context.Context, k client.Client, ref *xpv1.SecretKeySelector) (string, error)
- func Int32OrDefault(i *int32, def int32) *int32
- func Int32Ptr(p int32) *int32
- func Int32Value(v *int32) int32
- func Int64OrDefault(i *int64, def int64) *int64
- func Int64Ptr(p int64) *int64
- func Int64Value(v *int64) int64
- func IntPtrValue(ip *int, i int) int
- func IsBoolPtrEqualToBool(bp *bool, b bool) bool
- func IsIntEqualToIntPtr(ip *int, i int) bool
- func LateInitializeBool(b *bool, from bool) *bool
- func LateInitializeInt32(i *int32, from int32) *int32
- func LateInitializeInt64(i *int64, from int64) *int64
- func LateInitializeString(s *string, from string) *string
- func SetSecret(ctx context.Context, k client.Client, ref *xpv1.SecretKeySelector, val string) error
- func StringOrDefault(s *string, def string) *string
- func StringPtr(p string) *string
- func StringSliceContains(s []string, str string) bool
- func StringValue(v *string) string
- type ConfigMapKeySelector
- type ConfigMapReference
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoolOrDefault ¶
BoolOrDefault sets eventually a default value for bool type.
func BoolValue ¶
BoolValue converts the supplied bool pointer to an bool, returning false if the pointer is nil.
func DeleteSecret ¶
func GetConfigMapValue ¶
func Int32OrDefault ¶
Int32OrDefault sets eventually a default value for int32 type.
func Int32Value ¶
Int32Value converts the supplied int32 pointer to an int, returning zero if the pointer is nil.
func Int64OrDefault ¶
Int64OrDefault sets eventually a default value for int64 type.
func Int64Value ¶
Int64Value converts the supplied int64 pointer to an int, returning zero if the pointer is nil.
func IntPtrValue ¶
IntPtrValue return the *int value or a default
func IsBoolPtrEqualToBool ¶
IsBoolPtrEqualToBool compares a *bool with bool
func IsIntEqualToIntPtr ¶
IsIntEqualToIntPtr compares an *int with int
func LateInitializeBool ¶
LateInitializeBool implements late initialization for bool type.
func LateInitializeInt32 ¶
LateInitializeInt32 implements late initialization for int32 type.
func LateInitializeInt64 ¶
LateInitializeInt64 implements late initialization for int64 type.
func LateInitializeString ¶
LateInitializeString implements late initialization for string type.
func StringOrDefault ¶
StringOrDefault sets eventually a default value for string type.
func StringSliceContains ¶
StringSliceContains contains checks if a string is present in a slice.
func StringValue ¶
StringValue converts the supplied string pointer to a string, returning the empty string if the pointer is nil.
Types ¶
type ConfigMapKeySelector ¶
type ConfigMapKeySelector struct { ConfigMapReference `json:",inline"` // The key to select. Key string `json:"key"` }
A ConfigMapKeySelector is a reference to a configmap key in an arbitrary namespace.
type ConfigMapReference ¶
type ConfigMapReference struct { // Name of the configmap. Name string `json:"name"` // Namespace of the configmap. Namespace string `json:"namespace"` }
A ConfigMapReference is a reference to a configMap in an arbitrary namespace.