patch

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddOperation

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

func (*AddOperation) GetPath

func (o *AddOperation) GetPath() string

func (*AddOperation) MarshalJSON

func (o *AddOperation) MarshalJSON() ([]byte, error)

func (*AddOperation) String

func (o *AddOperation) String() string

type PatchOperation

type PatchOperation interface {
	MarshalJSON() ([]byte, error)
	GetPath() string
}

type PatchOperations

type PatchOperations []PatchOperation

func DiffStringMap

func DiffStringMap(pathPrefix string, oldV, newV map[string]interface{}) PatchOperations

func (PatchOperations) Equal

func (po PatchOperations) Equal(ops []PatchOperation) bool

func (PatchOperations) MarshalJSON

func (po PatchOperations) MarshalJSON() ([]byte, error)

type RemoveOperation

type RemoveOperation struct {
	Path string `json:"path"`
	Op   string `json:"op"`
}

func (*RemoveOperation) GetPath

func (o *RemoveOperation) GetPath() string

func (*RemoveOperation) MarshalJSON

func (o *RemoveOperation) MarshalJSON() ([]byte, error)

func (*RemoveOperation) String

func (o *RemoveOperation) String() string

type ReplaceOperation

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

func (*ReplaceOperation) GetPath

func (o *ReplaceOperation) GetPath() string

func (*ReplaceOperation) MarshalJSON

func (o *ReplaceOperation) MarshalJSON() ([]byte, error)

func (*ReplaceOperation) String

func (o *ReplaceOperation) String() string

Jump to

Keyboard shortcuts

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