Documentation ¶
Index ¶
- Constants
- Variables
- func BuildCreateParam(opts interface{}, d *schema.ResourceData, nameMap *map[string]string) ([]string, error)
- func BuildNewFormatByConfig(format string) string
- func BuildUpdateParam(opts interface{}, d *schema.ResourceData, nameMap *map[string]string) ([]string, error)
- func CompareJsonTemplateAreEquivalent(tem1, tem2 string) (bool, error)
- func ConvertStructToMap(obj interface{}, nameMap map[string]string) (map[string]interface{}, error)
- func EncodeBase64IfNot(str string) string
- func EncodeBase64String(str string) string
- func ExpandResourceTags(tagmap map[string]interface{}) []tags.ResourceTag
- func ExpandToStringList(v []interface{}) []string
- func FlattenStackOutputs(stackOutputs []*stacks.Output) map[string]string
- func FlattenStackParameters(stackParams map[string]string, originalParams map[string]interface{}) map[string]string
- func FormatTimeStampRFC3339(timestamp int64) string
- func GetDNSRecordSetTagType(zoneType string) (string, error)
- func GetDNSZoneTagType(zoneType string) (string, error)
- func IsResourceNotFound(err error) bool
- func JsonMarshal(t interface{}) ([]byte, error)
- func NormalizeJsonString(jsonString interface{}) (string, error)
- func NormalizeStackTemplate(templateString interface{}) (string, error)
- func RefreshResourceData(resource interface{}, d *schema.ResourceData, nameMap *map[string]string) error
- func RemoveDuplicateElem(s []string) []string
- func RemoveNil(data map[string]interface{}) map[string]interface{}
- func StrSliceContains(haystack []string, needle string) bool
- func SuppressCaseDiffs(k, old, new string, d *schema.ResourceData) bool
- func SuppressComputedFixedWhenFloatingIp(k, old, new string, d *schema.ResourceData) bool
- func SuppressDiffAll(k, old, new string, d *schema.ResourceData) bool
- func SuppressEquivalentAwsPolicyDiffs(k, old, new string, d *schema.ResourceData) bool
- func SuppressEquivilentTimeDiffs(k, old, new string, d *schema.ResourceData) bool
- func SuppressLBWhitelistDiffs(k, old, new string, d *schema.ResourceData) bool
- func SuppressMinDisk(k, old, new string, d *schema.ResourceData) bool
- func SuppressNewLineDiffs(k, old, new string, d *schema.ResourceData) bool
- func SuppressSnatFiplistDiffs(k, old, new string, d *schema.ResourceData) bool
- func TagsToMap(tags []tags.ResourceTag) map[string]string
- func UpdateResourceTags(conn *golangsdk.ServiceClient, d *schema.ResourceData, resourceType, id string) error
- func ValidateCIDR(v interface{}, k string) (ws []string, errors []error)
- func ValidateECSTagValue(v interface{}, k string) (ws []string, errors []error)
- func ValidateIP(v interface{}, k string) (ws []string, errors []error)
- func ValidateIPRange(v interface{}, k string) (ws []string, errors []error)
- func ValidateJsonString(v interface{}, k string) (ws []string, errors []error)
- func ValidateName(v interface{}, k string) (ws []string, errors []error)
- func ValidateStackTemplate(v interface{}, k string) (ws []string, errors []error)
- func ValidateString64WithChinese(v interface{}, k string) (ws []string, errors []error)
- func ValidateTrueOnly(v interface{}, k string) (ws []string, errors []error)
- func ValidateVBSBackupDescription(v interface{}, k string) (ws []string, errors []error)
- func ValidateVBSBackupName(v interface{}, k string) (ws []string, errors []error)
- func ValidateVBSPolicyName(v interface{}, k string) (ws []string, errors []error)
- func ValidateVBSTagKey(v interface{}, k string) (ws []string, errors []error)
- func ValidateVBSTagValue(v interface{}, k string) (ws []string, errors []error)
Constants ¶
const REPLACE_REG = "(?i)huaweicloud"
Variables ¶
var PackageName string
var ValidateSubnetV2IPv6Mode = validation.StringInSlice([]string{ "slaac", "dhcpv6-stateful", "dhcpv6-stateless", }, false)
Functions ¶
func BuildCreateParam ¶
func BuildNewFormatByConfig ¶ added in v1.26.0
func BuildUpdateParam ¶
func ConvertStructToMap ¶
ConvertStructToMap converts an instance of struct to a map object, and changes each key of fileds to the value of 'nameMap' if the key in it or to its corresponding lowercase.
func EncodeBase64IfNot ¶ added in v1.28.0
Method EncodeBase64IfNot is used to encode a string by base64 if it not a base64 string.
func EncodeBase64String ¶ added in v1.26.0
Method EncodeBase64String is used to encode a string by base64.
func ExpandResourceTags ¶
func ExpandResourceTags(tagmap map[string]interface{}) []tags.ResourceTag
ExpandResourceTags returns the tags for the given map of data.
func ExpandToStringList ¶
func ExpandToStringList(v []interface{}) []string
ExpandToStringList takes the result for an array of strings and returns a []string
func FlattenStackOutputs ¶
func FlattenStackParameters ¶
func FlattenStackParameters(stackParams map[string]string, originalParams map[string]interface{}) map[string]string
FlattenStackParameters is flattening list of stack Parameters and only returning existing parameters to avoid clash with default values
func FormatTimeStampRFC3339 ¶ added in v1.26.0
Method FormatTimeStampRFC3339 is used to unify the time format to RFC-3339 and return a time string.
func GetDNSRecordSetTagType ¶
GetDNSRecordSetTagType returns resource tag type of DNS record set by zoneType
func GetDNSZoneTagType ¶
GetDNSZoneTagType returns resource tag type of DNS zone by zoneType
func IsResourceNotFound ¶
func JsonMarshal ¶
func NormalizeJsonString ¶
Takes a value containing JSON string and passes it through the JSON parser to normalize it, returns either a parsing error or normalized JSON string.
func NormalizeStackTemplate ¶
func RefreshResourceData ¶
func RefreshResourceData(resource interface{}, d *schema.ResourceData, nameMap *map[string]string) error
func RemoveDuplicateElem ¶
RemoveDuplicateElem removes duplicate elements from slice
func StrSliceContains ¶
StrSliceContains checks if a given string is contained in a slice When anybody asks why Go needs generics, here you go.
func SuppressCaseDiffs ¶
func SuppressCaseDiffs(k, old, new string, d *schema.ResourceData) bool
Suppress changes if we get a string with or without cases
func SuppressComputedFixedWhenFloatingIp ¶
func SuppressComputedFixedWhenFloatingIp(k, old, new string, d *schema.ResourceData) bool
Suppress changes if we get a fixed ip when not expecting one, if we have a floating ip (generates fixed ip).
func SuppressDiffAll ¶
func SuppressDiffAll(k, old, new string, d *schema.ResourceData) bool
Suppress all changes
func SuppressEquivalentAwsPolicyDiffs ¶
func SuppressEquivalentAwsPolicyDiffs(k, old, new string, d *schema.ResourceData) bool
func SuppressEquivilentTimeDiffs ¶
func SuppressEquivilentTimeDiffs(k, old, new string, d *schema.ResourceData) bool
func SuppressLBWhitelistDiffs ¶
func SuppressLBWhitelistDiffs(k, old, new string, d *schema.ResourceData) bool
func SuppressMinDisk ¶
func SuppressMinDisk(k, old, new string, d *schema.ResourceData) bool
Suppress changes if we get a computed min_disk_gb if value is unspecified (default 0)
func SuppressNewLineDiffs ¶
func SuppressNewLineDiffs(k, old, new string, d *schema.ResourceData) bool
Suppress changes if we get a string with or without new line
func SuppressSnatFiplistDiffs ¶
func SuppressSnatFiplistDiffs(k, old, new string, d *schema.ResourceData) bool
func TagsToMap ¶
func TagsToMap(tags []tags.ResourceTag) map[string]string
TagsToMap returns the list of tags into a map.
func UpdateResourceTags ¶
func UpdateResourceTags(conn *golangsdk.ServiceClient, d *schema.ResourceData, resourceType, id string) error
UpdateResourceTags is a helper to update the tags for a resource. It expects the tags field to be named "tags"
func ValidateCIDR ¶
func ValidateECSTagValue ¶
lintignore:V001
func ValidateIP ¶
func ValidateIPRange ¶
func ValidateJsonString ¶
func ValidateName ¶
lintignore:V001
func ValidateStackTemplate ¶
func ValidateString64WithChinese ¶
lintignore:V001
func ValidateTrueOnly ¶
func ValidateVBSBackupDescription ¶
lintignore:V001
func ValidateVBSBackupName ¶
lintignore:V001
func ValidateVBSPolicyName ¶
lintignore:V001
func ValidateVBSTagKey ¶
lintignore:V001
func ValidateVBSTagValue ¶
lintignore:V001
Types ¶
This section is empty.