Documentation ¶
Index ¶
- Constants
- Variables
- func AddValueSpecs(body map[string]interface{}) map[string]interface{}
- func BuildRequest(opts interface{}, parent string) (map[string]interface{}, error)
- func CheckAlreadyExists(err error, msg, resourceName, conflict string) error
- func CheckDeleted(d *schema.ResourceData, err error, msg string) error
- func CheckDeletedDatasource(ctx context.Context, r *datasource.ReadResponse, err error) error
- func CheckDeletedResource(ctx context.Context, r *resource.ReadResponse, err error) error
- func CheckForRetryableError(err error) *retry.RetryError
- func CopyToMap(dst, src *map[string]string)
- func EnsureOnlyOnePresented(d *schema.ResourceData, keys ...string) (string, error)
- func ErrorWithRequestID(err error, requestID string) error
- func ExpandObjectReadTags(d *schema.ResourceData, tags []string)
- func ExpandObjectTags(d *schema.ResourceData) []string
- func ExpandObjectUpdateTags(d *schema.ResourceData) []string
- func ExpandToMapStringString(v map[string]interface{}) map[string]string
- func ExpandToStringSlice(v []interface{}) []string
- func ExpandVendorOptions(vendOptsRaw []interface{}) map[string]interface{}
- func GetRegion(d *schema.ResourceData, config clients.Config) string
- func GetTimestamp(t *time.Time) string
- func IsOperationNotSupported(d string, types ...string) bool
- func MapStructureDecoder(strct interface{}, v *map[string]interface{}, ...) error
- func MapValueSpecs(d *schema.ResourceData) map[string]string
- func SliceUnion(a, b []string) []string
- func StrSliceContains(haystack []string, needle string) bool
- func StructToMap(s interface{}) (map[string]interface{}, error)
- func ValueKnownBoolPointer(v basetypes.BoolValue) *bool
Constants ¶
const RequestIDHeader = "X-Openstack-Request-Id"
Variables ¶
var DecoderConfig = &mapstructure.DecoderConfig{
TagName: "json",
}
Functions ¶
func AddValueSpecs ¶
AddValueSpecs expands the 'value_specs' object and removes 'value_specs' from the reqeust body.
func BuildRequest ¶
BuildRequest takes an opts struct and builds a request body for Gophercloud to execute.
func CheckAlreadyExists ¶
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 CheckDeletedDatasource ¶ added in v0.3.0
func CheckDeletedDatasource(ctx context.Context, r *datasource.ReadResponse, err error) error
checkDeletedDatasource 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 CheckDeletedResource ¶ added in v0.4.0
checkDeletedResource 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) *retry.RetryError
func EnsureOnlyOnePresented ¶
func EnsureOnlyOnePresented(d *schema.ResourceData, keys ...string) (string, error)
func ErrorWithRequestID ¶ added in v0.5.4
func ExpandObjectReadTags ¶
func ExpandObjectReadTags(d *schema.ResourceData, tags []string)
func ExpandObjectTags ¶
func ExpandObjectTags(d *schema.ResourceData) []string
func ExpandObjectUpdateTags ¶
func ExpandObjectUpdateTags(d *schema.ResourceData) []string
func ExpandToMapStringString ¶
func ExpandToStringSlice ¶
func ExpandToStringSlice(v []interface{}) []string
func ExpandVendorOptions ¶
func ExpandVendorOptions(vendOptsRaw []interface{}) map[string]interface{}
func GetRegion ¶
func GetRegion(d *schema.ResourceData, config clients.Config) string
GetRegion returns the region that was specified in the resource. If a region was not set, the provider-level region is checked. The provider-level region can either be set by the region argument or by OS_REGION_NAME.
func IsOperationNotSupported ¶
func MapStructureDecoder ¶
func MapStructureDecoder(strct interface{}, v *map[string]interface{}, config *mapstructure.DecoderConfig) error
MapStructureDecoder ...
func MapValueSpecs ¶
func MapValueSpecs(d *schema.ResourceData) map[string]string
MapValueSpecs converts ResourceData into a map.
func SliceUnion ¶
func StrSliceContains ¶
util.StrSliceContains checks if a given string is contained in a slice When anybody asks why Go needs generics, here you go.
func StructToMap ¶
StructToMap converts a structure to map with keys set to lowered structure field names NOTE: This function does not implement mapping nested structures
func ValueKnownBoolPointer ¶ added in v0.5.0
Types ¶
This section is empty.