patch

package
v0.5.0-alpha1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Patch

type Patch []operation

Patch describes a JSONPatch operations.

func New

func New() Patch

New creates a new patch.

func (Patch) Add

func (p Patch) Add(path string, value interface{}) Patch

Add adds a "Add" operation to the patch.

func (Patch) AddKV

func (p Patch) AddKV(path, key string, value interface{}) Patch

AddKV adds a "add" operation to the patch.

func (Patch) Remove

func (p Patch) Remove(path string) Patch

Remove adds a "remove" operation to the patch.

func (Patch) Replace

func (p Patch) Replace(path string, value interface{}) Patch

Replace adds a "replace" operation to the patch.

func (Patch) ToJSON

func (p Patch) ToJSON() ([]byte, error)

ToJSON converts the patch to json.

Jump to

Keyboard shortcuts

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