Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter interface {
SyncStateAdapter
entutils.TxCreator
}
type EventHandler ¶
type EventHandler interface {
HandleCancelledEvent(ctx context.Context, event *subscription.CancelledEvent) error
HandleDeletedEvent(ctx context.Context, event *subscription.DeletedEvent) error
HandleSubscriptionSyncEvent(ctx context.Context, event *subscription.SubscriptionSyncEvent) error
HandleInvoiceCreation(ctx context.Context, event *billing.StandardInvoiceCreatedEvent) error
}
type GetSyncStatesInput ¶
type GetSyncStatesInput = []models.NamespacedID
type InvalidateSyncStateInput ¶
type InvalidateSyncStateInput = models.NamespacedID
type Service ¶
type Service interface {
EventHandler
SyncService
SyncStateService
}
type SyncService ¶
type SyncService interface {
SyncByViewAndInvoiceCustomer(ctx context.Context, view subscription.SubscriptionView, asOf time.Time) error
SyncByIDAndInvoiceCustomer(ctx context.Context, subscriptionID models.NamespacedID, asOf time.Time) error
SyncByView(ctx context.Context, view subscription.SubscriptionView, asOf time.Time, opts ...SynchronizeSubscriptionOption) error
SyncByID(ctx context.Context, subscriptionID models.NamespacedID, asOf time.Time, opts ...SynchronizeSubscriptionOption) error
}
type SyncStateAdapter ¶
type SyncStateAdapter interface {
InvalidateSyncState(ctx context.Context, input InvalidateSyncStateInput) error
GetSyncStates(ctx context.Context, input GetSyncStatesInput) ([]SyncState, error)
UpsertSyncState(ctx context.Context, input UpsertSyncStateInput) error
}
type SyncStateService ¶
type SyncStateService interface {
GetSyncStates(ctx context.Context, input GetSyncStatesInput) ([]SyncState, error)
}
type SynchronizeSubscriptionOption ¶
type SynchronizeSubscriptionOption func(*SynchronizeSubscriptionOptions)
func EnableDryRun ¶
func EnableDryRun() SynchronizeSubscriptionOption
type SynchronizeSubscriptionOptions ¶
type SynchronizeSubscriptionOptions struct {
DryRun bool
}
type UpsertSyncStateInput ¶
type UpsertSyncStateInput = SyncState
func (UpsertSyncStateInput) Validate ¶
func (i UpsertSyncStateInput) Validate() error
Click to show internal directories.
Click to hide internal directories.