Documentation ¶
Index ¶
- Constants
- func AppendMap(origin map[string]string, newMap map[string]string)
- func CountImportedDataVolumes(dvsDone map[string]bool) int
- func FormatBytes(bytes int64) (string, error)
- func GetMapKeys(theMap map[string]string) []string
- func IndexByIDAndName(mapping *[]v2vv1alpha1.ResourceMappingItem) (mapByID map[string]v2vv1alpha1.ResourceMappingItem, ...)
- func IsUtcCompatible(timezone string) bool
- func MakeLabelFrom(name string) string
- func NormalizeName(name string) (string, error)
- func ParseUtcOffsetToSeconds(offset string) (int, error)
- func ToLoggableID(id *string, name *string) string
- func ToLoggableResourceName(name string, namespace *string) string
- func WithLabels(labels map[string]string, existing map[string]string) map[string]string
- func WithMessage(message string, newMessage string) string
Constants ¶
const (
// MaxLabelValueLength specifies max length of k8s label value
MaxLabelValueLength = 63
)
Variables ¶
This section is empty.
Functions ¶
func CountImportedDataVolumes ¶
CountImportedDataVolumes return number of true values in map of booleans
func FormatBytes ¶
FormatBytes convert bytes to highest suffix
func GetMapKeys ¶
GetMapKeys gets all keys from a map as a slice
func IndexByIDAndName ¶
func IndexByIDAndName(mapping *[]v2vv1alpha1.ResourceMappingItem) (mapByID map[string]v2vv1alpha1.ResourceMappingItem, mapByName map[string]v2vv1alpha1.ResourceMappingItem)
IndexByIDAndName indexes mapping array by ID and by Name
func IsUtcCompatible ¶
IsUtcCompatible checks whether given timezone behaves like UTC - has the same offset of 0 and does not observer daylight saving time
func MakeLabelFrom ¶
MakeLabelFrom creates label value from given CR name
func NormalizeName ¶
NormalizeName returns a normalized name based on the given name that complies to DNS 1123 format
func ParseUtcOffsetToSeconds ¶
ParseUtcOffsetToSeconds parses UTC offset string ([+|-]HH:MM) into representation in seconds. Only syntactical validation is performed on input string.
func ToLoggableID ¶
ToLoggableID creates loggable identifier that may be comprised of an id and/or a name
func ToLoggableResourceName ¶
ToLoggableResourceName creates loggable representation of maybe namespaced resource name
func WithLabels ¶ added in v0.0.3
WithLabels aggregates existing lables
func WithMessage ¶
WithMessage joins message and newMessage with a ", " string and returns the resulting string or returns newMessage if message is empty
Types ¶
This section is empty.