Versions in this module Expand all Collapse all v1 v1.0.0 Jan 20, 2017 Changes in this version + type Added struct + Value interface{} + func NewAdded(position Position, value interface{}) *Added + func (cache Added) Similarity() (similarity float64) + func (d *Added) PostApply(object interface{}) interface{} + func (i Added) PostPosition() Position + type Array struct + Deltas []Delta + func NewArray(position Position, deltas []Delta) *Array + func (cache Array) Similarity() (similarity float64) + func (d *Array) PostApply(object interface{}) interface{} + func (i Array) PostPosition() Position + type Deleted struct + Value interface{} + func NewDeleted(position Position, value interface{}) *Deleted + func (d *Deleted) PreApply(object interface{}) interface{} + func (d Deleted) Similarity() (similarity float64) + func (i Deleted) PrePosition() Position + type Delta interface + Similarity func() (similarity float64) + type Diff interface + Deltas func() []Delta + Modified func() bool + type Differ struct + func New() *Differ + func (differ *Differ) ApplyPatch(json map[string]interface{}, patch Diff) + func (differ *Differ) Compare(left []byte, right []byte) (Diff, error) + func (differ *Differ) CompareArrays(left []interface{}, right []interface{}) Diff + func (differ *Differ) CompareObjects(left map[string]interface{}, right map[string]interface{}) Diff + type Index int + func (i Index) CompareTo(another Position) bool + func (i Index) String() (name string) + type Modified struct + NewValue interface{} + OldValue interface{} + func NewModified(position Position, oldValue, newValue interface{}) *Modified + func (cache Modified) Similarity() (similarity float64) + func (d *Modified) PostApply(object interface{}) interface{} + func (i Modified) PostPosition() Position + type Moved struct + Delta interface{} + Value interface{} + func NewMoved(oldPosition Position, newPosition Position, value interface{}, delta Delta) *Moved + func (cache Moved) Similarity() (similarity float64) + func (d *Moved) PostApply(object interface{}) interface{} + func (d *Moved) PreApply(object interface{}) interface{} + func (i Moved) PostPosition() Position + func (i Moved) PrePosition() Position + type Name string + func (n Name) CompareTo(another Position) bool + func (n Name) String() (name string) + type Object struct + Deltas []Delta + func NewObject(position Position, deltas []Delta) *Object + func (cache Object) Similarity() (similarity float64) + func (d *Object) PostApply(object interface{}) interface{} + func (i Object) PostPosition() Position + type Position interface + CompareTo func(another Position) bool + String func() (name string) + type PostDelta interface + PostApply func(object interface{}) interface{} + PostPosition func() Position + type PreDelta interface + PreApply func(object interface{}) interface{} + PrePosition func() Position + type TextDiff struct + Diff []dmp.Patch + func NewTextDiff(position Position, diff []dmp.Patch, oldValue, newValue interface{}) *TextDiff + func (cache TextDiff) Similarity() (similarity float64) + func (d *TextDiff) DiffString() string + func (d *TextDiff) PostApply(object interface{}) interface{} + func (i TextDiff) PostPosition() Position + type Unmarshaller struct + func NewUnmarshaller() *Unmarshaller + func (um *Unmarshaller) UnmarshalBytes(diffBytes []byte) (Diff, error) + func (um *Unmarshaller) UnmarshalObject(diffObj map[string]interface{}) (Diff, error) + func (um *Unmarshaller) UnmarshalReader(diffReader io.Reader) (Diff, error) + func (um *Unmarshaller) UnmarshalString(diffString string) (Diff, error)