hookutil

package
v1.0.0-alpha.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2020 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReasonCreated        = "Created"
	ReasonCreateFailed   = "CreateFailed"
	ReasonUpdated        = "Updated"
	ReasonUpdateFailed   = "UpdateFailed"
	ReasonDeleted        = "Deleted"
	ReasonDeleteFailed   = "DeleteFailed"
	ReasonInvalidWebhook = "InvalidWebhook"
	ReasonNotExist       = "NotExist"
)

Variables

View Source
var (
	ErrInvalidResourceTemplateAction = errors.New("invalid action")
	ErrResourceNameRequired          = errors.New("resourceName is required")
)
View Source
var ResourceTemplateClientSet = wire.NewSet(
	wire.Struct(new(ResourceTemplateClient), "*"),
)

ResourceTemplateClientSet provides the client for ResourceTemplate. nolint: gochecknoglobals

Functions

func FilterByConditions

func FilterByConditions(conditions []string, text string) bool

func FilterWebhook

func FilterWebhook(filter *v1beta1.WebhookFilter, text string) bool

func NewEventRecorder

func NewEventRecorder(mgr manager.Manager) record.EventRecorder

func NewFieldIndexer

func NewFieldIndexer(mgr manager.Manager) client.FieldIndexer

Types

type ResourceTemplateAction

type ResourceTemplateAction string
const (
	ActionApply  ResourceTemplateAction = "apply"
	ActionDelete ResourceTemplateAction = "delete"
)

type ResourceTemplateClient

type ResourceTemplateClient struct {
	Client   client.Client
	Recorder record.EventRecorder
}

func (*ResourceTemplateClient) Handle

type ResourceTemplateOptions

type ResourceTemplateOptions struct {
	Action              ResourceTemplateAction
	Event               interface{}
	Webhook             Webhook
	DefaultResourceName string
}

type Webhook

type Webhook interface {
	runtime.Object

	GetName() string
	GetNamespace() string
	GetUID() types.UID
	GetSpec() v1beta1.WebhookSpec
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL