Documentation ¶
Index ¶
- type Subscribe
- type SubscribeService
- func (s *SubscribeService) AddSubscription(userCredit, channelCredit string) error
- func (s *SubscribeService) DeleteSubscription(userCredit, channelCredit string) error
- func (s *SubscribeService) DownloadContent() error
- func (s *SubscribeService) FetchContent() (int, error)
- func (s *SubscribeService) ListContent(userCredit string) ([]*dao.Content, error)
- func (s *SubscribeService) ListSubscription(userCredit string) ([]*dao.Subscription, error)
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.
Click to show internal directories.
Click to hide internal directories.