api

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Gzip

func Gzip(next http.HandlerFunc) http.HandlerFunc

Gzip Middleware for Responses

func HealthzHandler

func HealthzHandler(synced func() bool) http.HandlerFunc

HealthzHandler for the Liveness REST API

func PolicyHandler

func PolicyHandler(s *kyverno.PolicyStore) http.HandlerFunc

PolicyHandler for the Policy REST API

func ReadyHandler

func ReadyHandler() http.HandlerFunc

ReadyHandler for the Readiness REST API

func VerifyImageRulesHandler added in v1.1.0

func VerifyImageRulesHandler(s *kyverno.PolicyStore) http.HandlerFunc

VerifyImageRulesHandler for the ImageVerify Policy REST API

Types

type Policy added in v1.1.0

type Policy struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace,omitempty"`
	UID       string `json:"uid,omitempty"`
}

type Server

type Server interface {
	// Start the HTTP REST API
	Start() error
	// Shutdown the HTTP Sever
	Shutdown(ctx context.Context) error
	// RegisterREST add all REST API handler
	RegisterREST()
	// RegisterMetrics adds Metrics handler
	RegisterMetrics()
}

Server for the optional HTTP REST API

func NewServer

func NewServer(pStore *kyverno.PolicyStore, port int, synced func() bool) Server

NewServer constructor for a new API Server

type VerifyImage added in v1.1.0

type VerifyImage struct {
	Policy       *Policy `json:"policy"`
	Rule         string  `json:"rule"`
	Repository   string  `json:"repository"`
	Image        string  `json:"image"`
	Key          string  `json:"key"`
	Attestations string  `json:"attestations,omitempty"`
}

Jump to

Keyboard shortcuts

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