webrss

package
v0.0.0-...-1506d98 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

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

func New

func New(logger *log.Logger, cfg *config.Config, categoryHandler handler, feedHandler handler, entryHandler handler,
	authenticateHandler *account.AuthenticateHandler, authenticateMiddleware *account.Middleware, feedsUpdater feedsUpdater, updaterInterval time.Duration) App

func (*App) AddOnExit

func (a *App) AddOnExit(fn func())

func (App) Run

func (a App) Run() error

func (App) Updater

func (a App) Updater(ctx context.Context)

type RESTEndPoint

type RESTEndPoint struct {
	Get     http.HandlerFunc
	Post    http.HandlerFunc
	Put     http.HandlerFunc
	Delete  http.HandlerFunc
	Options http.HandlerFunc
	Patch   http.HandlerFunc
	Head    http.HandlerFunc
}

func (*RESTEndPoint) Dispatch

func (rest *RESTEndPoint) Dispatch(w http.ResponseWriter, r *http.Request)

type WebRSSService

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

func NewService

func NewService(
	logger *log.Logger,
	categoryRepository categoryRepository, feedRepository feedRepository,
	entryRepository entryRepository, transactionRepository transactionRepository,
	httpClient *http.Client, feedFetcher feedFetcher,
) *WebRSSService

func (WebRSSService) CreateCategory

func (s WebRSSService) CreateCategory(ctx context.Context, category repository.Category) error

func (WebRSSService) CreateFeed

func (s WebRSSService) CreateFeed(ctx context.Context, feedURL string, categoryID int64) error

func (WebRSSService) DeleteCategory

func (s WebRSSService) DeleteCategory(ctx context.Context, id int64) error

func (WebRSSService) DeleteFeed

func (s WebRSSService) DeleteFeed(ctx context.Context, feed repository.Feed) error

func (WebRSSService) GetCategory

func (s WebRSSService) GetCategory(ctx context.Context, id int64) (repository.Category, error)

func (WebRSSService) GetEntry

func (s WebRSSService) GetEntry(ctx context.Context, id int64) (repository.Entry, error)

func (WebRSSService) GetFeed

func (s WebRSSService) GetFeed(ctx context.Context, id int64) (repository.Feed, error)

func (WebRSSService) ListCategories

func (s WebRSSService) ListCategories(ctx context.Context, params ...string) ([]repository.Category, error)

func (WebRSSService) ListEntriesForFeed

func (s WebRSSService) ListEntriesForFeed(ctx context.Context, feedID, page int64, perPage int) ([]repository.Entry, error)

func (WebRSSService) MoveCategoryDown

func (s WebRSSService) MoveCategoryDown(ctx context.Context, id int64) error

func (WebRSSService) MoveCategoryUp

func (s WebRSSService) MoveCategoryUp(ctx context.Context, id int64) error

func (WebRSSService) SaveEntries

func (s WebRSSService) SaveEntries(ctx context.Context, feedID int64, entries []repository.Entry) error

func (WebRSSService) Search

func (s WebRSSService) Search(ctx context.Context, phrase string, page int64, perPage int) ([]repository.Entry, error)

func (WebRSSService) UpdateCategory

func (s WebRSSService) UpdateCategory(ctx context.Context, category repository.Category) error

func (WebRSSService) UpdateFeed

func (s WebRSSService) UpdateFeed(ctx context.Context, feed repository.Feed) error

Jump to

Keyboard shortcuts

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