mutate

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsString

func ContainsString(obj string, v ...string) bool

ContainsString indicates if the target string in the list of string

func ServeMutate

func ServeMutate(w http.ResponseWriter, r *http.Request)

ServeMutate serve the /mutate path

Types

type JSONPatch

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

JSONPatch object

type JSONPatchOp

type JSONPatchOp string

JSONPatchOp json patch operator type

const (
	// JSONPatchOpAdd json patch operator add
	JSONPatchOpAdd JSONPatchOp = "add"
	// JSONPatchOpRemove json patch operator remove
	JSONPatchOpRemove JSONPatchOp = "remove"
	// JSONPatchOpReplace json patch operator replace
	JSONPatchOpReplace JSONPatchOp = "replace"
	// JSONPatchOpMove json patch operator move
	JSONPatchOpMove JSONPatchOp = "move"
	// JSONPatchOpCopy json patch operator copy
	JSONPatchOpCopy JSONPatchOp = "copy"
	// JSONPatchOpTest json patch operator test
	JSONPatchOpTest JSONPatchOp = "test"
)

func (JSONPatchOp) Valid

func (op JSONPatchOp) Valid() bool

Valid returns if the json patch operator is valid or not

Jump to

Keyboard shortcuts

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