Documentation ¶
Index ¶
- Variables
- func ExtractFeedLinks(content io.Reader, base string) (links []string, err error)
- func GetFeedID(url string) string
- func GetFeedTags(tags *string) []string
- func JoinTags(tags ...string) string
- func NewArticle(feed *model.FeedDef, item *gofeed.Item) *model.Article
- func NewArticles(feed *model.FeedDef, items []*gofeed.Item) []*model.Article
- func NewFeed(url string, tags *string) (*model.FeedDef, error)
- func NewFeedResponseFromDef(def *model.FeedDef) *app.FeedResponse
- type CustomAtomTranslator
- type CustomRSSTranslator
Constants ¶
This section is empty.
Variables ¶
var ValidFeedContentType = regexp.MustCompile(`^(application|text)/(\w+\+)?xml`)
ValidFeedContentType is a REGEXP used to validate valid feed Content-Type
Functions ¶
func ExtractFeedLinks ¶
ExtractFeedLinks extract feed links from HTML content
func GetFeedTags ¶
GetFeedTags extracts tags from a comma separated list of tags
func NewArticle ¶
NewArticle creates a new article from a feed item
func NewArticles ¶
NewArticles creates a new array of articles from an array of feed item
func NewFeedResponseFromDef ¶
func NewFeedResponseFromDef(def *model.FeedDef) *app.FeedResponse
NewFeedResponseFromDef creates new Feed response from a definition
Types ¶
type CustomAtomTranslator ¶
type CustomAtomTranslator struct {
// contains filtered or unexported fields
}
CustomAtomTranslator is a custom GoFeed Atom translator created to extract Hub link.
func NewCustomAtomTranslator ¶
func NewCustomAtomTranslator() *CustomAtomTranslator
NewCustomAtomTranslator creates nes custom GoFeed Atom translator.
type CustomRSSTranslator ¶
type CustomRSSTranslator struct {
// contains filtered or unexported fields
}
CustomRSSTranslator is a custom GoFeed RSS translator created to extract Hub link.
func NewCustomRSSTranslator ¶
func NewCustomRSSTranslator() *CustomRSSTranslator
NewCustomRSSTranslator creates nes custom GoFeed RSS translator.