usecases

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddFeed

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

func NewAddFeed

func NewAddFeed(repository rss.Repository) *AddFeed

func (*AddFeed) AddFeed

func (a *AddFeed) AddFeed(req AddFeedRequest) (AddFeedResponse, error)

type AddFeedRequest

type AddFeedRequest struct {
	Name string
	Url  string
}

type AddFeedResponse

type AddFeedResponse struct {
	Message string
}

type GetFeeds

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

func NewGetFeeds

func NewGetFeeds(repository rss.Repository) *GetFeeds

func (*GetFeeds) Get

func (g *GetFeeds) Get() (GetFeedsResponse, error)

type GetFeedsFeed

type GetFeedsFeed struct {
	Name string
	Url  string
}

type GetFeedsResponse

type GetFeedsResponse struct {
	Feeds   []*GetFeedsFeed
	Message string
}

type GetSubscriptionResponse

type GetSubscriptionResponse struct {
	Message       string
	Subscriptions []GetSubscriptionsSub
}

type GetSubscriptions

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

func NewGetSubscriptions

func NewGetSubscriptions(repository rss.Repository) *GetSubscriptions

func (GetSubscriptions) Get

type GetSubscriptionsRequest

type GetSubscriptionsRequest struct {
	User     string
	Optional struct{ Channel string }
}

type GetSubscriptionsSub

type GetSubscriptionsSub struct {
	Feed     string
	Channel  string
	Keywords []string
}

type Subscribe

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

func NewSubscribe

func NewSubscribe(repo rss.Repository) *Subscribe

func (*Subscribe) Subscribe

func (s *Subscribe) Subscribe(req SubscribeRequest) (SubscribeResponse, error)

Subscribe subscribes a user to a Feed.

type SubscribeRequest

type SubscribeRequest struct {
	FeedName    string
	Channel     string
	Keywords    string
	User        string
	IgnoreWords string
}

type SubscribeResponse

type SubscribeResponse struct {
	Message string
}

type Unsubscribe

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

func NewUnsubscribe

func NewUnsubscribe(repo rss.Repository) *Unsubscribe

func (Unsubscribe) Unsubscribe

func (useCase Unsubscribe) Unsubscribe(
	request UnsubscribeRequest) (UnsubscribeResponse, error)

type UnsubscribeRequest

type UnsubscribeRequest struct {
	User     string
	Channel  string
	FeedName string
}

type UnsubscribeResponse

type UnsubscribeResponse struct {
	Message string
}

Jump to

Keyboard shortcuts

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