Documentation
¶
Overview ¶
Package util represent few common functions
Index ¶
- func CheckIfMetaKeysExistsInResources(t *testing.T, res []resource.Resource, expectedMetaDataKeys []string)
- func GetAWSResourceTagByARN(ctx context.Context, resourceTaggingService ResourceTaggingServiceClient, ...) (map[string]string, error)
- func IsFieldExistsInConfig(value string, fields []string) bool
- func RetryWithExponentialBackoff(fn func() error, maxRetries int, initialBackoffSeconds int) error
- type ResourceTaggingServiceClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckIfMetaKeysExistsInResources ¶
func CheckIfMetaKeysExistsInResources(t *testing.T, res []resource.Resource, expectedMetaDataKeys []string)
CheckIfMetaKeysExistsInResources Checks if all the keys in the given list exist in the metaData of all the Resources
func GetAWSResourceTagByARN ¶
func GetAWSResourceTagByARN(ctx context.Context, resourceTaggingService ResourceTaggingServiceClient, arn string) (map[string]string, error)
GetAWSResourceTagByARN provides tags for any resource from ARN
func IsFieldExistsInConfig ¶
IsFieldExistsInConfig to check if specific field exists in config
Types ¶
type ResourceTaggingServiceClient ¶
type ResourceTaggingServiceClient interface {
GetResources(context.Context, *resourcegroupstaggingapi.GetResourcesInput, ...func(*resourcegroupstaggingapi.Options)) (*resourcegroupstaggingapi.GetResourcesOutput, error)
}
ResourceTaggingServiceClient construct resource tagging service
Click to show internal directories.
Click to hide internal directories.