subscribe

package
v0.0.0-...-f435a84 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Subscribe

type Subscribe interface {
	// Subscribe subscribes a user to a channel
	Subscribe(userID, channelID string) error
}

Subscribe is an interface that defines the methods that must be implemented by a subscription service.

type SubscribeService

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

func NewSubscribeService

func NewSubscribeService(ctx context.Context, mapper *dao.UnionMapper, downloader *downloader.Downloader, fetcher *fetcher.Fetcher) (*SubscribeService, error)

func (*SubscribeService) AddSubscription

func (s *SubscribeService) AddSubscription(userCredit, channelCredit string) error

AddSubscription adds a new subscription for a user to a channel.

func (*SubscribeService) DeleteSubscription

func (s *SubscribeService) DeleteSubscription(userCredit, channelCredit string) error

DeleteSubscription deletes an existing subscription for a user from a channel.

func (*SubscribeService) DownloadContent

func (s *SubscribeService) DownloadContent() error

DownloadContent downloads content for all subscriptions.

func (*SubscribeService) FetchContent

func (s *SubscribeService) FetchContent() (int, error)

FetchContent fetches content for all subscriptions.

func (*SubscribeService) ListContent

func (s *SubscribeService) ListContent(userCredit string) ([]*dao.Content, error)

func (*SubscribeService) ListSubscription

func (s *SubscribeService) ListSubscription(userCredit string) ([]*dao.Subscription, error)

ListSubscription lists all subscriptions for a user.

Jump to

Keyboard shortcuts

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