ExAudit.Diff (ex_audit v0.10.0) View Source

Link to this section Summary

Functions

Creates a patch that can be used to go from a to b with the ExAudit.Patch.patch function

Reverts a patch so that it can undo a change

Link to this section Types

Specs

addition() :: {:added, term()}

Specs

change() :: {:changed, changes()}

Specs

changes() ::
  addition()
  | removal()
  | change()
  | list_addition()
  | list_removal()
  | list_change()
  | no_change()
  | primitive_change()
  | %{any: changes()}
  | [changes()]

Specs

list_addition() :: {:added_to_list, index :: integer(), term()}

Specs

list_change() :: {:changed_in_list, index :: integer(), changes()}

Specs

list_removal() :: {:removed_from_list, index :: integer(), term()}

Specs

no_change() :: :not_changed

Specs

primitive_change() :: {:primitive_change, removed :: term(), added :: term()}

Specs

removal() :: {:removed, term()}

Link to this section Functions

Specs

diff(term(), term()) :: changes()

Creates a patch that can be used to go from a to b with the ExAudit.Patch.patch function

Specs

reverse(changes()) :: changes()

Reverts a patch so that it can undo a change