service

package
v0.1.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2021 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrSubscriptionNotFound may be returned when job is not found.
	ErrSubscriptionNotFound = errors.New("subscription not found")

	// ErrAlreadySubscribed may be returned if link is already subscribed.
	ErrAlreadySubscribed = errors.New("link already subscribed")
)

Functions

This section is empty.

Types

type Service

type Service interface {
	Subscribe(userID int, link string, payload func(*beta.Beta)) error
	Unsubscribe(userID int, link string) error
	GetUserSubscriptions(userID int) ([]Subscription, error)

	io.Closer
}

Service describes subscription service. It will be periodically do payload.

func NewService

func NewService(repo repository.Repository, interval time.Duration) Service

NewService new Service instance.

type Subscription

type Subscription struct {
	repository.Subscription
}

Subscription describes user subscription.

Jump to

Keyboard shortcuts

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