types

package
v0.58.2 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PatchReplaceOp = "replace"
	PatchTestOp    = "test"
	PatchAddOp     = "add"
	PatchRemoveOp  = "remove"
)

Variables

This section is empty.

Functions

func EscapeJSONPointer added in v0.56.0

func EscapeJSONPointer(ptr string) string

func GeneratePatchPayload added in v0.55.0

func GeneratePatchPayload(patches ...PatchOperation) ([]byte, error)

func GenerateTestReplacePatch added in v0.55.0

func GenerateTestReplacePatch(path string, oldValue, newValue interface{}) ([]byte, error)

Types

type PatchOperation added in v0.42.0

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

func UnmarshalPatch added in v0.55.0

func UnmarshalPatch(patch []byte) ([]PatchOperation, error)

Jump to

Keyboard shortcuts

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