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.5.0 (latest)
Published
Jan 28, 2022
Platform
linux/amd64
Imports
1 packages
Last checked
5 hours ago

Tools for package owners.