controller

package
v0.0.0-...-23cec36 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArticleGet

type ArticleGet struct {
	Fetcher     datasources.ArticleFetcher
	CacheMaxAge time.Duration
}

func (ArticleGet) ServeHTTP

func (c ArticleGet) ServeHTTP(w http.ResponseWriter, r *http.Request)

type ArticlesList

type ArticlesList struct {
	Lister      datasources.LatestArticleLister
	CacheMaxAge time.Duration
}

func (ArticlesList) ServeHTTP

func (c ArticlesList) ServeHTTP(w http.ResponseWriter, r *http.Request)

type ArticlesListMetadata

type ArticlesListMetadata struct{}

type ArticlesListResponse

type ArticlesListResponse struct {
	Data     []domain.Article     `json:"data"`
	Metadata ArticlesListMetadata `json:"metadata"`
}

type RSS

type RSS struct {
	FeedHostname    string
	FeedPath        string
	FeedAuthorName  string
	FeedAuthorEmail string
	Dataset         datasources.DatasetRepository
	CacheMaxAge     time.Duration
}

func (RSS) ServeHTTP

func (c RSS) ServeHTTP(w http.ResponseWriter, r *http.Request)

type SimilarArticlesList

type SimilarArticlesList struct {
	Fetcher     datasources.ArticleFetcher
	Similarity  datasources.SimilarArticleLister
	CacheMaxAge time.Duration
}

func (SimilarArticlesList) ServeHTTP

func (c SimilarArticlesList) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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