compare

package
v0.1.16 Latest Latest
Warning

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

Go to latest
Published: May 7, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Add describes an operation where the traget path object has been added.
	Add string = "add"
	// Remove describes that entity has been removed.
	Remove string = "remove"
	// Replace describes an operation to replace content of the target path object.
	Replace string = "replace"
)

Variables

This section is empty.

Functions

func ToPatch added in v0.1.11

func ToPatch(oplog []DiffItem) (*bundlev1.Patch, error)

ToPatch convert oplog to a bundle patch.

Types

type DiffItem

type DiffItem struct {
	Operation string `json:"op"`
	Type      string `json:"type"`
	Path      string `json:"path"`
	Value     string `json:"value,omitempty"`
}

DiffItem represents bundle comparison operations.

func Diff

func Diff(src, dst *bundlev1.Bundle) ([]DiffItem, error)

Diff calculates bundle differences.

type OpLog added in v0.1.11

type OpLog []DiffItem

OpLog represents operation log calculate from bundle differences.

Jump to

Keyboard shortcuts

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