diff --git a/go.mod b/go.mod index d5f88042..73c3a70c 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.21.6 require ( github.com/aws/aws-sdk-go v1.50.4 - github.com/ekristen/libnuke v0.8.0 + github.com/ekristen/libnuke v0.9.1 github.com/fatih/color v1.16.0 github.com/golang/mock v1.6.0 github.com/google/uuid v1.6.0 diff --git a/go.sum b/go.sum index b9205ba1..7f1e15b5 100644 --- a/go.sum +++ b/go.sum @@ -8,6 +8,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/ekristen/libnuke v0.8.0 h1:dxs+RosOcstbzvxnLyWN4mq1mAuOqMRUi7LEBC8rk44= github.com/ekristen/libnuke v0.8.0/go.mod h1:WhYx7LDAkvkXwwfhWCASRn7fbifF8kfyhNsUj5zCCVs= +github.com/ekristen/libnuke v0.9.1 h1:AoX1cggVTanP671Xuh6kJRv0HEp26NLqqPTzwYbz9I0= +github.com/ekristen/libnuke v0.9.1/go.mod h1:WhYx7LDAkvkXwwfhWCASRn7fbifF8kfyhNsUj5zCCVs= github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= diff --git a/pkg/commands/list/list.go b/pkg/commands/list/list.go index dca20b1a..cb802644 100644 --- a/pkg/commands/list/list.go +++ b/pkg/commands/list/list.go @@ -10,13 +10,12 @@ import ( "github.com/ekristen/aws-nuke/pkg/commands/global" "github.com/ekristen/aws-nuke/pkg/common" - "github.com/ekristen/libnuke/pkg/resource" - _ "github.com/ekristen/aws-nuke/resources" + "github.com/ekristen/libnuke/pkg/registry" ) func execute(c *cli.Context) error { - ls := resource.GetNames() + ls := registry.GetNames() sort.Strings(ls) @@ -25,7 +24,7 @@ func execute(c *cli.Context) error { continue } - reg := resource.GetRegistration(name) + reg := registry.GetRegistration(name) if reg.AlternativeResource != "" { color.New(color.Bold).Printf("%-55s\n", name) diff --git a/pkg/commands/nuke/command.go b/pkg/commands/nuke/command.go index de2b279a..49f38d18 100644 --- a/pkg/commands/nuke/command.go +++ b/pkg/commands/nuke/command.go @@ -3,6 +3,7 @@ package nuke import ( "context" "fmt" + "github.com/ekristen/libnuke/pkg/registry" "slices" "time" @@ -13,7 +14,6 @@ import ( libconfig "github.com/ekristen/libnuke/pkg/config" libnuke "github.com/ekristen/libnuke/pkg/nuke" - "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/scanner" "github.com/ekristen/libnuke/pkg/types" @@ -67,7 +67,7 @@ func execute(c *cli.Context) error { // Parse the user supplied configuration file to pass in part to configure the nuke process. parsedConfig, err := config.New(libconfig.Options{ Path: c.Path("config"), - Deprecations: resource.GetDeprecatedResourceTypeMapping(), + Deprecations: registry.GetDeprecatedResourceTypeMapping(), }) if err != nil { logrus.Errorf("Failed to parse config file %s", c.Path("config")) @@ -124,7 +124,7 @@ func execute(c *cli.Context) error { // Resolve the resource types to be used for the nuke process based on the parameters, global configuration, and // account level configuration. resourceTypes := types.ResolveResourceTypes( - resource.GetNames(), + registry.GetNames(), []types.Collection{ n.Parameters.Includes, parsedConfig.ResourceTypes.GetIncludes(), @@ -140,7 +140,7 @@ func execute(c *cli.Context) error { parsedConfig.ResourceTypes.GetAlternatives(), accountConfig.ResourceTypes.GetAlternatives(), }, - resource.GetAlternativeResourceTypeMapping(), + registry.GetAlternativeResourceTypeMapping(), ) // Register the scanners for each region that is defined in the configuration. diff --git a/pkg/nuke/resource.go b/pkg/nuke/resource.go index 4a417b7e..2dcdcfa9 100644 --- a/pkg/nuke/resource.go +++ b/pkg/nuke/resource.go @@ -3,11 +3,11 @@ package nuke import ( "github.com/aws/aws-sdk-go/aws/session" - "github.com/ekristen/libnuke/pkg/resource" + "github.com/ekristen/libnuke/pkg/registry" ) // Account is the resource scope that all resources in AWS Nuke are registered against. -const Account resource.Scope = "account" +const Account registry.Scope = "account" // ListerOpts are the options for the Lister functions of each individual resource. It is passed in as an interface{} // so that each implementing tool can define their own options for the lister. Each resource then asserts the type on diff --git a/resources/accessanalyzer-analyzers.go b/resources/accessanalyzer-analyzers.go index 3af0d669..4dd59b4b 100644 --- a/resources/accessanalyzer-analyzers.go +++ b/resources/accessanalyzer-analyzers.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/accessanalyzer" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -23,7 +24,7 @@ type AccessAnalyzer struct { } func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: AccessAnalyzerResource, Scope: nuke.Account, Lister: &AccessAnalyzerLister{}, diff --git a/resources/accessanalyzer-archiverules.go b/resources/accessanalyzer-archiverules.go index 260a9e05..90b9b051 100644 --- a/resources/accessanalyzer-archiverules.go +++ b/resources/accessanalyzer-archiverules.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/accessanalyzer" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const AccessAnalyzerArchiveRuleResource = "ArchiveRule" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: AccessAnalyzerArchiveRuleResource, Scope: nuke.Account, Lister: &AccessAnalyzerArchiveRuleLister{}, diff --git a/resources/acm-certificates.go b/resources/acm-certificates.go index 0c966192..8d74f310 100644 --- a/resources/acm-certificates.go +++ b/resources/acm-certificates.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/acm" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const ACMCertificateResource = "ACMCertificate" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ACMCertificateResource, Scope: nuke.Account, Lister: &ACMCertificateLister{}, diff --git a/resources/acmpca-certificateauthorities.go b/resources/acmpca-certificateauthorities.go index f1b0144b..b4783ec0 100644 --- a/resources/acmpca-certificateauthorities.go +++ b/resources/acmpca-certificateauthorities.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/acmpca" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const ACMPCACertificateAuthorityResource = "ACMPCACertificateAuthority" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ACMPCACertificateAuthorityResource, Scope: nuke.Account, Lister: &ACMPCACertificateAuthorityLister{}, diff --git a/resources/acmpca-certificateauthoritystates.go b/resources/acmpca-certificateauthoritystates.go index 209dcc4c..bb3d8aa2 100644 --- a/resources/acmpca-certificateauthoritystates.go +++ b/resources/acmpca-certificateauthoritystates.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/acmpca" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const ACMPCACertificateAuthorityStateResource = "ACMPCACertificateAuthorityState" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ACMPCACertificateAuthorityStateResource, Scope: nuke.Account, Lister: &ACMPCACertificateAuthorityStateLister{}, diff --git a/resources/apigateway-apikeys.go b/resources/apigateway-apikeys.go index 517c0f3b..2769458a 100644 --- a/resources/apigateway-apikeys.go +++ b/resources/apigateway-apikeys.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/apigateway" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const APIGatewayAPIKeyResource = "APIGatewayAPIKey" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: APIGatewayAPIKeyResource, Scope: nuke.Account, Lister: &APIGatewayAPIKeyLister{}, diff --git a/resources/apigateway-clientcertificates.go b/resources/apigateway-clientcertificates.go index aae8dabb..c8bd1430 100644 --- a/resources/apigateway-clientcertificates.go +++ b/resources/apigateway-clientcertificates.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/apigateway" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const APIGatewayClientCertificateResource = "APIGatewayClientCertificate" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: APIGatewayClientCertificateResource, Scope: nuke.Account, Lister: &APIGatewayClientCertificateLister{}, diff --git a/resources/apigateway-domainnames.go b/resources/apigateway-domainnames.go index 25bbd5f3..7e8e96db 100644 --- a/resources/apigateway-domainnames.go +++ b/resources/apigateway-domainnames.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/apigateway" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const APIGatewayDomainNameResource = "APIGatewayDomainName" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: APIGatewayDomainNameResource, Scope: nuke.Account, Lister: &APIGatewayDomainNameLister{}, diff --git a/resources/apigateway-restapis.go b/resources/apigateway-restapis.go index b630335f..02c74269 100644 --- a/resources/apigateway-restapis.go +++ b/resources/apigateway-restapis.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/apigateway" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const APIGatewayRestAPIResource = "APIGatewayRestAPI" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: APIGatewayRestAPIResource, Scope: nuke.Account, Lister: &APIGatewayRestAPILister{}, diff --git a/resources/apigateway-usageplans.go b/resources/apigateway-usageplans.go index c55ab839..71d8b45e 100644 --- a/resources/apigateway-usageplans.go +++ b/resources/apigateway-usageplans.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/apigateway" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const APIGatewayUsagePlanResource = "APIGatewayUsagePlan" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: APIGatewayUsagePlanResource, Scope: nuke.Account, Lister: &APIGatewayUsagePlanLister{}, diff --git a/resources/apigateway-vpclinks.go b/resources/apigateway-vpclinks.go index 0c1248df..af01c50d 100644 --- a/resources/apigateway-vpclinks.go +++ b/resources/apigateway-vpclinks.go @@ -5,15 +5,18 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/apigateway" - "github.com/ekristen/aws-nuke/pkg/nuke" + + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" + + "github.com/ekristen/aws-nuke/pkg/nuke" ) const APIGatewayVpcLinkResource = "APIGatewayVpcLink" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: APIGatewayVpcLinkResource, Scope: nuke.Account, Lister: &APIGatewayVpcLinkLister{}, diff --git a/resources/apigatewayv2-apis.go b/resources/apigatewayv2-apis.go index b76e8c82..8210a5cc 100644 --- a/resources/apigatewayv2-apis.go +++ b/resources/apigatewayv2-apis.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/apigatewayv2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const APIGatewayV2APIResource = "APIGatewayV2API" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: APIGatewayV2APIResource, Scope: nuke.Account, Lister: &APIGatewayV2APILister{}, diff --git a/resources/apigatewayv2-vpc-links.go b/resources/apigatewayv2-vpc-links.go index 3d71fb04..ad1f1a94 100644 --- a/resources/apigatewayv2-vpc-links.go +++ b/resources/apigatewayv2-vpc-links.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/apigatewayv2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const APIGatewayV2VpcLinkResource = "APIGatewayV2VpcLink" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: APIGatewayV2VpcLinkResource, Scope: nuke.Account, Lister: &APIGatewayV2VpcLinkLister{}, diff --git a/resources/appconfig-applications.go b/resources/appconfig-applications.go index 81afeb9a..b58167bd 100644 --- a/resources/appconfig-applications.go +++ b/resources/appconfig-applications.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/appconfig" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -21,7 +22,7 @@ type AppConfigApplication struct { const AppConfigApplicationResource = "AppConfigApplication" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: AppConfigApplicationResource, Scope: nuke.Account, Lister: &AppConfigApplicationLister{}, diff --git a/resources/appconfig-configurationprofiles.go b/resources/appconfig-configurationprofiles.go index ea320164..cd57ac64 100644 --- a/resources/appconfig-configurationprofiles.go +++ b/resources/appconfig-configurationprofiles.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/appconfig" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -24,7 +25,7 @@ type AppConfigConfigurationProfile struct { const AppConfigConfigurationProfileResource = "AppConfigConfigurationProfile" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: AppConfigConfigurationProfileResource, Scope: nuke.Account, Lister: &AppConfigConfigurationProfileLister{}, diff --git a/resources/appconfig-deploymentstrategies.go b/resources/appconfig-deploymentstrategies.go index 30e5c074..94330148 100644 --- a/resources/appconfig-deploymentstrategies.go +++ b/resources/appconfig-deploymentstrategies.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/appconfig" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -23,7 +24,7 @@ type AppConfigDeploymentStrategy struct { const AppConfigDeploymentStrategyResource = "AppConfigDeploymentStrategy" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: AppConfigDeploymentStrategyResource, Scope: nuke.Account, Lister: &AppConfigDeploymentStrategyLister{}, diff --git a/resources/appconfig-environments.go b/resources/appconfig-environments.go index 960a5dca..7195b210 100644 --- a/resources/appconfig-environments.go +++ b/resources/appconfig-environments.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/appconfig" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -24,7 +25,7 @@ type AppConfigEnvironment struct { const AppConfigEnvironmentResource = "AppConfigEnvironment" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: AppConfigEnvironmentResource, Scope: nuke.Account, Lister: &AppConfigEnvironmentLister{}, diff --git a/resources/appconfig-hostedconfigurationversions.go b/resources/appconfig-hostedconfigurationversions.go index cb38a7e4..4a7bcfe9 100644 --- a/resources/appconfig-hostedconfigurationversions.go +++ b/resources/appconfig-hostedconfigurationversions.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/appconfig" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -24,7 +25,7 @@ type AppConfigHostedConfigurationVersion struct { const AppConfigHostedConfigurationVersionResource = "AppConfigHostedConfigurationVersion" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: AppConfigHostedConfigurationVersionResource, Scope: nuke.Account, Lister: &AppConfigHostedConfigurationVersionLister{}, diff --git a/resources/applicationautoscaling-scalable-targets.go b/resources/applicationautoscaling-scalable-targets.go index 016e498b..714a1105 100644 --- a/resources/applicationautoscaling-scalable-targets.go +++ b/resources/applicationautoscaling-scalable-targets.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/applicationautoscaling" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const ApplicationAutoScalingScalableTargetResource = "ApplicationAutoScalingScalableTarget" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ApplicationAutoScalingScalableTargetResource, Scope: nuke.Account, Lister: &ApplicationAutoScalingScalableTargetLister{}, diff --git a/resources/appmesh-gatewayroute.go b/resources/appmesh-gatewayroute.go index d42fa1f0..7b3db473 100644 --- a/resources/appmesh-gatewayroute.go +++ b/resources/appmesh-gatewayroute.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/appmesh" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const AppMeshGatewayRouteResource = "AppMeshGatewayRoute" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: AppMeshGatewayRouteResource, Scope: nuke.Account, Lister: &AppMeshGatewayRouteLister{}, diff --git a/resources/appmesh-mesh.go b/resources/appmesh-mesh.go index 31dca2e2..42488a94 100644 --- a/resources/appmesh-mesh.go +++ b/resources/appmesh-mesh.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/appmesh" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const AppMeshMeshResource = "AppMeshMesh" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: AppMeshMeshResource, Scope: nuke.Account, Lister: &AppMeshMeshLister{}, diff --git a/resources/appmesh-route.go b/resources/appmesh-route.go index 73b15394..a72fb1f5 100644 --- a/resources/appmesh-route.go +++ b/resources/appmesh-route.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/appmesh" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const AppMeshRouteResource = "AppMeshRoute" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: AppMeshRouteResource, Scope: nuke.Account, Lister: &AppMeshRouteLister{}, diff --git a/resources/appmesh-virtualgateway.go b/resources/appmesh-virtualgateway.go index 9f70e142..efa3020a 100644 --- a/resources/appmesh-virtualgateway.go +++ b/resources/appmesh-virtualgateway.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/appmesh" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const AppMeshVirtualGatewayResource = "AppMeshVirtualGateway" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: AppMeshVirtualGatewayResource, Scope: nuke.Account, Lister: &AppMeshVirtualGatewayLister{}, diff --git a/resources/appmesh-virtualnode.go b/resources/appmesh-virtualnode.go index 295e83c7..fe755e02 100644 --- a/resources/appmesh-virtualnode.go +++ b/resources/appmesh-virtualnode.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/appmesh" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const AppMeshVirtualNodeResource = "AppMeshVirtualNode" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: AppMeshVirtualNodeResource, Scope: nuke.Account, Lister: &AppMeshVirtualNodeLister{}, diff --git a/resources/appmesh-virtualrouter.go b/resources/appmesh-virtualrouter.go index 02efd9c3..556bfa07 100644 --- a/resources/appmesh-virtualrouter.go +++ b/resources/appmesh-virtualrouter.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/appmesh" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -20,7 +21,7 @@ type AppMeshVirtualRouter struct { const AppMeshVirtualRouterResource = "AppMeshVirtualRouter" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: AppMeshVirtualRouterResource, Scope: nuke.Account, Lister: &AppMeshVirtualRouterLister{}, diff --git a/resources/appmesh-virtualservice.go b/resources/appmesh-virtualservice.go index f201de9f..f794f2a0 100644 --- a/resources/appmesh-virtualservice.go +++ b/resources/appmesh-virtualservice.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/appmesh" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -20,7 +21,7 @@ type AppMeshVirtualService struct { const AppMeshVirtualServiceResource = "AppMeshVirtualService" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: AppMeshVirtualServiceResource, Scope: nuke.Account, Lister: &AppMeshVirtualServiceLister{}, diff --git a/resources/apprunner-connection.go b/resources/apprunner-connection.go index 616a5206..9bb3b640 100644 --- a/resources/apprunner-connection.go +++ b/resources/apprunner-connection.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/apprunner" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -20,7 +21,7 @@ type AppRunnerConnection struct { const AppRunnerConnectionResource = "AppRunnerConnection" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: AppRunnerConnectionResource, Scope: nuke.Account, Lister: &AppRunnerConnectionLister{}, diff --git a/resources/apprunner-service.go b/resources/apprunner-service.go index 8bf633eb..ce45203a 100644 --- a/resources/apprunner-service.go +++ b/resources/apprunner-service.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/apprunner" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -21,7 +22,7 @@ type AppRunnerService struct { const AppRunnerServiceResource = "AppRunnerService" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: AppRunnerServiceResource, Scope: nuke.Account, Lister: &AppRunnerServiceLister{}, diff --git a/resources/appstream-directoryconfigs.go b/resources/appstream-directoryconfigs.go index 5fd8d5f2..1b98f103 100644 --- a/resources/appstream-directoryconfigs.go +++ b/resources/appstream-directoryconfigs.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/appstream" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -19,7 +20,7 @@ type AppStreamDirectoryConfig struct { const AppStreamDirectoryConfigResource = "AppStreamDirectoryConfig" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: AppStreamDirectoryConfigResource, Scope: nuke.Account, Lister: &AppStreamDirectoryConfigLister{}, diff --git a/resources/appstream-fleets.go b/resources/appstream-fleets.go index 5c12c216..4e8fef39 100644 --- a/resources/appstream-fleets.go +++ b/resources/appstream-fleets.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/service/appstream" "github.com/ekristen/aws-nuke/pkg/nuke" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" ) @@ -17,7 +18,7 @@ type AppStreamFleet struct { const AppStreamFleetResource = "AppStreamFleet" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: AppStreamFleetResource, Scope: nuke.Account, Lister: &AppStreamFleetLister{}, diff --git a/resources/appstream-fleetstates.go b/resources/appstream-fleetstates.go index 8568515c..0bf72fa1 100644 --- a/resources/appstream-fleetstates.go +++ b/resources/appstream-fleetstates.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/appstream" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -21,7 +22,7 @@ type AppStreamFleetState struct { const AppStreamFleetStateResource = "AppStreamFleetState" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: AppStreamFleetStateResource, Scope: nuke.Account, Lister: &AppStreamFleetStateLister{}, diff --git a/resources/appstream-imagebuilders.go b/resources/appstream-imagebuilders.go index 6654850a..4c2f9239 100644 --- a/resources/appstream-imagebuilders.go +++ b/resources/appstream-imagebuilders.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/appstream" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -19,7 +20,7 @@ type AppStreamImageBuilder struct { const AppStreamImageBuilderResource = "AppStreamImageBuilder" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: AppStreamImageBuilderResource, Scope: nuke.Account, Lister: &AppStreamImageBuilderLister{}, diff --git a/resources/appstream-imagebuilderwaiters.go b/resources/appstream-imagebuilderwaiters.go index 6d8832d9..fb2beaf6 100644 --- a/resources/appstream-imagebuilderwaiters.go +++ b/resources/appstream-imagebuilderwaiters.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/appstream" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -22,7 +23,7 @@ type AppStreamImageBuilderWaiter struct { const AppStreamImageBuilderWaiterResource = "AppStreamImageBuilderWaiter" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: AppStreamImageBuilderWaiterResource, Scope: nuke.Account, Lister: &AppStreamImageBuilderWaiterLister{}, diff --git a/resources/appstream-images.go b/resources/appstream-images.go index c4274d3c..ab1e64ea 100644 --- a/resources/appstream-images.go +++ b/resources/appstream-images.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/service/appstream" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -22,7 +23,7 @@ type AppStreamImage struct { const AppStreamImageResource = "AppStreamImage" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: AppStreamImageResource, Scope: nuke.Account, Lister: &AppStreamImageLister{}, diff --git a/resources/appstream-stack-fleet-attachments.go b/resources/appstream-stack-fleet-attachments.go index 040bca5a..0ddae89d 100644 --- a/resources/appstream-stack-fleet-attachments.go +++ b/resources/appstream-stack-fleet-attachments.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/appstream" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -21,7 +22,7 @@ type AppStreamStackFleetAttachment struct { const AppStreamStackFleetAttachmentResource = "AppStreamStackFleetAttachment" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: AppStreamStackFleetAttachmentResource, Scope: nuke.Account, Lister: &AppStreamStackFleetAttachmentLister{}, diff --git a/resources/appstream-stacks.go b/resources/appstream-stacks.go index f5a34398..2298b467 100644 --- a/resources/appstream-stacks.go +++ b/resources/appstream-stacks.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/service/appstream" "github.com/ekristen/aws-nuke/pkg/nuke" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" ) @@ -17,7 +18,7 @@ type AppStreamStack struct { const AppStreamStackResource = "AppStreamStack" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: AppStreamStackResource, Scope: nuke.Account, Lister: &AppStreamStackLister{}, diff --git a/resources/appsync-graphqlapis.go b/resources/appsync-graphqlapis.go index d381db82..1aee67ba 100644 --- a/resources/appsync-graphqlapis.go +++ b/resources/appsync-graphqlapis.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/appsync" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const AppSyncGraphqlAPIResource = "AppSyncGraphqlAPI" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: AppSyncGraphqlAPIResource, Scope: nuke.Account, Lister: &AppSyncGraphqlAPILister{}, diff --git a/resources/athena-named-queries.go b/resources/athena-named-queries.go index 55ff3185..8198563e 100644 --- a/resources/athena-named-queries.go +++ b/resources/athena-named-queries.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/athena" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const AthenaNamedQueryResource = "AthenaNamedQuery" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: AthenaNamedQueryResource, Scope: nuke.Account, Lister: &AthenaNamedQueryLister{}, diff --git a/resources/athena-work-groups.go b/resources/athena-work-groups.go index 62fcc58e..2b1839ea 100644 --- a/resources/athena-work-groups.go +++ b/resources/athena-work-groups.go @@ -12,6 +12,7 @@ import ( "github.com/aws/aws-sdk-go/service/athena" "github.com/aws/aws-sdk-go/service/sts" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -21,7 +22,7 @@ import ( const AthenaWorkGroupResource = "AthenaWorkGroup" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: AthenaWorkGroupResource, Scope: nuke.Account, Lister: &AthenaWorkGroupLister{}, diff --git a/resources/autoscaling-groups.go b/resources/autoscaling-groups.go index e0083ac1..41b7a468 100644 --- a/resources/autoscaling-groups.go +++ b/resources/autoscaling-groups.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/autoscaling" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const AutoScalingGroupResource = "AutoScalingGroup" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: AutoScalingGroupResource, Scope: nuke.Account, Lister: &AutoScalingGroupLister{}, diff --git a/resources/autoscaling-launch-configurations.go b/resources/autoscaling-launch-configurations.go index 10b265f0..2ba7b736 100644 --- a/resources/autoscaling-launch-configurations.go +++ b/resources/autoscaling-launch-configurations.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/autoscaling" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -15,7 +16,7 @@ import ( const LaunchConfigurationResource = "LaunchConfiguration" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: LaunchConfigurationResource, Scope: nuke.Account, Lister: &LaunchConfigurationLister{}, diff --git a/resources/autoscaling-lifecycle-hooks.go b/resources/autoscaling-lifecycle-hooks.go index e421bb33..fd6153d0 100644 --- a/resources/autoscaling-lifecycle-hooks.go +++ b/resources/autoscaling-lifecycle-hooks.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/autoscaling" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -15,7 +16,7 @@ import ( const LifecycleHookResource = "LifecycleHook" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: LifecycleHookResource, Scope: nuke.Account, Lister: &LifecycleHookLister{}, diff --git a/resources/autoscalingplans-scalingplans.go b/resources/autoscalingplans-scalingplans.go index 19413c89..aa86ccc9 100644 --- a/resources/autoscalingplans-scalingplans.go +++ b/resources/autoscalingplans-scalingplans.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/autoscalingplans" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const AutoScalingPlansScalingPlanResource = "AutoScalingPlansScalingPlan" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: AutoScalingPlansScalingPlanResource, Scope: nuke.Account, Lister: &AutoScalingPlansScalingPlanLister{}, diff --git a/resources/backup-plans.go b/resources/backup-plans.go index 3ea5a31c..06a40dfa 100644 --- a/resources/backup-plans.go +++ b/resources/backup-plans.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/service/backup" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -25,7 +26,7 @@ type BackupPlan struct { const AWSBackupPlanResource = "AWSBackupPlan" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: AWSBackupPlanResource, Scope: nuke.Account, Lister: &AWSBackupPlanLister{}, diff --git a/resources/backup-recovery-points.go b/resources/backup-recovery-points.go index 86e5d9e2..163943c5 100644 --- a/resources/backup-recovery-points.go +++ b/resources/backup-recovery-points.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/backup" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -22,7 +23,7 @@ type BackupRecoveryPoint struct { const AWSBackupRecoveryPointResource = "AWSBackupRecoveryPoint" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: AWSBackupRecoveryPointResource, Scope: nuke.Account, Lister: &AWSBackupRecoveryPointLister{}, diff --git a/resources/backup-selections.go b/resources/backup-selections.go index 122749af..f632df48 100644 --- a/resources/backup-selections.go +++ b/resources/backup-selections.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/service/backup" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -24,7 +25,7 @@ type BackupSelection struct { const AWSBackupSelectionResource = "AWSBackupSelection" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: AWSBackupSelectionResource, Scope: nuke.Account, Lister: &AWSBackupSelectionLister{}, diff --git a/resources/backup-vaults-access-policies.go b/resources/backup-vaults-access-policies.go index f9925283..19e6bbb8 100644 --- a/resources/backup-vaults-access-policies.go +++ b/resources/backup-vaults-access-policies.go @@ -4,6 +4,7 @@ import ( "context" "github.com/ekristen/aws-nuke/pkg/nuke" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/aws/aws-sdk-go/service/backup" @@ -17,7 +18,7 @@ type BackupVaultAccessPolicy struct { const AWSBackupVaultAccessPolicyResource = "AWSBackupVaultAccessPolicy" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: AWSBackupVaultAccessPolicyResource, Scope: nuke.Account, Lister: &AWSBackupVaultAccessPolicyLister{}, diff --git a/resources/backup-vaults.go b/resources/backup-vaults.go index 65d7e03b..89e3d295 100644 --- a/resources/backup-vaults.go +++ b/resources/backup-vaults.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/backup" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -23,7 +24,7 @@ type BackupVault struct { const AWSBackupVaultResource = "AWSBackupVault" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: AWSBackupVaultResource, Scope: nuke.Account, Lister: &AWSBackupVaultLister{}, diff --git a/resources/batch-compute-environment-states.go b/resources/batch-compute-environment-states.go index 8c7e7927..fbf0828b 100644 --- a/resources/batch-compute-environment-states.go +++ b/resources/batch-compute-environment-states.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/batch" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -17,7 +18,7 @@ import ( const BatchComputeEnvironmentStateResource = "BatchComputeEnvironmentState" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: BatchComputeEnvironmentStateResource, Scope: nuke.Account, Lister: &BatchComputeEnvironmentStateLister{}, diff --git a/resources/batch-compute-environments.go b/resources/batch-compute-environments.go index 1f0f1227..a4bcfdb2 100644 --- a/resources/batch-compute-environments.go +++ b/resources/batch-compute-environments.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/batch" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const BatchComputeEnvironmentResource = "BatchComputeEnvironment" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: BatchComputeEnvironmentResource, Scope: nuke.Account, Lister: &BatchComputeEnvironmentLister{}, diff --git a/resources/batch-job-queue-states.go b/resources/batch-job-queue-states.go index 947e8baf..d0b18192 100644 --- a/resources/batch-job-queue-states.go +++ b/resources/batch-job-queue-states.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/batch" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -23,7 +24,7 @@ type BatchJobQueueState struct { const BatchJobQueueStateResource = "BatchJobQueueState" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: BatchJobQueueStateResource, Scope: nuke.Account, Lister: &BatchJobQueueStateLister{}, diff --git a/resources/batch-job-queues.go b/resources/batch-job-queues.go index e17f58fc..bd3f7870 100644 --- a/resources/batch-job-queues.go +++ b/resources/batch-job-queues.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/batch" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const BatchJobQueueResource = "BatchJobQueue" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: BatchJobQueueResource, Scope: nuke.Account, Lister: &BatchJobQueueLister{}, diff --git a/resources/billing-costandusagereports.go b/resources/billing-costandusagereports.go index 2eee591e..7d40588d 100644 --- a/resources/billing-costandusagereports.go +++ b/resources/billing-costandusagereports.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/costandusagereportservice" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const BillingCostandUsageReportResource = "BillingCostandUsageReport" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: BillingCostandUsageReportResource, Scope: nuke.Account, Lister: &BillingCostandUsageReportLister{}, diff --git a/resources/budgets.go b/resources/budgets.go index 57799327..54704be3 100644 --- a/resources/budgets.go +++ b/resources/budgets.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/service/budgets" "github.com/aws/aws-sdk-go/service/sts" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const BudgetResource = "Budget" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: BudgetResource, Scope: nuke.Account, Lister: &BudgetLister{}, diff --git a/resources/cloud9-environments.go b/resources/cloud9-environments.go index 9a152dce..fc33e4e9 100644 --- a/resources/cloud9-environments.go +++ b/resources/cloud9-environments.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/cloud9" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -19,7 +20,7 @@ type Cloud9Environment struct { const Cloud9EnvironmentResource = "Cloud9Environment" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: Cloud9EnvironmentResource, Scope: nuke.Account, Lister: &Cloud9EnvironmentLister{}, diff --git a/resources/cloudcontrol.go b/resources/cloudcontrol.go index f4ec6f2e..a225ee4b 100644 --- a/resources/cloudcontrol.go +++ b/resources/cloudcontrol.go @@ -15,6 +15,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/cloudcontrolapi" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -53,7 +54,7 @@ func init() { } func registerCloudControl(typeName string) { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: typeName, Scope: nuke.Account, Lister: &CloudControlResourceLister{ diff --git a/resources/clouddirectory-directories.go b/resources/clouddirectory-directories.go index 4c4b3572..8e12261a 100644 --- a/resources/clouddirectory-directories.go +++ b/resources/clouddirectory-directories.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/clouddirectory" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const CloudDirectoryDirectoryResource = "CloudDirectoryDirectory" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CloudDirectoryDirectoryResource, Scope: nuke.Account, Lister: &CloudDirectoryDirectoryLister{}, diff --git a/resources/clouddirectory-schemas.go b/resources/clouddirectory-schemas.go index a6aa4f49..9b8314bc 100644 --- a/resources/clouddirectory-schemas.go +++ b/resources/clouddirectory-schemas.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/clouddirectory" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const CloudDirectorySchemaResource = "CloudDirectorySchema" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CloudDirectorySchemaResource, Scope: nuke.Account, Lister: &CloudDirectorySchemaLister{}, diff --git a/resources/cloudformation-stack.go b/resources/cloudformation-stack.go index 7d8c7555..97c7b1f2 100644 --- a/resources/cloudformation-stack.go +++ b/resources/cloudformation-stack.go @@ -16,6 +16,7 @@ import ( "github.com/aws/aws-sdk-go/service/cloudformation/cloudformationiface" liberrors "github.com/ekristen/libnuke/pkg/errors" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -27,7 +28,7 @@ const CloudformationMaxDeleteAttempt = 3 const CloudFormationStackResource = "CloudFormationStack" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CloudFormationStackResource, Scope: nuke.Account, Lister: &CloudFormationStackLister{}, diff --git a/resources/cloudformation-stackset.go b/resources/cloudformation-stackset.go index e6c0fc50..56b859b1 100644 --- a/resources/cloudformation-stackset.go +++ b/resources/cloudformation-stackset.go @@ -4,6 +4,7 @@ import ( "context" "github.com/ekristen/aws-nuke/pkg/nuke" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "fmt" @@ -21,7 +22,7 @@ import ( const CloudFormationStackSetResource = "CloudFormationStackSet" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CloudFormationStackSetResource, Scope: nuke.Account, Lister: &CloudFormationStackSetLister{}, diff --git a/resources/cloudformation-type.go b/resources/cloudformation-type.go index d701d53d..8f944ff2 100644 --- a/resources/cloudformation-type.go +++ b/resources/cloudformation-type.go @@ -10,6 +10,7 @@ import ( "github.com/aws/aws-sdk-go/service/cloudformation" "github.com/aws/aws-sdk-go/service/cloudformation/cloudformationiface" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -19,7 +20,7 @@ import ( const CloudFormationTypeResource = "CloudFormationType" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CloudFormationTypeResource, Scope: nuke.Account, Lister: &CloudFormationTypeLister{}, diff --git a/resources/cloudfront-distribution-deployments.go b/resources/cloudfront-distribution-deployments.go index d31cd71e..1f379216 100644 --- a/resources/cloudfront-distribution-deployments.go +++ b/resources/cloudfront-distribution-deployments.go @@ -10,6 +10,7 @@ import ( "github.com/aws/aws-sdk-go/service/cloudfront" "github.com/ekristen/aws-nuke/pkg/nuke" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" ) @@ -24,7 +25,7 @@ type CloudFrontDistributionDeployment struct { const CloudFrontDistributionDeploymentResource = "CloudFrontDistributionDeployment" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CloudFrontDistributionDeploymentResource, Scope: nuke.Account, Lister: &CloudFrontDistributionDeploymentLister{}, diff --git a/resources/cloudfront-distributions.go b/resources/cloudfront-distributions.go index 21dc9412..1bc3ff93 100644 --- a/resources/cloudfront-distributions.go +++ b/resources/cloudfront-distributions.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/cloudfront" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const CloudFrontDistributionResource = "CloudFrontDistribution" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CloudFrontDistributionResource, Scope: nuke.Account, Lister: &CloudFrontDistributionLister{}, diff --git a/resources/cloudfront-function.go b/resources/cloudfront-function.go index c0dcb1af..2207ef73 100644 --- a/resources/cloudfront-function.go +++ b/resources/cloudfront-function.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/cloudfront" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const CloudFrontFunctionResource = "CloudFrontFunction" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CloudFrontFunctionResource, Scope: nuke.Account, Lister: &CloudFrontFunctionLister{}, diff --git a/resources/cloudfront-key-groups.go b/resources/cloudfront-key-groups.go index a760bec3..f7cd402d 100644 --- a/resources/cloudfront-key-groups.go +++ b/resources/cloudfront-key-groups.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/service/cloudfront" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -22,7 +23,7 @@ type CloudFrontKeyGroup struct { const CloudFrontKeyGroupResource = "CloudFrontKeyGroup" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CloudFrontKeyGroupResource, Scope: nuke.Account, Lister: &CloudFrontKeyGroupLister{}, diff --git a/resources/cloudfront-origin-access-control.go b/resources/cloudfront-origin-access-control.go index dc5c2af1..3f8567fc 100644 --- a/resources/cloudfront-origin-access-control.go +++ b/resources/cloudfront-origin-access-control.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/cloudfront" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const CloudFrontOriginAccessControlResource = "CloudFrontOriginAccessControl" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CloudFrontOriginAccessControlResource, Scope: nuke.Account, Lister: &CloudFrontOriginAccessControlLister{}, diff --git a/resources/cloudfront-origin-access-identities.go b/resources/cloudfront-origin-access-identities.go index ce1f503a..c95f5e59 100644 --- a/resources/cloudfront-origin-access-identities.go +++ b/resources/cloudfront-origin-access-identities.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/cloudfront" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const CloudFrontOriginAccessIdentityResource = "CloudFrontOriginAccessIdentity" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CloudFrontOriginAccessIdentityResource, Scope: nuke.Account, Lister: &CloudFrontOriginAccessIdentityLister{}, diff --git a/resources/cloudfront-origin-request-policy.go b/resources/cloudfront-origin-request-policy.go index db009806..591ff7f5 100644 --- a/resources/cloudfront-origin-request-policy.go +++ b/resources/cloudfront-origin-request-policy.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/cloudfront" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -19,7 +20,7 @@ type CloudFrontOriginRequestPolicy struct { const CloudFrontOriginRequestPolicyResource = "CloudFrontOriginRequestPolicy" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CloudFrontOriginRequestPolicyResource, Scope: nuke.Account, Lister: &CloudFrontOriginRequestPolicyLister{}, diff --git a/resources/cloudfront-public-keys.go b/resources/cloudfront-public-keys.go index 4a117a2b..19ea3ff7 100644 --- a/resources/cloudfront-public-keys.go +++ b/resources/cloudfront-public-keys.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/service/cloudfront" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -22,7 +23,7 @@ type CloudFrontPublicKey struct { const CloudFrontPublicKeyResource = "CloudFrontPublicKey" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CloudFrontPublicKeyResource, Scope: nuke.Account, Lister: &CloudFrontPublicKeyLister{}, diff --git a/resources/cloudhsmv2-cluster.go b/resources/cloudhsmv2-cluster.go index a622b9ac..6d8a5c41 100644 --- a/resources/cloudhsmv2-cluster.go +++ b/resources/cloudhsmv2-cluster.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/cloudhsmv2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const CloudHSMV2ClusterResource = "CloudHSMV2Cluster" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CloudHSMV2ClusterResource, Scope: nuke.Account, Lister: &CloudHSMV2ClusterLister{}, diff --git a/resources/cloudhsmv2-clusterhsms.go b/resources/cloudhsmv2-clusterhsms.go index 882211b9..809f02e7 100644 --- a/resources/cloudhsmv2-clusterhsms.go +++ b/resources/cloudhsmv2-clusterhsms.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/cloudhsmv2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const CloudHSMV2ClusterHSMResource = "CloudHSMV2ClusterHSM" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CloudHSMV2ClusterHSMResource, Scope: nuke.Account, Lister: &CloudHSMV2ClusterHSMLister{}, diff --git a/resources/cloudsearch-domains.go b/resources/cloudsearch-domains.go index dc1c88f1..9d38781e 100644 --- a/resources/cloudsearch-domains.go +++ b/resources/cloudsearch-domains.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/cloudsearch" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -13,7 +14,7 @@ import ( const CloudSearchDomainResource = "CloudSearchDomain" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CloudSearchDomainResource, Scope: nuke.Account, Lister: &CloudSearchDomainLister{}, diff --git a/resources/cloudtrail-trails.go b/resources/cloudtrail-trails.go index 8265478d..1d957a1f 100644 --- a/resources/cloudtrail-trails.go +++ b/resources/cloudtrail-trails.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/cloudtrail" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const CloudTrailTrailResource = "CloudTrailTrail" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CloudTrailTrailResource, Scope: nuke.Account, Lister: &CloudTrailTrailLister{}, diff --git a/resources/cloudwatch-alarms.go b/resources/cloudwatch-alarms.go index 06328687..cb39a41f 100644 --- a/resources/cloudwatch-alarms.go +++ b/resources/cloudwatch-alarms.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/cloudwatch" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const CloudWatchAlarmResource = "CloudWatchAlarm" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CloudWatchAlarmResource, Scope: nuke.Account, Lister: &CloudWatchAlarmLister{}, diff --git a/resources/cloudwatch-dashboards.go b/resources/cloudwatch-dashboards.go index 08ea77fc..7fd731a6 100644 --- a/resources/cloudwatch-dashboards.go +++ b/resources/cloudwatch-dashboards.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/cloudwatch" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -13,7 +14,7 @@ import ( const CloudWatchDashboardResource = "CloudWatchDashboard" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CloudWatchDashboardResource, Scope: nuke.Account, Lister: &CloudWatchDashboardLister{}, diff --git a/resources/cloudwatch-rum.go b/resources/cloudwatch-rum.go index b2953b56..cb32f057 100644 --- a/resources/cloudwatch-rum.go +++ b/resources/cloudwatch-rum.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/cloudwatchrum" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const CloudWatchRUMAppResource = "CloudWatchRUMApp" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CloudWatchRUMAppResource, Scope: nuke.Account, Lister: &CloudWatchRUMAppLister{}, diff --git a/resources/cloudwatchevents-buses.go b/resources/cloudwatchevents-buses.go index 71da5e9f..a17340f9 100644 --- a/resources/cloudwatchevents-buses.go +++ b/resources/cloudwatchevents-buses.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/cloudwatchevents" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -13,7 +14,7 @@ import ( const CloudWatchEventsBusesResource = "CloudWatchEventsBuses" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CloudWatchEventsBusesResource, Scope: nuke.Account, Lister: &CloudWatchEventsBusesLister{}, diff --git a/resources/cloudwatchevents-rules.go b/resources/cloudwatchevents-rules.go index cb58ad6f..97980715 100644 --- a/resources/cloudwatchevents-rules.go +++ b/resources/cloudwatchevents-rules.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/cloudwatchevents" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -16,7 +17,7 @@ import ( const CloudWatchEventsRuleResource = "CloudWatchEventsRule" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CloudWatchEventsRuleResource, Scope: nuke.Account, Lister: &CloudWatchEventsRuleLister{}, diff --git a/resources/cloudwatchevents-targets.go b/resources/cloudwatchevents-targets.go index 65c3b318..1fc7a52c 100644 --- a/resources/cloudwatchevents-targets.go +++ b/resources/cloudwatchevents-targets.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/cloudwatchevents" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -16,7 +17,7 @@ import ( const CloudWatchEventsTargetResource = "CloudWatchEventsTarget" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CloudWatchEventsTargetResource, Scope: nuke.Account, Lister: &CloudWatchEventsTargetLister{}, diff --git a/resources/cloudwatchlogs-destinations.go b/resources/cloudwatchlogs-destinations.go index bd50102f..e9383bc4 100644 --- a/resources/cloudwatchlogs-destinations.go +++ b/resources/cloudwatchlogs-destinations.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/cloudwatchlogs" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const CloudWatchLogsDestinationResource = "CloudWatchLogsDestination" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CloudWatchLogsDestinationResource, Scope: nuke.Account, Lister: &CloudWatchLogsDestinationLister{}, diff --git a/resources/cloudwatchlogs-loggroups.go b/resources/cloudwatchlogs-loggroups.go index 30e5cedb..3840218d 100644 --- a/resources/cloudwatchlogs-loggroups.go +++ b/resources/cloudwatchlogs-loggroups.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/cloudwatchlogs" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -18,7 +19,7 @@ import ( const CloudWatchLogsLogGroupResource = "CloudWatchLogsLogGroup" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CloudWatchLogsLogGroupResource, Scope: nuke.Account, Lister: &CloudWatchLogsLogGroupLister{}, diff --git a/resources/cloudwatchlogs-resourcepolicy.go b/resources/cloudwatchlogs-resourcepolicy.go index e31eb8cd..5547ccb1 100644 --- a/resources/cloudwatchlogs-resourcepolicy.go +++ b/resources/cloudwatchlogs-resourcepolicy.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/cloudwatchlogs" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const CloudWatchLogsResourcePolicyResource = "CloudWatchLogsResourcePolicy" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CloudWatchLogsResourcePolicyResource, Scope: nuke.Account, Lister: &CloudWatchLogsResourcePolicyLister{}, diff --git a/resources/codeartifact-domains.go b/resources/codeartifact-domains.go index d2bd6aa6..96643a2f 100644 --- a/resources/codeartifact-domains.go +++ b/resources/codeartifact-domains.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/codeartifact" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const CodeArtifactDomainResource = "CodeArtifactDomain" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CodeArtifactDomainResource, Scope: nuke.Account, Lister: &CodeArtifactDomainLister{}, diff --git a/resources/codeartifact-repositories.go b/resources/codeartifact-repositories.go index 3153e428..3ceb9e1c 100644 --- a/resources/codeartifact-repositories.go +++ b/resources/codeartifact-repositories.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/codeartifact" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const CodeArtifactRepositoryResource = "CodeArtifactRepository" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CodeArtifactRepositoryResource, Scope: nuke.Account, Lister: &CodeArtifactRepositoryLister{}, diff --git a/resources/codebuild-projects.go b/resources/codebuild-projects.go index c12b7495..6128a5de 100644 --- a/resources/codebuild-projects.go +++ b/resources/codebuild-projects.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/codebuild" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const CodeBuildProjectResource = "CodeBuildProject" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CodeBuildProjectResource, Scope: nuke.Account, Lister: &CodeBuildProjectLister{}, diff --git a/resources/codecommit-repositories.go b/resources/codecommit-repositories.go index 6283768e..bfdcc617 100644 --- a/resources/codecommit-repositories.go +++ b/resources/codecommit-repositories.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/codecommit" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -13,7 +14,7 @@ import ( const CodeCommitRepositoryResource = "CodeCommitRepository" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CodeCommitRepositoryResource, Scope: nuke.Account, Lister: &CodeCommitRepositoryLister{}, diff --git a/resources/codedeploy-applications.go b/resources/codedeploy-applications.go index 82559726..461789d7 100644 --- a/resources/codedeploy-applications.go +++ b/resources/codedeploy-applications.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/codedeploy" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -13,7 +14,7 @@ import ( const CodeDeployApplicationResource = "CodeDeployApplication" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CodeDeployApplicationResource, Scope: nuke.Account, Lister: &CodeDeployApplicationLister{}, diff --git a/resources/codepipeline-pipelines.go b/resources/codepipeline-pipelines.go index d12803b4..3b7f44ed 100644 --- a/resources/codepipeline-pipelines.go +++ b/resources/codepipeline-pipelines.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/codepipeline" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -13,7 +14,7 @@ import ( const CodePipelinePipelineResource = "CodePipelinePipeline" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CodePipelinePipelineResource, Scope: nuke.Account, Lister: &CodePipelinePipelineLister{}, diff --git a/resources/codestar-connections.go b/resources/codestar-connections.go index eb7a6899..5a063354 100644 --- a/resources/codestar-connections.go +++ b/resources/codestar-connections.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/codestarconnections" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const CodeStarConnectionResource = "CodeStarConnection" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CodeStarConnectionResource, Scope: nuke.Account, Lister: &CodeStarConnectionLister{}, diff --git a/resources/codestar-notifications.go b/resources/codestar-notifications.go index 7241d358..254354d3 100644 --- a/resources/codestar-notifications.go +++ b/resources/codestar-notifications.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/codestarnotifications" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const CodeStarNotificationRuleResource = "CodeStarNotificationRule" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CodeStarNotificationRuleResource, Scope: nuke.Account, Lister: &CodeStarNotificationRuleLister{}, diff --git a/resources/codestar-projects.go b/resources/codestar-projects.go index 101aff14..03765948 100644 --- a/resources/codestar-projects.go +++ b/resources/codestar-projects.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/codestar" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const CodeStarProjectResource = "CodeStarProject" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CodeStarProjectResource, Scope: nuke.Account, Lister: &CodeStarProjectLister{}, diff --git a/resources/cognito-identity-providers.go b/resources/cognito-identity-providers.go index 29a8a646..4ad9cfda 100644 --- a/resources/cognito-identity-providers.go +++ b/resources/cognito-identity-providers.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/cognitoidentityprovider" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const CognitoIdentityProviderResource = "CognitoIdentityProvider" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CognitoIdentityProviderResource, Scope: nuke.Account, Lister: &CognitoIdentityProviderLister{}, diff --git a/resources/cognito-identitypools.go b/resources/cognito-identitypools.go index 26ca20f5..a5735451 100644 --- a/resources/cognito-identitypools.go +++ b/resources/cognito-identitypools.go @@ -4,6 +4,7 @@ import ( "context" "github.com/ekristen/aws-nuke/pkg/nuke" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/aws/aws-sdk-go/aws" @@ -20,7 +21,7 @@ type CognitoIdentityPool struct { const CognitoIdentityPoolResource = "CognitoIdentityPool" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CognitoIdentityPoolResource, Scope: nuke.Account, Lister: &CognitoIdentityPoolLister{}, diff --git a/resources/cognito-userpool-clients.go b/resources/cognito-userpool-clients.go index 6f426315..0ec1ed68 100644 --- a/resources/cognito-userpool-clients.go +++ b/resources/cognito-userpool-clients.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/cognitoidentityprovider" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const CognitoUserPoolClientResource = "CognitoUserPoolClient" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CognitoUserPoolClientResource, Scope: nuke.Account, Lister: &CognitoUserPoolClientLister{}, diff --git a/resources/cognito-userpool-domains.go b/resources/cognito-userpool-domains.go index 15cb23e2..5a5669f4 100644 --- a/resources/cognito-userpool-domains.go +++ b/resources/cognito-userpool-domains.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/cognitoidentityprovider" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -15,7 +16,7 @@ import ( const CognitoUserPoolDomainResource = "CognitoUserPoolDomain" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CognitoUserPoolDomainResource, Scope: nuke.Account, Lister: &CognitoUserPoolDomainLister{}, diff --git a/resources/cognito-userpools.go b/resources/cognito-userpools.go index 01169786..0c1ebb2e 100644 --- a/resources/cognito-userpools.go +++ b/resources/cognito-userpools.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/cognitoidentityprovider" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const CognitoUserPoolResource = "CognitoUserPool" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: CognitoUserPoolResource, Scope: nuke.Account, Lister: &CognitoUserPoolLister{}, diff --git a/resources/comprehend-document-classifier.go b/resources/comprehend-document-classifier.go index 2eb6440d..8792161a 100644 --- a/resources/comprehend-document-classifier.go +++ b/resources/comprehend-document-classifier.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/comprehend" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -16,7 +17,7 @@ import ( const ComprehendDocumentClassifierResource = "ComprehendDocumentClassifier" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ComprehendDocumentClassifierResource, Scope: nuke.Account, Lister: &ComprehendDocumentClassifierLister{}, diff --git a/resources/comprehend-dominant-language-detection-job.go b/resources/comprehend-dominant-language-detection-job.go index d5710105..809b7dd6 100644 --- a/resources/comprehend-dominant-language-detection-job.go +++ b/resources/comprehend-dominant-language-detection-job.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/comprehend" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const ComprehendDominantLanguageDetectionJobResource = "ComprehendDominantLanguageDetectionJob" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ComprehendDominantLanguageDetectionJobResource, Scope: nuke.Account, Lister: &ComprehendDominantLanguageDetectionJobLister{}, diff --git a/resources/comprehend-endpoint.go b/resources/comprehend-endpoint.go index 737bec14..24e858ff 100644 --- a/resources/comprehend-endpoint.go +++ b/resources/comprehend-endpoint.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/comprehend" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const ComprehendEndpointResource = "ComprehendEndpoint" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ComprehendEndpointResource, Scope: nuke.Account, Lister: &ComprehendEndpointLister{}, diff --git a/resources/comprehend-entities-detection-job.go b/resources/comprehend-entities-detection-job.go index 52749232..db1ea58e 100644 --- a/resources/comprehend-entities-detection-job.go +++ b/resources/comprehend-entities-detection-job.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/comprehend" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const ComprehendEntitiesDetectionJobResource = "ComprehendEntitiesDetectionJob" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ComprehendEntitiesDetectionJobResource, Scope: nuke.Account, Lister: &ComprehendEntitiesDetectionJobLister{}, diff --git a/resources/comprehend-entity-recognizer.go b/resources/comprehend-entity-recognizer.go index c2f9e2a5..5b30a12c 100644 --- a/resources/comprehend-entity-recognizer.go +++ b/resources/comprehend-entity-recognizer.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/comprehend" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -16,7 +17,7 @@ import ( const ComprehendEntityRecognizerResource = "ComprehendEntityRecognizer" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ComprehendEntityRecognizerResource, Scope: nuke.Account, Lister: &ComprehendEntityRecognizerLister{}, diff --git a/resources/comprehend-events-detection-job.go b/resources/comprehend-events-detection-job.go index cc5d7ef1..4443902c 100644 --- a/resources/comprehend-events-detection-job.go +++ b/resources/comprehend-events-detection-job.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/comprehend" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const ComprehendEventsDetectionJobResource = "ComprehendEventsDetectionJob" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ComprehendEventsDetectionJobResource, Scope: nuke.Account, Lister: &ComprehendEventsDetectionJobLister{}, diff --git a/resources/comprehend-key-phrases-detection-job.go b/resources/comprehend-key-phrases-detection-job.go index 71c02c2b..2c95a40d 100644 --- a/resources/comprehend-key-phrases-detection-job.go +++ b/resources/comprehend-key-phrases-detection-job.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/comprehend" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const ComprehendKeyPhrasesDetectionJobResource = "ComprehendKeyPhrasesDetectionJob" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ComprehendKeyPhrasesDetectionJobResource, Scope: nuke.Account, Lister: &ComprehendKeyPhrasesDetectionJobLister{}, diff --git a/resources/comprehend-pii-entities-detection-job.go b/resources/comprehend-pii-entities-detection-job.go index 1ee7250a..51a2bdbf 100644 --- a/resources/comprehend-pii-entities-detection-job.go +++ b/resources/comprehend-pii-entities-detection-job.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/comprehend" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const ComprehendPiiEntitiesDetectionJobResource = "ComprehendPiiEntitiesDetectionJob" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ComprehendPiiEntitiesDetectionJobResource, Scope: nuke.Account, Lister: &ComprehendPiiEntitiesDetectionJobLister{}, diff --git a/resources/comprehend-sentiment-detection-job.go b/resources/comprehend-sentiment-detection-job.go index d516741e..523ccc38 100644 --- a/resources/comprehend-sentiment-detection-job.go +++ b/resources/comprehend-sentiment-detection-job.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/comprehend" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const ComprehendSentimentDetectionJobResource = "ComprehendSentimentDetectionJob" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ComprehendSentimentDetectionJobResource, Scope: nuke.Account, Lister: &ComprehendSentimentDetectionJobLister{}, diff --git a/resources/comprehend-targeted-sentiment-detection-job.go b/resources/comprehend-targeted-sentiment-detection-job.go index f8839653..c03b0d4f 100644 --- a/resources/comprehend-targeted-sentiment-detection-job.go +++ b/resources/comprehend-targeted-sentiment-detection-job.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/comprehend" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const ComprehendTargetedSentimentDetectionJobResource = "ComprehendTargetedSentimentDetectionJob" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ComprehendTargetedSentimentDetectionJobResource, Scope: nuke.Account, Lister: &ComprehendTargetedSentimentDetectionJobLister{}, diff --git a/resources/configservice-configrules.go b/resources/configservice-configrules.go index d53d1b30..0efe6692 100644 --- a/resources/configservice-configrules.go +++ b/resources/configservice-configrules.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/configservice" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -16,7 +17,7 @@ import ( const ConfigServiceConfigRuleResource = "ConfigServiceConfigRule" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ConfigServiceConfigRuleResource, Scope: nuke.Account, Lister: &ConfigServiceConfigRuleLister{}, diff --git a/resources/configservice-configurationrecorders.go b/resources/configservice-configurationrecorders.go index bd111275..80ce5cec 100644 --- a/resources/configservice-configurationrecorders.go +++ b/resources/configservice-configurationrecorders.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/configservice" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -13,7 +14,7 @@ import ( const ConfigServiceConfigurationRecorderResource = "ConfigServiceConfigurationRecorder" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ConfigServiceConfigurationRecorderResource, Scope: nuke.Account, Lister: &ConfigServiceConfigurationRecorderLister{}, diff --git a/resources/configservice-deliverychannels.go b/resources/configservice-deliverychannels.go index 50c0d186..db4663a3 100644 --- a/resources/configservice-deliverychannels.go +++ b/resources/configservice-deliverychannels.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/configservice" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -13,7 +14,7 @@ import ( const ConfigServiceDeliveryChannelResource = "ConfigServiceDeliveryChannel" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ConfigServiceDeliveryChannelResource, Scope: nuke.Account, Lister: &ConfigServiceDeliveryChannelLister{}, diff --git a/resources/databasemigrationservice-certificates.go b/resources/databasemigrationservice-certificates.go index 9d405833..5acc7b3e 100644 --- a/resources/databasemigrationservice-certificates.go +++ b/resources/databasemigrationservice-certificates.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/databasemigrationservice" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const DatabaseMigrationServiceCertificateResource = "DatabaseMigrationServiceCertificate" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: DatabaseMigrationServiceCertificateResource, Scope: nuke.Account, Lister: &DatabaseMigrationServiceCertificateLister{}, diff --git a/resources/databasemigrationservice-endpoints.go b/resources/databasemigrationservice-endpoints.go index 3ad2d33a..d0c2813e 100644 --- a/resources/databasemigrationservice-endpoints.go +++ b/resources/databasemigrationservice-endpoints.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/databasemigrationservice" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const DatabaseMigrationServiceEndpointResource = "DatabaseMigrationServiceEndpoint" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: DatabaseMigrationServiceEndpointResource, Scope: nuke.Account, Lister: &DatabaseMigrationServiceEndpointLister{}, diff --git a/resources/databasemigrationservice-eventsubscriptions.go b/resources/databasemigrationservice-eventsubscriptions.go index c19d02ab..576c4ef8 100644 --- a/resources/databasemigrationservice-eventsubscriptions.go +++ b/resources/databasemigrationservice-eventsubscriptions.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/databasemigrationservice" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const DatabaseMigrationServiceEventSubscriptionResource = "DatabaseMigrationServiceEventSubscription" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: DatabaseMigrationServiceEventSubscriptionResource, Scope: nuke.Account, Lister: &DatabaseMigrationServiceEventSubscriptionLister{}, diff --git a/resources/databasemigrationservice-replicationinstances.go b/resources/databasemigrationservice-replicationinstances.go index 7ec39b88..60dcfe75 100644 --- a/resources/databasemigrationservice-replicationinstances.go +++ b/resources/databasemigrationservice-replicationinstances.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/databasemigrationservice" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const DatabaseMigrationServiceReplicationInstanceResource = "DatabaseMigrationServiceReplicationInstance" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: DatabaseMigrationServiceReplicationInstanceResource, Scope: nuke.Account, Lister: &DatabaseMigrationServiceReplicationInstanceLister{}, diff --git a/resources/databasemigrationservice-replicationtasks.go b/resources/databasemigrationservice-replicationtasks.go index d120628c..5cdebe5a 100644 --- a/resources/databasemigrationservice-replicationtasks.go +++ b/resources/databasemigrationservice-replicationtasks.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/databasemigrationservice" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const DatabaseMigrationServiceReplicationTaskResource = "DatabaseMigrationServiceReplicationTask" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: DatabaseMigrationServiceReplicationTaskResource, Scope: nuke.Account, Lister: &DatabaseMigrationServiceReplicationTaskLister{}, diff --git a/resources/databasemigrationservice-subnetgroups.go b/resources/databasemigrationservice-subnetgroups.go index 46df5c4a..326f4659 100644 --- a/resources/databasemigrationservice-subnetgroups.go +++ b/resources/databasemigrationservice-subnetgroups.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/databasemigrationservice" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const DatabaseMigrationServiceSubnetGroupResource = "DatabaseMigrationServiceSubnetGroup" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: DatabaseMigrationServiceSubnetGroupResource, Scope: nuke.Account, Lister: &DatabaseMigrationServiceSubnetGroupLister{}, diff --git a/resources/datapipeline-pipelines.go b/resources/datapipeline-pipelines.go index ad691435..06b2fcc2 100644 --- a/resources/datapipeline-pipelines.go +++ b/resources/datapipeline-pipelines.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/datapipeline" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -13,7 +14,7 @@ import ( const DataPipelinePipelineResource = "DataPipelinePipeline" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: DataPipelinePipelineResource, Scope: nuke.Account, Lister: &DataPipelinePipelineLister{}, diff --git a/resources/dax-clusters.go b/resources/dax-clusters.go index 56b42b38..ed616a66 100644 --- a/resources/dax-clusters.go +++ b/resources/dax-clusters.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/dax" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const DAXClusterResource = "DAXCluster" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: DAXClusterResource, Scope: nuke.Account, Lister: &DAXClusterLister{}, diff --git a/resources/dax-parametergroups.go b/resources/dax-parametergroups.go index b42daed0..7364b28c 100644 --- a/resources/dax-parametergroups.go +++ b/resources/dax-parametergroups.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/dax" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -21,7 +22,7 @@ type DAXParameterGroup struct { const DAXParameterGroupResource = "DAXParameterGroup" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: DAXParameterGroupResource, Scope: nuke.Account, Lister: &DAXParameterGroupLister{}, diff --git a/resources/dax-subnetgroups.go b/resources/dax-subnetgroups.go index 2a775028..7dc1a2c7 100644 --- a/resources/dax-subnetgroups.go +++ b/resources/dax-subnetgroups.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/dax" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -16,7 +17,7 @@ import ( const DAXSubnetGroupResource = "DAXSubnetGroup" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: DAXSubnetGroupResource, Scope: nuke.Account, Lister: &DAXSubnetGroupLister{}, diff --git a/resources/devicefarm-projects.go b/resources/devicefarm-projects.go index 7c9b9f7d..6de198d5 100644 --- a/resources/devicefarm-projects.go +++ b/resources/devicefarm-projects.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/devicefarm" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -13,7 +14,7 @@ import ( const DeviceFarmProjectResource = "DeviceFarmProject" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: DeviceFarmProjectResource, Scope: nuke.Account, Lister: &DeviceFarmProjectLister{}, diff --git a/resources/directoryservice-directories.go b/resources/directoryservice-directories.go index 1d2b76ee..935b082e 100644 --- a/resources/directoryservice-directories.go +++ b/resources/directoryservice-directories.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/directoryservice" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const DirectoryServiceDirectoryResource = "DirectoryServiceDirectory" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: DirectoryServiceDirectoryResource, Scope: nuke.Account, Lister: &DirectoryServiceDirectoryLister{}, diff --git a/resources/dynamodb-items.go b/resources/dynamodb-items.go index 2e440226..9d0c54bf 100644 --- a/resources/dynamodb-items.go +++ b/resources/dynamodb-items.go @@ -10,6 +10,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/dynamodb" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -19,7 +20,7 @@ import ( const DynamoDBTableItemResource = "DynamoDBTableItem" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: DynamoDBTableItemResource, Scope: nuke.Account, Lister: &DynamoDBTableItemLister{}, diff --git a/resources/dynamodb-tables.go b/resources/dynamodb-tables.go index 232ecc9a..e89c6fb9 100644 --- a/resources/dynamodb-tables.go +++ b/resources/dynamodb-tables.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/dynamodb" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const DynamoDBTableResource = "DynamoDBTable" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: DynamoDBTableResource, Scope: nuke.Account, Lister: &DynamoDBTableLister{}, diff --git a/resources/ec2-client-vpn-endpoint-attachment.go b/resources/ec2-client-vpn-endpoint-attachment.go index 9b615eb7..a1d36c25 100644 --- a/resources/ec2-client-vpn-endpoint-attachment.go +++ b/resources/ec2-client-vpn-endpoint-attachment.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -17,7 +18,7 @@ import ( const EC2ClientVpnEndpointAttachmentResource = "EC2ClientVpnEndpointAttachment" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EC2ClientVpnEndpointAttachmentResource, Scope: nuke.Account, Lister: &EC2ClientVpnEndpointAttachmentLister{}, diff --git a/resources/ec2-client-vpn-endpoint.go b/resources/ec2-client-vpn-endpoint.go index 0df4803e..e59a4b44 100644 --- a/resources/ec2-client-vpn-endpoint.go +++ b/resources/ec2-client-vpn-endpoint.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const EC2ClientVpnEndpointResource = "EC2ClientVpnEndpoint" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EC2ClientVpnEndpointResource, Scope: nuke.Account, Lister: &EC2ClientVpnEndpointLister{}, diff --git a/resources/ec2-customer-gateway.go b/resources/ec2-customer-gateway.go index b4164363..b71dc96a 100644 --- a/resources/ec2-customer-gateway.go +++ b/resources/ec2-customer-gateway.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -15,7 +16,7 @@ import ( const EC2CustomerGatewayResource = "EC2CustomerGateway" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EC2CustomerGatewayResource, Scope: nuke.Account, Lister: &EC2CustomerGatewayLister{}, diff --git a/resources/ec2-default-security-group-rules.go b/resources/ec2-default-security-group-rules.go index 3078b1a7..fd7465a3 100644 --- a/resources/ec2-default-security-group-rules.go +++ b/resources/ec2-default-security-group-rules.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const EC2DefaultSecurityGroupRuleResource = "EC2DefaultSecurityGroupRule" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EC2DefaultSecurityGroupRuleResource, Scope: nuke.Account, Lister: &EC2DefaultSecurityGroupRuleLister{}, diff --git a/resources/ec2-dhcp-options.go b/resources/ec2-dhcp-options.go index 26d3dba8..c7a73824 100644 --- a/resources/ec2-dhcp-options.go +++ b/resources/ec2-dhcp-options.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -16,7 +17,7 @@ import ( const EC2DHCPOptionResource = "EC2DHCPOption" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EC2DHCPOptionResource, Scope: nuke.Account, Lister: &EC2DHCPOptionLister{}, diff --git a/resources/ec2-egress-only-internet-gateways.go b/resources/ec2-egress-only-internet-gateways.go index 77be43f9..98a82570 100644 --- a/resources/ec2-egress-only-internet-gateways.go +++ b/resources/ec2-egress-only-internet-gateways.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const EC2EgressOnlyInternetGatewayResource = "EC2EgressOnlyInternetGateway" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EC2EgressOnlyInternetGatewayResource, Scope: nuke.Account, Lister: &EC2EgressOnlyInternetGatewayLister{}, diff --git a/resources/ec2-eip.go b/resources/ec2-eip.go index d929d94b..f51af49d 100644 --- a/resources/ec2-eip.go +++ b/resources/ec2-eip.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -16,7 +17,7 @@ import ( const EC2AddressResource = "EC2Address" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EC2AddressResource, Scope: nuke.Account, Lister: &EC2AddressLister{}, diff --git a/resources/ec2-host.go b/resources/ec2-host.go index a660219c..712a1e6b 100644 --- a/resources/ec2-host.go +++ b/resources/ec2-host.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const EC2HostResource = "EC2Host" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EC2HostResource, Scope: nuke.Account, Lister: &EC2HostLister{}, diff --git a/resources/ec2-image.go b/resources/ec2-image.go index fead58f5..665ac1de 100644 --- a/resources/ec2-image.go +++ b/resources/ec2-image.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const EC2ImageResource = "EC2Image" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EC2ImageResource, Scope: nuke.Account, Lister: &EC2ImageLister{}, diff --git a/resources/ec2-instance-connect-endpoint.go b/resources/ec2-instance-connect-endpoint.go index a49f408a..5513f824 100644 --- a/resources/ec2-instance-connect-endpoint.go +++ b/resources/ec2-instance-connect-endpoint.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const EC2InstanceConnectEndpointResource = "EC2InstanceConnectEndpoint" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EC2InstanceConnectEndpointResource, Scope: nuke.Account, Lister: &EC2InstanceConnectEndpointLister{}, diff --git a/resources/ec2-instance.go b/resources/ec2-instance.go index 0ef641d8..d9ab9b4c 100644 --- a/resources/ec2-instance.go +++ b/resources/ec2-instance.go @@ -7,6 +7,7 @@ import ( "errors" "fmt" "github.com/ekristen/aws-nuke/pkg/nuke" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "time" @@ -19,7 +20,7 @@ import ( const EC2InstanceResource = "EC2Instance" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EC2InstanceResource, Scope: nuke.Account, Lister: &EC2InstanceLister{}, diff --git a/resources/ec2-internet-gateway-attachments.go b/resources/ec2-internet-gateway-attachments.go index b394c913..467af8b4 100644 --- a/resources/ec2-internet-gateway-attachments.go +++ b/resources/ec2-internet-gateway-attachments.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -18,7 +19,7 @@ import ( const EC2InternetGatewayAttachmentResource = "EC2InternetGatewayAttachment" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EC2InternetGatewayAttachmentResource, Scope: nuke.Account, Lister: &EC2InternetGatewayAttachmentLister{}, diff --git a/resources/ec2-internet-gateways.go b/resources/ec2-internet-gateways.go index 5f207d16..4e7fcda4 100644 --- a/resources/ec2-internet-gateways.go +++ b/resources/ec2-internet-gateways.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" "github.com/gotidy/ptr" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const EC2InternetGatewayResource = "EC2InternetGateway" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EC2InternetGatewayResource, Scope: nuke.Account, Lister: &EC2InternetGatewayLister{}, diff --git a/resources/ec2-key-pairs.go b/resources/ec2-key-pairs.go index fa1173cd..88a19c00 100644 --- a/resources/ec2-key-pairs.go +++ b/resources/ec2-key-pairs.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const EC2KeyPairResource = "EC2KeyPair" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EC2KeyPairResource, Scope: nuke.Account, Lister: &EC2KeyPairLister{}, diff --git a/resources/ec2-launch-templates.go b/resources/ec2-launch-templates.go index cce4488c..4c732f25 100644 --- a/resources/ec2-launch-templates.go +++ b/resources/ec2-launch-templates.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -16,7 +17,7 @@ import ( const EC2LaunchTemplateResource = "EC2LaunchTemplate" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EC2LaunchTemplateResource, Scope: nuke.Account, Lister: &EC2LaunchTemplateLister{}, diff --git a/resources/ec2-nat-gateways.go b/resources/ec2-nat-gateways.go index ff59528f..fe9e164e 100644 --- a/resources/ec2-nat-gateways.go +++ b/resources/ec2-nat-gateways.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -18,7 +19,7 @@ import ( const EC2NATGatewayResource = "EC2NATGateway" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EC2NATGatewayResource, Scope: nuke.Account, Lister: &EC2NATGatewayLister{}, diff --git a/resources/ec2-network-acls.go b/resources/ec2-network-acls.go index 649b7941..d353cdc2 100644 --- a/resources/ec2-network-acls.go +++ b/resources/ec2-network-acls.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -18,7 +19,7 @@ import ( const EC2NetworkACLResource = "EC2NetworkACL" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EC2NetworkACLResource, Scope: nuke.Account, Lister: &EC2NetworkACLLister{}, diff --git a/resources/ec2-network-interfaces.go b/resources/ec2-network-interfaces.go index b7bb6d01..084c427b 100644 --- a/resources/ec2-network-interfaces.go +++ b/resources/ec2-network-interfaces.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -18,7 +19,7 @@ import ( const EC2NetworkInterfaceResource = "EC2NetworkInterface" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EC2NetworkInterfaceResource, Scope: nuke.Account, Lister: &EC2NetworkInterfaceLister{}, diff --git a/resources/ec2-placement-groups.go b/resources/ec2-placement-groups.go index dcc995cb..2cd3e160 100644 --- a/resources/ec2-placement-groups.go +++ b/resources/ec2-placement-groups.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -15,7 +16,7 @@ import ( const EC2PlacementGroupResource = "EC2PlacementGroup" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EC2PlacementGroupResource, Scope: nuke.Account, Lister: &EC2PlacementGroupLister{}, diff --git a/resources/ec2-route-tables.go b/resources/ec2-route-tables.go index 74dc02db..c195af2a 100644 --- a/resources/ec2-route-tables.go +++ b/resources/ec2-route-tables.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const EC2RouteTableResource = "EC2RouteTable" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EC2RouteTableResource, Scope: nuke.Account, Lister: &EC2RouteTableLister{}, diff --git a/resources/ec2-security-groups.go b/resources/ec2-security-groups.go index e74c7012..727886e8 100644 --- a/resources/ec2-security-groups.go +++ b/resources/ec2-security-groups.go @@ -11,6 +11,7 @@ import ( "github.com/ekristen/aws-nuke/pkg/nuke" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" ) @@ -18,7 +19,7 @@ import ( const EC2SecurityGroupResource = "EC2SecurityGroup" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EC2SecurityGroupResource, Scope: nuke.Account, Lister: &EC2SecurityGroupLister{}, diff --git a/resources/ec2-snapshots.go b/resources/ec2-snapshots.go index e76a9256..b1f5f10c 100644 --- a/resources/ec2-snapshots.go +++ b/resources/ec2-snapshots.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -18,7 +19,7 @@ import ( const EC2SnapshotResource = "EC2Snapshot" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EC2SnapshotResource, Scope: nuke.Account, Lister: &EC2SnapshotLister{}, diff --git a/resources/ec2-spot-fleet-requests.go b/resources/ec2-spot-fleet-requests.go index 55338344..7424741d 100644 --- a/resources/ec2-spot-fleet-requests.go +++ b/resources/ec2-spot-fleet-requests.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -16,7 +17,7 @@ import ( const EC2SpotFleetRequestResource = "EC2SpotFleetRequest" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EC2SpotFleetRequestResource, Scope: nuke.Account, Lister: &EC2SpotFleetRequestLister{}, diff --git a/resources/ec2-subnets.go b/resources/ec2-subnets.go index 0838fa17..922100e9 100644 --- a/resources/ec2-subnets.go +++ b/resources/ec2-subnets.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const EC2SubnetResource = "EC2Subnet" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EC2SubnetResource, Scope: nuke.Account, Lister: &EC2SubnetLister{}, diff --git a/resources/ec2-tgw-attachments.go b/resources/ec2-tgw-attachments.go index 4655e336..bdc09d5a 100644 --- a/resources/ec2-tgw-attachments.go +++ b/resources/ec2-tgw-attachments.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -16,7 +17,7 @@ import ( const EC2TGWAttachmentResource = "EC2TGWAttachment" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EC2TGWAttachmentResource, Scope: nuke.Account, Lister: &EC2TGWAttachmentLister{}, diff --git a/resources/ec2-tgw.go b/resources/ec2-tgw.go index 04ff92b3..f2b1d1d7 100644 --- a/resources/ec2-tgw.go +++ b/resources/ec2-tgw.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -16,7 +17,7 @@ import ( const EC2TGWResource = "EC2TGW" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EC2TGWResource, Scope: nuke.Account, Lister: &EC2TGWLister{}, diff --git a/resources/ec2-volume.go b/resources/ec2-volume.go index fb1bb60c..038c4928 100644 --- a/resources/ec2-volume.go +++ b/resources/ec2-volume.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const EC2VolumeResource = "EC2Volume" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EC2VolumeResource, Scope: nuke.Account, Lister: &EC2VolumeLister{}, diff --git a/resources/ec2-vpc-endpoint-connections.go b/resources/ec2-vpc-endpoint-connections.go index 1d586681..d726e726 100644 --- a/resources/ec2-vpc-endpoint-connections.go +++ b/resources/ec2-vpc-endpoint-connections.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const EC2VPCEndpointConnectionResource = "EC2VPCEndpointConnection" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EC2VPCEndpointConnectionResource, Scope: nuke.Account, Lister: &EC2VPCEndpointConnectionLister{}, diff --git a/resources/ec2-vpc-endpoint-service-configurations.go b/resources/ec2-vpc-endpoint-service-configurations.go index f9c6b7ad..99e34774 100644 --- a/resources/ec2-vpc-endpoint-service-configurations.go +++ b/resources/ec2-vpc-endpoint-service-configurations.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const EC2VPCEndpointServiceConfigurationResource = "EC2VPCEndpointServiceConfiguration" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EC2VPCEndpointServiceConfigurationResource, Scope: nuke.Account, Lister: &EC2VPCEndpointServiceConfigurationLister{}, diff --git a/resources/ec2-vpc-endpoint.go b/resources/ec2-vpc-endpoint.go index 4815b522..b8c6bbdb 100644 --- a/resources/ec2-vpc-endpoint.go +++ b/resources/ec2-vpc-endpoint.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const EC2VPCEndpointResource = "EC2VPCEndpoint" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EC2VPCEndpointResource, Scope: nuke.Account, Lister: &EC2VPCEndpointLister{}, diff --git a/resources/ec2-vpc-peering-connections.go b/resources/ec2-vpc-peering-connections.go index c3aa88b3..9fc82326 100644 --- a/resources/ec2-vpc-peering-connections.go +++ b/resources/ec2-vpc-peering-connections.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -15,7 +16,7 @@ import ( const EC2VPCPeeringConnectionResource = "EC2VPCPeeringConnection" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EC2VPCPeeringConnectionResource, Scope: nuke.Account, Lister: &EC2VPCPeeringConnectionLister{}, diff --git a/resources/ec2-vpc.go b/resources/ec2-vpc.go index 3e382ff8..5ef99cc7 100644 --- a/resources/ec2-vpc.go +++ b/resources/ec2-vpc.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const EC2VPCResource = "EC2VPC" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EC2VPCResource, Scope: nuke.Account, Lister: &EC2VPCLister{}, diff --git a/resources/ec2-vpn-connections.go b/resources/ec2-vpn-connections.go index e935ebf6..e6e7f78c 100644 --- a/resources/ec2-vpn-connections.go +++ b/resources/ec2-vpn-connections.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -16,7 +17,7 @@ import ( const EC2VPNConnectionResource = "EC2VPNConnection" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EC2VPNConnectionResource, Scope: nuke.Account, Lister: &EC2VPNConnectionLister{}, diff --git a/resources/ec2-vpn-gateway-attachments.go b/resources/ec2-vpn-gateway-attachments.go index 3f44a992..0d855593 100644 --- a/resources/ec2-vpn-gateway-attachments.go +++ b/resources/ec2-vpn-gateway-attachments.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const EC2VPNGatewayAttachmentResource = "EC2VPNGatewayAttachment" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EC2VPNGatewayAttachmentResource, Scope: nuke.Account, Lister: &EC2VPNGatewayAttachmentLister{}, diff --git a/resources/ec2-vpn-gateways.go b/resources/ec2-vpn-gateways.go index 8a667b38..0c040c4c 100644 --- a/resources/ec2-vpn-gateways.go +++ b/resources/ec2-vpn-gateways.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -15,7 +16,7 @@ import ( const EC2VPNGatewayResource = "EC2VPNGateway" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EC2VPNGatewayResource, Scope: nuke.Account, Lister: &EC2VPNGatewayLister{}, diff --git a/resources/ecr-public-repository.go b/resources/ecr-public-repository.go index bb56776a..b26bb878 100644 --- a/resources/ecr-public-repository.go +++ b/resources/ecr-public-repository.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ecrpublic" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const ECRPublicRepositoryResource = "ECRPublicRepository" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ECRPublicRepositoryResource, Scope: nuke.Account, Lister: &ECRPublicRepositoryLister{}, diff --git a/resources/ecr-repository.go b/resources/ecr-repository.go index 2031cafd..042c4c66 100644 --- a/resources/ecr-repository.go +++ b/resources/ecr-repository.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ecr" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -19,7 +20,7 @@ const ECRRepositoryResource = "ECRRepository" const ECRRepositoryCloudControlResource = "AWS::ECR::Repository" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ECRRepositoryResource, Scope: nuke.Account, Lister: &ECRRepositoryLister{}, diff --git a/resources/ecs-clusterinstances.go b/resources/ecs-clusterinstances.go index 7b435499..25b7caf3 100644 --- a/resources/ecs-clusterinstances.go +++ b/resources/ecs-clusterinstances.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ecs" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -16,7 +17,7 @@ import ( const ECSClusterInstanceResource = "ECSClusterInstance" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ECSClusterInstanceResource, Scope: nuke.Account, Lister: &ECSClusterInstanceLister{}, diff --git a/resources/ecs-clusters.go b/resources/ecs-clusters.go index 41439be8..8e197dbe 100644 --- a/resources/ecs-clusters.go +++ b/resources/ecs-clusters.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ecs" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const ECSClusterResource = "ECSCluster" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ECSClusterResource, Scope: nuke.Account, Lister: &ECSClusterLister{}, diff --git a/resources/ecs-services.go b/resources/ecs-services.go index 4c2a5c95..b0f16621 100644 --- a/resources/ecs-services.go +++ b/resources/ecs-services.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ecs" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -16,7 +17,7 @@ import ( const ECSServiceResource = "ECSService" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ECSServiceResource, Scope: nuke.Account, Lister: &ECSServiceLister{}, diff --git a/resources/ecs-taskdefinitions.go b/resources/ecs-taskdefinitions.go index 2607cd97..305d03da 100644 --- a/resources/ecs-taskdefinitions.go +++ b/resources/ecs-taskdefinitions.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ecs" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const ECSTaskDefinitionResource = "ECSTaskDefinition" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ECSTaskDefinitionResource, Scope: nuke.Account, Lister: &ECSTaskDefinitionLister{}, diff --git a/resources/ecs-tasks.go b/resources/ecs-tasks.go index 7713d740..da2e0d62 100644 --- a/resources/ecs-tasks.go +++ b/resources/ecs-tasks.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ecs" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const ECSTaskResource = "ECSTask" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ECSTaskResource, Scope: nuke.Account, Lister: &ECSTaskLister{}, diff --git a/resources/efs-filesystem.go b/resources/efs-filesystem.go index 590c443e..61a385d3 100644 --- a/resources/efs-filesystem.go +++ b/resources/efs-filesystem.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/efs" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const EFSFileSystemResource = "EFSFileSystem" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EFSFileSystemResource, Scope: nuke.Account, Lister: &EFSFileSystemLister{}, diff --git a/resources/efs-mount-targets.go b/resources/efs-mount-targets.go index 9dab0ac4..250ce18c 100644 --- a/resources/efs-mount-targets.go +++ b/resources/efs-mount-targets.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/efs" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -16,7 +17,7 @@ import ( const EFSMountTargetResource = "EFSMountTarget" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EFSMountTargetResource, Scope: nuke.Account, Lister: &EFSMountTargetLister{}, diff --git a/resources/eks-clusters.go b/resources/eks-clusters.go index 48329dff..d65fda3f 100644 --- a/resources/eks-clusters.go +++ b/resources/eks-clusters.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/eks" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const EKSClusterResource = "EKSCluster" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EKSClusterResource, Scope: nuke.Account, Lister: &EKSClusterLister{}, diff --git a/resources/eks-fargate.go b/resources/eks-fargate.go index e80ed082..c6b0521d 100644 --- a/resources/eks-fargate.go +++ b/resources/eks-fargate.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/eks" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const EKSFargateProfileResource = "EKSFargateProfile" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EKSFargateProfileResource, Scope: nuke.Account, Lister: &EKSFargateProfileLister{}, diff --git a/resources/eks-nodegroups.go b/resources/eks-nodegroups.go index 0776bcd4..c433037f 100644 --- a/resources/eks-nodegroups.go +++ b/resources/eks-nodegroups.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/eks" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -18,7 +19,7 @@ import ( const EKSNodegroupResource = "EKSNodegroup" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EKSNodegroupResource, Scope: nuke.Account, Lister: &EKSNodegroupLister{}, diff --git a/resources/elasticache-cacheparametergroups.go b/resources/elasticache-cacheparametergroups.go index 5b34e2b5..4330f8e4 100644 --- a/resources/elasticache-cacheparametergroups.go +++ b/resources/elasticache-cacheparametergroups.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/elasticache" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -18,7 +19,7 @@ import ( const ElasticacheCacheParameterGroupResource = "ElasticacheCacheParameterGroup" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ElasticacheCacheParameterGroupResource, Scope: nuke.Account, Lister: &ElasticacheCacheParameterGroupLister{}, diff --git a/resources/elasticache-memcacheclusters.go b/resources/elasticache-memcacheclusters.go index 19ad3039..9eca8287 100644 --- a/resources/elasticache-memcacheclusters.go +++ b/resources/elasticache-memcacheclusters.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/elasticache" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const ElasticacheCacheClusterResource = "ElasticacheCacheCluster" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ElasticacheCacheClusterResource, Scope: nuke.Account, Lister: &ElasticacheCacheClusterLister{}, diff --git a/resources/elasticache-replicationgroups.go b/resources/elasticache-replicationgroups.go index 0942169a..479a1c34 100644 --- a/resources/elasticache-replicationgroups.go +++ b/resources/elasticache-replicationgroups.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/elasticache" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const ElasticacheReplicationGroupResource = "ElasticacheReplicationGroup" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ElasticacheReplicationGroupResource, Scope: nuke.Account, Lister: &ElasticacheReplicationGroupLister{}, diff --git a/resources/elasticache-subnetgroups.go b/resources/elasticache-subnetgroups.go index 951e2dcc..e803170e 100644 --- a/resources/elasticache-subnetgroups.go +++ b/resources/elasticache-subnetgroups.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/elasticache" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -16,7 +17,7 @@ import ( const ElasticacheSubnetGroupResource = "ElasticacheSubnetGroup" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ElasticacheSubnetGroupResource, Scope: nuke.Account, Lister: &ElasticacheSubnetGroupLister{}, diff --git a/resources/elasticache-usergroups.go b/resources/elasticache-usergroups.go index 79491054..c88b3b68 100644 --- a/resources/elasticache-usergroups.go +++ b/resources/elasticache-usergroups.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/elasticache" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -20,7 +21,7 @@ type ElasticacheUserGroup struct { const ElasticacheUserGroupResource = "ElasticacheUserGroup" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ElasticacheUserGroupResource, Scope: nuke.Account, Lister: &ElasticacheUserGroupLister{}, diff --git a/resources/elasticache-users.go b/resources/elasticache-users.go index ecac0c2c..ed15e79f 100644 --- a/resources/elasticache-users.go +++ b/resources/elasticache-users.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/elasticache" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -23,7 +24,7 @@ type ElasticacheUser struct { const ElasticacheUserResource = "ElasticacheUser" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ElasticacheUserResource, Scope: nuke.Account, Lister: &ElasticacheUserLister{}, diff --git a/resources/elasticbeanstalk-applications.go b/resources/elasticbeanstalk-applications.go index 89a078d0..af927213 100644 --- a/resources/elasticbeanstalk-applications.go +++ b/resources/elasticbeanstalk-applications.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/elasticbeanstalk" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -13,7 +14,7 @@ import ( const ElasticBeanstalkApplicationResource = "ElasticBeanstalkApplication" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ElasticBeanstalkApplicationResource, Scope: nuke.Account, Lister: &ElasticBeanstalkApplicationLister{}, diff --git a/resources/elasticbeanstalk-environments.go b/resources/elasticbeanstalk-environments.go index d466f610..e92dd941 100644 --- a/resources/elasticbeanstalk-environments.go +++ b/resources/elasticbeanstalk-environments.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/elasticbeanstalk" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const ElasticBeanstalkEnvironmentResource = "ElasticBeanstalkEnvironment" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ElasticBeanstalkEnvironmentResource, Scope: nuke.Account, Lister: &ElasticBeanstalkEnvironmentLister{}, diff --git a/resources/elasticsearchservice-domain.go b/resources/elasticsearchservice-domain.go index 9af1a9a6..21d4f93d 100644 --- a/resources/elasticsearchservice-domain.go +++ b/resources/elasticsearchservice-domain.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/elasticsearchservice" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const ESDomainResource = "ESDomain" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ESDomainResource, Scope: nuke.Account, Lister: &ESDomainLister{}, diff --git a/resources/elastictranscoder-pipelines.go b/resources/elastictranscoder-pipelines.go index d89e1965..553b35d7 100644 --- a/resources/elastictranscoder-pipelines.go +++ b/resources/elastictranscoder-pipelines.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/elastictranscoder" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -13,7 +14,7 @@ import ( const ElasticTranscoderPipelineResource = "ElasticTranscoderPipeline" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ElasticTranscoderPipelineResource, Scope: nuke.Account, Lister: &ElasticTranscoderPipelineLister{}, diff --git a/resources/elb-elb.go b/resources/elb-elb.go index 53cc5319..15390936 100644 --- a/resources/elb-elb.go +++ b/resources/elb-elb.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/elb" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -16,7 +17,7 @@ import ( const ELBResource = "ELB" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ELBResource, Scope: nuke.Account, Lister: &ELBLister{}, diff --git a/resources/elbv2-alb.go b/resources/elbv2-alb.go index a2d3b73f..345638c7 100644 --- a/resources/elbv2-alb.go +++ b/resources/elbv2-alb.go @@ -11,6 +11,7 @@ import ( "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/elbv2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -27,7 +28,7 @@ type ELBv2LoadBalancer struct { const ELBv2Resource = "ELBv2" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ELBv2Resource, Scope: nuke.Account, Lister: &ELBv2Lister{}, diff --git a/resources/elbv2-targetgroup.go b/resources/elbv2-targetgroup.go index 91affcb2..18127b3d 100644 --- a/resources/elbv2-targetgroup.go +++ b/resources/elbv2-targetgroup.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/elbv2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const ELBv2TargetGroupResource = "ELBv2TargetGroup" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ELBv2TargetGroupResource, Scope: nuke.Account, Lister: &ELBv2TargetGroupLister{}, diff --git a/resources/emr-clusters.go b/resources/emr-clusters.go index ff477578..04c42870 100644 --- a/resources/emr-clusters.go +++ b/resources/emr-clusters.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/service/emr" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -18,7 +19,7 @@ import ( const EMRClusterResource = "EMRCluster" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EMRClusterResource, Scope: nuke.Account, Lister: &EMRClusterLister{}, diff --git a/resources/emr-securityconfigurations.go b/resources/emr-securityconfigurations.go index 1a1b38a0..c344e0fc 100644 --- a/resources/emr-securityconfigurations.go +++ b/resources/emr-securityconfigurations.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/emr" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -13,7 +14,7 @@ import ( const EMRSecurityConfigurationResource = "EMRSecurityConfiguration" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: EMRSecurityConfigurationResource, Scope: nuke.Account, Lister: &EMRSecurityConfigurationLister{}, diff --git a/resources/firehose-deliverystreams.go b/resources/firehose-deliverystreams.go index d4e5b47f..0589999b 100644 --- a/resources/firehose-deliverystreams.go +++ b/resources/firehose-deliverystreams.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/firehose" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const FirehoseDeliveryStreamResource = "FirehoseDeliveryStream" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: FirehoseDeliveryStreamResource, Scope: nuke.Account, Lister: &FirehoseDeliveryStreamLister{}, diff --git a/resources/fms-notification-channels.go b/resources/fms-notification-channels.go index ea47c432..6eecd62d 100644 --- a/resources/fms-notification-channels.go +++ b/resources/fms-notification-channels.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/fms" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -16,7 +17,7 @@ import ( const FMSNotificationChannelResource = "FMSNotificationChannel" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: FMSNotificationChannelResource, Scope: nuke.Account, Lister: &FMSNotificationChannelLister{}, diff --git a/resources/fms-policies.go b/resources/fms-policies.go index fa91eae0..f178b8dd 100644 --- a/resources/fms-policies.go +++ b/resources/fms-policies.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/fms" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const FMSPolicyResource = "FMSPolicy" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: FMSPolicyResource, Scope: nuke.Account, Lister: &FMSPolicyLister{}, diff --git a/resources/fsx-backups.go b/resources/fsx-backups.go index 4cf0657e..87858c50 100644 --- a/resources/fsx-backups.go +++ b/resources/fsx-backups.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/fsx" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const FSxBackupResource = "FSxBackup" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: FSxBackupResource, Scope: nuke.Account, Lister: &FSxBackupLister{}, diff --git a/resources/fsx-filesystems.go b/resources/fsx-filesystems.go index 3312b157..81ac7a94 100644 --- a/resources/fsx-filesystems.go +++ b/resources/fsx-filesystems.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/fsx" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const FSxFileSystemResource = "FSxFileSystem" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: FSxFileSystemResource, Scope: nuke.Account, Lister: &FSxFileSystemLister{}, diff --git a/resources/ga-accelerators.go b/resources/ga-accelerators.go index a7c47b24..15dfcc7c 100644 --- a/resources/ga-accelerators.go +++ b/resources/ga-accelerators.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/globalaccelerator" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -20,7 +21,7 @@ type GlobalAccelerator struct { const GlobalAcceleratorResource = "GlobalAccelerator" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: GlobalAcceleratorResource, Scope: nuke.Account, Lister: &GlobalAcceleratorLister{}, diff --git a/resources/ga-endpoints.go b/resources/ga-endpoints.go index 2f3da81d..c74dd1c5 100644 --- a/resources/ga-endpoints.go +++ b/resources/ga-endpoints.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/globalaccelerator" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const GlobalAcceleratorEndpointGroupResource = "GlobalAcceleratorEndpointGroup" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: GlobalAcceleratorEndpointGroupResource, Scope: nuke.Account, Lister: &GlobalAcceleratorEndpointGroupLister{}, diff --git a/resources/ga-listeners.go b/resources/ga-listeners.go index 1f80af3d..e3f11d02 100644 --- a/resources/ga-listeners.go +++ b/resources/ga-listeners.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/globalaccelerator" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const GlobalAcceleratorListenerResource = "GlobalAcceleratorListener" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: GlobalAcceleratorListenerResource, Scope: nuke.Account, Lister: &GlobalAcceleratorListenerLister{}, diff --git a/resources/glue-classifiers.go b/resources/glue-classifiers.go index 393f9baa..26d75c20 100644 --- a/resources/glue-classifiers.go +++ b/resources/glue-classifiers.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/glue" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const GlueClassifierResource = "GlueClassifier" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: GlueClassifierResource, Scope: nuke.Account, Lister: &GlueClassifierLister{}, diff --git a/resources/glue-connections.go b/resources/glue-connections.go index 00da814c..af1695f5 100644 --- a/resources/glue-connections.go +++ b/resources/glue-connections.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/glue" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const GlueConnectionResource = "GlueConnection" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: GlueConnectionResource, Scope: nuke.Account, Lister: &GlueConnectionLister{}, diff --git a/resources/glue-crawlers.go b/resources/glue-crawlers.go index 81ba0694..25337a1a 100644 --- a/resources/glue-crawlers.go +++ b/resources/glue-crawlers.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/glue" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const GlueCrawlerResource = "GlueCrawler" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: GlueCrawlerResource, Scope: nuke.Account, Lister: &GlueCrawlerLister{}, diff --git a/resources/glue-databases.go b/resources/glue-databases.go index 025b7c8d..5e4cb2c7 100644 --- a/resources/glue-databases.go +++ b/resources/glue-databases.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/glue" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const GlueDatabaseResource = "GlueDatabase" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: GlueDatabaseResource, Scope: nuke.Account, Lister: &GlueDatabaseLister{}, diff --git a/resources/glue-devendpoints.go b/resources/glue-devendpoints.go index 85c6422d..9ae16177 100644 --- a/resources/glue-devendpoints.go +++ b/resources/glue-devendpoints.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/glue" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const GlueDevEndpointResource = "GlueDevEndpoint" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: GlueDevEndpointResource, Scope: nuke.Account, Lister: &GlueDevEndpointLister{}, diff --git a/resources/glue-jobs.go b/resources/glue-jobs.go index 3bfa1c53..15e42e2a 100644 --- a/resources/glue-jobs.go +++ b/resources/glue-jobs.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/glue" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const GlueJobResource = "GlueJob" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: GlueJobResource, Scope: nuke.Account, Lister: &GlueJobLister{}, diff --git a/resources/glue-triggers.go b/resources/glue-triggers.go index 086feeb2..3db4149b 100644 --- a/resources/glue-triggers.go +++ b/resources/glue-triggers.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/glue" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const GlueTriggerResource = "GlueTrigger" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: GlueTriggerResource, Scope: nuke.Account, Lister: &GlueTriggerLister{}, diff --git a/resources/gluedatabrew-datasets.go b/resources/gluedatabrew-datasets.go index b1573104..cc9c81e7 100644 --- a/resources/gluedatabrew-datasets.go +++ b/resources/gluedatabrew-datasets.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/gluedatabrew" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const GlueDataBrewDatasetsResource = "GlueDataBrewDatasets" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: GlueDataBrewDatasetsResource, Scope: nuke.Account, Lister: &GlueDataBrewDatasetsLister{}, diff --git a/resources/gluedatabrew-jobs.go b/resources/gluedatabrew-jobs.go index 08c90523..be956fd3 100644 --- a/resources/gluedatabrew-jobs.go +++ b/resources/gluedatabrew-jobs.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/gluedatabrew" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const GlueDataBrewJobsResource = "GlueDataBrewJobs" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: GlueDataBrewJobsResource, Scope: nuke.Account, Lister: &GlueDataBrewJobsLister{}, diff --git a/resources/gluedatabrew-projects.go b/resources/gluedatabrew-projects.go index 3dc14117..f9f915e7 100644 --- a/resources/gluedatabrew-projects.go +++ b/resources/gluedatabrew-projects.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/gluedatabrew" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const GlueDataBrewProjectsResource = "GlueDataBrewProjects" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: GlueDataBrewProjectsResource, Scope: nuke.Account, Lister: &GlueDataBrewProjectsLister{}, diff --git a/resources/gluedatabrew-recipe.go b/resources/gluedatabrew-recipe.go index a010cfed..0d95a9d3 100644 --- a/resources/gluedatabrew-recipe.go +++ b/resources/gluedatabrew-recipe.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/gluedatabrew" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const GlueDataBrewRecipeResource = "GlueDataBrewRecipe" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: GlueDataBrewRecipeResource, Scope: nuke.Account, Lister: &GlueDataBrewRecipeLister{}, diff --git a/resources/gluedatabrew-rulesets.go b/resources/gluedatabrew-rulesets.go index 4e3273da..88133d84 100644 --- a/resources/gluedatabrew-rulesets.go +++ b/resources/gluedatabrew-rulesets.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/gluedatabrew" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const GlueDataBrewRulesetsResource = "GlueDataBrewRulesets" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: GlueDataBrewRulesetsResource, Scope: nuke.Account, Lister: &GlueDataBrewRulesetsLister{}, diff --git a/resources/gluedatabrew-schedules.go b/resources/gluedatabrew-schedules.go index d3b75040..baff0806 100644 --- a/resources/gluedatabrew-schedules.go +++ b/resources/gluedatabrew-schedules.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/gluedatabrew" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const GlueDataBrewSchedulesResource = "GlueDataBrewSchedules" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: GlueDataBrewSchedulesResource, Scope: nuke.Account, Lister: &GlueDataBrewSchedulesLister{}, diff --git a/resources/guardduty.go b/resources/guardduty.go index 8fc49e48..48e99dbe 100644 --- a/resources/guardduty.go +++ b/resources/guardduty.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/guardduty" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const GuardDutyDetectorResource = "GuardDutyDetector" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: GuardDutyDetectorResource, Scope: nuke.Account, Lister: &GuardDutyDetectorLister{}, diff --git a/resources/iam-account-setting-password-policy.go b/resources/iam-account-setting-password-policy.go index dc5a9021..9866e86c 100644 --- a/resources/iam-account-setting-password-policy.go +++ b/resources/iam-account-setting-password-policy.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/service/iam" "github.com/aws/aws-sdk-go/service/iam/iamiface" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -17,7 +18,7 @@ import ( const IAMAccountSettingPasswordPolicyResource = "IAMAccountSettingPasswordPolicy" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IAMAccountSettingPasswordPolicyResource, Scope: nuke.Account, Lister: &IAMAccountSettingPasswordPolicyLister{}, diff --git a/resources/iam-group-policies.go b/resources/iam-group-policies.go index 7c8a27c4..1bbc43e1 100644 --- a/resources/iam-group-policies.go +++ b/resources/iam-group-policies.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/service/iam" "github.com/aws/aws-sdk-go/service/iam/iamiface" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -16,7 +17,7 @@ import ( const IAMGroupPolicyResource = "IAMGroupPolicy" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IAMGroupPolicyResource, Scope: nuke.Account, Lister: &IAMGroupPolicyLister{}, diff --git a/resources/iam-group-policy-attachments.go b/resources/iam-group-policy-attachments.go index d093a949..c2932d43 100644 --- a/resources/iam-group-policy-attachments.go +++ b/resources/iam-group-policy-attachments.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/service/iam" "github.com/aws/aws-sdk-go/service/iam/iamiface" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const IAMGroupPolicyAttachmentResource = "IAMGroupPolicyAttachment" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IAMGroupPolicyAttachmentResource, Scope: nuke.Account, Lister: &IAMGroupPolicyAttachmentLister{}, diff --git a/resources/iam-groups.go b/resources/iam-groups.go index e4660d7a..05e8ec0c 100644 --- a/resources/iam-groups.go +++ b/resources/iam-groups.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/service/iam" "github.com/aws/aws-sdk-go/service/iam/iamiface" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const IAMGroupResource = "IAMGroup" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IAMGroupResource, Scope: nuke.Account, Lister: &IAMGroupLister{}, diff --git a/resources/iam-instance-profile-roles.go b/resources/iam-instance-profile-roles.go index b7c86c8e..1a523b92 100644 --- a/resources/iam-instance-profile-roles.go +++ b/resources/iam-instance-profile-roles.go @@ -12,6 +12,7 @@ import ( "github.com/aws/aws-sdk-go/service/iam" "github.com/aws/aws-sdk-go/service/iam/iamiface" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -21,7 +22,7 @@ import ( const IAMInstanceProfileRoleResource = "IAMInstanceProfileRole" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IAMInstanceProfileRoleResource, Scope: nuke.Account, Lister: &IAMInstanceProfileRoleLister{}, diff --git a/resources/iam-instance-profiles.go b/resources/iam-instance-profiles.go index 9b381ec6..4000f974 100644 --- a/resources/iam-instance-profiles.go +++ b/resources/iam-instance-profiles.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/service/iam" "github.com/aws/aws-sdk-go/service/iam/iamiface" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const IAMInstanceProfileResource = "IAMInstanceProfile" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IAMInstanceProfileResource, Scope: nuke.Account, Lister: &IAMInstanceProfileLister{}, diff --git a/resources/iam-login-profiles.go b/resources/iam-login-profiles.go index e45d2815..6ccfb1c0 100644 --- a/resources/iam-login-profiles.go +++ b/resources/iam-login-profiles.go @@ -12,6 +12,7 @@ import ( "github.com/aws/aws-sdk-go/service/iam" "github.com/aws/aws-sdk-go/service/iam/iamiface" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -21,7 +22,7 @@ import ( const IAMLoginProfileResource = "IAMLoginProfile" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IAMLoginProfileResource, Scope: nuke.Account, Lister: &IAMLoginProfileLister{}, diff --git a/resources/iam-open-id-connect-provider.go b/resources/iam-open-id-connect-provider.go index f7848149..264aac20 100644 --- a/resources/iam-open-id-connect-provider.go +++ b/resources/iam-open-id-connect-provider.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/service/iam" "github.com/aws/aws-sdk-go/service/iam/iamiface" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const IAMOpenIDConnectProviderResource = "IAMOpenIDConnectProvider" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IAMOpenIDConnectProviderResource, Scope: nuke.Account, Lister: &IAMOpenIDConnectProviderLister{}, diff --git a/resources/iam-policies.go b/resources/iam-policies.go index ae51c301..aa89611d 100644 --- a/resources/iam-policies.go +++ b/resources/iam-policies.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/service/iam" "github.com/aws/aws-sdk-go/service/iam/iamiface" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -18,7 +19,7 @@ import ( const IAMPolicyResource = "IAMPolicy" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IAMPolicyResource, Scope: nuke.Account, Lister: &IAMPolicyLister{}, diff --git a/resources/iam-role-policy-attachments.go b/resources/iam-role-policy-attachments.go index d62e327d..937bbf9c 100644 --- a/resources/iam-role-policy-attachments.go +++ b/resources/iam-role-policy-attachments.go @@ -12,6 +12,7 @@ import ( "github.com/aws/aws-sdk-go/service/iam" "github.com/aws/aws-sdk-go/service/iam/iamiface" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -21,7 +22,7 @@ import ( const IAMRolePolicyAttachmentResource = "IAMRolePolicyAttachment" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IAMRolePolicyAttachmentResource, Scope: nuke.Account, Lister: &IAMRolePolicyAttachmentLister{}, diff --git a/resources/iam-role-policy.go b/resources/iam-role-policy.go index e5711ed3..3c6055fa 100644 --- a/resources/iam-role-policy.go +++ b/resources/iam-role-policy.go @@ -11,6 +11,7 @@ import ( "github.com/aws/aws-sdk-go/service/iam" "github.com/aws/aws-sdk-go/service/iam/iamiface" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -20,7 +21,7 @@ import ( const IAMRolePolicyResource = "IAMRolePolicy" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IAMRolePolicyResource, Scope: nuke.Account, Lister: &IAMRolePolicyLister{}, diff --git a/resources/iam-roles.go b/resources/iam-roles.go index 6e0bd410..618c50b7 100644 --- a/resources/iam-roles.go +++ b/resources/iam-roles.go @@ -13,6 +13,7 @@ import ( "github.com/aws/aws-sdk-go/service/iam" "github.com/aws/aws-sdk-go/service/iam/iamiface" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -22,7 +23,7 @@ import ( const IAMRoleResource = "IAMRole" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IAMRoleResource, Scope: nuke.Account, Lister: &IAMRoleLister{}, diff --git a/resources/iam-saml-provider.go b/resources/iam-saml-provider.go index 9388bbd4..ba50f9a4 100644 --- a/resources/iam-saml-provider.go +++ b/resources/iam-saml-provider.go @@ -6,13 +6,14 @@ import ( "github.com/aws/aws-sdk-go/service/iam" "github.com/aws/aws-sdk-go/service/iam/iamiface" "github.com/ekristen/aws-nuke/pkg/nuke" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" ) const IAMSAMLProviderResource = "IAMSAMLProvider" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IAMSAMLProviderResource, Scope: nuke.Account, Lister: &IAMSAMLProviderLister{}, diff --git a/resources/iam-server-certificate.go b/resources/iam-server-certificate.go index 7d8fc852..9d102f22 100644 --- a/resources/iam-server-certificate.go +++ b/resources/iam-server-certificate.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/service/iam" "github.com/aws/aws-sdk-go/service/iam/iamiface" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const IAMServerCertificateResource = "IAMServerCertificate" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IAMServerCertificateResource, Scope: nuke.Account, Lister: &IAMServerCertificateLister{}, diff --git a/resources/iam-service-specific-credentials.go b/resources/iam-service-specific-credentials.go index ea0fc365..10dd0d9b 100644 --- a/resources/iam-service-specific-credentials.go +++ b/resources/iam-service-specific-credentials.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/service/iam" "github.com/aws/aws-sdk-go/service/iam/iamiface" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const IAMServiceSpecificCredentialResource = "IAMServiceSpecificCredential" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IAMServiceSpecificCredentialResource, Scope: nuke.Account, Lister: &IAMServiceSpecificCredentialLister{}, diff --git a/resources/iam-signing-certificate.go b/resources/iam-signing-certificate.go index 5d7161d1..13dd2400 100644 --- a/resources/iam-signing-certificate.go +++ b/resources/iam-signing-certificate.go @@ -11,6 +11,7 @@ import ( "github.com/aws/aws-sdk-go/service/iam" "github.com/aws/aws-sdk-go/service/iam/iamiface" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -20,7 +21,7 @@ import ( const IAMSigningCertificateResource = "IAMSigningCertificate" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IAMSigningCertificateResource, Scope: nuke.Account, Lister: &IAMSigningCertificateLister{}, diff --git a/resources/iam-user-access-key.go b/resources/iam-user-access-key.go index 7415e6c3..ef1f29ee 100644 --- a/resources/iam-user-access-key.go +++ b/resources/iam-user-access-key.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/service/iam" "github.com/aws/aws-sdk-go/service/iam/iamiface" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const IAMUserAccessKeyResource = "IAMUserAccessKey" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IAMUserAccessKeyResource, Scope: nuke.Account, Lister: &IAMUserAccessKeyLister{}, diff --git a/resources/iam-user-group-attachments.go b/resources/iam-user-group-attachments.go index bf216292..03ff5e0c 100644 --- a/resources/iam-user-group-attachments.go +++ b/resources/iam-user-group-attachments.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/service/iam" "github.com/aws/aws-sdk-go/service/iam/iamiface" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const IAMUserGroupAttachmentResource = "IAMUserGroupAttachment" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IAMUserGroupAttachmentResource, Scope: nuke.Account, Lister: &IAMUserGroupAttachmentLister{}, diff --git a/resources/iam-user-https-git-credential.go b/resources/iam-user-https-git-credential.go index 2f2a8386..211ecd55 100644 --- a/resources/iam-user-https-git-credential.go +++ b/resources/iam-user-https-git-credential.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/service/iam" "github.com/aws/aws-sdk-go/service/iam/iamiface" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -18,7 +19,7 @@ import ( const IAMUserHTTPSGitCredentialResource = "IAMUserHTTPSGitCredential" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IAMUserHTTPSGitCredentialResource, Scope: nuke.Account, Lister: &IAMUserHTTPSGitCredentialLister{}, diff --git a/resources/iam-user-policy-attachment.go b/resources/iam-user-policy-attachment.go index 8c3608da..c363a13f 100644 --- a/resources/iam-user-policy-attachment.go +++ b/resources/iam-user-policy-attachment.go @@ -10,6 +10,7 @@ import ( "github.com/aws/aws-sdk-go/service/iam" "github.com/aws/aws-sdk-go/service/iam/iamiface" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -19,7 +20,7 @@ import ( const IAMUserPolicyAttachmentResource = "IAMUserPolicyAttachment" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IAMUserPolicyAttachmentResource, Scope: nuke.Account, Lister: &IAMUserPolicyAttachmentLister{}, diff --git a/resources/iam-user-policy.go b/resources/iam-user-policy.go index c8b16270..f565d173 100644 --- a/resources/iam-user-policy.go +++ b/resources/iam-user-policy.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/service/iam" "github.com/aws/aws-sdk-go/service/iam/iamiface" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -16,7 +17,7 @@ import ( const IAMUserPolicyResource = "IAMUserPolicy" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IAMUserPolicyResource, Scope: nuke.Account, Lister: &IAMUserPolicyLister{}, diff --git a/resources/iam-user-ssh-keys.go b/resources/iam-user-ssh-keys.go index d7db68e2..28b441fd 100644 --- a/resources/iam-user-ssh-keys.go +++ b/resources/iam-user-ssh-keys.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/service/iam" "github.com/aws/aws-sdk-go/service/iam/iamiface" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const IAMUserSSHPublicKeyResource = "IAMUserSSHPublicKey" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IAMUserSSHPublicKeyResource, Scope: nuke.Account, Lister: &IAMUserSSHPublicKeyLister{}, diff --git a/resources/iam-users.go b/resources/iam-users.go index 2fc924f3..87a27152 100644 --- a/resources/iam-users.go +++ b/resources/iam-users.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/service/iam" "github.com/aws/aws-sdk-go/service/iam/iamiface" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const IAMUserResource = "IAMUser" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IAMUserResource, Scope: nuke.Account, Lister: &IAMUsersLister{}, diff --git a/resources/iam-virtual-mfa-devices.go b/resources/iam-virtual-mfa-devices.go index d972ede4..f97656d7 100644 --- a/resources/iam-virtual-mfa-devices.go +++ b/resources/iam-virtual-mfa-devices.go @@ -9,18 +9,18 @@ import ( "github.com/gotidy/ptr" - "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/iam" "github.com/aws/aws-sdk-go/service/iam/iamiface" "github.com/ekristen/aws-nuke/pkg/nuke" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" ) const IAMVirtualMFADeviceResource = "IAMVirtualMFADevice" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IAMVirtualMFADeviceResource, Scope: nuke.Account, Lister: &IAMVirtualMFADeviceLister{}, @@ -45,8 +45,8 @@ func (l *IAMVirtualMFADeviceLister) List(_ context.Context, o interface{}) ([]re svc: svc, userId: out.User.UserId, userArn: out.User.Arn, - userName: *out.User.UserName, - serialNumber: *out.SerialNumber, + userName: out.User.UserName, + serialNumber: out.SerialNumber, }) } @@ -57,8 +57,8 @@ type IAMVirtualMFADevice struct { svc iamiface.IAMAPI userId *string userArn *string - userName string - serialNumber string + userName *string + serialNumber *string } func (v *IAMVirtualMFADevice) Filter() error { @@ -66,7 +66,7 @@ func (v *IAMVirtualMFADevice) Filter() error { if ptr.ToString(v.userArn) == fmt.Sprintf("arn:aws:iam::%s:root", ptr.ToString(v.userId)) { isRoot = true } - if strings.HasSuffix(v.serialNumber, "/root-account-mfa-device") { + if strings.HasSuffix(ptr.ToString(v.serialNumber), "/root-account-mfa-device") { isRoot = true } @@ -79,14 +79,14 @@ func (v *IAMVirtualMFADevice) Filter() error { func (v *IAMVirtualMFADevice) Remove(_ context.Context) error { if _, err := v.svc.DeactivateMFADevice(&iam.DeactivateMFADeviceInput{ - UserName: aws.String(v.userName), - SerialNumber: aws.String(v.serialNumber), + UserName: v.userName, + SerialNumber: v.serialNumber, }); err != nil { return err } if _, err := v.svc.DeleteVirtualMFADevice(&iam.DeleteVirtualMFADeviceInput{ - SerialNumber: &v.serialNumber, + SerialNumber: v.serialNumber, }); err != nil { return err } @@ -95,5 +95,5 @@ func (v *IAMVirtualMFADevice) Remove(_ context.Context) error { } func (v *IAMVirtualMFADevice) String() string { - return v.serialNumber + return ptr.ToString(v.serialNumber) } diff --git a/resources/iam-virtual-mfa-devices_mock_test.go b/resources/iam-virtual-mfa-devices_mock_test.go index a7797f23..6759415e 100644 --- a/resources/iam-virtual-mfa-devices_mock_test.go +++ b/resources/iam-virtual-mfa-devices_mock_test.go @@ -2,12 +2,12 @@ package resources import ( "context" + "github.com/gotidy/ptr" "testing" "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" - "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/iam" "github.com/ekristen/aws-nuke/mocks/mock_iamiface" @@ -22,17 +22,17 @@ func Test_Mock_IAMVirtualMFADevice_Remove(t *testing.T) { iamVirtualMFADevice := IAMVirtualMFADevice{ svc: mockIAM, - userName: "user:foobar", - serialNumber: "serial:foobar", + userName: ptr.String("user:foobar"), + serialNumber: ptr.String("serial:foobar"), } mockIAM.EXPECT().DeactivateMFADevice(gomock.Eq(&iam.DeactivateMFADeviceInput{ - UserName: &iamVirtualMFADevice.userName, - SerialNumber: &iamVirtualMFADevice.serialNumber, + UserName: iamVirtualMFADevice.userName, + SerialNumber: iamVirtualMFADevice.serialNumber, })).Return(&iam.DeactivateMFADeviceOutput{}, nil) mockIAM.EXPECT().DeleteVirtualMFADevice(gomock.Eq(&iam.DeleteVirtualMFADeviceInput{ - SerialNumber: aws.String(iamVirtualMFADevice.serialNumber), + SerialNumber: iamVirtualMFADevice.serialNumber, })).Return(&iam.DeleteVirtualMFADeviceOutput{}, nil) err := iamVirtualMFADevice.Remove(context.TODO()) diff --git a/resources/imagebuilder-components.go b/resources/imagebuilder-components.go index 2cf8ab69..0a48c8dd 100644 --- a/resources/imagebuilder-components.go +++ b/resources/imagebuilder-components.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/imagebuilder" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const ImageBuilderComponentResource = "ImageBuilderComponent" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ImageBuilderComponentResource, Scope: nuke.Account, Lister: &ImageBuilderComponentLister{}, diff --git a/resources/imagebuilder-distribution-configurations.go b/resources/imagebuilder-distribution-configurations.go index dd15b718..b1b08ac9 100644 --- a/resources/imagebuilder-distribution-configurations.go +++ b/resources/imagebuilder-distribution-configurations.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/imagebuilder" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const ImageBuilderDistributionConfigurationResource = "ImageBuilderDistributionConfiguration" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ImageBuilderDistributionConfigurationResource, Scope: nuke.Account, Lister: &ImageBuilderDistributionConfigurationLister{}, diff --git a/resources/imagebuilder-images.go b/resources/imagebuilder-images.go index dbe1d1d7..00316fb6 100644 --- a/resources/imagebuilder-images.go +++ b/resources/imagebuilder-images.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/imagebuilder" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const ImageBuilderImageResource = "ImageBuilderImage" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ImageBuilderImageResource, Scope: nuke.Account, Lister: &ImageBuilderImageLister{}, diff --git a/resources/imagebuilder-infrastructure-configurations.go b/resources/imagebuilder-infrastructure-configurations.go index a12557b1..b0c3ef24 100644 --- a/resources/imagebuilder-infrastructure-configurations.go +++ b/resources/imagebuilder-infrastructure-configurations.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/imagebuilder" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const ImageBuilderInfrastructureConfigurationResource = "ImageBuilderInfrastructureConfiguration" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ImageBuilderInfrastructureConfigurationResource, Scope: nuke.Account, Lister: &ImageBuilderInfrastructureConfigurationLister{}, diff --git a/resources/imagebuilder-pipelines.go b/resources/imagebuilder-pipelines.go index 5ce2994c..3fe8b339 100644 --- a/resources/imagebuilder-pipelines.go +++ b/resources/imagebuilder-pipelines.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/imagebuilder" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const ImageBuilderPipelineResource = "ImageBuilderPipeline" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ImageBuilderPipelineResource, Scope: nuke.Account, Lister: &ImageBuilderPipelineLister{}, diff --git a/resources/imagebuilder-recipes.go b/resources/imagebuilder-recipes.go index 26c1e40b..79986594 100644 --- a/resources/imagebuilder-recipes.go +++ b/resources/imagebuilder-recipes.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/imagebuilder" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const ImageBuilderRecipeResource = "ImageBuilderRecipe" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ImageBuilderRecipeResource, Scope: nuke.Account, Lister: &ImageBuilderRecipeLister{}, diff --git a/resources/inspector-assessment-runs.go b/resources/inspector-assessment-runs.go index 6f95a479..7330d472 100644 --- a/resources/inspector-assessment-runs.go +++ b/resources/inspector-assessment-runs.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/inspector" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -13,7 +14,7 @@ import ( const InspectorAssessmentRunResource = "InspectorAssessmentRun" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: InspectorAssessmentRunResource, Scope: nuke.Account, Lister: &InspectorAssessmentRunLister{}, diff --git a/resources/inspector-assessment-targets.go b/resources/inspector-assessment-targets.go index b8ecb63f..d22fe817 100644 --- a/resources/inspector-assessment-targets.go +++ b/resources/inspector-assessment-targets.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/inspector" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -13,7 +14,7 @@ import ( const InspectorAssessmentTargetResource = "InspectorAssessmentTarget" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: InspectorAssessmentTargetResource, Scope: nuke.Account, Lister: &InspectorAssessmentTargetLister{}, diff --git a/resources/inspector-assessment-templates.go b/resources/inspector-assessment-templates.go index 56e57526..67c50837 100644 --- a/resources/inspector-assessment-templates.go +++ b/resources/inspector-assessment-templates.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/inspector" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -13,7 +14,7 @@ import ( const InspectorAssessmentTemplateResource = "InspectorAssessmentTemplate" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: InspectorAssessmentTemplateResource, Scope: nuke.Account, Lister: &InspectorAssessmentTemplateLister{}, diff --git a/resources/inspector2.go b/resources/inspector2.go index 060a5153..ebc32c80 100644 --- a/resources/inspector2.go +++ b/resources/inspector2.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/inspector2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const Inspector2Resource = "Inspector2" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: Inspector2Resource, Scope: nuke.Account, Lister: &Inspector2Lister{}, diff --git a/resources/iot-authorizers.go b/resources/iot-authorizers.go index 02079a3f..02cf03cd 100644 --- a/resources/iot-authorizers.go +++ b/resources/iot-authorizers.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/iot" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -13,7 +14,7 @@ import ( const IoTAuthorizerResource = "IoTAuthorizer" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IoTAuthorizerResource, Scope: nuke.Account, Lister: &IoTAuthorizerLister{}, diff --git a/resources/iot-cacertificates.go b/resources/iot-cacertificates.go index 2b425181..82058fb0 100644 --- a/resources/iot-cacertificates.go +++ b/resources/iot-cacertificates.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/iot" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const IoTCACertificateResource = "IoTCACertificate" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IoTCACertificateResource, Scope: nuke.Account, Lister: &IoTCACertificateLister{}, diff --git a/resources/iot-certificates.go b/resources/iot-certificates.go index b8c56bcc..94ee7aaa 100644 --- a/resources/iot-certificates.go +++ b/resources/iot-certificates.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/iot" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const IoTCertificateResource = "IoTCertificate" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IoTCertificateResource, Scope: nuke.Account, Lister: &IoTCertificateLister{}, diff --git a/resources/iot-jobs.go b/resources/iot-jobs.go index ec699094..de48f1ef 100644 --- a/resources/iot-jobs.go +++ b/resources/iot-jobs.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/iot" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const IoTJobResource = "IoTJob" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IoTJobResource, Scope: nuke.Account, Lister: &IoTJobLister{}, diff --git a/resources/iot-otaupdates.go b/resources/iot-otaupdates.go index 2c520aac..ff364ba4 100644 --- a/resources/iot-otaupdates.go +++ b/resources/iot-otaupdates.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/iot" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const IoTOTAUpdateResource = "IoTOTAUpdate" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IoTOTAUpdateResource, Scope: nuke.Account, Lister: &IoTOTAUpdateLister{}, diff --git a/resources/iot-policies.go b/resources/iot-policies.go index 0d0bfcdb..d173b808 100644 --- a/resources/iot-policies.go +++ b/resources/iot-policies.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/iot" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const IoTPolicyResource = "IoTPolicy" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IoTPolicyResource, Scope: nuke.Account, Lister: &IoTPolicyLister{}, diff --git a/resources/iot-rolealiases.go b/resources/iot-rolealiases.go index 8e843413..0e283c7a 100644 --- a/resources/iot-rolealiases.go +++ b/resources/iot-rolealiases.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/iot" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const IoTRoleAliasResource = "IoTRoleAlias" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IoTRoleAliasResource, Scope: nuke.Account, Lister: &IoTRoleAliasLister{}, diff --git a/resources/iot-streams.go b/resources/iot-streams.go index 0001b69b..3cc39abe 100644 --- a/resources/iot-streams.go +++ b/resources/iot-streams.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/iot" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const IoTStreamResource = "IoTStream" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IoTStreamResource, Scope: nuke.Account, Lister: &IoTStreamLister{}, diff --git a/resources/iot-thinggroups.go b/resources/iot-thinggroups.go index 5b61163c..d824e400 100644 --- a/resources/iot-thinggroups.go +++ b/resources/iot-thinggroups.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/iot" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const IoTThingGroupResource = "IoTThingGroup" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IoTThingGroupResource, Scope: nuke.Account, Lister: &IoTThingGroupLister{}, diff --git a/resources/iot-things.go b/resources/iot-things.go index 4ab58946..61430316 100644 --- a/resources/iot-things.go +++ b/resources/iot-things.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/iot" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const IoTThingResource = "IoTThing" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IoTThingResource, Scope: nuke.Account, Lister: &IoTThingLister{}, diff --git a/resources/iot-thingtypes.go b/resources/iot-thingtypes.go index 1f659b71..46eda75d 100644 --- a/resources/iot-thingtypes.go +++ b/resources/iot-thingtypes.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/iot" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const IoTThingTypeResource = "IoTThingType" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IoTThingTypeResource, Scope: nuke.Account, Lister: &IoTThingTypeLister{}, diff --git a/resources/iot-thingtypestates.go b/resources/iot-thingtypestates.go index ab07ee4e..a8bfc0fb 100644 --- a/resources/iot-thingtypestates.go +++ b/resources/iot-thingtypestates.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/iot" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -17,7 +18,7 @@ import ( const IoTThingTypeStateResource = "IoTThingTypeState" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IoTThingTypeStateResource, Scope: nuke.Account, Lister: &IoTThingTypeStateLister{}, diff --git a/resources/iot-topicrules.go b/resources/iot-topicrules.go index 5b3993f5..3842fb20 100644 --- a/resources/iot-topicrules.go +++ b/resources/iot-topicrules.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/iot" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const IoTTopicRuleResource = "IoTTopicRule" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: IoTTopicRuleResource, Scope: nuke.Account, Lister: &IoTTopicRuleLister{}, diff --git a/resources/kendra-indexes.go b/resources/kendra-indexes.go index b41a3860..cf86143a 100644 --- a/resources/kendra-indexes.go +++ b/resources/kendra-indexes.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/kendra" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const KendraIndexResource = "KendraIndex" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: KendraIndexResource, Scope: nuke.Account, Lister: &KendraIndexLister{}, diff --git a/resources/kinesis-streams.go b/resources/kinesis-streams.go index 2529f4d2..bcb15351 100644 --- a/resources/kinesis-streams.go +++ b/resources/kinesis-streams.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/kinesis" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const KinesisStreamResource = "KinesisStream" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: KinesisStreamResource, Scope: nuke.Account, Lister: &KinesisStreamLister{}, diff --git a/resources/kinesisanalytics-streams.go b/resources/kinesisanalytics-streams.go index a57a29ab..f6685ec4 100644 --- a/resources/kinesisanalytics-streams.go +++ b/resources/kinesisanalytics-streams.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/kinesisanalyticsv2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const KinesisAnalyticsApplicationResource = "KinesisAnalyticsApplication" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: KinesisAnalyticsApplicationResource, Scope: nuke.Account, Lister: &KinesisAnalyticsApplicationLister{}, diff --git a/resources/kinesisvideo-streams.go b/resources/kinesisvideo-streams.go index e32d670c..aec12fb4 100644 --- a/resources/kinesisvideo-streams.go +++ b/resources/kinesisvideo-streams.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/kinesisvideo" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const KinesisVideoProjectResource = "KinesisVideoProject" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: KinesisVideoProjectResource, Scope: nuke.Account, Lister: &KinesisVideoProjectLister{}, diff --git a/resources/kms-aliases.go b/resources/kms-aliases.go index 45724828..b8ac8078 100644 --- a/resources/kms-aliases.go +++ b/resources/kms-aliases.go @@ -10,6 +10,7 @@ import ( "github.com/aws/aws-sdk-go/service/kms" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -19,7 +20,7 @@ import ( const KMSAliasResource = "KMSAlias" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: KMSAliasResource, Scope: nuke.Account, Lister: &KMSAliasLister{}, diff --git a/resources/kms-keys.go b/resources/kms-keys.go index bfa4b9cb..3db980e3 100644 --- a/resources/kms-keys.go +++ b/resources/kms-keys.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/kms" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const KMSKeyResource = "KMSKey" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: KMSKeyResource, Scope: nuke.Account, Lister: &KMSKeyLister{}, diff --git a/resources/lambda-event-source-mapping.go b/resources/lambda-event-source-mapping.go index e51fe670..8b5bd162 100644 --- a/resources/lambda-event-source-mapping.go +++ b/resources/lambda-event-source-mapping.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/lambda" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const LambdaEventSourceMappingResource = "LambdaEventSourceMapping" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: LambdaEventSourceMappingResource, Scope: nuke.Account, Lister: &LambdaEventSourceMappingLister{}, diff --git a/resources/lambda-functions.go b/resources/lambda-functions.go index 0a93b931..4d2d56e6 100644 --- a/resources/lambda-functions.go +++ b/resources/lambda-functions.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/lambda" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const LambdaFunctionResource = "LambdaFunction" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: LambdaFunctionResource, Scope: nuke.Account, Lister: &LambdaFunctionLister{}, diff --git a/resources/lambda-layers.go b/resources/lambda-layers.go index 29f9b6e1..cee9ef89 100644 --- a/resources/lambda-layers.go +++ b/resources/lambda-layers.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/lambda" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const LambdaLayerResource = "LambdaLayer" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: LambdaLayerResource, Scope: nuke.Account, Lister: &LambdaLayerLister{}, diff --git a/resources/lex-bot.go b/resources/lex-bot.go index 8e10acd6..f7e36f54 100644 --- a/resources/lex-bot.go +++ b/resources/lex-bot.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/lexmodelbuildingservice" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const LexBotResource = "LexBot" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: LexBotResource, Scope: nuke.Account, Lister: &LexBotLister{}, diff --git a/resources/lex-intent.go b/resources/lex-intent.go index 467de544..783331f7 100644 --- a/resources/lex-intent.go +++ b/resources/lex-intent.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/lexmodelbuildingservice" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const LexIntentResource = "LexIntent" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: LexIntentResource, Scope: nuke.Account, Lister: &LexIntentLister{}, diff --git a/resources/lex-model-building-service-bot-alias.go b/resources/lex-model-building-service-bot-alias.go index a2b105d9..4253f501 100644 --- a/resources/lex-model-building-service-bot-alias.go +++ b/resources/lex-model-building-service-bot-alias.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/lexmodelbuildingservice" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const LexModelBuildingServiceBotAliasResource = "LexModelBuildingServiceBotAlias" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: LexModelBuildingServiceBotAliasResource, Scope: nuke.Account, Lister: &LexModelBuildingServiceBotAliasLister{}, diff --git a/resources/lex-slot-types.go b/resources/lex-slot-types.go index 18f70f37..ffd0c543 100644 --- a/resources/lex-slot-types.go +++ b/resources/lex-slot-types.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/lexmodelbuildingservice" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const LexSlotTypeResource = "LexSlotType" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: LexSlotTypeResource, Scope: nuke.Account, Lister: &LexSlotTypeLister{}, diff --git a/resources/lightsail-disks.go b/resources/lightsail-disks.go index 5cb159eb..c52b2cb8 100644 --- a/resources/lightsail-disks.go +++ b/resources/lightsail-disks.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/lightsail" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -13,7 +14,7 @@ import ( const LightsailDiskResource = "LightsailDisk" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: LightsailDiskResource, Scope: nuke.Account, Lister: &LightsailDiskLister{}, diff --git a/resources/lightsail-domains.go b/resources/lightsail-domains.go index 6ea63b70..0101d863 100644 --- a/resources/lightsail-domains.go +++ b/resources/lightsail-domains.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws/endpoints" "github.com/aws/aws-sdk-go/service/lightsail" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -16,7 +17,7 @@ import ( const LightsailDomainResource = "LightsailDomain" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: LightsailDomainResource, Scope: nuke.Account, Lister: &LightsailDomainLister{}, diff --git a/resources/lightsail-instances.go b/resources/lightsail-instances.go index 4e236a16..51a59ca3 100644 --- a/resources/lightsail-instances.go +++ b/resources/lightsail-instances.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/lightsail" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -16,7 +17,7 @@ import ( const LightsailInstanceResource = "LightsailInstance" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: LightsailInstanceResource, Scope: nuke.Account, Lister: &LightsailInstanceLister{}, diff --git a/resources/lightsail-keypairs.go b/resources/lightsail-keypairs.go index f5d4ecb3..5b363d0b 100644 --- a/resources/lightsail-keypairs.go +++ b/resources/lightsail-keypairs.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/lightsail" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -13,7 +14,7 @@ import ( const LightsailKeyPairResource = "LightsailKeyPair" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: LightsailKeyPairResource, Scope: nuke.Account, Lister: &LightsailKeyPairLister{}, diff --git a/resources/lightsail-loadbalancers.go b/resources/lightsail-loadbalancers.go index 63e2f00c..9aab4bfc 100644 --- a/resources/lightsail-loadbalancers.go +++ b/resources/lightsail-loadbalancers.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/lightsail" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -13,7 +14,7 @@ import ( const LightsailLoadBalancerResource = "LightsailLoadBalancer" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: LightsailLoadBalancerResource, Scope: nuke.Account, Lister: &LightsailLoadBalancerLister{}, diff --git a/resources/lightsail-staticips.go b/resources/lightsail-staticips.go index 185ec491..b4b79479 100644 --- a/resources/lightsail-staticips.go +++ b/resources/lightsail-staticips.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/lightsail" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -13,7 +14,7 @@ import ( const LightsailStaticIPResource = "LightsailStaticIP" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: LightsailStaticIPResource, Scope: nuke.Account, Lister: &LightsailStaticIPLister{}, diff --git a/resources/machinelearning-batchpredictions.go b/resources/machinelearning-batchpredictions.go index 6148ca77..c657c9d9 100644 --- a/resources/machinelearning-batchpredictions.go +++ b/resources/machinelearning-batchpredictions.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/machinelearning" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const MachineLearningBranchPredictionResource = "MachineLearningBranchPrediction" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: MachineLearningBranchPredictionResource, Scope: nuke.Account, Lister: &MachineLearningBranchPredictionLister{}, diff --git a/resources/machinelearning-datasources.go b/resources/machinelearning-datasources.go index d8bf0f6a..e097abfd 100644 --- a/resources/machinelearning-datasources.go +++ b/resources/machinelearning-datasources.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/machinelearning" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const MachineLearningDataSourceResource = "MachineLearningDataSource" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: MachineLearningDataSourceResource, Scope: nuke.Account, Lister: &MachineLearningDataSourceLister{}, diff --git a/resources/machinelearning-evaluations.go b/resources/machinelearning-evaluations.go index 2d355a7a..1a19fbd6 100644 --- a/resources/machinelearning-evaluations.go +++ b/resources/machinelearning-evaluations.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/machinelearning" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const MachineLearningEvaluationResource = "MachineLearningEvaluation" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: MachineLearningEvaluationResource, Scope: nuke.Account, Lister: &MachineLearningEvaluationLister{}, diff --git a/resources/machinelearning-mlmodels.go b/resources/machinelearning-mlmodels.go index 5dc1f2ba..225b7cdb 100644 --- a/resources/machinelearning-mlmodels.go +++ b/resources/machinelearning-mlmodels.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/machinelearning" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const MachineLearningMLModelResource = "MachineLearningMLModel" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: MachineLearningMLModelResource, Scope: nuke.Account, Lister: &MachineLearningMLModelLister{}, diff --git a/resources/macie2.go b/resources/macie2.go index 4925b27b..cc8d6899 100644 --- a/resources/macie2.go +++ b/resources/macie2.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/macie2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -13,7 +14,7 @@ import ( const MacieResource = "Macie" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: MacieResource, Scope: nuke.Account, Lister: &MacieLister{}, diff --git a/resources/managedblockchain-member.go b/resources/managedblockchain-member.go index 855b852f..e66cde1c 100644 --- a/resources/managedblockchain-member.go +++ b/resources/managedblockchain-member.go @@ -10,6 +10,7 @@ import ( "github.com/aws/aws-sdk-go/service/managedblockchain" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -19,7 +20,7 @@ import ( const ManagedBlockchainMemberResource = "ManagedBlockchainMember" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ManagedBlockchainMemberResource, Scope: nuke.Account, Lister: &ManagedBlockchainMemberLister{}, diff --git a/resources/managedgrafana-workspaces.go b/resources/managedgrafana-workspaces.go index abfab2ea..5ed47a87 100644 --- a/resources/managedgrafana-workspaces.go +++ b/resources/managedgrafana-workspaces.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/managedgrafana" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const AMGWorkspaceResource = "AMGWorkspace" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: AMGWorkspaceResource, Scope: nuke.Account, Lister: &AMGWorkspaceLister{}, diff --git a/resources/mediaconvert-jobtemplates.go b/resources/mediaconvert-jobtemplates.go index 9aa28e37..0bc2e8e8 100644 --- a/resources/mediaconvert-jobtemplates.go +++ b/resources/mediaconvert-jobtemplates.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/mediaconvert" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const MediaConvertJobTemplateResource = "MediaConvertJobTemplate" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: MediaConvertJobTemplateResource, Scope: nuke.Account, Lister: &MediaConvertJobTemplateLister{}, diff --git a/resources/mediaconvert-presets.go b/resources/mediaconvert-presets.go index b0ec3bc4..ef1397f3 100644 --- a/resources/mediaconvert-presets.go +++ b/resources/mediaconvert-presets.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/mediaconvert" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const MediaConvertPresetResource = "MediaConvertPreset" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: MediaConvertPresetResource, Scope: nuke.Account, Lister: &MediaConvertPresetLister{}, diff --git a/resources/mediaconvert-queues.go b/resources/mediaconvert-queues.go index 16119b53..52eec06e 100644 --- a/resources/mediaconvert-queues.go +++ b/resources/mediaconvert-queues.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/mediaconvert" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -17,7 +18,7 @@ import ( const MediaConvertQueueResource = "MediaConvertQueue" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: MediaConvertQueueResource, Scope: nuke.Account, Lister: &MediaConvertQueueLister{}, diff --git a/resources/medialive-channels.go b/resources/medialive-channels.go index 17e23c35..e042466d 100644 --- a/resources/medialive-channels.go +++ b/resources/medialive-channels.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/medialive" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const MediaLiveChannelResource = "MediaLiveChannel" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: MediaLiveChannelResource, Scope: nuke.Account, Lister: &MediaLiveChannelLister{}, diff --git a/resources/medialive-inputs.go b/resources/medialive-inputs.go index 9b303cef..3285532e 100644 --- a/resources/medialive-inputs.go +++ b/resources/medialive-inputs.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/medialive" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const MediaLiveInputResource = "MediaLiveInput" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: MediaLiveInputResource, Scope: nuke.Account, Lister: &MediaLiveInputLister{}, diff --git a/resources/medialive-inputsecuritygroups.go b/resources/medialive-inputsecuritygroups.go index 9a899bae..72aa6585 100644 --- a/resources/medialive-inputsecuritygroups.go +++ b/resources/medialive-inputsecuritygroups.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/medialive" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const MediaLiveInputSecurityGroupResource = "MediaLiveInputSecurityGroup" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: MediaLiveInputSecurityGroupResource, Scope: nuke.Account, Lister: &MediaLiveInputSecurityGroupLister{}, diff --git a/resources/mediapackage-channels.go b/resources/mediapackage-channels.go index d7273cdc..6015a125 100644 --- a/resources/mediapackage-channels.go +++ b/resources/mediapackage-channels.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/mediapackage" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const MediaPackageChannelResource = "MediaPackageChannel" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: MediaPackageChannelResource, Scope: nuke.Account, Lister: &MediaPackageChannelLister{}, diff --git a/resources/mediapackage-originendpoints.go b/resources/mediapackage-originendpoints.go index 672446c7..c51acde1 100644 --- a/resources/mediapackage-originendpoints.go +++ b/resources/mediapackage-originendpoints.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/mediapackage" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const MediaPackageOriginEndpointResource = "MediaPackageOriginEndpoint" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: MediaPackageOriginEndpointResource, Scope: nuke.Account, Lister: &MediaPackageOriginEndpointLister{}, diff --git a/resources/mediastore-containers.go b/resources/mediastore-containers.go index 4e27b255..3bb3bad6 100644 --- a/resources/mediastore-containers.go +++ b/resources/mediastore-containers.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/mediastore" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const MediaStoreContainerResource = "MediaStoreContainer" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: MediaStoreContainerResource, Scope: nuke.Account, Lister: &MediaStoreContainerLister{}, diff --git a/resources/mediastoredata-items.go b/resources/mediastoredata-items.go index 58f6f999..1e3b4f85 100644 --- a/resources/mediastoredata-items.go +++ b/resources/mediastoredata-items.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/mediastore" "github.com/aws/aws-sdk-go/service/mediastoredata" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -15,7 +16,7 @@ import ( const MediaStoreDataItemsResource = "MediaStoreDataItems" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: MediaStoreDataItemsResource, Scope: nuke.Account, Lister: &MediaStoreDataItemsLister{}, diff --git a/resources/mediatailor-configurations.go b/resources/mediatailor-configurations.go index e0665eea..debd202a 100644 --- a/resources/mediatailor-configurations.go +++ b/resources/mediatailor-configurations.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/mediatailor" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const MediaTailorConfigurationResource = "MediaTailorConfiguration" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: MediaTailorConfigurationResource, Scope: nuke.Account, Lister: &MediaTailorConfigurationLister{}, diff --git a/resources/memorydb-acl.go b/resources/memorydb-acl.go index 1541c754..9f8b66e5 100644 --- a/resources/memorydb-acl.go +++ b/resources/memorydb-acl.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/memorydb" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -22,7 +23,7 @@ type MemoryDBACL struct { const MemoryDBACLResource = "MemoryDBACL" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: MemoryDBACLResource, Scope: nuke.Account, Lister: &MemoryDBACLLister{}, diff --git a/resources/memorydb-cluster.go b/resources/memorydb-cluster.go index 4e0ab9b6..633ab071 100644 --- a/resources/memorydb-cluster.go +++ b/resources/memorydb-cluster.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/memorydb" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -21,7 +22,7 @@ type MemoryDBCluster struct { const MemoryDBClusterResource = "MemoryDBCluster" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: MemoryDBClusterResource, Scope: nuke.Account, Lister: &MemoryDBClusterLister{}, diff --git a/resources/memorydb-parametergroups.go b/resources/memorydb-parametergroups.go index 30e7c0a9..3e1cb8f5 100644 --- a/resources/memorydb-parametergroups.go +++ b/resources/memorydb-parametergroups.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/memorydb" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -24,7 +25,7 @@ type MemoryDBParameterGroup struct { const MemoryDBParameterGroupResource = "MemoryDBParameterGroup" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: MemoryDBParameterGroupResource, Scope: nuke.Account, Lister: &MemoryDBParameterGroupLister{}, diff --git a/resources/memorydb-subnetgroups.go b/resources/memorydb-subnetgroups.go index 231efc6a..d20bd964 100644 --- a/resources/memorydb-subnetgroups.go +++ b/resources/memorydb-subnetgroups.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/memorydb" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -21,7 +22,7 @@ type MemoryDBSubnetGroup struct { const MemoryDBSubnetGroupResource = "MemoryDBSubnetGroup" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: MemoryDBSubnetGroupResource, Scope: nuke.Account, Lister: &MemoryDBSubnetGroupLister{}, diff --git a/resources/memorydb-user.go b/resources/memorydb-user.go index 858c9d2e..630d8100 100644 --- a/resources/memorydb-user.go +++ b/resources/memorydb-user.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/memorydb" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -23,7 +24,7 @@ type MemoryDBUser struct { const MemoryDBUserResource = "MemoryDBUser" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: MemoryDBUserResource, Scope: nuke.Account, Lister: &MemoryDBUserLister{}, diff --git a/resources/mgn-jobs.go b/resources/mgn-jobs.go index cc7fd772..de1b0c55 100644 --- a/resources/mgn-jobs.go +++ b/resources/mgn-jobs.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/mgn" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const MGNJobResource = "MGNJob" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: MGNJobResource, Scope: nuke.Account, Lister: &MGNJobLister{}, diff --git a/resources/mgn-source-servers.go b/resources/mgn-source-servers.go index 897975ce..0efecc62 100644 --- a/resources/mgn-source-servers.go +++ b/resources/mgn-source-servers.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/mgn" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const MGNSourceServerResource = "MGNSourceServer" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: MGNSourceServerResource, Scope: nuke.Account, Lister: &MGNSourceServerLister{}, diff --git a/resources/mobile-projects.go b/resources/mobile-projects.go index 7142546d..2ab5ff67 100644 --- a/resources/mobile-projects.go +++ b/resources/mobile-projects.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/mobile" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const MobileProjectResource = "MobileProject" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: MobileProjectResource, Scope: nuke.Account, Lister: &MobileProjectLister{}, diff --git a/resources/mq-broker.go b/resources/mq-broker.go index 366b5daa..8881793f 100644 --- a/resources/mq-broker.go +++ b/resources/mq-broker.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/mq" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const MQBrokerResource = "MQBroker" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: MQBrokerResource, Scope: nuke.Account, Lister: &MQBrokerLister{}, diff --git a/resources/msk-cluster.go b/resources/msk-cluster.go index 959d40a4..7d672b08 100644 --- a/resources/msk-cluster.go +++ b/resources/msk-cluster.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/kafka" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const MSKClusterResource = "MSKCluster" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: MSKClusterResource, Scope: nuke.Account, Lister: &MSKClusterLister{}, diff --git a/resources/msk-configuration.go b/resources/msk-configuration.go index b208cee5..4b459e29 100644 --- a/resources/msk-configuration.go +++ b/resources/msk-configuration.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/kafka" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const MSKConfigurationResource = "MSKConfiguration" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: MSKConfigurationResource, Scope: nuke.Account, Lister: &MSKConfigurationLister{}, diff --git a/resources/neptune-clusters.go b/resources/neptune-clusters.go index d892e3c2..ef8b7da3 100644 --- a/resources/neptune-clusters.go +++ b/resources/neptune-clusters.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/neptune" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const NeptuneClusterResource = "NeptuneCluster" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: NeptuneClusterResource, Scope: nuke.Account, Lister: &NeptuneClusterLister{}, diff --git a/resources/neptune-instances.go b/resources/neptune-instances.go index 2a2534b8..d64276d4 100644 --- a/resources/neptune-instances.go +++ b/resources/neptune-instances.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/neptune" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const NeptuneInstanceResource = "NeptuneInstance" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: NeptuneInstanceResource, Scope: nuke.Account, Lister: &NeptuneInstanceLister{}, diff --git a/resources/neptune-snapshots.go b/resources/neptune-snapshots.go index 9d57bb8c..e367d916 100644 --- a/resources/neptune-snapshots.go +++ b/resources/neptune-snapshots.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/neptune" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const NeptuneSnapshotResource = "NeptuneSnapshot" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: NeptuneSnapshotResource, Scope: nuke.Account, Lister: &NeptuneSnapshotLister{}, diff --git a/resources/opensearchservice-domain.go b/resources/opensearchservice-domain.go index 78f0a3d6..7eeb2b3f 100644 --- a/resources/opensearchservice-domain.go +++ b/resources/opensearchservice-domain.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/opensearchservice" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -16,7 +17,7 @@ import ( const OSDomainResource = "OSDomain" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: OSDomainResource, Scope: nuke.Account, Lister: &OSDomainLister{}, diff --git a/resources/opensearchservice-packages.go b/resources/opensearchservice-packages.go index 299c1ad1..6a933e50 100644 --- a/resources/opensearchservice-packages.go +++ b/resources/opensearchservice-packages.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/service/opensearchservice" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const OSPackageResource = "OSPackage" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: OSPackageResource, Scope: nuke.Account, Lister: &OSPackageLister{}, diff --git a/resources/opensearchservice-vpcendpoints.go b/resources/opensearchservice-vpcendpoints.go index b9baa0bd..4d8ad8ca 100644 --- a/resources/opensearchservice-vpcendpoints.go +++ b/resources/opensearchservice-vpcendpoints.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/opensearchservice" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const OSVPCEndpointResource = "OSVPCEndpoint" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: OSVPCEndpointResource, Scope: nuke.Account, Lister: &OSVPCEndpointLister{}, diff --git a/resources/opsworks-apps.go b/resources/opsworks-apps.go index ed609bb6..89b84e4c 100644 --- a/resources/opsworks-apps.go +++ b/resources/opsworks-apps.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/opsworks" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -13,7 +14,7 @@ import ( const OpsWorksAppResource = "OpsWorksApp" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: OpsWorksAppResource, Scope: nuke.Account, Lister: &OpsWorksAppLister{}, diff --git a/resources/opsworks-instances.go b/resources/opsworks-instances.go index 84ec5b7b..55d78ce3 100644 --- a/resources/opsworks-instances.go +++ b/resources/opsworks-instances.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/opsworks" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -13,7 +14,7 @@ import ( const OpsWorksInstanceResource = "OpsWorksInstance" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: OpsWorksInstanceResource, Scope: nuke.Account, Lister: &OpsWorksInstanceLister{}, diff --git a/resources/opsworks-layers.go b/resources/opsworks-layers.go index 630887be..e0396c97 100644 --- a/resources/opsworks-layers.go +++ b/resources/opsworks-layers.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/opsworks" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -13,7 +14,7 @@ import ( const OpsWorksLayerResource = "OpsWorksLayer" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: OpsWorksLayerResource, Scope: nuke.Account, Lister: &OpsWorksLayerLister{}, diff --git a/resources/opsworks-userprofiles.go b/resources/opsworks-userprofiles.go index 18c3f536..dcbf52a6 100644 --- a/resources/opsworks-userprofiles.go +++ b/resources/opsworks-userprofiles.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/service/opsworks" "github.com/aws/aws-sdk-go/service/sts" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -16,7 +17,7 @@ import ( const OpsWorksUserProfileResource = "OpsWorksUserProfile" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: OpsWorksUserProfileResource, Scope: nuke.Account, Lister: &OpsWorksUserProfileLister{}, diff --git a/resources/opsworkscm-backups.go b/resources/opsworkscm-backups.go index a93fbc7e..b853d034 100644 --- a/resources/opsworkscm-backups.go +++ b/resources/opsworkscm-backups.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/opsworkscm" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -13,7 +14,7 @@ import ( const OpsWorksCMBackupResource = "OpsWorksCMBackup" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: OpsWorksCMBackupResource, Scope: nuke.Account, Lister: &OpsWorksCMBackupLister{}, diff --git a/resources/opsworkscm-servers.go b/resources/opsworkscm-servers.go index 45fa91c8..dec1f2b5 100644 --- a/resources/opsworkscm-servers.go +++ b/resources/opsworkscm-servers.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/opsworkscm" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -13,7 +14,7 @@ import ( const OpsWorksCMServerResource = "OpsWorksCMServer" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: OpsWorksCMServerResource, Scope: nuke.Account, Lister: &OpsWorksCMServerLister{}, diff --git a/resources/opsworkscm-serverstates.go b/resources/opsworkscm-serverstates.go index bb02ada1..cefca634 100644 --- a/resources/opsworkscm-serverstates.go +++ b/resources/opsworkscm-serverstates.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/opsworkscm" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -15,7 +16,7 @@ import ( const OpsWorksCMServerStateResource = "OpsWorksCMServerState" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: OpsWorksCMServerStateResource, Scope: nuke.Account, Lister: &OpsWorksCMServerStateLister{}, diff --git a/resources/prometheusservice-workspace.go b/resources/prometheusservice-workspace.go index 8a68ebdc..90c7bac4 100644 --- a/resources/prometheusservice-workspace.go +++ b/resources/prometheusservice-workspace.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/prometheusservice" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const AMPWorkspaceResource = "AMPWorkspace" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: AMPWorkspaceResource, Scope: nuke.Account, Lister: &WorkspaceLister{}, diff --git a/resources/qldb-ledger.go b/resources/qldb-ledger.go index 2504258c..3d7c17a0 100644 --- a/resources/qldb-ledger.go +++ b/resources/qldb-ledger.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/qldb" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -18,7 +19,7 @@ import ( const QLDBLedgerResource = "QLDBLedger" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: QLDBLedgerResource, Scope: nuke.Account, Lister: &QLDBLedgerLister{}, diff --git a/resources/rds-cluster-snapshots.go b/resources/rds-cluster-snapshots.go index f95ac98e..5bcc9097 100644 --- a/resources/rds-cluster-snapshots.go +++ b/resources/rds-cluster-snapshots.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/rds" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const RDSClusterSnapshotResource = "RDSClusterSnapshot" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: RDSClusterSnapshotResource, Scope: nuke.Account, Lister: &RDSClusterSnapshotLister{}, diff --git a/resources/rds-clusters.go b/resources/rds-clusters.go index f34d7b1c..04c844fb 100644 --- a/resources/rds-clusters.go +++ b/resources/rds-clusters.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/rds" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const RDSDBClusterResource = "RDSDBCluster" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: RDSDBClusterResource, Scope: nuke.Account, Lister: &RDSDBClusterLister{}, diff --git a/resources/rds-dbclusterparametergroups.go b/resources/rds-dbclusterparametergroups.go index 5fb8d784..18bf954a 100644 --- a/resources/rds-dbclusterparametergroups.go +++ b/resources/rds-dbclusterparametergroups.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/rds" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -18,7 +19,7 @@ import ( const RDSDBClusterParameterGroupResource = "RDSDBClusterParameterGroup" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: RDSDBClusterParameterGroupResource, Scope: nuke.Account, Lister: &RDSDBClusterParameterGroupLister{}, diff --git a/resources/rds-dbparametergroups.go b/resources/rds-dbparametergroups.go index df6738f1..e928788f 100644 --- a/resources/rds-dbparametergroups.go +++ b/resources/rds-dbparametergroups.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/rds" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -18,7 +19,7 @@ import ( const RDSDBParameterGroupResource = "RDSDBParameterGroup" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: RDSDBParameterGroupResource, Scope: nuke.Account, Lister: &RDSDBParameterGroupLister{}, diff --git a/resources/rds-event-subscriptions.go b/resources/rds-event-subscriptions.go index 770b9a54..f77866bb 100644 --- a/resources/rds-event-subscriptions.go +++ b/resources/rds-event-subscriptions.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/rds" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const RDSEventSubscriptionResource = "RDSEventSubscription" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: RDSEventSubscriptionResource, Scope: nuke.Account, Lister: &RDSEventSubscriptionLister{}, diff --git a/resources/rds-instances.go b/resources/rds-instances.go index 5154f528..efcfbaa0 100644 --- a/resources/rds-instances.go +++ b/resources/rds-instances.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/rds" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -18,7 +19,7 @@ import ( const RDSInstanceResource = "RDSInstance" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: RDSInstanceResource, Scope: nuke.Account, Lister: &RDSInstanceLister{}, diff --git a/resources/rds-optiongroups.go b/resources/rds-optiongroups.go index c37eafc7..1495db35 100644 --- a/resources/rds-optiongroups.go +++ b/resources/rds-optiongroups.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/rds" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -18,7 +19,7 @@ import ( const RDSOptionGroupResource = "RDSOptionGroup" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: RDSOptionGroupResource, Scope: nuke.Account, Lister: &RDSOptionGroupLister{}, diff --git a/resources/rds-proxies.go b/resources/rds-proxies.go index 4987b3e4..331db133 100644 --- a/resources/rds-proxies.go +++ b/resources/rds-proxies.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/rds" "github.com/ekristen/aws-nuke/pkg/nuke" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" ) @@ -12,7 +13,7 @@ import ( const RDSProxyResource = "RDSProxy" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: RDSProxyResource, Scope: nuke.Account, Lister: &RDSProxyLister{}, diff --git a/resources/rds-snapshots.go b/resources/rds-snapshots.go index a9d7ab98..6822efe0 100644 --- a/resources/rds-snapshots.go +++ b/resources/rds-snapshots.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/rds" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -18,7 +19,7 @@ import ( const RDSSnapshotResource = "RDSSnapshot" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: RDSSnapshotResource, Scope: nuke.Account, Lister: &RDSSnapshotLister{}, diff --git a/resources/rds-subnets.go b/resources/rds-subnets.go index 99d565d3..9a222ea0 100644 --- a/resources/rds-subnets.go +++ b/resources/rds-subnets.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/rds" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const RDSDBSubnetGroupResource = "RDSDBSubnetGroup" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: RDSDBSubnetGroupResource, Scope: nuke.Account, Lister: &RDSDBSubnetGroupLister{}, diff --git a/resources/redshift-clusters.go b/resources/redshift-clusters.go index 3d16c6d6..026f3202 100644 --- a/resources/redshift-clusters.go +++ b/resources/redshift-clusters.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/redshift" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const RedshiftClusterResource = "RedshiftCluster" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: RedshiftClusterResource, Scope: nuke.Account, Lister: &RedshiftClusterLister{}, diff --git a/resources/redshift-parametergroups.go b/resources/redshift-parametergroups.go index 0a20bb41..e043373e 100644 --- a/resources/redshift-parametergroups.go +++ b/resources/redshift-parametergroups.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/redshift" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -16,7 +17,7 @@ import ( const RedshiftParameterGroupResource = "RedshiftParameterGroup" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: RedshiftParameterGroupResource, Scope: nuke.Account, Lister: &RedshiftParameterGroupLister{}, diff --git a/resources/redshift-scheduled-action.go b/resources/redshift-scheduled-action.go index 5f67a5ba..cbb7bdc3 100644 --- a/resources/redshift-scheduled-action.go +++ b/resources/redshift-scheduled-action.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/redshift" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const RedshiftScheduledActionResource = "RedshiftScheduledAction" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: RedshiftScheduledActionResource, Scope: nuke.Account, Lister: &RedshiftScheduledActionLister{}, diff --git a/resources/redshift-snapshots.go b/resources/redshift-snapshots.go index b6672707..478f033a 100644 --- a/resources/redshift-snapshots.go +++ b/resources/redshift-snapshots.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/redshift" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const RedshiftSnapshotResource = "RedshiftSnapshot" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: RedshiftSnapshotResource, Scope: nuke.Account, Lister: &RedshiftSnapshotLister{}, diff --git a/resources/redshift-subnetgroups.go b/resources/redshift-subnetgroups.go index 66f22ce5..af9b8396 100644 --- a/resources/redshift-subnetgroups.go +++ b/resources/redshift-subnetgroups.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/redshift" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const RedshiftSubnetGroupResource = "RedshiftSubnetGroup" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: RedshiftSubnetGroupResource, Scope: nuke.Account, Lister: &RedshiftSubnetGroupLister{}, diff --git a/resources/rekognition-collection.go b/resources/rekognition-collection.go index 92a45eb7..875cd62f 100644 --- a/resources/rekognition-collection.go +++ b/resources/rekognition-collection.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/rekognition" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const RekognitionCollectionResource = "RekognitionCollection" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: RekognitionCollectionResource, Scope: nuke.Account, Lister: &RekognitionCollectionLister{}, diff --git a/resources/resource-explorer2-indexes.go b/resources/resource-explorer2-indexes.go index 1f029c90..14e4264b 100644 --- a/resources/resource-explorer2-indexes.go +++ b/resources/resource-explorer2-indexes.go @@ -6,13 +6,14 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/resourceexplorer2" "github.com/ekristen/aws-nuke/pkg/nuke" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" ) const ResourceExplorer2IndexResource = "ResourceExplorer2Index" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ResourceExplorer2IndexResource, Scope: nuke.Account, Lister: &ResourceExplorer2IndexLister{}, diff --git a/resources/resource-explorer2-views.go b/resources/resource-explorer2-views.go index 5f5afbcd..8a7c3173 100644 --- a/resources/resource-explorer2-views.go +++ b/resources/resource-explorer2-views.go @@ -6,13 +6,14 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/resourceexplorer2" "github.com/ekristen/aws-nuke/pkg/nuke" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" ) const ResourceExplorer2ViewResource = "ResourceExplorer2View" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ResourceExplorer2ViewResource, Scope: nuke.Account, Lister: &ResourceExplorer2ViewLister{}, diff --git a/resources/resourcegroups-groups.go b/resources/resourcegroups-groups.go index 200748f0..f365069b 100644 --- a/resources/resourcegroups-groups.go +++ b/resources/resourcegroups-groups.go @@ -6,13 +6,14 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/resourcegroups" "github.com/ekristen/aws-nuke/pkg/nuke" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" ) const ResourceGroupGroupResource = "ResourceGroupGroup" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ResourceGroupGroupResource, Scope: nuke.Account, Lister: &ResourceGroupGroupLister{}, diff --git a/resources/robomaker-robot-applications.go b/resources/robomaker-robot-applications.go index f2400d38..32e6cd4f 100644 --- a/resources/robomaker-robot-applications.go +++ b/resources/robomaker-robot-applications.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/robomaker" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const RoboMakerRobotApplicationResource = "RoboMakerRobotApplication" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: RoboMakerRobotApplicationResource, Scope: nuke.Account, Lister: &RoboMakerRobotApplicationLister{}, diff --git a/resources/robomaker-simulation-applications.go b/resources/robomaker-simulation-applications.go index 7027ca1a..900c75e4 100644 --- a/resources/robomaker-simulation-applications.go +++ b/resources/robomaker-simulation-applications.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/robomaker" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const RoboMakerSimulationApplicationResource = "RoboMakerSimulationApplication" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: RoboMakerSimulationApplicationResource, Scope: nuke.Account, Lister: &RoboMakerSimulationApplicationLister{}, diff --git a/resources/robomaker-simulation-jobs.go b/resources/robomaker-simulation-jobs.go index 0aa83280..63fc4548 100644 --- a/resources/robomaker-simulation-jobs.go +++ b/resources/robomaker-simulation-jobs.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/robomaker" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const RoboMakerSimulationJobResource = "RoboMakerSimulationJob" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: RoboMakerSimulationJobResource, Scope: nuke.Account, Lister: &RoboMakerSimulationJobLister{}, diff --git a/resources/route53-health-checks.go b/resources/route53-health-checks.go index 8e32b4d7..734077ae 100644 --- a/resources/route53-health-checks.go +++ b/resources/route53-health-checks.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/route53" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const Route53HealthCheckResource = "Route53HealthCheck" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: Route53HealthCheckResource, Scope: nuke.Account, Lister: &Route53HealthCheckLister{}, diff --git a/resources/route53-hosted-zones.go b/resources/route53-hosted-zones.go index 6e820a84..938352d9 100644 --- a/resources/route53-hosted-zones.go +++ b/resources/route53-hosted-zones.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/route53" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const Route53HostedZoneResource = "Route53HostedZone" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: Route53HostedZoneResource, Scope: nuke.Account, Lister: &Route53HostedZoneLister{}, diff --git a/resources/route53-resolver-endpoints.go b/resources/route53-resolver-endpoints.go index bc8126bb..43f62df0 100644 --- a/resources/route53-resolver-endpoints.go +++ b/resources/route53-resolver-endpoints.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/route53resolver" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -16,7 +17,7 @@ import ( const Route53ResolverEndpointResource = "Route53ResolverEndpoint" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: Route53ResolverEndpointResource, Scope: nuke.Account, Lister: &Route53ResolverEndpointLister{}, diff --git a/resources/route53-resolver-rules.go b/resources/route53-resolver-rules.go index f5936055..10782f8e 100644 --- a/resources/route53-resolver-rules.go +++ b/resources/route53-resolver-rules.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/service/route53resolver" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -18,7 +19,7 @@ import ( const Route53ResolverRuleResource = "Route53ResolverRule" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: Route53ResolverRuleResource, Scope: nuke.Account, Lister: &Route53ResolverRuleLister{}, diff --git a/resources/route53-resource-records.go b/resources/route53-resource-records.go index 4ee9baf0..85f7bf80 100644 --- a/resources/route53-resource-records.go +++ b/resources/route53-resource-records.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/route53" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const Route53ResourceRecordSetResource = "Route53ResourceRecordSet" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: Route53ResourceRecordSetResource, Scope: nuke.Account, Lister: &Route53ResourceRecordSetLister{}, diff --git a/resources/route53-traffic-policies.go b/resources/route53-traffic-policies.go index a0299ec5..17aca937 100644 --- a/resources/route53-traffic-policies.go +++ b/resources/route53-traffic-policies.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/route53" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const Route53TrafficPolicyResource = "Route53TrafficPolicy" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: Route53TrafficPolicyResource, Scope: nuke.Account, Lister: &Route53TrafficPolicyLister{}, diff --git a/resources/s3-access-points.go b/resources/s3-access-points.go index 0793c96e..aec6eb0f 100644 --- a/resources/s3-access-points.go +++ b/resources/s3-access-points.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/service/s3control" "github.com/aws/aws-sdk-go/service/sts" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -18,7 +19,7 @@ import ( const S3AccessPointResource = "S3AccessPoint" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: S3AccessPointResource, Scope: nuke.Account, Lister: &S3AccessPointLister{}, diff --git a/resources/s3-buckets.go b/resources/s3-buckets.go index 41a91ab9..1b588e0d 100644 --- a/resources/s3-buckets.go +++ b/resources/s3-buckets.go @@ -16,6 +16,7 @@ import ( "github.com/aws/aws-sdk-go/service/s3/s3iface" "github.com/aws/aws-sdk-go/service/s3/s3manager" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -25,7 +26,7 @@ import ( const S3BucketResource = "S3Bucket" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: S3BucketResource, Scope: nuke.Account, Lister: &S3BucketLister{}, diff --git a/resources/s3-multipart-uploads.go b/resources/s3-multipart-uploads.go index e4f18978..d5b9a437 100644 --- a/resources/s3-multipart-uploads.go +++ b/resources/s3-multipart-uploads.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/s3" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const S3MultipartUploadResource = "S3MultipartUpload" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: S3MultipartUploadResource, Scope: nuke.Account, Lister: &S3MultipartUploadLister{}, diff --git a/resources/s3-objects.go b/resources/s3-objects.go index 56a98e81..4c854f96 100644 --- a/resources/s3-objects.go +++ b/resources/s3-objects.go @@ -11,6 +11,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/s3" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -20,7 +21,7 @@ import ( const S3ObjectResource = "S3Object" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: S3ObjectResource, Scope: nuke.Account, Lister: &S3ObjectLister{}, diff --git a/resources/sagemaker-apps.go b/resources/sagemaker-apps.go index 68bb68b2..d510c3fc 100644 --- a/resources/sagemaker-apps.go +++ b/resources/sagemaker-apps.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/sagemaker" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const SageMakerAppResource = "SageMakerApp" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: SageMakerAppResource, Scope: nuke.Account, Lister: &SageMakerAppLister{}, diff --git a/resources/sagemaker-domain.go b/resources/sagemaker-domain.go index 7dd2590e..5c715ba8 100644 --- a/resources/sagemaker-domain.go +++ b/resources/sagemaker-domain.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/sagemaker" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const SageMakerDomainResource = "SageMakerDomain" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: SageMakerDomainResource, Scope: nuke.Account, Lister: &SageMakerDomainLister{}, diff --git a/resources/sagemaker-endpointconfigs.go b/resources/sagemaker-endpointconfigs.go index 1b3ffa8a..7ab25ffc 100644 --- a/resources/sagemaker-endpointconfigs.go +++ b/resources/sagemaker-endpointconfigs.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/sagemaker" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const SageMakerEndpointConfigResource = "SageMakerEndpointConfig" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: SageMakerEndpointConfigResource, Scope: nuke.Account, Lister: &SageMakerEndpointConfigLister{}, diff --git a/resources/sagemaker-endpoints.go b/resources/sagemaker-endpoints.go index 48ccb578..c31c0a9a 100644 --- a/resources/sagemaker-endpoints.go +++ b/resources/sagemaker-endpoints.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/sagemaker" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const SageMakerEndpointResource = "SageMakerEndpoint" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: SageMakerEndpointResource, Scope: nuke.Account, Lister: &SageMakerEndpointLister{}, diff --git a/resources/sagemaker-models.go b/resources/sagemaker-models.go index 00f3c72f..40cf80d3 100644 --- a/resources/sagemaker-models.go +++ b/resources/sagemaker-models.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/sagemaker" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const SageMakerModelResource = "SageMakerModel" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: SageMakerModelResource, Scope: nuke.Account, Lister: &SageMakerModelLister{}, diff --git a/resources/sagemaker-notebook-instancelifecycleconfigs.go b/resources/sagemaker-notebook-instancelifecycleconfigs.go index ea676ac7..9e1dfa1a 100644 --- a/resources/sagemaker-notebook-instancelifecycleconfigs.go +++ b/resources/sagemaker-notebook-instancelifecycleconfigs.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/sagemaker" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const SageMakerNotebookInstanceLifecycleConfigResource = "SageMakerNotebookInstanceLifecycleConfig" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: SageMakerNotebookInstanceLifecycleConfigResource, Scope: nuke.Account, Lister: &SageMakerNotebookInstanceLifecycleConfigLister{}, diff --git a/resources/sagemaker-notebook-instances.go b/resources/sagemaker-notebook-instances.go index 778be7fa..a5733936 100644 --- a/resources/sagemaker-notebook-instances.go +++ b/resources/sagemaker-notebook-instances.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/sagemaker" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const SageMakerNotebookInstanceResource = "SageMakerNotebookInstance" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: SageMakerNotebookInstanceResource, Scope: nuke.Account, Lister: &SageMakerNotebookInstanceLister{}, diff --git a/resources/sagemaker-notebook-instancestates.go b/resources/sagemaker-notebook-instancestates.go index 74d73426..95d79f74 100644 --- a/resources/sagemaker-notebook-instancestates.go +++ b/resources/sagemaker-notebook-instancestates.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/sagemaker" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -17,7 +18,7 @@ import ( const SageMakerNotebookInstanceStateResource = "SageMakerNotebookInstanceState" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: SageMakerNotebookInstanceStateResource, Scope: nuke.Account, Lister: &SageMakerNotebookInstanceStateLister{}, diff --git a/resources/sagemaker-userprofiles.go b/resources/sagemaker-userprofiles.go index 53971909..7261ec07 100644 --- a/resources/sagemaker-userprofiles.go +++ b/resources/sagemaker-userprofiles.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/sagemaker" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const SageMakerUserProfilesResource = "SageMakerUserProfiles" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: SageMakerUserProfilesResource, Scope: nuke.Account, Lister: &SageMakerUserProfilesLister{}, diff --git a/resources/secretsmanager-secrets.go b/resources/secretsmanager-secrets.go index ad4957bb..b3d8df3f 100644 --- a/resources/secretsmanager-secrets.go +++ b/resources/secretsmanager-secrets.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/secretsmanager" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const SecretsManagerSecretResource = "SecretsManagerSecret" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: SecretsManagerSecretResource, Scope: nuke.Account, Lister: &SecretsManagerSecretLister{}, diff --git a/resources/securityhub-hub.go b/resources/securityhub-hub.go index 6cbb295c..61cb40e5 100644 --- a/resources/securityhub-hub.go +++ b/resources/securityhub-hub.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/securityhub" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const SecurityHubResource = "SecurityHub" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: SecurityHubResource, Scope: nuke.Account, Lister: &SecurityHubLister{}, diff --git a/resources/servicecatalog-portfolio-constraints-attachments.go b/resources/servicecatalog-portfolio-constraints-attachments.go index 1239dc17..56d190fd 100644 --- a/resources/servicecatalog-portfolio-constraints-attachments.go +++ b/resources/servicecatalog-portfolio-constraints-attachments.go @@ -10,6 +10,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/servicecatalog" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -20,7 +21,7 @@ import ( const ServiceCatalogConstraintPortfolioAttachmentResource = "ServiceCatalogConstraintPortfolioAttachment" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ServiceCatalogConstraintPortfolioAttachmentResource, Scope: nuke.Account, Lister: &ServiceCatalogConstraintPortfolioAttachmentLister{}, diff --git a/resources/servicecatalog-portfolio-principal-attachments.go b/resources/servicecatalog-portfolio-principal-attachments.go index 9b9be5e2..29c61c3e 100644 --- a/resources/servicecatalog-portfolio-principal-attachments.go +++ b/resources/servicecatalog-portfolio-principal-attachments.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/servicecatalog" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const ServiceCatalogPrincipalPortfolioAttachmentResource = "ServiceCatalogPrincipalPortfolioAttachment" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ServiceCatalogPrincipalPortfolioAttachmentResource, Scope: nuke.Account, Lister: &ServiceCatalogPrincipalPortfolioAttachmentLister{}, diff --git a/resources/servicecatalog-portfolio-product-attachments.go b/resources/servicecatalog-portfolio-product-attachments.go index 15faabaf..fdcfa797 100644 --- a/resources/servicecatalog-portfolio-product-attachments.go +++ b/resources/servicecatalog-portfolio-product-attachments.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/servicecatalog" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const ServiceCatalogPortfolioProductAttachmentResource = "ServiceCatalogPortfolioProductAttachment" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ServiceCatalogPortfolioProductAttachmentResource, Scope: nuke.Account, Lister: &ServiceCatalogPortfolioProductAttachmentLister{}, diff --git a/resources/servicecatalog-portfolio-share-attachments.go b/resources/servicecatalog-portfolio-share-attachments.go index 2764540b..4ef50ec1 100644 --- a/resources/servicecatalog-portfolio-share-attachments.go +++ b/resources/servicecatalog-portfolio-share-attachments.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/servicecatalog" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const ServiceCatalogPortfolioShareAttachmentResource = "ServiceCatalogPortfolioShareAttachment" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ServiceCatalogPortfolioShareAttachmentResource, Scope: nuke.Account, Lister: &ServiceCatalogPortfolioShareAttachmentLister{}, diff --git a/resources/servicecatalog-portfolio-tagoptions-attachements.go b/resources/servicecatalog-portfolio-tagoptions-attachements.go index 2c0fb2f8..d851824e 100644 --- a/resources/servicecatalog-portfolio-tagoptions-attachements.go +++ b/resources/servicecatalog-portfolio-tagoptions-attachements.go @@ -10,6 +10,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/servicecatalog" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -20,7 +21,7 @@ import ( const ServiceCatalogTagOptionPortfolioAttachmentResource = "ServiceCatalogTagOptionPortfolioAttachment" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ServiceCatalogTagOptionPortfolioAttachmentResource, Scope: nuke.Account, Lister: &ServiceCatalogTagOptionPortfolioAttachmentLister{}, diff --git a/resources/servicecatalog-portfolios.go b/resources/servicecatalog-portfolios.go index af5a8c83..de7f6b16 100644 --- a/resources/servicecatalog-portfolios.go +++ b/resources/servicecatalog-portfolios.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/servicecatalog" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const ServiceCatalogPortfolioResource = "ServiceCatalogPortfolio" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ServiceCatalogPortfolioResource, Scope: nuke.Account, Lister: &ServiceCatalogPortfolioLister{}, diff --git a/resources/servicecatalog-products.go b/resources/servicecatalog-products.go index b457d1ec..47dcd6b3 100644 --- a/resources/servicecatalog-products.go +++ b/resources/servicecatalog-products.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/servicecatalog" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const ServiceCatalogProductResource = "ServiceCatalogProduct" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ServiceCatalogProductResource, Scope: nuke.Account, Lister: &ServiceCatalogProductLister{}, diff --git a/resources/servicecatalog-provisionedproducts.go b/resources/servicecatalog-provisionedproducts.go index 5a151128..5cac6920 100644 --- a/resources/servicecatalog-provisionedproducts.go +++ b/resources/servicecatalog-provisionedproducts.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/servicecatalog" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const ServiceCatalogProvisionedProductResource = "ServiceCatalogProvisionedProduct" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ServiceCatalogProvisionedProductResource, Scope: nuke.Account, Lister: &ServiceCatalogProvisionedProductLister{}, diff --git a/resources/servicecatalog-tagoptions.go b/resources/servicecatalog-tagoptions.go index 9b512934..1893fb13 100644 --- a/resources/servicecatalog-tagoptions.go +++ b/resources/servicecatalog-tagoptions.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/servicecatalog" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -18,7 +19,7 @@ import ( const ServiceCatalogTagOptionResource = "ServiceCatalogTagOption" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ServiceCatalogTagOptionResource, Scope: nuke.Account, Lister: &ServiceCatalogTagOptionLister{}, diff --git a/resources/servicediscovery-instances.go b/resources/servicediscovery-instances.go index a28334e0..e7029e31 100644 --- a/resources/servicediscovery-instances.go +++ b/resources/servicediscovery-instances.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/servicediscovery" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -16,7 +17,7 @@ import ( const ServiceDiscoveryInstanceResource = "ServiceDiscoveryInstance" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ServiceDiscoveryInstanceResource, Scope: nuke.Account, Lister: &ServiceDiscoveryInstanceLister{}, diff --git a/resources/servicediscovery-namespaces.go b/resources/servicediscovery-namespaces.go index fd9a597f..add9a0d8 100644 --- a/resources/servicediscovery-namespaces.go +++ b/resources/servicediscovery-namespaces.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/servicediscovery" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const ServiceDiscoveryNamespaceResource = "ServiceDiscoveryNamespace" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ServiceDiscoveryNamespaceResource, Scope: nuke.Account, Lister: &ServiceDiscoveryNamespaceLister{}, diff --git a/resources/servicediscovery-services.go b/resources/servicediscovery-services.go index 634b5088..b3d9ca19 100644 --- a/resources/servicediscovery-services.go +++ b/resources/servicediscovery-services.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/servicediscovery" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const ServiceDiscoveryServiceResource = "ServiceDiscoveryService" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: ServiceDiscoveryServiceResource, Scope: nuke.Account, Lister: &ServiceDiscoveryServiceLister{}, diff --git a/resources/ses-configurationsets.go b/resources/ses-configurationsets.go index 692c3f5b..e253d9a6 100644 --- a/resources/ses-configurationsets.go +++ b/resources/ses-configurationsets.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ses" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const SESConfigurationSetResource = "SESConfigurationSet" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: SESConfigurationSetResource, Scope: nuke.Account, Lister: &SESConfigurationSetLister{}, diff --git a/resources/ses-identities.go b/resources/ses-identities.go index 4babd2e3..589693ee 100644 --- a/resources/ses-identities.go +++ b/resources/ses-identities.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ses" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const SESIdentityResource = "SESIdentity" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: SESIdentityResource, Scope: nuke.Account, Lister: &SESIdentityLister{}, diff --git a/resources/ses-receiptfilters.go b/resources/ses-receiptfilters.go index daaf38b5..112817b8 100644 --- a/resources/ses-receiptfilters.go +++ b/resources/ses-receiptfilters.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/service/ses" sdkerrors "github.com/ekristen/libnuke/pkg/errors" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -17,7 +18,7 @@ import ( const SESReceiptFilterResource = "SESReceiptFilter" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: SESReceiptFilterResource, Scope: nuke.Account, Lister: &SESReceiptFilterLister{}, diff --git a/resources/ses-receiptrulesets.go b/resources/ses-receiptrulesets.go index c41919ee..7008c5e2 100644 --- a/resources/ses-receiptrulesets.go +++ b/resources/ses-receiptrulesets.go @@ -10,6 +10,7 @@ import ( "github.com/aws/aws-sdk-go/service/ses" sdkerrors "github.com/ekristen/libnuke/pkg/errors" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -18,7 +19,7 @@ import ( const SESReceiptRuleSetResource = "SESReceiptRuleSet" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: SESReceiptRuleSetResource, Scope: nuke.Account, Lister: &SESReceiptRuleSetLister{}, diff --git a/resources/ses-templates.go b/resources/ses-templates.go index f953efae..628f5ed4 100644 --- a/resources/ses-templates.go +++ b/resources/ses-templates.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ses" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const SESTemplateResource = "SESTemplate" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: SESTemplateResource, Scope: nuke.Account, Lister: &SESTemplateLister{}, diff --git a/resources/sfn-statemachines.go b/resources/sfn-statemachines.go index 74be8579..397c2c56 100644 --- a/resources/sfn-statemachines.go +++ b/resources/sfn-statemachines.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/sfn" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const SFNStateMachineResource = "SFNStateMachine" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: SFNStateMachineResource, Scope: nuke.Account, Lister: &SFNStateMachineLister{}, diff --git a/resources/signer-signingjobs.go b/resources/signer-signingjobs.go index 88ded25a..9387ed85 100644 --- a/resources/signer-signingjobs.go +++ b/resources/signer-signingjobs.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/signer" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -18,7 +19,7 @@ import ( const SignerSigningJobResource = "SignerSigningJob" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: SignerSigningJobResource, Scope: nuke.Account, Lister: &SignerSigningJobLister{}, diff --git a/resources/simpledb-domains.go b/resources/simpledb-domains.go index 26a493cc..68ee7626 100644 --- a/resources/simpledb-domains.go +++ b/resources/simpledb-domains.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/simpledb" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const SimpleDBDomainResource = "SimpleDBDomain" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: SimpleDBDomainResource, Scope: nuke.Account, Lister: &SimpleDBDomainLister{}, diff --git a/resources/sns-endpoints.go b/resources/sns-endpoints.go index 4e98eb5b..a18507dc 100644 --- a/resources/sns-endpoints.go +++ b/resources/sns-endpoints.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/sns" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -15,7 +16,7 @@ import ( const SNSEndpointResource = "SNSEndpoint" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: SNSEndpointResource, Scope: nuke.Account, Lister: &SNSEndpointLister{}, diff --git a/resources/sns-platformapplications.go b/resources/sns-platformapplications.go index da4b0ba0..6269f703 100644 --- a/resources/sns-platformapplications.go +++ b/resources/sns-platformapplications.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/sns" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -15,7 +16,7 @@ import ( const SNSPlatformApplicationResource = "SNSPlatformApplication" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: SNSPlatformApplicationResource, Scope: nuke.Account, Lister: &SNSPlatformApplicationLister{}, diff --git a/resources/sns-subscriptions.go b/resources/sns-subscriptions.go index 57b0368e..fa998b44 100644 --- a/resources/sns-subscriptions.go +++ b/resources/sns-subscriptions.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/sns" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -15,7 +16,7 @@ import ( const SNSSubscriptionResource = "SNSSubscription" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: SNSSubscriptionResource, Scope: nuke.Account, Lister: &SNSSubscriptionLister{}, diff --git a/resources/sns-topics.go b/resources/sns-topics.go index 42b96ad9..2c375de4 100644 --- a/resources/sns-topics.go +++ b/resources/sns-topics.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/sns" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -16,7 +17,7 @@ import ( const SNSTopicResource = "SNSTopic" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: SNSTopicResource, Scope: nuke.Account, Lister: &SNSTopicLister{}, diff --git a/resources/sqs-queues.go b/resources/sqs-queues.go index 60ca59ab..5cb78f42 100644 --- a/resources/sqs-queues.go +++ b/resources/sqs-queues.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/sqs" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -15,7 +16,7 @@ import ( const SQSQueueResource = "SQSQueue" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: SQSQueueResource, Scope: nuke.Account, Lister: &SQSQueueLister{}, diff --git a/resources/ssm-activations.go b/resources/ssm-activations.go index ec5931e9..ada54582 100644 --- a/resources/ssm-activations.go +++ b/resources/ssm-activations.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/ssm" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -15,7 +16,7 @@ import ( const SSMActivationResource = "SSMActivation" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: SSMActivationResource, Scope: nuke.Account, Lister: &SSMActivationLister{}, diff --git a/resources/ssm-associations.go b/resources/ssm-associations.go index 07783226..fb3aa81c 100644 --- a/resources/ssm-associations.go +++ b/resources/ssm-associations.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ssm" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const SSMAssociationResource = "SSMAssociation" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: SSMAssociationResource, Scope: nuke.Account, Lister: &SSMAssociationLister{}, diff --git a/resources/ssm-documents.go b/resources/ssm-documents.go index 2a589a33..5ebebbb9 100644 --- a/resources/ssm-documents.go +++ b/resources/ssm-documents.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ssm" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const SSMDocumentResource = "SSMDocument" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: SSMDocumentResource, Scope: nuke.Account, Lister: &SSMDocumentLister{}, diff --git a/resources/ssm-maintenancewindows.go b/resources/ssm-maintenancewindows.go index 5a1c8b88..bdba1f05 100644 --- a/resources/ssm-maintenancewindows.go +++ b/resources/ssm-maintenancewindows.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ssm" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const SSMMaintenanceWindowResource = "SSMMaintenanceWindow" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: SSMMaintenanceWindowResource, Scope: nuke.Account, Lister: &SSMMaintenanceWindowLister{}, diff --git a/resources/ssm-parameters.go b/resources/ssm-parameters.go index 2675b8d3..874cf7a5 100644 --- a/resources/ssm-parameters.go +++ b/resources/ssm-parameters.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ssm" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const SSMParameterResource = "SSMParameter" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: SSMParameterResource, Scope: nuke.Account, Lister: &SSMParameterLister{}, diff --git a/resources/ssm-patchbaselines.go b/resources/ssm-patchbaselines.go index e24f6575..5d1c81f6 100644 --- a/resources/ssm-patchbaselines.go +++ b/resources/ssm-patchbaselines.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ssm" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -16,7 +17,7 @@ import ( const SSMPatchBaselineResource = "SSMPatchBaseline" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: SSMPatchBaselineResource, Scope: nuke.Account, Lister: &SSMPatchBaselineLister{}, diff --git a/resources/ssm-resourcedatasyncs.go b/resources/ssm-resourcedatasyncs.go index a09d7ab9..671b70a4 100644 --- a/resources/ssm-resourcedatasyncs.go +++ b/resources/ssm-resourcedatasyncs.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ssm" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const SSMResourceDataSyncResource = "SSMResourceDataSync" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: SSMResourceDataSyncResource, Scope: nuke.Account, Lister: &SSMResourceDataSyncLister{}, diff --git a/resources/storagegateway-fileshares.go b/resources/storagegateway-fileshares.go index 5e48a02b..46b4bcd1 100644 --- a/resources/storagegateway-fileshares.go +++ b/resources/storagegateway-fileshares.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/storagegateway" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const StorageGatewayFileShareResource = "StorageGatewayFileShare" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: StorageGatewayFileShareResource, Scope: nuke.Account, Lister: &StorageGatewayFileShareLister{}, diff --git a/resources/storagegateway-gateways.go b/resources/storagegateway-gateways.go index eb398e63..8f66da68 100644 --- a/resources/storagegateway-gateways.go +++ b/resources/storagegateway-gateways.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/storagegateway" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const StorageGatewayGatewayResource = "StorageGatewayGateway" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: StorageGatewayGatewayResource, Scope: nuke.Account, Lister: &StorageGatewayGatewayLister{}, diff --git a/resources/storagegateway-tapes.go b/resources/storagegateway-tapes.go index 2d201061..5016e8c6 100644 --- a/resources/storagegateway-tapes.go +++ b/resources/storagegateway-tapes.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/storagegateway" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const StorageGatewayTapeResource = "StorageGatewayTape" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: StorageGatewayTapeResource, Scope: nuke.Account, Lister: &StorageGatewayTapeLister{}, diff --git a/resources/storagegateway-volumes.go b/resources/storagegateway-volumes.go index c2c22fa6..83364b00 100644 --- a/resources/storagegateway-volumes.go +++ b/resources/storagegateway-volumes.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/storagegateway" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const StorageGatewayVolumeResource = "StorageGatewayVolume" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: StorageGatewayVolumeResource, Scope: nuke.Account, Lister: &StorageGatewayVolumeLister{}, diff --git a/resources/transfer-server-user.go b/resources/transfer-server-user.go index 466685f9..d2fda6ea 100644 --- a/resources/transfer-server-user.go +++ b/resources/transfer-server-user.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/transfer" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const TransferServerUserResource = "TransferServerUser" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: TransferServerUserResource, Scope: nuke.Account, Lister: &TransferServerUserLister{}, diff --git a/resources/transfer-server.go b/resources/transfer-server.go index 2d4f32ab..8e5240e6 100644 --- a/resources/transfer-server.go +++ b/resources/transfer-server.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/transfer" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -17,7 +18,7 @@ import ( const TransferServerResource = "TransferServer" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: TransferServerResource, Scope: nuke.Account, Lister: &TransferServerLister{}, diff --git a/resources/waf-rules.go b/resources/waf-rules.go index fd011d08..cb38b908 100644 --- a/resources/waf-rules.go +++ b/resources/waf-rules.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/waf" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const WAFRuleResource = "WAFRule" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: WAFRuleResource, Scope: nuke.Account, Lister: &WAFRuleLister{}, diff --git a/resources/waf-webacl-rule-attachments.go b/resources/waf-webacl-rule-attachments.go index c081f401..758cab03 100644 --- a/resources/waf-webacl-rule-attachments.go +++ b/resources/waf-webacl-rule-attachments.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/waf" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -16,7 +17,7 @@ import ( const WAFWebACLRuleAttachmentResource = "WAFWebACLRuleAttachment" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: WAFWebACLRuleAttachmentResource, Scope: nuke.Account, Lister: &WAFWebACLRuleAttachmentLister{}, diff --git a/resources/waf-webacls.go b/resources/waf-webacls.go index b72e42d0..3f0c50b1 100644 --- a/resources/waf-webacls.go +++ b/resources/waf-webacls.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/waf" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const WAFWebACLResource = "WAFWebACL" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: WAFWebACLResource, Scope: nuke.Account, Lister: &WAFWebACLLister{}, diff --git a/resources/wafregional-byte-match-set-tuples.go b/resources/wafregional-byte-match-set-tuples.go index 29061efd..c1baea47 100644 --- a/resources/wafregional-byte-match-set-tuples.go +++ b/resources/wafregional-byte-match-set-tuples.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/waf" "github.com/aws/aws-sdk-go/service/wafregional" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -16,7 +17,7 @@ import ( const WAFRegionalByteMatchSetIPResource = "WAFRegionalByteMatchSetIP" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: WAFRegionalByteMatchSetIPResource, Scope: nuke.Account, Lister: &WAFRegionalByteMatchSetIPLister{}, diff --git a/resources/wafregional-byte-match-sets.go b/resources/wafregional-byte-match-sets.go index abfd2cf2..50308454 100644 --- a/resources/wafregional-byte-match-sets.go +++ b/resources/wafregional-byte-match-sets.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/waf" "github.com/aws/aws-sdk-go/service/wafregional" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -16,7 +17,7 @@ import ( const WAFRegionalByteMatchSetResource = "WAFRegionalByteMatchSet" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: WAFRegionalByteMatchSetResource, Scope: nuke.Account, Lister: &WAFRegionalByteMatchSetLister{}, diff --git a/resources/wafregional-ip-set-ips.go b/resources/wafregional-ip-set-ips.go index 5bc7fe10..afe75e87 100644 --- a/resources/wafregional-ip-set-ips.go +++ b/resources/wafregional-ip-set-ips.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/waf" "github.com/aws/aws-sdk-go/service/wafregional" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -16,7 +17,7 @@ import ( const WAFRegionalIPSetIPResource = "WAFRegionalIPSetIP" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: WAFRegionalIPSetIPResource, Scope: nuke.Account, Lister: &WAFRegionalIPSetIPLister{}, diff --git a/resources/wafregional-ip-sets.go b/resources/wafregional-ip-sets.go index 0bececdd..798bbf13 100644 --- a/resources/wafregional-ip-sets.go +++ b/resources/wafregional-ip-sets.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/waf" "github.com/aws/aws-sdk-go/service/wafregional" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -16,7 +17,7 @@ import ( const WAFRegionalIPSetResource = "WAFRegionalIPSet" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: WAFRegionalIPSetResource, Scope: nuke.Account, Lister: &WAFRegionalIPSetLister{}, diff --git a/resources/wafregional-rate-based-rule-predicates.go b/resources/wafregional-rate-based-rule-predicates.go index c79cfb97..b4a90218 100644 --- a/resources/wafregional-rate-based-rule-predicates.go +++ b/resources/wafregional-rate-based-rule-predicates.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/waf" "github.com/aws/aws-sdk-go/service/wafregional" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -16,7 +17,7 @@ import ( const WAFRegionalRateBasedRulePredicateResource = "WAFRegionalRateBasedRulePredicate" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: WAFRegionalRateBasedRulePredicateResource, Scope: nuke.Account, Lister: &WAFRegionalRateBasedRulePredicateLister{}, diff --git a/resources/wafregional-rate-based-rules.go b/resources/wafregional-rate-based-rules.go index b0325924..dcf5baf8 100644 --- a/resources/wafregional-rate-based-rules.go +++ b/resources/wafregional-rate-based-rules.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/waf" "github.com/aws/aws-sdk-go/service/wafregional" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -15,7 +16,7 @@ import ( const WAFRegionalRateBasedRuleResource = "WAFRegionalRateBasedRule" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: WAFRegionalRateBasedRuleResource, Scope: nuke.Account, Lister: &WAFRegionalRateBasedRuleLister{}, diff --git a/resources/wafregional-regex-match-sets.go b/resources/wafregional-regex-match-sets.go index 57fd9185..96348921 100644 --- a/resources/wafregional-regex-match-sets.go +++ b/resources/wafregional-regex-match-sets.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/waf" "github.com/aws/aws-sdk-go/service/wafregional" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -16,7 +17,7 @@ import ( const WAFRegionalRegexMatchSetResource = "WAFRegionalRegexMatchSet" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: WAFRegionalRegexMatchSetResource, Scope: nuke.Account, Lister: &WAFRegionalRegexMatchSetLister{}, diff --git a/resources/wafregional-regex-match-tuples.go b/resources/wafregional-regex-match-tuples.go index f6da657e..69ebf0c8 100644 --- a/resources/wafregional-regex-match-tuples.go +++ b/resources/wafregional-regex-match-tuples.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/waf" "github.com/aws/aws-sdk-go/service/wafregional" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -16,7 +17,7 @@ import ( const WAFRegionalRegexMatchTupleResource = "WAFRegionalRegexMatchTuple" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: WAFRegionalRegexMatchTupleResource, Scope: nuke.Account, Lister: &WAFRegionalRegexMatchTupleLister{}, diff --git a/resources/wafregional-regex-pattern-sets.go b/resources/wafregional-regex-pattern-sets.go index 18a65b3a..d94313de 100644 --- a/resources/wafregional-regex-pattern-sets.go +++ b/resources/wafregional-regex-pattern-sets.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/waf" "github.com/aws/aws-sdk-go/service/wafregional" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -16,7 +17,7 @@ import ( const WAFRegionalRegexPatternSetResource = "WAFRegionalRegexPatternSet" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: WAFRegionalRegexPatternSetResource, Scope: nuke.Account, Lister: &WAFRegionalRegexPatternSetLister{}, diff --git a/resources/wafregional-regex-pattern-tuples.go b/resources/wafregional-regex-pattern-tuples.go index 7b45b779..7587a86a 100644 --- a/resources/wafregional-regex-pattern-tuples.go +++ b/resources/wafregional-regex-pattern-tuples.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/waf" "github.com/aws/aws-sdk-go/service/wafregional" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -16,7 +17,7 @@ import ( const WAFRegionalRegexPatternStringResource = "WAFRegionalRegexPatternString" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: WAFRegionalRegexPatternStringResource, Scope: nuke.Account, Lister: &WAFRegionalRegexPatternStringLister{}, diff --git a/resources/wafregional-rule-predicates.go b/resources/wafregional-rule-predicates.go index 467f9657..6ba8c271 100644 --- a/resources/wafregional-rule-predicates.go +++ b/resources/wafregional-rule-predicates.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/waf" "github.com/aws/aws-sdk-go/service/wafregional" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -16,7 +17,7 @@ import ( const WAFRegionalRulePredicateResource = "WAFRegionalRulePredicate" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: WAFRegionalRulePredicateResource, Scope: nuke.Account, Lister: &WAFRegionalRulePredicateLister{}, diff --git a/resources/wafregional-rulegroup.go b/resources/wafregional-rulegroup.go index 9e69b3bd..21adf5bf 100644 --- a/resources/wafregional-rulegroup.go +++ b/resources/wafregional-rulegroup.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/waf" "github.com/aws/aws-sdk-go/service/wafregional" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -16,7 +17,7 @@ import ( const WAFRegionalRuleGroupResource = "WAFRegionalRuleGroup" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: WAFRegionalRuleGroupResource, Scope: nuke.Account, Lister: &WAFRegionalRuleGroupLister{}, diff --git a/resources/wafregional-rules.go b/resources/wafregional-rules.go index 2e8c6fe9..8a505127 100644 --- a/resources/wafregional-rules.go +++ b/resources/wafregional-rules.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/waf" "github.com/aws/aws-sdk-go/service/wafregional" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -16,7 +17,7 @@ import ( const WAFRegionalRuleResource = "WAFRegionalRule" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: WAFRegionalRuleResource, Scope: nuke.Account, Lister: &WAFRegionalRuleLister{}, diff --git a/resources/wafregional-webacl-rule-attachments.go b/resources/wafregional-webacl-rule-attachments.go index 09da956c..9220f314 100644 --- a/resources/wafregional-webacl-rule-attachments.go +++ b/resources/wafregional-webacl-rule-attachments.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/service/waf" "github.com/aws/aws-sdk-go/service/wafregional" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -17,7 +18,7 @@ import ( const WAFRegionalWebACLRuleAttachmentResource = "WAFRegionalWebACLRuleAttachment" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: WAFRegionalWebACLRuleAttachmentResource, Scope: nuke.Account, Lister: &WAFRegionalWebACLRuleAttachmentLister{}, diff --git a/resources/wafregional-webacls.go b/resources/wafregional-webacls.go index 208f416f..e47d6260 100644 --- a/resources/wafregional-webacls.go +++ b/resources/wafregional-webacls.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/waf" "github.com/aws/aws-sdk-go/service/wafregional" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -22,7 +23,7 @@ type WAFRegionalWebACL struct { const WAFRegionalWebACLResource = "WAFRegionalWebACL" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: WAFRegionalWebACLResource, Scope: nuke.Account, Lister: &WAFRegionalWebACLLister{}, diff --git a/resources/wafv2-ipsets.go b/resources/wafv2-ipsets.go index 0e40dd36..70731173 100644 --- a/resources/wafv2-ipsets.go +++ b/resources/wafv2-ipsets.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/wafv2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const WAFv2IPSetResource = "WAFv2IPSet" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: WAFv2IPSetResource, Scope: nuke.Account, Lister: &WAFv2IPSetLister{}, diff --git a/resources/wafv2-regex-pattern-sets.go b/resources/wafv2-regex-pattern-sets.go index 6a40696f..b9d94b9f 100644 --- a/resources/wafv2-regex-pattern-sets.go +++ b/resources/wafv2-regex-pattern-sets.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/wafv2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const WAFv2RegexPatternSetResource = "WAFv2RegexPatternSet" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: WAFv2RegexPatternSetResource, Scope: nuke.Account, Lister: &WAFv2RegexPatternSetLister{}, diff --git a/resources/wafv2-rulegroup.go b/resources/wafv2-rulegroup.go index ae064ad6..03e3d4a0 100644 --- a/resources/wafv2-rulegroup.go +++ b/resources/wafv2-rulegroup.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/wafv2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const WAFv2RuleGroupResource = "WAFv2RuleGroup" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: WAFv2RuleGroupResource, Scope: nuke.Account, Lister: &WAFv2RuleGroupLister{}, diff --git a/resources/wafv2-webacls.go b/resources/wafv2-webacls.go index 51018943..a47b1bf3 100644 --- a/resources/wafv2-webacls.go +++ b/resources/wafv2-webacls.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/wafv2" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -15,7 +16,7 @@ import ( const WAFv2WebACLResource = "WAFv2WebACL" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: WAFv2WebACLResource, Scope: nuke.Account, Lister: &WAFv2WebACLLister{}, diff --git a/resources/workspaces-workspaces.go b/resources/workspaces-workspaces.go index 74f1bf91..fb613e98 100644 --- a/resources/workspaces-workspaces.go +++ b/resources/workspaces-workspaces.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/workspaces" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -14,7 +15,7 @@ import ( const WorkSpacesWorkspaceResource = "WorkSpacesWorkspace" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: WorkSpacesWorkspaceResource, Scope: nuke.Account, Lister: &WorkSpacesWorkspaceLister{}, diff --git a/resources/xray-group.go b/resources/xray-group.go index 8519781b..4fd295bd 100644 --- a/resources/xray-group.go +++ b/resources/xray-group.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/xray" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const XRayGroupResource = "XRayGroup" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: XRayGroupResource, Scope: nuke.Account, Lister: &XRayGroupLister{}, diff --git a/resources/xray-sampling-rule.go b/resources/xray-sampling-rule.go index 5ae8e940..3d6870ac 100644 --- a/resources/xray-sampling-rule.go +++ b/resources/xray-sampling-rule.go @@ -5,6 +5,7 @@ import ( "github.com/aws/aws-sdk-go/service/xray" + "github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/resource" "github.com/ekristen/libnuke/pkg/types" @@ -14,7 +15,7 @@ import ( const XRaySamplingRuleResource = "XRaySamplingRule" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: XRaySamplingRuleResource, Scope: nuke.Account, Lister: &XRaySamplingRuleLister{}, diff --git a/tools/create-resource/main.go b/tools/create-resource/main.go index ce704844..0e85981b 100644 --- a/tools/create-resource/main.go +++ b/tools/create-resource/main.go @@ -17,6 +17,7 @@ import ( "github.com/aws/aws-sdk-go/service/{{.Service}}" "github.com/ekristen/libnuke/pkg/resource" +"github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/libnuke/pkg/types" "github.com/ekristen/aws-nuke/pkg/nuke" @@ -25,7 +26,7 @@ import ( const {{.Combined}}Resource = "{{.Combined}}" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: {{.Combined}}Resource, Scope: nuke.Account, Lister: &{{.Combined}}Lister{}, diff --git a/tools/list-cloudcontrol/main.go b/tools/list-cloudcontrol/main.go index 7ec6a3d4..f3de4e52 100644 --- a/tools/list-cloudcontrol/main.go +++ b/tools/list-cloudcontrol/main.go @@ -4,7 +4,7 @@ import ( "context" "encoding/json" "fmt" - "github.com/ekristen/libnuke/pkg/resource" + "strings" "github.com/fatih/color" @@ -14,6 +14,8 @@ import ( "github.com/aws/aws-sdk-go/aws/endpoints" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/cloudformation" + + "github.com/ekristen/libnuke/pkg/registry" ) type CFTypeSchema struct { @@ -32,7 +34,7 @@ func main() { cf := cloudformation.New(sess) - mapping := resource.GetAlternativeResourceTypeMapping() + mapping := registry.GetAlternativeResourceTypeMapping() in := &cloudformation.ListTypesInput{ Type: aws.String(cloudformation.RegistryTypeResource), diff --git a/tools/migrate-resource/main.go b/tools/migrate-resource/main.go index a0026088..2a5582df 100644 --- a/tools/migrate-resource/main.go +++ b/tools/migrate-resource/main.go @@ -13,7 +13,7 @@ import ( var resourceTemplate = `const {{.ResourceType}}Resource = "{{.ResourceType}}" func init() { - resource.Register(&resource.Registration{ + registry.Register(®istry.Registration{ Name: {{.ResourceType}}Resource, Scope: nuke.Account, Lister: &{{.ResourceType}}Lister{}, @@ -30,6 +30,7 @@ var imports = `import ( "context" "github.com/ekristen/libnuke/pkg/resource" +"github.com/ekristen/libnuke/pkg/registry" "github.com/ekristen/aws-nuke/pkg/nuke" `