subscriptions

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("subscription not found")
)

Functions

func Module

func Module() fx.Option

Types

type Service

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

func NewService

func NewService(subscriptions *repository, logger *zap.Logger) *Service

func (*Service) DeleteByUUID

func (s *Service) DeleteByUUID(ctx context.Context, uuid string) error

func (*Service) GetByUUID

func (s *Service) GetByUUID(ctx context.Context, uuid string) (*Subscription, error)

func (*Service) Replace

func (s *Service) Replace(ctx context.Context, draft SubscriptionIn) (*Subscription, error)

func (*Service) SelectByEvent

func (s *Service) SelectByEvent(ctx context.Context, event string) ([]Subscription, error)

func (*Service) SelectByUUID

func (s *Service) SelectByUUID(ctx context.Context, uuid ...string) ([]Subscription, error)

type Subscription

type Subscription struct {
	UUID      string
	URL       string
	Secret    string
	Events    []string
	CreatedAt time.Time
	UpdatedAt time.Time
}

type SubscriptionIn

type SubscriptionIn struct {
	UUID   string
	URL    string
	Secret string
	Events []string
}

Jump to

Keyboard shortcuts

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