package patch

import "github.com/docker/compose-on-kubernetes/internal/patch"

Index

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.

Source Files

patch.go

Version
v0.4.25-alpha1
Published
Oct 30, 2019
Platform
js/wasm
Imports
1 packages
Last checked
28 minutes ago

Tools for package owners.