Documentation ¶
Index ¶
- Variables
- func LoadUrlPrefixAllowListFromFile(path string, fileReader FileReader) ([]string, error)
- func SetupWebhookWithManager(mgr ctrl.Manager, validator webhook.CustomValidator) error
- type FileReader
- type RepositoryValidator
- func (r *RepositoryValidator) ValidateCreate(ctx context.Context, obj runtime.Object) (warnings admission.Warnings, err error)
- func (r *RepositoryValidator) ValidateDelete(ctx context.Context, obj runtime.Object) (warnings admission.Warnings, err error)
- func (r *RepositoryValidator) ValidateUpdate(ctx context.Context, oldObj runtime.Object, newObj runtime.Object) (warnings admission.Warnings, err error)
- type URLValidationFailedError
- type URLValidator
Constants ¶
This section is empty.
Variables ¶
View Source
var AddToScheme = pacv1alpha1.AddToScheme
Functions ¶
func LoadUrlPrefixAllowListFromFile ¶
func LoadUrlPrefixAllowListFromFile(path string, fileReader FileReader) ([]string, error)
Load the URL prefix' of allowed URLs from a file
func SetupWebhookWithManager ¶
func SetupWebhookWithManager(mgr ctrl.Manager, validator webhook.CustomValidator) error
SetupWebhookWithManager will setup the manager to manage the webhooks
Types ¶
type FileReader ¶
type RepositoryValidator ¶
type RepositoryValidator struct {
UrlValidator *URLValidator
}
func (*RepositoryValidator) ValidateCreate ¶
func (r *RepositoryValidator) ValidateCreate(ctx context.Context, obj runtime.Object) (warnings admission.Warnings, err error)
ValidateCreate implements admission.CustomValidator.
func (*RepositoryValidator) ValidateDelete ¶
func (r *RepositoryValidator) ValidateDelete(ctx context.Context, obj runtime.Object) (warnings admission.Warnings, err error)
ValidateDelete implements admission.CustomValidator.
type URLValidationFailedError ¶
type URLValidationFailedError struct{}
func (*URLValidationFailedError) Error ¶
func (u *URLValidationFailedError) Error() string
type URLValidator ¶
type URLValidator struct {
URLPrefixAllowList []string
}
Click to show internal directories.
Click to hide internal directories.