service

package
v1.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Delivery

type Delivery struct {
	// contains filtered or unexported fields
}

Delivery implements postmand.DeliveryService interface.

func NewDelivery

func NewDelivery(deliveryRepository postmand.DeliveryRepository) *Delivery

NewDelivery will create an implementation of postmand.DeliveryService.

func (Delivery) Create

func (d Delivery) Create(ctx context.Context, delivery *postmand.Delivery) error

Create postmand.Delivery on database.

func (Delivery) Delete

func (d Delivery) Delete(ctx context.Context, id postmand.ID) error

Delete postmand.Delivery on database.

func (Delivery) Get

Get returns postmand.Delivery by options filter.

func (Delivery) List

List returns a slice of postmand.Delivery by options filter.

func (Delivery) Update

func (d Delivery) Update(ctx context.Context, delivery *postmand.Delivery) error

Update postmand.Delivery on database.

type DeliveryAttempt

type DeliveryAttempt struct {
	// contains filtered or unexported fields
}

DeliveryAttempt implements postmand.DeliveryAttemptService interface.

func NewDeliveryAttempt

func NewDeliveryAttempt(deliveryAttemptRepository postmand.DeliveryAttemptRepository) *DeliveryAttempt

NewDeliveryAttempt will create an implementation of postmand.DeliveryAttemptService.

func (DeliveryAttempt) Get

Get returns postmand.DeliveryAttempt by options filter.

func (DeliveryAttempt) List

List returns a slice of postmand.DeliveryAttempt by options filter.

type Migration

type Migration struct {
	// contains filtered or unexported fields
}

Migration implements postmand.MigrationService interface.

func NewMigration

func NewMigration(migrationRepo postmand.MigrationRepository, logger *zap.Logger) *Migration

NewMigration will create an implementation of postmand.MigrationService.

func (Migration) Run

func (m Migration) Run(ctx context.Context) error

Run database migrations.

type Ping

type Ping struct {
	// contains filtered or unexported fields
}

Ping implements postmand.PingService interface.

func NewPing

func NewPing(pingRepository postmand.PingRepository) *Ping

NewPing will create an implementation of postmand.PingService.

func (Ping) Run

func (p Ping) Run(ctx context.Context) error

Run ping operation against the database.

type Webhook

type Webhook struct {
	// contains filtered or unexported fields
}

Webhook implements postmand.WebhookService interface.

func NewWebhook

func NewWebhook(webhookRepository postmand.WebhookRepository) *Webhook

NewWebhook will create an implementation of postmand.WebhookService.

func (Webhook) Create

func (w Webhook) Create(ctx context.Context, webhook *postmand.Webhook) error

Create postmand.Webhook on database.

func (Webhook) Delete

func (w Webhook) Delete(ctx context.Context, id postmand.ID) error

Delete postmand.Webhook on database.

func (Webhook) Get

Get returns postmand.Webhook by options filter.

func (Webhook) List

func (w Webhook) List(ctx context.Context, listOptions postmand.RepositoryListOptions) ([]*postmand.Webhook, error)

List returns a slice of postmand.Webhook by options filter.

func (Webhook) Update

func (w Webhook) Update(ctx context.Context, webhook *postmand.Webhook) error

Update postmand.Webhook on database.

type Worker

type Worker struct {
	// contains filtered or unexported fields
}

Worker implements postmand.WorkerService interface.

func NewWorker

func NewWorker(deliveryRepository postmand.DeliveryRepository, logger *zap.Logger, pollingInterval time.Duration) *Worker

NewWorker will create an implementation of postmand.WorkerService.

func (*Worker) Run

func (w *Worker) Run(ctx context.Context)

Run sending of webhooks until the Shutdown method is called.

func (*Worker) Shutdown

func (w *Worker) Shutdown(ctx context.Context)

Shutdown stops the forloop in Run method.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL