mutator

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Mutate

func Mutate(body []byte, sourceDomains string, targetDomain string) ([]byte, error)

Mutate receives an http request body (AdmissionReview), and baseDomain. It adds an AdmissionResponse to the AdmissionReview and then returns it. Its goal is to create a JSON patch to append the baseDomain to the host values in a given ingress resource

Types

type BadRequest

type BadRequest struct {
	// contains filtered or unexported fields
}

BadRequest is used to allow the caller to return an appropriate http response

func (*BadRequest) Error

func (e *BadRequest) Error() string

type Patch

type Patch struct {
	Op    string `json:"op"`
	Path  string `json:"path"`
	Value string `json:"value"`
}

Patch represents a JSON patch

Jump to

Keyboard shortcuts

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