Versions in this module Expand all Collapse all v1 v1.8.1 Oct 16, 2024 v1.8.0 Feb 6, 2024 v1.7.0 Apr 1, 2023 v1.6.0 Apr 1, 2023 v1.5.0 Oct 13, 2022 v1.4.0 Nov 20, 2021 v1.3.0 Oct 2, 2021 v1.2.0 Apr 24, 2021 v1.1.0 Mar 10, 2021 v1.0.0 Mar 9, 2021 Changes in this version + const DeliveryStatusFailed + const DeliveryStatusPending + const DeliveryStatusSucceeded + var ErrDeliveryAttemptNotFound = errors.New("delivery_attempt_not_found") + var ErrDeliveryNotFound = errors.New("delivery_not_found") + var ErrWebhookNotFound = errors.New("webhook_not_found") + type Delivery struct + CreatedAt time.Time + DeliveryAttempts int + ID ID + Payload string + ScheduledAt time.Time + Status string + UpdatedAt time.Time + WebhookID ID + func (d Delivery) Validate() error + type DeliveryAttempt struct + CreatedAt time.Time + DeliveryID ID + Error string + ExecutionDuration int + ID ID + RawRequest string + RawResponse string + ResponseStatusCode int + Success bool + WebhookID ID + type DeliveryAttemptRepository interface + Create func(ctx context.Context, deliveryAttempt *DeliveryAttempt) error + Get func(ctx context.Context, getOptions RepositoryGetOptions) (*DeliveryAttempt, error) + List func(ctx context.Context, listOptions RepositoryListOptions) ([]*DeliveryAttempt, error) + type DeliveryAttemptService interface + Get func(ctx context.Context, getOptions RepositoryGetOptions) (*DeliveryAttempt, error) + List func(ctx context.Context, listOptions RepositoryListOptions) ([]*DeliveryAttempt, error) + type DeliveryRepository interface + Create func(ctx context.Context, delivery *Delivery) error + Delete func(ctx context.Context, id ID) error + Dispatch func(ctx context.Context) (*DeliveryAttempt, error) + Get func(ctx context.Context, getOptions RepositoryGetOptions) (*Delivery, error) + List func(ctx context.Context, listOptions RepositoryListOptions) ([]*Delivery, error) + Update func(ctx context.Context, delivery *Delivery) error + type DeliveryService interface + Create func(ctx context.Context, delivery *Delivery) error + Delete func(ctx context.Context, id ID) error + Get func(ctx context.Context, getOptions RepositoryGetOptions) (*Delivery, error) + List func(ctx context.Context, listOptions RepositoryListOptions) ([]*Delivery, error) + Update func(ctx context.Context, delivery *Delivery) error + type ID = uuid.UUID + type MigrationRepository interface + Run func(ctx context.Context) error + type MigrationService interface + Run func(ctx context.Context) error + type PingRepository interface + Run func(ctx context.Context) error + type PingService interface + Run func(ctx context.Context) error + type RepositoryGetOptions struct + Filters map[string]interface{} + type RepositoryListOptions struct + Filters map[string]interface{} + Limit int + Offset int + Order string + OrderBy string + type Webhook struct + Active bool + ContentType string + CreatedAt time.Time + DeliveryAttemptTimeout int + ID ID + MaxDeliveryAttempts int + Name string + RetryMaxBackoff int + RetryMinBackoff int + SecretToken string + URL string + UpdatedAt time.Time + ValidStatusCodes pq.Int32Array + func (w Webhook) Validate() error + type WebhookRepository interface + Create func(ctx context.Context, webhook *Webhook) error + Delete func(ctx context.Context, id ID) error + Get func(ctx context.Context, getOptions RepositoryGetOptions) (*Webhook, error) + List func(ctx context.Context, listOptions RepositoryListOptions) ([]*Webhook, error) + Update func(ctx context.Context, webhook *Webhook) error + type WebhookService interface + Create func(ctx context.Context, webhook *Webhook) error + Delete func(ctx context.Context, id ID) error + Get func(ctx context.Context, getOptions RepositoryGetOptions) (*Webhook, error) + List func(ctx context.Context, listOptions RepositoryListOptions) ([]*Webhook, error) + Update func(ctx context.Context, webhook *Webhook) error + type WorkerService interface + Run func(ctx context.Context) + Shutdown func(ctx context.Context)