patch

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: MIT Imports: 5 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type CalculateOption

type CalculateOption func([]byte, []byte) ([]byte, []byte, error)

type Maker

type Maker interface {
	Calculate(currentObject, modifiedObject, originalObject any, opts ...CalculateOption) (*PatchResult, error)
}

func NewPatchMaker

func NewPatchMaker(strategicMergePatcher patch.StrategicMergePatcher, jsonMergePatcher patch.JSONMergePatcher) Maker

type PatchMaker

type PatchMaker struct {
	// contains filtered or unexported fields
}

func (*PatchMaker) Calculate

func (p *PatchMaker) Calculate(currentObject, modifiedObject, originalObject any, opts ...CalculateOption) (*PatchResult, error)

type PatchResult

type PatchResult struct {
	Patch    []byte
	Current  []byte
	Modified []byte
	Original []byte
	Patched  any
}

func (*PatchResult) IsEmpty

func (p *PatchResult) IsEmpty() bool

func (*PatchResult) String

func (p *PatchResult) String() string

Jump to

Keyboard shortcuts

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