Documentation ¶
Index ¶
- func BoolOrDefault(b *bool, def bool) *bool
- func BoolPtr(p bool) *bool
- func BoolValue(v *bool) bool
- func DeleteConfigMapValue(ctx context.Context, kc client.Client, ref ConfigMapKeySelector) error
- func DeleteSecretValue(ctx context.Context, kc client.Client, ref SecretKeySelector) error
- func GetConfigMapValue(ctx context.Context, k client.Client, ref ConfigMapKeySelector) (string, error)
- func GetSecretValue(ctx context.Context, kc client.Client, ref 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 IntPtr(p int) *int
- 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 SetConfigMapValue(ctx context.Context, kc client.Client, ref ConfigMapKeySelector, val string) error
- func SetSecretValue(ctx context.Context, kc client.Client, ref 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 SecretKeySelector
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 DeleteConfigMapValue ¶
func DeleteSecretValue ¶
func GetConfigMapValue ¶
func GetSecretValue ¶
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 SetConfigMapValue ¶
func SetSecretValue ¶
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 { // Name of the configmap. Name string // Namespace of the configmap. Namespace string // The key to select. Key string }
A ConfigMapKeySelector is a reference to a configmap key in an arbitrary namespace.
func (ConfigMapKeySelector) String ¶
func (s ConfigMapKeySelector) String() string
type SecretKeySelector ¶
type SecretKeySelector struct { // Name of the secret. Name string // Namespace of the secret. Namespace string // The key to select. Key string }
A SecretKeySelector is a reference to a secret key in an arbitrary namespace.