Versions in this module Expand all Collapse all v1 v1.5.1 May 14, 2026 v1.5.0 May 13, 2026 Changes in this version + const SiteCloudConfig + const SitePhoneHomeName + const SitePhoneHomePost + const SitePhoneHomePostAll + const SitePhoneHomeUrl + var CharsetAlphaNumeric = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" + var DiskImagePathRegex = regexp.MustCompile("^/dev/(:?nvme\\d+n\\d+|sd*)") + var ErrValidationLabelCount = fmt.Errorf("up to %v key/value pairs can be specified in labels", LabelCountMax) + var ErrValidationLabelKeyEmpty = errors.New("one or more labels do not have a key specified") + var ErrValidationLabelKeyLength = fmt.Errorf("label key must contain at least 1 character and a maximum of %v characters", ...) + var ErrValidationLabelValueLength = fmt.Errorf("label value cannot exceed a maximum of %v characters", LabelValueMaxLength) + var LabelCountMax = 10 + var LabelKeyMaxLength = 255 + var LabelValueMaxLength = 255 + var LeadingWhitespaceRegexp = regexp.MustCompile("^\\s+.*") + var NotAllWhitespaceRegexp = regexp.MustCompile("[^\\s]+") + var ShaHashRegex = regexp.MustCompile("^[A-Fa-f0-9]+$") + var TestCommonCloudInit = ... + var TestCommonInvalidCloudInit = ... + var TestCommonPhoneHomeCloudInit = ... + var TestCommonPhoneHomeOnlyCloudInit = ... + var TestCommonPhoneHomeSegment = ... + var TestCommonXMLUserData = ... + var TrailingWhitespaceRegexp = regexp.MustCompile(".*\\s+$") + var ValidationErrorNameFieldIsEmpty = errors.New("name field is empty") + var ValidationErrorNameHasLeadingWhitespace = errors.New("name field has leading whitespace") + var ValidationErrorNameHasTrailingWhitespace = errors.New("name field has trailing whitespace") + var ValidationErrorOnlyWhitespace = errors.New("field consists only of whitespace") + func GenerateRandomString(length int, charset string) string + func GetUUIDPtrToStrPtr(id *uuid.UUID) *string + func InsertPhoneHomeIntoUserData(documentRoot *yaml.Node, url string) error + func IsEmptyStrPtr(s *string) bool + func IsNilOrEmptyStrPtr(s *string) bool + func ProtobufLabelsFromAPILabels(labels map[string]string) []*cwssaws.Label + func RemovePhoneHomeFromUserData(documentRoot *yaml.Node, url *string) error + func ValidateLabels(labels map[string]string) error + func ValidateNameCharacters(value interface{}) error + func ValidateNested(target interface{}, fieldRules ...*validation.FieldRules) *validation.FieldRules