repository

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupDatabaseConnection

func SetupDatabaseConnection(ctx context.Context, cfg *domain.Config) (*pgxpool.Pool, error)

SetupDatabaseConnection returns a configured pgx pool.

Types

type HealthCheck added in v0.3.0

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

HealthCheck is an implementation of domain.HealthCheckRepository.

func NewHealthCheck added in v0.3.0

func NewHealthCheck(pool *pgxpool.Pool) *HealthCheck

NewHealthCheck returns an implementation of domain.HealthCheckRepository.

func (*HealthCheck) Check added in v0.3.0

func (h *HealthCheck) Check(ctx context.Context) (*domain.HealthCheck, error)

type Message

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

Message is an implementation of domain.MessageRepository.

func NewMessage

func NewMessage(pool *pgxpool.Pool) *Message

NewMessage returns an implementation of domain.MessageRepository.

func (*Message) Ack

func (m *Message) Ack(ctx context.Context, id string) error

func (*Message) Create

func (m *Message) Create(ctx context.Context, message *domain.Message) error

func (*Message) CreateMany added in v0.2.0

func (m *Message) CreateMany(ctx context.Context, messages []*domain.Message) error

func (*Message) Get

func (m *Message) Get(ctx context.Context, id string) (*domain.Message, error)

func (*Message) List

func (m *Message) List(ctx context.Context, queue *domain.Queue, label *string, limit uint) ([]*domain.Message, error)

func (*Message) Nack

func (m *Message) Nack(ctx context.Context, id string, visibilityTimeoutSeconds uint) error

type Queue

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

Queue is an implementation of domain.QueueRepository.

func NewQueue

func NewQueue(pool *pgxpool.Pool) *Queue

NewQueue returns an implementation of domain.QueueRepository.

func (*Queue) Cleanup

func (q *Queue) Cleanup(ctx context.Context, id string) error

func (*Queue) Create

func (q *Queue) Create(ctx context.Context, queue *domain.Queue) error

func (*Queue) Delete

func (q *Queue) Delete(ctx context.Context, id string) error

func (*Queue) Get

func (q *Queue) Get(ctx context.Context, id string) (*domain.Queue, error)

func (*Queue) List

func (q *Queue) List(ctx context.Context, offset, limit uint) ([]*domain.Queue, error)

func (*Queue) Purge

func (q *Queue) Purge(ctx context.Context, id string) error

func (*Queue) Stats

func (q *Queue) Stats(ctx context.Context, id string) (*domain.QueueStats, error)

func (*Queue) Update

func (q *Queue) Update(ctx context.Context, queue *domain.Queue) error

type Subscription added in v0.2.0

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

Subscription is an implementation of domain.SubscriptionRepository.

func NewSubscription added in v0.2.0

func NewSubscription(pool *pgxpool.Pool) *Subscription

NewSubscription returns an implementation of domain.SubscriptionRepository.

func (*Subscription) Create added in v0.2.0

func (s *Subscription) Create(ctx context.Context, subscription *domain.Subscription) error

func (*Subscription) Delete added in v0.2.0

func (s *Subscription) Delete(ctx context.Context, id string) error

func (*Subscription) Get added in v0.2.0

func (*Subscription) List added in v0.2.0

func (s *Subscription) List(ctx context.Context, offset, limit uint) ([]*domain.Subscription, error)

func (*Subscription) ListByTopic added in v0.2.0

func (s *Subscription) ListByTopic(ctx context.Context, topicID string, offset, limit uint) ([]*domain.Subscription, error)

type Topic added in v0.2.0

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

Topic is an implementation of domain.TopicRepository.

func NewTopic added in v0.2.0

func NewTopic(pool *pgxpool.Pool) *Topic

NewTopic returns an implementation of domain.TopicRepository.

func (*Topic) Create added in v0.2.0

func (t *Topic) Create(ctx context.Context, topic *domain.Topic) error

func (*Topic) Delete added in v0.2.0

func (t *Topic) Delete(ctx context.Context, id string) error

func (*Topic) Get added in v0.2.0

func (t *Topic) Get(ctx context.Context, id string) (*domain.Topic, error)

func (*Topic) List added in v0.2.0

func (t *Topic) List(ctx context.Context, offset, limit uint) ([]*domain.Topic, error)

Jump to

Keyboard shortcuts

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