Documentation ¶
Index ¶
- func CreateName(identifier string, suffix string) string
- func CreateNameWithRand(identifier string, suffix string) string
- func Int64PointerToString(value *int64) string
- func NameCreatedByScript(name string) bool
- func NameCreatedForIdentifier(name, identifier string) bool
- func SliceStringPointersToSliceStrings(s []*string) []string
- func StringPointerToString(s *string) string
- func StringToInt64Pointer(value string) *int64
- func StringToStringPointer(s string) *string
- func StringToUInt32Pointer(value string) *uint32
- func StringToUInt64Pointer(value string) *uint64
- func UInt32PointerToString(value *uint32) string
- type Set
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateName ¶
CreateName creates a name for resources created with CSP Connector to help identifying these resources.
The form of the name is as follows: ausm-csp-<CRC-64 hashed identified>[-suffix] Example names: ausm-csp-982CE62C7BA91558 ausm-csp-982CE62C7BA91558-mysuffix
func CreateNameWithRand ¶
CreateNameWithRand follows the same pattern as CreateName but additionally adds 6 random alphanumerical characters at the end to decrease the chance of name conflict after a dash character.
func Int64PointerToString ¶
If the value is nil, returns empty string, otherwise converts the int64 to a string number.
func NameCreatedByScript ¶
NameCreatedByScript is a check if the generated name was actually generated by the script.
It just checks if the name has our name prefix.
func NameCreatedForIdentifier ¶
NameCreatedForIdentifier is a check if the generated name was actually generated for the provided identifier.
func SliceStringPointersToSliceStrings ¶
Takes a slice of pointers to strings and returns a slice of regular strings (empty strings for nil pointers).
func StringPointerToString ¶
Returns dereferenced string - if the pointer is a nil, returns empty string.
func StringToInt64Pointer ¶
If string is empty, returns nil, otherwise returns a pointer to int64 variable casted from a given string.
func StringToStringPointer ¶
If string is empty, returns nil, otherwise returns a pointer to that particular string.
func StringToUInt32Pointer ¶
If string is empty, returns nil, otherwise returns a pointer to uint32 variable casted from a given string.
func StringToUInt64Pointer ¶
If string is empty, returns nil, otherwise returns a pointer to uint64 variable casted from a given string.
func UInt32PointerToString ¶
If the value is nil, returns empty string, otherwise converts the uint32 to a string number.
Types ¶
type Set ¶
type Set[T comparable] struct { // contains filtered or unexported fields }
func SetFromSlice ¶
func SetFromSlice[T comparable](s []T) Set[T]