jsonpatch

package
v0.0.0-...-31bcc22 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2018 License: MIT Imports: 0 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 []PatchItem

Patch is the spec for a json-patch operation : http://jsonpatch.com/

func New

func New() Patch

New returns a new Patch list

func (Patch) Add

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

Add creats and adds an item to the patch

type PatchItem

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

PatchItem is a single item in Patch

func NewItem

func NewItem(op string, path string, value interface{}) PatchItem

NewItem returns a new Patch item

Jump to

Keyboard shortcuts

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