Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Operation ¶
type Operation struct {
Value any `json:"value,omitempty"`
OldValue any `json:"oldValue"`
Operation OperationType `json:"op"`
// NOTE: From is not used by this package as of now, since we do not support move and copy operations.
// From string `json:"from,omitempty"`
Path jsonpointer.Pointer `json:"path"`
UnmarshaledValue any `json:"unmarshaledValue"`
Metadata map[string]string `json:"metadata,omitempty"`
}
Operation represents a single JSON Patch (RFC6902) operation.
type OperationType ¶
type OperationType string
const ( OperationAdd OperationType = "add" OperationReplace OperationType = "replace" OperationRemove OperationType = "remove" // FIXME: Operation move and copy are not supported by this package. // OperationMove OperationType = "move" // OperationCopy OperationType = "copy" OperationTest OperationType = "test" )
JSON Patch operation types. These are defined in RFC 6902 section 4. https://datatracker.ietf.org/doc/html/rfc6902#section-4
func (*OperationType) UnmarshalJSON ¶
func (o *OperationType) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.