Skip to content

Commit

Permalink
Add interface validation check for missing types
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Orive <adrian.orive.oneca@gmail.com>
  • Loading branch information
Adirio committed Jan 13, 2020
1 parent f403d24 commit cb7c1c2
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/scaffold/v1/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ import (
"sigs.k8s.io/kubebuilder/pkg/scaffold/resource"
)

var _ input.File = &Controller{}

// Controller scaffolds a Controller for a Resource
type Controller struct {
input.Input
Expand Down
2 changes: 2 additions & 0 deletions pkg/scaffold/v1/controller/controllersuitetest.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import (
"sigs.k8s.io/kubebuilder/pkg/scaffold/resource"
)

var _ input.File = &SuiteTest{}

// SuiteTest scaffolds a SuiteTest
type SuiteTest struct {
input.Input
Expand Down
2 changes: 2 additions & 0 deletions pkg/scaffold/v1/controller/controllertest.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import (
"sigs.k8s.io/kubebuilder/pkg/scaffold/resource"
)

var _ input.File = &Test{}

// Test scaffolds a Controller Test
type Test struct {
input.Input
Expand Down
2 changes: 2 additions & 0 deletions pkg/scaffold/v2/certmanager/certificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import (
"sigs.k8s.io/kubebuilder/pkg/scaffold/input"
)

var _ input.File = &CertManager{}

// CertManager scaffolds an issuer CR and a certificate CR
type CertManager struct {
input.Input
Expand Down
2 changes: 2 additions & 0 deletions pkg/scaffold/v2/certmanager/kustomize.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import (
"sigs.k8s.io/kubebuilder/pkg/scaffold/input"
)

var _ input.File = &Kustomization{}

// Kustomization scaffolds the kustomizaiton in the certmanager folder
type Kustomization struct {
input.Input
Expand Down
2 changes: 2 additions & 0 deletions pkg/scaffold/v2/certmanager/kustomizeconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import (
"sigs.k8s.io/kubebuilder/pkg/scaffold/input"
)

var _ input.File = &KustomizeConfig{}

// KustomizeConfig scaffolds the kustomizeconfig in the certmanager folder
type KustomizeConfig struct {
input.Input
Expand Down
2 changes: 2 additions & 0 deletions pkg/scaffold/v2/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ import (
"sigs.k8s.io/kubebuilder/pkg/scaffold/util"
)

var _ input.File = &Controller{}

// Controller scaffolds a Controller for a Resource
type Controller struct {
input.Input
Expand Down
2 changes: 2 additions & 0 deletions pkg/scaffold/v2/crd/enablecainjection_patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ import (
"sigs.k8s.io/kubebuilder/pkg/scaffold/resource"
)

var _ input.File = &EnableCAInjectionPatch{}

// EnableCAInjectionPatch scaffolds a EnableCAInjectionPatch for a Resource
type EnableCAInjectionPatch struct {
input.Input
Expand Down
2 changes: 2 additions & 0 deletions pkg/scaffold/v2/crd/enablewebhook_patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ import (
"sigs.k8s.io/kubebuilder/pkg/scaffold/resource"
)

var _ input.File = &EnableWebhookPatch{}

// EnableWebhookPatch scaffolds a EnableWebhookPatch for a Resource
type EnableWebhookPatch struct {
input.Input
Expand Down
2 changes: 2 additions & 0 deletions pkg/scaffold/v2/prometheus/kustomize.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import (
"sigs.k8s.io/kubebuilder/pkg/scaffold/input"
)

var _ input.File = &Kustomization{}

// Kustomization scaffolds the kustomizaiton in the prometheus folder
type Kustomization struct {
input.Input
Expand Down
2 changes: 2 additions & 0 deletions pkg/scaffold/v2/prometheus/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import (
"sigs.k8s.io/kubebuilder/pkg/scaffold/input"
)

var _ input.File = &PrometheusServiceMonitor{}

// PrometheusMetricsService scaffolds an issuer CR and a certificate CR
type PrometheusServiceMonitor struct {
input.Input
Expand Down
2 changes: 2 additions & 0 deletions pkg/scaffold/v2/webhook/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ import (
"sigs.k8s.io/kubebuilder/pkg/scaffold/util"
)

var _ input.File = &Webhook{}

// Webhook scaffolds a Webhook for a Resource
type Webhook struct {
input.Input
Expand Down
2 changes: 2 additions & 0 deletions pkg/scaffold/v2/webhook_manager_patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import (
"sigs.k8s.io/kubebuilder/pkg/scaffold/input"
)

var _ input.File = &ManagerWebhookPatch{}

// CRDWebhookPatch scaffolds a CRDWebhookPatch for a Resource
type ManagerWebhookPatch struct {
input.Input
Expand Down

0 comments on commit cb7c1c2

Please sign in to comment.