Documentation ¶
Index ¶
- Variables
- func AddValueSpecs(body map[string]interface{}) map[string]interface{}
- func Base64IfNot(src string) string
- func BuildRequest(opts interface{}, parent string) (map[string]interface{}, error)
- func CheckDeleted(d *schema.ResourceData, err error, msg string) error
- func CheckForRetryableError(err error) *resource.RetryError
- func CheckYamlString(yamlString interface{}) (string, error)
- func ConvertStructToMap(obj interface{}, nameMap map[string]string) (map[string]interface{}, error)
- func ExpandResourceTags(tagMap map[string]interface{}) []tags.ResourceTag
- func ExpandStringList(configured []interface{}) []string
- func ExpandToStringSlice(v []interface{}) []string
- func FirstOneSet(res map[string]interface{}, k1, k2 string) (interface{}, error)
- func FlattenStringList(list []*string) []interface{}
- func GetAllAvailableZones(d *schema.ResourceData) []string
- func GetHashOrEmpty(v interface{}) string
- func HasFilledOpt(d *schema.ResourceData, param string) bool
- func ImportAsManaged(d *schema.ResourceData, _ interface{}) ([]*schema.ResourceData, error)
- func InstallScriptEncode(script string) string
- func InstallScriptHashSum(script string) string
- func IsEmptyValue(v reflect.Value) (bool, error)
- func IsResourceNotFound(err error) bool
- func LooksLikeJsonString(s interface{}) bool
- func MapResourceProp(d *schema.ResourceData, prop string) map[string]interface{}
- func MapValueSpecs(d cfg.SchemaOrDiff) map[string]string
- func MultipleCustomizeDiffs(funcs ...schema.CustomizeDiffFunc) schema.CustomizeDiffFunc
- func NavigateValue(d interface{}, index []string, arrayIndex map[string]int) (interface{}, error)
- func NormalizeJsonString(jsonString interface{}) (string, error)
- func ReplaceVars(d *schema.ResourceData, linkTmpl string, kv map[string]string) (string, error)
- func ReplaceVarsForTest(rs *terraform.ResourceState, linkTmpl string) (string, error)
- func SortVersions(src []string) []string
- func StrSliceContains(haystack []string, needle string) bool
- func SuppressCaseInsensitive(_, old, new string, _ *schema.ResourceData) bool
- func SuppressComputedFixedWhenFloatingIp(_, old, new string, d *schema.ResourceData) bool
- func SuppressDiffAll(_, _, _ string, _ *schema.ResourceData) bool
- func SuppressEqualZoneNames(_, old, new string, _ *schema.ResourceData) bool
- func SuppressEquivalentAwsPolicyDiffs(_, old, new string, _ *schema.ResourceData) bool
- func SuppressExternalGateway(_, old, new string, _ *schema.ResourceData) bool
- func SuppressLBWhitelistDiffs(_, old, new string, _ *schema.ResourceData) bool
- func SuppressMinDisk(_, old, new string, _ *schema.ResourceData) bool
- func SuppressRdsNameDiffs(_, old, new string, _ *schema.ResourceData) bool
- func SuppressSmartVersionDiff(_, old, new string, _ *schema.ResourceData) bool
- func TagsSchema() *schema.Schema
- func TagsToMap(tags []tags.ResourceTag) map[string]string
- func UpdateResourceTags(client *golangsdk.ServiceClient, d *schema.ResourceData, ...) error
- func ValidateASGroupListenerID(v interface{}, k string) (ws []string, errors []error)
- func ValidateAntiDdosAppTypeID(v interface{}, k string) (ws []string, errors []error)
- func ValidateAntiDdosCleaningAccessPosID(v interface{}, k string) (ws []string, errors []error)
- func ValidateAntiDdosHttpRequestPosID(v interface{}, k string) (ws []string, errors []error)
- func ValidateAntiDdosTrafficPosID(v interface{}, k string) (ws []string, errors []error)
- func ValidateCIDR(v interface{}, k string) (ws []string, errors []error)
- func ValidateDDSStartTime(v interface{}, _ string) (ws []string, errors []error)
- func ValidateECSTagValue(v interface{}, _ string) (ws []string, errors []error)
- func ValidateIP(v interface{}, k string) (ws []string, errors []error)
- func ValidateIntRange(v interface{}, k string, l int, h int) (ws []string, errors []error)
- func ValidateJsonString(v interface{}, k string) (ws []string, errors []error)
- func ValidateK8sTagsMap(v interface{}, k string) (ws []string, errors []error)
- func ValidateName(v interface{}, k string) (ws []string, errors []error)
- func ValidatePositiveInt(v interface{}, k string) (ws []string, errors []error)
- func ValidateStackTemplate(v interface{}, k string) (ws []string, errors []error)
- func ValidateStringList(v interface{}, k string, l []string) (ws []string, errors []error)
- func ValidateSubnet(argName string) schema.CustomizeDiffFunc
- func ValidateTrueOnly(v interface{}, k string) (ws []string, errors []error)
- func ValidateVBSBackupName(v interface{}, k string) (ws []string, errors []error)
- func ValidateVBSPolicyFrequency(v interface{}, k string) (ws []string, errors []error)
- func ValidateVBSPolicyName(v interface{}, k string) (ws []string, errors []error)
- func ValidateVBSPolicyRetainBackup(v interface{}, k string) (ws []string, errors []error)
- func ValidateVBSPolicyRetentionNum(v interface{}, k string) (ws []string, errors []error)
- func ValidateVBSPolicyStatus(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)
- func ValidateVPC(argName string) schema.CustomizeDiffFunc
- func ValidateVolumeType(argName string) schema.CustomizeDiffFunc
- func WaitToFinish(target, pending []string, timeout, interval time.Duration, ...) (interface{}, error)
- type StringSearcher
Constants ¶
This section is empty.
Variables ¶
var Descriptions = map[string]string{
"access_key": "The access key for API operations. You can retrieve this\n" +
"from the 'My Credential' section of the console.",
"secret_key": "The secret key for API operations. You can retrieve this\n" +
"from the 'My Credential' section of the console.",
"auth_url": "The Identity authentication URL.",
"region": "The OpenTelekomCloud region to connect to.",
"user_name": "Username to login with.",
"user_id": "User ID to login with.",
"tenant_id": "The ID of the Tenant (Identity v2) or Project (Identity v3)\n" +
"to login with.",
"tenant_name": "The name of the Tenant (Identity v2) or Project (Identity v3)\n" +
"to login with.",
"password": "Password to login with.",
"token": "Authentication token to use as an alternative to username/password.",
"security_token": "Security token to use for OBS federated authentication.",
"domain_id": "The ID of the Domain to scope to (Identity v3).",
"domain_name": "The name of the Domain to scope to (Identity v3).",
"insecure": "Trust self-signed certificates.",
"cacert_file": "A Custom CA certificate.",
"endpoint_type": "The catalog endpoint type to use.",
"cert": "A client certificate to authenticate with.",
"key": "A client private key to authenticate with.",
"swauth": "Use Swift's authentication system instead of Keystone. Only used for\n" +
"interaction with Swift.",
"agency_name": "The name of agency",
"agency_domain_name": "The name of domain who created the agency (Identity v3).",
"delegated_project": "The name of delegated project (Identity v3).",
"cloud": "An entry in a `clouds.yaml` file to use.",
"max_retries": "How many times HTTP connection should be retried until giving up.",
}
var SuccessHTTPCodes = []int{200, 201, 202, 203, 204, 205, 206, 207, 208, 226}
Functions ¶
func AddValueSpecs ¶
AddValueSpecs expands the 'value_specs' object and removes 'value_specs' from the request body.
func Base64IfNot ¶
func BuildRequest ¶
BuildRequest takes an opts struct and builds a request body for Gophercloud to execute
func CheckDeleted ¶
func CheckDeleted(d *schema.ResourceData, err error, msg string) error
CheckDeleted checks the error to see if it's a 404 (Not Found) and, if so, sets the resource ID to the empty string instead of throwing an error.
func CheckForRetryableError ¶
func CheckForRetryableError(err error) *resource.RetryError
func CheckYamlString ¶
Takes a value containing YAML string and passes it through the YAML parser. Returns either a parsing error or original YAML string.
func ConvertStructToMap ¶
ConvertStructToMap converts an instance of struct to a map object, and changes each key of fields to the value of 'nameMap' if the key in it or to its corresponding lowercase.
func ExpandResourceTags ¶
func ExpandResourceTags(tagMap map[string]interface{}) []tags.ResourceTag
ExpandResourceTags returns the tags for the given map of data.
func ExpandStringList ¶
func ExpandStringList(configured []interface{}) []string
Takes the result of flatmap.Expand for an array of strings and returns a []*string
func ExpandToStringSlice ¶
func ExpandToStringSlice(v []interface{}) []string
func FirstOneSet ¶
FirstOneSet select first nonempty string or returns error if both are empty
func FlattenStringList ¶
func FlattenStringList(list []*string) []interface{}
Takes list of pointers to strings. Expand to an array of raw strings and returns a []interface{} to keep compatibility w/ schema.NewSetschema.NewSet
func GetAllAvailableZones ¶ added in v1.23.2
func GetAllAvailableZones(d *schema.ResourceData) []string
func GetHashOrEmpty ¶
func GetHashOrEmpty(v interface{}) string
func HasFilledOpt ¶
func HasFilledOpt(d *schema.ResourceData, param string) bool
The result may be not correct when the type of param is string and user config it to 'param=""' but, there is no other way.
func ImportAsManaged ¶
func ImportAsManaged(d *schema.ResourceData, _ interface{}) ([]*schema.ResourceData, error)
func InstallScriptEncode ¶
func InstallScriptHashSum ¶
func IsResourceNotFound ¶
func LooksLikeJsonString ¶
func LooksLikeJsonString(s interface{}) bool
func MapResourceProp ¶
func MapResourceProp(d *schema.ResourceData, prop string) map[string]interface{}
MapResourceProp converts ResourceData property into a map
func MapValueSpecs ¶
func MapValueSpecs(d cfg.SchemaOrDiff) map[string]string
MapValueSpecs converts ResourceData into a map
func MultipleCustomizeDiffs ¶
func MultipleCustomizeDiffs(funcs ...schema.CustomizeDiffFunc) schema.CustomizeDiffFunc
func NavigateValue ¶
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 ReplaceVars ¶
func ReplaceVarsForTest ¶
func ReplaceVarsForTest(rs *terraform.ResourceState, linkTmpl string) (string, error)
func SortVersions ¶
SortVersions sorts versions from newer to older. If non-version-like string will be found in the slice, slice will be sorted as string slice in reversed order (z-a)
func StrSliceContains ¶
StrSliceContains checks if a given string is contained in a slice When anybody asks why Go needs generics, here you go.
func SuppressCaseInsensitive ¶
func SuppressCaseInsensitive(_, old, new string, _ *schema.ResourceData) bool
func SuppressComputedFixedWhenFloatingIp ¶
func SuppressComputedFixedWhenFloatingIp(_, 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(_, _, _ string, _ *schema.ResourceData) bool
Suppress all changes?
func SuppressEqualZoneNames ¶
func SuppressEqualZoneNames(_, old, new string, _ *schema.ResourceData) bool
func SuppressEquivalentAwsPolicyDiffs ¶
func SuppressEquivalentAwsPolicyDiffs(_, old, new string, _ *schema.ResourceData) bool
func SuppressExternalGateway ¶
func SuppressExternalGateway(_, old, new string, _ *schema.ResourceData) bool
Suppress changes if we don't specify an external gateway, but one is specified for us
func SuppressLBWhitelistDiffs ¶
func SuppressLBWhitelistDiffs(_, old, new string, _ *schema.ResourceData) bool
func SuppressMinDisk ¶
func SuppressMinDisk(_, old, new string, _ *schema.ResourceData) bool
Suppress changes if we get a computed min_disk_gb if value is unspecified (default 0)
func SuppressRdsNameDiffs ¶
func SuppressRdsNameDiffs(_, old, new string, _ *schema.ResourceData) bool
func SuppressSmartVersionDiff ¶
func SuppressSmartVersionDiff(_, old, new string, _ *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(client *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 ValidateDDSStartTime ¶
func ValidateECSTagValue ¶
func ValidateIP ¶
func ValidateIntRange ¶
ValidateIntRange Deprecated Use validation.IntBetween instead
func ValidateJsonString ¶
func ValidateK8sTagsMap ¶
func ValidateName ¶
func ValidatePositiveInt ¶
ValidatePositiveInt Deprecated Use validation.IntAtLeast instead
func ValidateStackTemplate ¶
func ValidateStringList ¶
ValidateStringList Deprecated Use validation.StringInSlice instead
func ValidateSubnet ¶
func ValidateSubnet(argName string) schema.CustomizeDiffFunc
func ValidateTrueOnly ¶
func ValidateVBSBackupName ¶
func ValidateVBSPolicyName ¶
func ValidateVBSPolicyStatus ¶
func ValidateVBSTagKey ¶
func ValidateVBSTagValue ¶
func ValidateVPC ¶
func ValidateVPC(argName string) schema.CustomizeDiffFunc
func ValidateVolumeType ¶
func ValidateVolumeType(argName string) schema.CustomizeDiffFunc
func WaitToFinish ¶
Types ¶
type StringSearcher ¶
StringSearcher is string search structure with internal cache This allows single iteration from base slice for multiple string searches