repository

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: 20 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.DeliveryRepository interface.

func NewDelivery

func NewDelivery(db *sqlx.DB) *Delivery

NewDelivery will create an implementation of postmand.DeliveryRepository.

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) Dispatch

func (d Delivery) Dispatch(ctx context.Context) (*postmand.DeliveryAttempt, error)

Dispatch fetchs a delivery and send to url destination.

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.DeliveryAttemptRepository interface.

func NewDeliveryAttempt

func NewDeliveryAttempt(db *sqlx.DB) *DeliveryAttempt

NewDeliveryAttempt returns postmand.DeliveryAttempt with db connection.

func (DeliveryAttempt) Create

func (d DeliveryAttempt) Create(ctx context.Context, deliveryAttempt *postmand.DeliveryAttempt) error

Create postmand.DeliveryAttempt on database.

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.MigrationRepository interface.

func NewMigration

func NewMigration(db *sqlx.DB, migrationDir string) *Migration

NewMigration will create an implementation of postmand.MigrationRepository.

func (*Migration) Run

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

Run migrations

type Ping

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

Ping implements postmand.PingRepository interface.

func NewPing

func NewPing(db *sqlx.DB) *Ping

NewPing will create an implementation of postmand.PingRepository.

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.WebhookRepository interface.

func NewWebhook

func NewWebhook(db *sqlx.DB) *Webhook

NewWebhook will create an implementation of postmand.WebhookRepository.

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.

Jump to

Keyboard shortcuts

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