Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUnknownOperation = errors.New("unknown operation")
Functions ¶
This section is empty.
Types ¶
type Operation ¶
type Operation string
Operation represents an JSON patch operation.
const ( // RemoveOperation is an operation to remove the value at the target location. // Requires `path`. RemoveOperation Operation = "remove" // AddOperation add a value or array to an array at the target location. // Requires `path` and `value`. Target of the path must be an array. AddOperation Operation = "add" // ReplaceOperation replaces the value at the target location // with a new value. Requires `path` and `value`. ReplaceOperation Operation = "replace" // MoveOperation removes the value at a specified location and // adds it to the target location. Requires `from` and `path`. MoveOperation Operation = "move" // CopyOperation copies the value from a specified location to the // target location. Requires `from` and `path`. CopyOperation Operation = "copy" )
func FromString ¶
FromString return operation that matches string or nil with error if no match.
Click to show internal directories.
Click to hide internal directories.