Skip to content

Commit fab1ab8

Browse files
authored
chore: satisfy ValidationRule (#233)
## Issue Resolves <!-- Link to the github issue this PR address, ie: #123 --> ## Description <!-- Description of the changes made --> Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>
1 parent b4687e5 commit fab1ab8

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

api/v1alpha1/azurevalidator_types.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ limitations under the License.
1717
package v1alpha1
1818

1919
import (
20+
"reflect"
21+
2022
"github.com/validator-labs/validator-plugin-azure/pkg/constants"
2123
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2224
)
@@ -145,6 +147,11 @@ type AzureValidator struct {
145147
Status AzureValidatorStatus `json:"status,omitempty"`
146148
}
147149

150+
// GetKind returns the Azure validator's kind.
151+
func (v AzureValidator) GetKind() string {
152+
return reflect.TypeOf(v).Name()
153+
}
154+
148155
// PluginCode returns the Azure validator's plugin code.
149156
func (v AzureValidator) PluginCode() string {
150157
return v.Spec.PluginCode()

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ require (
1010
github.com/go-logr/logr v1.4.2
1111
github.com/onsi/ginkgo/v2 v2.20.0
1212
github.com/onsi/gomega v1.34.1
13-
github.com/validator-labs/validator v0.1.2
13+
github.com/validator-labs/validator v0.1.3-0.20240809205255-c05a36eebd3c
1414
golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa
1515
k8s.io/api v0.30.3
1616
k8s.io/apimachinery v0.30.3

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
155155
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
156156
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
157157
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
158-
github.com/validator-labs/validator v0.1.2 h1:2KqwetsZFeK5ol7Hd/VGO1Ccz8WQFVs5QwfLf8blp10=
159-
github.com/validator-labs/validator v0.1.2/go.mod h1:AdpMOk2xYjlpUjmPJ2CN6MNDFN4NLH/q4lqUziseHpU=
158+
github.com/validator-labs/validator v0.1.3-0.20240809205255-c05a36eebd3c h1:9Dy8DW7qdSQflkwiNPcBPkf/wgAOT+ddmSDvOabjnVQ=
159+
github.com/validator-labs/validator v0.1.3-0.20240809205255-c05a36eebd3c/go.mod h1:TU04WjenuJxvJI/uhRsBJRym3ysA+dvSwUs2qvnak1Q=
160160
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
161161
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
162162
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=

0 commit comments

Comments
 (0)