Skip to content

Commit

Permalink
Merge pull request #1554 from snyk/chore/extracted_enumeration
Browse files Browse the repository at this point in the history
Extract enumeration to it's own module
  • Loading branch information
eliecharra authored Jul 7, 2022
2 parents 516609f + 3c7a52b commit 172e121
Show file tree
Hide file tree
Showing 1,266 changed files with 4,012 additions and 2,968 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/alerter/alerter.go → enumeration/alerter/alerter.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package alerter
import (
"fmt"

"github.com/snyk/driftctl/pkg/resource"
"github.com/snyk/driftctl/enumeration/resource"
)

type AlerterInterface interface {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"reflect"
"testing"

"github.com/snyk/driftctl/pkg/resource"
"github.com/snyk/driftctl/enumeration/resource"
)

func TestAlerter_Alert(t *testing.T) {
Expand Down
9 changes: 9 additions & 0 deletions enumeration/filter.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package enumeration

import "github.com/snyk/driftctl/enumeration/resource"

type Filter interface {
IsTypeIgnored(ty resource.ResourceType) bool
IsResourceIgnored(res *resource.Resource) bool
IsFieldIgnored(res *resource.Resource, path []string) bool
}
55 changes: 55 additions & 0 deletions enumeration/mock_Filter.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions enumeration/progress.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package enumeration

type ProgressCounter interface {
Inc()
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package alerts
import (
"fmt"

"github.com/snyk/driftctl/enumeration/alerter"
"github.com/snyk/driftctl/enumeration/remote/common"
remoteerror "github.com/snyk/driftctl/enumeration/remote/error"

"github.com/sirupsen/logrus"
"github.com/snyk/driftctl/pkg/alerter"
"github.com/snyk/driftctl/pkg/remote/common"
remoteerror "github.com/snyk/driftctl/pkg/remote/error"
)

type ScanningPhase int
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package aws

import (
"github.com/snyk/driftctl/pkg/remote/aws/repository"
remoteerror "github.com/snyk/driftctl/pkg/remote/error"
"github.com/snyk/driftctl/pkg/resource"
"github.com/snyk/driftctl/pkg/resource/aws"
"github.com/snyk/driftctl/enumeration/remote/aws/repository"
remoteerror "github.com/snyk/driftctl/enumeration/remote/error"
"github.com/snyk/driftctl/enumeration/resource"
"github.com/snyk/driftctl/enumeration/resource/aws"
)

type ApiGatewayAccountEnumerator struct {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package aws

import (
"github.com/snyk/driftctl/pkg/remote/aws/repository"
remoteerror "github.com/snyk/driftctl/pkg/remote/error"
"github.com/snyk/driftctl/pkg/resource"
"github.com/snyk/driftctl/pkg/resource/aws"
"github.com/snyk/driftctl/enumeration/remote/aws/repository"
remoteerror "github.com/snyk/driftctl/enumeration/remote/error"
"github.com/snyk/driftctl/enumeration/resource"
"github.com/snyk/driftctl/enumeration/resource/aws"
)

type ApiGatewayApiKeyEnumerator struct {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package aws

import (
"github.com/snyk/driftctl/pkg/remote/aws/repository"
remoteerror "github.com/snyk/driftctl/pkg/remote/error"
"github.com/snyk/driftctl/pkg/resource"
"github.com/snyk/driftctl/pkg/resource/aws"
"github.com/snyk/driftctl/enumeration/remote/aws/repository"
remoteerror "github.com/snyk/driftctl/enumeration/remote/error"
"github.com/snyk/driftctl/enumeration/resource"
"github.com/snyk/driftctl/enumeration/resource/aws"
)

type ApiGatewayAuthorizerEnumerator struct {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package aws

import (
"github.com/snyk/driftctl/enumeration/remote/aws/repository"
remoteerror "github.com/snyk/driftctl/enumeration/remote/error"
"strings"

"github.com/snyk/driftctl/pkg/remote/aws/repository"
remoteerror "github.com/snyk/driftctl/pkg/remote/error"
"github.com/snyk/driftctl/pkg/resource"
"github.com/snyk/driftctl/pkg/resource/aws"
"github.com/snyk/driftctl/enumeration/resource"
"github.com/snyk/driftctl/enumeration/resource/aws"
)

type ApiGatewayBasePathMappingEnumerator struct {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package aws

import (
"github.com/snyk/driftctl/pkg/remote/aws/repository"
remoteerror "github.com/snyk/driftctl/pkg/remote/error"
"github.com/snyk/driftctl/pkg/resource"
"github.com/snyk/driftctl/pkg/resource/aws"
"github.com/snyk/driftctl/enumeration/remote/aws/repository"
remoteerror "github.com/snyk/driftctl/enumeration/remote/error"
"github.com/snyk/driftctl/enumeration/resource"
"github.com/snyk/driftctl/enumeration/resource/aws"
)

type ApiGatewayDomainNameEnumerator struct {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package aws

import (
"github.com/snyk/driftctl/enumeration/remote/aws/repository"
remoteerror "github.com/snyk/driftctl/enumeration/remote/error"
"strings"

"github.com/snyk/driftctl/pkg/remote/aws/repository"
remoteerror "github.com/snyk/driftctl/pkg/remote/error"
"github.com/snyk/driftctl/pkg/resource"
"github.com/snyk/driftctl/pkg/resource/aws"
"github.com/snyk/driftctl/enumeration/resource"
"github.com/snyk/driftctl/enumeration/resource/aws"
)

type ApiGatewayGatewayResponseEnumerator struct {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package aws

import (
"github.com/snyk/driftctl/enumeration/remote/aws/repository"
remoteerror "github.com/snyk/driftctl/enumeration/remote/error"
"strings"

"github.com/snyk/driftctl/pkg/remote/aws/repository"
remoteerror "github.com/snyk/driftctl/pkg/remote/error"
"github.com/snyk/driftctl/pkg/resource"
"github.com/snyk/driftctl/pkg/resource/aws"
"github.com/snyk/driftctl/enumeration/resource"
"github.com/snyk/driftctl/enumeration/resource/aws"
)

type ApiGatewayIntegrationEnumerator struct {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package aws

import (
"github.com/snyk/driftctl/enumeration/remote/aws/repository"
remoteerror "github.com/snyk/driftctl/enumeration/remote/error"
"strings"

"github.com/snyk/driftctl/pkg/remote/aws/repository"
remoteerror "github.com/snyk/driftctl/pkg/remote/error"
"github.com/snyk/driftctl/pkg/resource"
"github.com/snyk/driftctl/pkg/resource/aws"
"github.com/snyk/driftctl/enumeration/resource"
"github.com/snyk/driftctl/enumeration/resource/aws"
)

type ApiGatewayIntegrationResponseEnumerator struct {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package aws

import (
"github.com/snyk/driftctl/enumeration/remote/aws/repository"
remoteerror "github.com/snyk/driftctl/enumeration/remote/error"
"strings"

"github.com/snyk/driftctl/pkg/remote/aws/repository"
remoteerror "github.com/snyk/driftctl/pkg/remote/error"
"github.com/snyk/driftctl/pkg/resource"
"github.com/snyk/driftctl/pkg/resource/aws"
"github.com/snyk/driftctl/enumeration/resource"
"github.com/snyk/driftctl/enumeration/resource/aws"
)

type ApiGatewayMethodEnumerator struct {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package aws

import (
"github.com/snyk/driftctl/enumeration/remote/aws/repository"
remoteerror "github.com/snyk/driftctl/enumeration/remote/error"
"strings"

"github.com/snyk/driftctl/pkg/remote/aws/repository"
remoteerror "github.com/snyk/driftctl/pkg/remote/error"
"github.com/snyk/driftctl/pkg/resource"
"github.com/snyk/driftctl/pkg/resource/aws"
"github.com/snyk/driftctl/enumeration/resource"
"github.com/snyk/driftctl/enumeration/resource/aws"
)

type ApiGatewayMethodResponseEnumerator struct {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package aws

import (
"github.com/snyk/driftctl/enumeration/remote/aws/repository"
remoteerror "github.com/snyk/driftctl/enumeration/remote/error"
"strings"

"github.com/snyk/driftctl/pkg/remote/aws/repository"
remoteerror "github.com/snyk/driftctl/pkg/remote/error"
"github.com/snyk/driftctl/pkg/resource"
"github.com/snyk/driftctl/pkg/resource/aws"
"github.com/snyk/driftctl/enumeration/resource"
"github.com/snyk/driftctl/enumeration/resource/aws"
)

type ApiGatewayMethodSettingsEnumerator struct {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package aws

import (
"github.com/snyk/driftctl/pkg/remote/aws/repository"
remoteerror "github.com/snyk/driftctl/pkg/remote/error"
"github.com/snyk/driftctl/pkg/resource"
"github.com/snyk/driftctl/pkg/resource/aws"
"github.com/snyk/driftctl/enumeration/remote/aws/repository"
remoteerror "github.com/snyk/driftctl/enumeration/remote/error"
"github.com/snyk/driftctl/enumeration/resource"
"github.com/snyk/driftctl/enumeration/resource/aws"
)

type ApiGatewayModelEnumerator struct {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package aws

import (
"github.com/snyk/driftctl/pkg/remote/aws/repository"
remoteerror "github.com/snyk/driftctl/pkg/remote/error"
"github.com/snyk/driftctl/pkg/resource"
"github.com/snyk/driftctl/pkg/resource/aws"
"github.com/snyk/driftctl/enumeration/remote/aws/repository"
remoteerror "github.com/snyk/driftctl/enumeration/remote/error"
"github.com/snyk/driftctl/enumeration/resource"
"github.com/snyk/driftctl/enumeration/resource/aws"
)

type ApiGatewayRequestValidatorEnumerator struct {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package aws

import (
"github.com/snyk/driftctl/pkg/remote/aws/repository"
remoteerror "github.com/snyk/driftctl/pkg/remote/error"
"github.com/snyk/driftctl/pkg/resource"
"github.com/snyk/driftctl/pkg/resource/aws"
"github.com/snyk/driftctl/enumeration/remote/aws/repository"
remoteerror "github.com/snyk/driftctl/enumeration/remote/error"
"github.com/snyk/driftctl/enumeration/resource"
"github.com/snyk/driftctl/enumeration/resource/aws"
)

type ApiGatewayResourceEnumerator struct {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package aws

import (
"github.com/snyk/driftctl/pkg/remote/aws/repository"
remoteerror "github.com/snyk/driftctl/pkg/remote/error"
"github.com/snyk/driftctl/pkg/resource"
"github.com/snyk/driftctl/pkg/resource/aws"
"github.com/snyk/driftctl/enumeration/remote/aws/repository"
remoteerror "github.com/snyk/driftctl/enumeration/remote/error"
"github.com/snyk/driftctl/enumeration/resource"
"github.com/snyk/driftctl/enumeration/resource/aws"
)

type ApiGatewayRestApiEnumerator struct {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package aws

import (
"github.com/snyk/driftctl/pkg/remote/aws/repository"
remoteerror "github.com/snyk/driftctl/pkg/remote/error"
"github.com/snyk/driftctl/pkg/resource"
"github.com/snyk/driftctl/pkg/resource/aws"
"github.com/snyk/driftctl/enumeration/remote/aws/repository"
remoteerror "github.com/snyk/driftctl/enumeration/remote/error"
"github.com/snyk/driftctl/enumeration/resource"
"github.com/snyk/driftctl/enumeration/resource/aws"
)

type ApiGatewayRestApiPolicyEnumerator struct {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package aws

import (
"github.com/snyk/driftctl/enumeration/remote/aws/repository"
remoteerror "github.com/snyk/driftctl/enumeration/remote/error"
"strings"

"github.com/snyk/driftctl/pkg/remote/aws/repository"
remoteerror "github.com/snyk/driftctl/pkg/remote/error"
"github.com/snyk/driftctl/pkg/resource"
"github.com/snyk/driftctl/pkg/resource/aws"
"github.com/snyk/driftctl/enumeration/resource"
"github.com/snyk/driftctl/enumeration/resource/aws"
)

type ApiGatewayStageEnumerator struct {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package aws

import (
"github.com/snyk/driftctl/pkg/remote/aws/repository"
remoteerror "github.com/snyk/driftctl/pkg/remote/error"
"github.com/snyk/driftctl/pkg/resource"
"github.com/snyk/driftctl/pkg/resource/aws"
"github.com/snyk/driftctl/enumeration/remote/aws/repository"
remoteerror "github.com/snyk/driftctl/enumeration/remote/error"
"github.com/snyk/driftctl/enumeration/resource"
"github.com/snyk/driftctl/enumeration/resource/aws"
)

type ApiGatewayVpcLinkEnumerator struct {
Expand Down
Loading

0 comments on commit 172e121

Please sign in to comment.