Documentation
¶
Index ¶
- Constants
- func BytesToGiB(volumeSizeBytes int64) (int32, error)
- func Contains(slice []string, element string) bool
- func ConvertJsonStringToObject(input string, object any) error
- func ConvertObjectToJsonString(input any) (string, error)
- func ConvertObjectType(from any, to any) error
- func ConvertStringMapToAny(input map[string]string) map[string]any
- func DecodeDeletionTag(input string) string
- func EncodeDeletionTag(input string) string
- func GiBToBytes(volumeSizeGiB int32) int64
- func MapCopy(oldMap map[string]string) map[string]string
- func ParseEndpoint(endpoint string) (string, string, error)
- func RemoveParametersAndPopulateObject(parameters map[string]string, config any) error
- func ReplaceParametersAndPopulateObject(newKey string, parameters map[string]string, config any) error
- func StrictRemoveParametersAndPopulateObject(parameters map[string]string, config any) error
Constants ¶
const (
GiB = 1024 * 1024 * 1024
)
Variables ¶
This section is empty.
Functions ¶
func BytesToGiB ¶
func ConvertJsonStringToObject ¶
ConvertJsonStringToObject converts a given input into an object. The input should be a formatted JSON string. The object must be passed in by reference
func ConvertObjectToJsonString ¶
ConvertObjectToJsonString converts a given object to a json string.
func ConvertObjectType ¶
ConvertObjectType converts a given object into another object type. This is done by converting the object into a JSON string, then using the JSON string to populate the parameters of a new object. The "to" object must be passed in by reference
func ConvertStringMapToAny ¶
ConvertStringMapToAny converts a given map to map containing any values which are parsable by json. Strings should already be formatted as jsons, therefore the raw value is taken ints and bools are converted to their respective types for proper json parsing
func DecodeDeletionTag ¶
func EncodeDeletionTag ¶
func GiBToBytes ¶
func RemoveParametersAndPopulateObject ¶
RemoveParametersAndPopulateObject uses a given map[string]string to populate a given pointer to a struct. Values used in the map are removed once used.
func ReplaceParametersAndPopulateObject ¶
func ReplaceParametersAndPopulateObject(newKey string, parameters map[string]string, config any) error
ReplaceParametersAndPopulateObject removes config variables from parameters, and replaces them with one combined json string.
func StrictRemoveParametersAndPopulateObject ¶
StrictRemoveParametersAndPopulateObject removes config variables from parameters, and replaces them with one combined json string. Also ensures that all parameters has been used
Types ¶
This section is empty.