controller

package
v0.0.0-...-9931e2d Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const ImageAnnotation = "cosign.sigstore.dev/imageRef"

ImageAnnotation : metadata annotation for message in tkn resources

View Source
const MessageAnnotation = "cosign.sigstore.dev/message"

MessageAnnotation : metadata annotation for message in tkn resources

View Source
const SignatureAnnotation = "cosign.sigstore.dev/signature"

SignatureAnnotation : metadata annotation for signature in tkn resources

Variables

This section is empty.

Functions

This section is empty.

Types

type AdmitFunc

type AdmitFunc func(request *admission.AdmissionRequest) (*Result, error)

AdmitFunc defines how to process an admission request

type Hook

type Hook struct {
	Create  AdmitFunc
	Delete  AdmitFunc
	Update  AdmitFunc
	Connect AdmitFunc
}

Hook represents the set of functions for each operation in an admission webhook

func (*Hook) Execute

func (h *Hook) Execute(r *admission.AdmissionRequest) (*Result, error)

Execute evaluates the request and try to execute the function for operation specified in the request

type PatchOperation

type PatchOperation struct {
	Op    string      `json:"op"`
	Path  string      `json:"path"`
	From  string      `json:"from"`
	Value interface{} `json:"value,omitempty"`
}

PatchOperation is an operation of a JSON patch https://datatracker.ietf.org/doc/html/rfc6902

func AddPatchOperation

func AddPatchOperation(path string, value interface{}) PatchOperation

AddPatchOperation returns an add JSON patch operation

func CopyPatchOperation

func CopyPatchOperation(from, path string) PatchOperation

CopyPatchOperation returns a copy JSON patch operation

func MovePatchOperation

func MovePatchOperation(from, path string) PatchOperation

MovePatchOperation returns a move JSON patch operation

func RemovePatchOperation

func RemovePatchOperation(path string) PatchOperation

RemovePatchOperation returns a remove JSON patch operation

func ReplacePatchOperation

func ReplacePatchOperation(path string, value interface{}) PatchOperation

ReplacePatchOperation returns a replace JSON patch operation

type Result

type Result struct {
	Allowed  bool
	Message  string
	PatchOps []PatchOperation
}

Result contains the result of an admission request

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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