-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
3,135 additions
and
214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright (c) Microsoft Corporation. | ||
* Licensed under the MIT license. | ||
*/ | ||
|
||
package genruntime | ||
|
||
import ( | ||
"k8s.io/apimachinery/pkg/runtime" | ||
) | ||
|
||
// Validator is similar to controller-runtime/pkg/webhook/admission Validator. Implementing this interface | ||
// allows you to hook into the code generated validations and add custom handcrafted validations. | ||
type Validator interface { | ||
// CreateValidations returns validation functions that should be run on create. | ||
CreateValidations() []func() error | ||
// UpdateValidations returns validation functions that should be run on update. | ||
UpdateValidations() []func(old runtime.Object) error | ||
// DeleteValidations returns validation functions taht should be run on delete. | ||
DeleteValidations() []func() error | ||
} | ||
|
||
// Defaulter is similar to controller-runtime/pkg/webhook/admission Defaulter. Implementing this interface | ||
// allows you to hook into the code generated defaults and add custom handcrafted defaults. | ||
type Defaulter interface { | ||
// CustomDefault performs custom defaults that are run in addition to the code generated defaults. | ||
CustomDefault() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.