Documentation
¶
Index ¶
- func Deserialize(b []byte) (any, error)
- type PatchAddItem
- func (a PatchAddItem) ApplyTo(spec *subscription.SubscriptionSpec, actx subscription.ApplyContext) error
- func (p PatchAddItem) MarshalJSON() ([]byte, error)
- func (a PatchAddItem) Op() subscription.PatchOperation
- func (a PatchAddItem) Path() subscription.PatchPath
- func (a PatchAddItem) Validate() error
- func (a PatchAddItem) Value() subscription.SubscriptionItemSpec
- func (a PatchAddItem) ValueAsAny() any
- type PatchAddPhase
- func (a PatchAddPhase) ApplyTo(spec *subscription.SubscriptionSpec, actx subscription.ApplyContext) error
- func (p PatchAddPhase) MarshalJSON() ([]byte, error)
- func (a PatchAddPhase) Op() subscription.PatchOperation
- func (a PatchAddPhase) Path() subscription.PatchPath
- func (a PatchAddPhase) Validate() error
- func (a PatchAddPhase) Value() subscription.CreateSubscriptionPhaseInput
- func (a PatchAddPhase) ValueAsAny() any
- type PatchRemoveItem
- func (r PatchRemoveItem) ApplyTo(spec *subscription.SubscriptionSpec, actx subscription.ApplyContext) error
- func (p PatchRemoveItem) MarshalJSON() ([]byte, error)
- func (r PatchRemoveItem) Op() subscription.PatchOperation
- func (r PatchRemoveItem) Path() subscription.PatchPath
- func (r PatchRemoveItem) Validate() error
- type PatchRemovePhase
- func (r PatchRemovePhase) ApplyTo(spec *subscription.SubscriptionSpec, actx subscription.ApplyContext) error
- func (p PatchRemovePhase) MarshalJSON() ([]byte, error)
- func (r PatchRemovePhase) Op() subscription.PatchOperation
- func (r PatchRemovePhase) Path() subscription.PatchPath
- func (r PatchRemovePhase) Validate() error
- func (r PatchRemovePhase) Value() subscription.RemoveSubscriptionPhaseInput
- func (r PatchRemovePhase) ValueAsAny() any
- type PatchStretchPhase
- func (p PatchStretchPhase) ApplyTo(spec *subscription.SubscriptionSpec, actx subscription.ApplyContext) error
- func (p PatchStretchPhase) MarshalJSON() ([]byte, error)
- func (p PatchStretchPhase) Op() subscription.PatchOperation
- func (p PatchStretchPhase) Path() subscription.PatchPath
- func (p PatchStretchPhase) Validate() error
- func (p PatchStretchPhase) Value() isodate.Period
- func (p PatchStretchPhase) ValueAsAny() any
- type PatchUnscheduleEdit
- func (p PatchUnscheduleEdit) ApplyTo(spec *subscription.SubscriptionSpec, actx subscription.ApplyContext) error
- func (p PatchUnscheduleEdit) MarshalJSON() ([]byte, error)
- func (p PatchUnscheduleEdit) Op() subscription.PatchOperation
- func (p PatchUnscheduleEdit) Path() subscription.PatchPath
- func (p PatchUnscheduleEdit) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PatchAddItem ¶
type PatchAddItem struct {
PhaseKey string
ItemKey string
CreateInput subscription.SubscriptionItemSpec
}
func (PatchAddItem) ApplyTo ¶
func (a PatchAddItem) ApplyTo(spec *subscription.SubscriptionSpec, actx subscription.ApplyContext) error
func (PatchAddItem) MarshalJSON ¶
func (p PatchAddItem) MarshalJSON() ([]byte, error)
func (PatchAddItem) Op ¶
func (a PatchAddItem) Op() subscription.PatchOperation
func (PatchAddItem) Path ¶
func (a PatchAddItem) Path() subscription.PatchPath
func (PatchAddItem) Validate ¶
func (a PatchAddItem) Validate() error
func (PatchAddItem) Value ¶
func (a PatchAddItem) Value() subscription.SubscriptionItemSpec
func (PatchAddItem) ValueAsAny ¶
func (a PatchAddItem) ValueAsAny() any
type PatchAddPhase ¶
type PatchAddPhase struct {
PhaseKey string
CreateInput subscription.CreateSubscriptionPhaseInput
}
func (PatchAddPhase) ApplyTo ¶
func (a PatchAddPhase) ApplyTo(spec *subscription.SubscriptionSpec, actx subscription.ApplyContext) error
func (PatchAddPhase) MarshalJSON ¶
func (p PatchAddPhase) MarshalJSON() ([]byte, error)
func (PatchAddPhase) Op ¶
func (a PatchAddPhase) Op() subscription.PatchOperation
func (PatchAddPhase) Path ¶
func (a PatchAddPhase) Path() subscription.PatchPath
func (PatchAddPhase) Validate ¶
func (a PatchAddPhase) Validate() error
func (PatchAddPhase) Value ¶
func (a PatchAddPhase) Value() subscription.CreateSubscriptionPhaseInput
func (PatchAddPhase) ValueAsAny ¶
func (a PatchAddPhase) ValueAsAny() any
type PatchRemoveItem ¶
func (PatchRemoveItem) ApplyTo ¶
func (r PatchRemoveItem) ApplyTo(spec *subscription.SubscriptionSpec, actx subscription.ApplyContext) error
RemoveItem removes the last version for the provided key
func (PatchRemoveItem) MarshalJSON ¶
func (p PatchRemoveItem) MarshalJSON() ([]byte, error)
func (PatchRemoveItem) Op ¶
func (r PatchRemoveItem) Op() subscription.PatchOperation
func (PatchRemoveItem) Path ¶
func (r PatchRemoveItem) Path() subscription.PatchPath
func (PatchRemoveItem) Validate ¶
func (r PatchRemoveItem) Validate() error
type PatchRemovePhase ¶
type PatchRemovePhase struct {
PhaseKey string
RemoveInput subscription.RemoveSubscriptionPhaseInput
}
func (PatchRemovePhase) ApplyTo ¶
func (r PatchRemovePhase) ApplyTo(spec *subscription.SubscriptionSpec, actx subscription.ApplyContext) error
func (PatchRemovePhase) MarshalJSON ¶
func (p PatchRemovePhase) MarshalJSON() ([]byte, error)
func (PatchRemovePhase) Op ¶
func (r PatchRemovePhase) Op() subscription.PatchOperation
func (PatchRemovePhase) Path ¶
func (r PatchRemovePhase) Path() subscription.PatchPath
func (PatchRemovePhase) Validate ¶
func (r PatchRemovePhase) Validate() error
func (PatchRemovePhase) Value ¶
func (r PatchRemovePhase) Value() subscription.RemoveSubscriptionPhaseInput
func (PatchRemovePhase) ValueAsAny ¶
func (r PatchRemovePhase) ValueAsAny() any
type PatchStretchPhase ¶
func (PatchStretchPhase) ApplyTo ¶
func (p PatchStretchPhase) ApplyTo(spec *subscription.SubscriptionSpec, actx subscription.ApplyContext) error
func (PatchStretchPhase) MarshalJSON ¶
func (p PatchStretchPhase) MarshalJSON() ([]byte, error)
func (PatchStretchPhase) Op ¶
func (p PatchStretchPhase) Op() subscription.PatchOperation
func (PatchStretchPhase) Path ¶
func (p PatchStretchPhase) Path() subscription.PatchPath
func (PatchStretchPhase) Validate ¶
func (p PatchStretchPhase) Validate() error
func (PatchStretchPhase) Value ¶
func (p PatchStretchPhase) Value() isodate.Period
func (PatchStretchPhase) ValueAsAny ¶
func (p PatchStretchPhase) ValueAsAny() any
type PatchUnscheduleEdit ¶
type PatchUnscheduleEdit struct{}
func (PatchUnscheduleEdit) ApplyTo ¶
func (p PatchUnscheduleEdit) ApplyTo(spec *subscription.SubscriptionSpec, actx subscription.ApplyContext) error
"Unscheduling an edit" is a concept that might intuitively makes sense for clients: 1. Making some edit to a subscription 2. You want to do another edit 3. Your edit discards the previous edit
However, this is not really a behavior that makes sense from a server perspective. The compromise we make is that, for most cases, when a client wants to unschedule an edit, all they really want to do is get rid of any future changes to the subscription.
As editing future phases doesn't create multiple versions of the items (see AddItem and RemoveItem), we only tackle editing the current phase.
UnscheduleEdit simply removes all scheduled versions of the items in the current phase.
func (PatchUnscheduleEdit) MarshalJSON ¶
func (p PatchUnscheduleEdit) MarshalJSON() ([]byte, error)
func (PatchUnscheduleEdit) Op ¶
func (p PatchUnscheduleEdit) Op() subscription.PatchOperation
func (PatchUnscheduleEdit) Path ¶
func (p PatchUnscheduleEdit) Path() subscription.PatchPath
func (PatchUnscheduleEdit) Validate ¶
func (p PatchUnscheduleEdit) Validate() error