utils

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyPatchNew

func ApplyPatchNew(resource, patch []byte) ([]byte, error)

ApplyPatchNew patches given resource with given joined patches

func ApplyPatches

func ApplyPatches(resource []byte, patches [][]byte) ([]byte, error)

ApplyPatches patches given resource with given patches and returns patched document return origin resource if any error occurs

func ConvertToUnstructured

func ConvertToUnstructured(data []byte) (*unstructured.Unstructured, error)

func GetAnchorsFromMap

func GetAnchorsFromMap(anchorsMap map[string]interface{}) map[string]interface{}

getAnchorsFromMap gets the conditional anchor map

func JoinPatches

func JoinPatches(patches [][]byte) []byte

JoinPatches joins array of serialized JSON patches to the single JSONPatch array

Types

type RuleType

type RuleType int
const (
	Mutation RuleType = iota
	Validation
	Generation
	All
)

func (RuleType) String

func (ri RuleType) String() string

Jump to

Keyboard shortcuts

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