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 v0.18.4
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 v0.18.4
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 ¶
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
}
func (SortableSliceOfMaps) Len ¶
func (ss SortableSliceOfMaps) Len() int
func (SortableSliceOfMaps) Less ¶
func (ss SortableSliceOfMaps) Less(i, j int) bool
func (SortableSliceOfMaps) Swap ¶
func (ss SortableSliceOfMaps) Swap(i, j int)
type SortableSliceOfScalars ¶
type SortableSliceOfScalars struct {
// contains filtered or unexported fields
}
func (SortableSliceOfScalars) Len ¶
func (ss SortableSliceOfScalars) Len() int
func (SortableSliceOfScalars) Less ¶
func (ss SortableSliceOfScalars) Less(i, j int) bool
func (SortableSliceOfScalars) Swap ¶
func (ss SortableSliceOfScalars) Swap(i, j int)