Documentation
¶
Index ¶
- func CreateStrategicMergePatch(original, modified []byte, dataStruct interface{}) ([]byte, error)
- func StrategicMergePatch(original, patch []byte, dataStruct interface{}) ([]byte, error)
- func StrategicMergePatchData(original, patch []byte, dataStruct interface{}) ([]byte, error)
- type SortableSliceOfMaps
- type SortableSliceOfScalars
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateStrategicMergePatch ¶ added in v1.1.0
func CreateStrategicMergePatch(original, modified []byte, dataStruct interface{}) ([]byte, error)
CreateStrategicMergePatch creates a patch that can be passed to StrategicMergePatch. The original and modified documents must be passed to the method as json encoded content. It will return a mergeable json document with differences from original to modified, or an error if either of the two documents is invalid.
func StrategicMergePatch ¶ added in v1.1.0
func StrategicMergePatch(original, patch []byte, dataStruct interface{}) ([]byte, error)
StrategicMergePatch applies a strategic merge patch. The patch and the original document must be json encoded content. A patch can be created from an original and a modified document by calling CreateStrategicMergePatch.
func StrategicMergePatchData ¶
func StrategicMergePatchData(original, patch []byte, dataStruct interface{}) ([]byte, error)
StrategicMergePatchData applies a patch using strategic merge patch semantics. Deprecated: StrategicMergePatchData is deprecated. Use the synonym StrategicMergePatch, instead, which follows the naming convention of evanphx/json-patch.
Types ¶
type SortableSliceOfMaps ¶
type SortableSliceOfMaps struct {
// contains filtered or unexported fields
}
type SortableSliceOfScalars ¶
type SortableSliceOfScalars struct {
// contains filtered or unexported fields
}