Documentation
¶
Index ¶
- func Base64Encode(message []byte) string
- func CmdHelp(cmd *cobra.Command, _ []string)
- func ConvertInt32PToFloat32P(i *int32) *float32
- func ConvertInt64PToFloat64P(i *int64) *float64
- func ConvertStringMapToInterfaceMap(m *map[string]string) *map[string]interface{}
- func ConvertTimePToDateTimeString(t *time.Time) string
- func Float64Ptr(f float64) *float64
- func FormatPossibleValues(values ...string) []string
- func GetSliceFromPointer[T any](s *[]T) []T
- func Int64Ptr(i int64) *int64
- func JoinStringKeys(m map[string]any, sep string) string
- func JoinStringKeysPtr(m map[string]any, sep string) string
- func JoinStringMap(m map[string]string, keyValueSeparator, separator string) string
- func JoinStringPtr[T ~string](vals *[]T, sep string) string
- func Ptr[T any](v T) *T
- func PtrByteSizeDefault(size *int64, defaultValue string) string
- func PtrGigaByteSizeDefault(size *int64, defaultValue string) string
- func PtrString[T any](t *T) string
- func PtrStringDefault[T any](v *T, defaultValue string) string
- func PtrValue[T any](t *T) (r T)
- func Truncate(s *string, maxLen int) string
- func UserAgentConfigOption(cliVersion string) sdkConfig.ConfigurationOption
- func ValidateURLDomain(value string) error
- func ValidateUUID(value string) error
- type OsFS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Base64Encode ¶ added in v0.27.0
Base64Encode encodes a []byte to a base64 representation as string
func CmdHelp ¶
CmdHelp is used to explicitly set the Run function for non-leaf commands to the command help function, so that we can catch invalid commands This is a workaround needed due to the open issue on the Cobra repo: https://github.com/spf13/cobra/issues/706
func ConvertInt32PToFloat32P ¶ added in v0.67.0
ConvertInt32PToFloat32P converts an int32 pointer to a float64 pointer This function will return nil if the input is nil This is a lossy conversion for i > 2^24
func ConvertInt64PToFloat64P ¶ added in v0.2.3
ConvertInt64PToFloat64P converts an int64 pointer to a float64 pointer This function will return nil if the input is nil
func ConvertStringMapToInterfaceMap ¶ added in v0.34.0
ConvertStringMapToInterfaceMap converts a map[string]string to a pointer to map[string]interface{}. Returns nil if the input map is empty.
func ConvertTimePToDateTimeString ¶ added in v0.22.0
ConvertTimePToDateTimeString converts a time.Time pointer to a string represented as "2006-01-02 15:04:05" This function will return an empty string if the input is nil
func Float64Ptr ¶ added in v0.2.3
Float64Ptr returns a pointer to a float64 Needed because the Ptr function only returns pointer to float
func FormatPossibleValues ¶ added in v0.65.0
FormatPossibleValues formats a slice into a list for usage in the provider docs
func GetSliceFromPointer ¶ added in v0.44.0
func GetSliceFromPointer[T any](s *[]T) []T
GetSliceFromPointer returns the value of a pointer to a slice of type T. If the pointer is nil, it returns an empty slice.
func Int64Ptr ¶ added in v0.2.3
Int64Ptr returns a pointer to an int64 Needed because the Ptr function only returns pointer to int
func JoinStringKeys ¶ added in v0.21.0
JoinStringKeys concatenates the string keys of a map, each separatore by the [sep] string.
func JoinStringKeysPtr ¶ added in v0.21.0
JoinStringKeysPtr concatenates the string keys of a map pointer, each separatore by the [sep] string.
func JoinStringMap ¶ added in v0.53.0
JoinStringMap concatenates the key-value pairs of a string map, key and value separated by keyValueSeparator, key value pairs separated by separator.
func JoinStringPtr ¶ added in v0.24.0
JoinStringPtr concatenates the strings of a string slice pointer, each separatore by the [sep] string.
func PtrByteSizeDefault ¶ added in v0.24.0
PtrByteSizeDefault return the value of an in64 pointer to a string representation of bytesize. If the pointer is nil, it returns the [defaultValue].
func PtrGigaByteSizeDefault ¶ added in v0.35.0
PtrGigaByteSizeDefault return the value of an int64 pointer to a string representation of gigabytes. If the pointer is nil, it returns the [defaultValue].
func PtrString ¶ added in v0.20.0
PtrString creates a string representation of a passed object pointer or returns an empty string, if the passed object is _nil_.
func PtrStringDefault ¶ added in v0.24.0
PtrStringDefault return the value of a pointer [v] as string. If the pointer is nil, it returns the [defaultValue].
func PtrValue ¶ added in v0.26.0
func PtrValue[T any](t *T) (r T)
PtrValue returns the dereferenced value if the pointer is not nil. Otherwise the types zero element is returned
func Truncate ¶ added in v0.31.0
Truncate trims the passed string (if it is not nil). If the input string is longer than the given length, it is truncated to _maxLen_ and a ellipsis (…) is attached. Therefore the resulting string has at most length _maxLen-1_
func UserAgentConfigOption ¶ added in v0.32.0
func UserAgentConfigOption(cliVersion string) sdkConfig.ConfigurationOption
func ValidateURLDomain ¶ added in v0.12.0
func ValidateUUID ¶
ValidateUUID validates if the provided string is a valid UUID