Documentation
¶
Index ¶
- type OptionalPatcher
- type Patch
- type PatchAction
- type PatchField
- func (p PatchField[T]) Action() PatchAction
- func (p PatchField[T]) Apply(operand *T) error
- func (p PatchField[T]) ApplyOption(current optional.Optional[T]) error
- func (p PatchField[T]) IsNoop(current T) bool
- func (p PatchField[T]) IsNoopOption(current optional.Optional[T]) bool
- func (p PatchField[T]) Peek() optional.Optional[T]
- type PatchFunc
- type PatchMap
- type PatchSet
- type Patchable
- type Patcher
- type PrimativePatch
- type ValuePatcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OptionalPatcher ¶
type OptionalPatcher[T comparable] struct { // contains filtered or unexported fields }
func NewOptionalPatcher ¶
func NewOptionalPatcher[T comparable](target optional.Optional[T], patch Patch[T]) *OptionalPatcher[T]
func (*OptionalPatcher[T]) Apply ¶
func (p *OptionalPatcher[T]) Apply() error
func (OptionalPatcher[T]) IsNoop ¶
func (p OptionalPatcher[T]) IsNoop() bool
type PatchField ¶
type PatchField[T comparable] struct { // contains filtered or unexported fields }
func GetFieldPatch ¶
func GetFieldPatch[T comparable](old, updated T) PatchField[T]
func GetOptionFieldPatch ¶
func GetOptionFieldPatch[T comparable](old, updated optional.Optional[T]) PatchField[T]
func NewNoop ¶
func NewNoop[T comparable]() PatchField[T]
func NewRemoval ¶
func NewRemoval[T comparable]() PatchField[T]
func NewReplace ¶
func NewReplace[T comparable](updated T) PatchField[T]
func (PatchField[T]) Action ¶
func (p PatchField[T]) Action() PatchAction
func (PatchField[T]) Apply ¶
func (p PatchField[T]) Apply(operand *T) error
func (PatchField[T]) ApplyOption ¶
func (p PatchField[T]) ApplyOption(current optional.Optional[T]) error
func (PatchField[T]) IsNoop ¶
func (p PatchField[T]) IsNoop(current T) bool
func (PatchField[T]) IsNoopOption ¶
func (p PatchField[T]) IsNoopOption(current optional.Optional[T]) bool
func (PatchField[T]) Peek ¶
func (p PatchField[T]) Peek() optional.Optional[T]
type PatchFunc ¶
type PatchFunc[T comparable] func(left, right T) error
type PatchMap ¶
type PatchMap struct {
// contains filtered or unexported fields
}
func NewPatchMap ¶
func NewPatchMap() *PatchMap
type Patchable ¶
type Patchable[Self comparable, P Patch[Self]] interface { WithPatch(P) (Self, error) Patch(P) error }
type PrimativePatch ¶
type PrimativePatch[T comparable] interface { Patch[T] Action() PatchAction Peek() optional.Option[T] }
type ValuePatcher ¶
type ValuePatcher[T comparable] struct { // contains filtered or unexported fields }
func NewValuePatcher ¶
func NewValuePatcher[T comparable](target *T, patch Patch[T]) *ValuePatcher[T]
func (*ValuePatcher[T]) Apply ¶
func (p *ValuePatcher[T]) Apply() error
func (ValuePatcher[T]) IsNoop ¶
func (p ValuePatcher[T]) IsNoop() bool
Click to show internal directories.
Click to hide internal directories.