Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrParseBytes indicates an error occurred trying to parse a byte array as a feed. ErrParseBytes = errors.New("unable to parse bytes as feed") )
var ErrUnmarshal = errors.New("unmarshaling object failed")
ErrUnmarshal indicates an error occurred trying to unmarshal data into a given feed object.
Functions ¶
func Decode ¶
Decode will decode the byte array into the given type T, and assign values without a namespace with the given namespace.
func DetectSourceType ¶
func DetectSourceType(r io.Reader) (types.SourceType, error)
DetectSourceType determines the feed source by extracting key signatures from the data. It can detect supported feed formats as well as HTML.
Types ¶
type Feed ¶
type Feed struct {
types.FeedSource `json:"source"`
SourceType types.SourceType `json:"type"`
}
Feed represents any feed type containing a number of items.
func NewDecoder ¶
NewDecoder will create a new Feed of the given type from the given io.Reader.
func NewFeedFromSource ¶
func NewFeedFromSource[T types.FeedSource](source T) *Feed
NewFeedFromSource will create a new Feed from the given source that satisfies the FeedSource interface. This can be used to create a Feed from an existing rss.RSS or atom.Feed object.
func (*Feed) UnmarshalJSON ¶
UnmarshalJSON handles unmarshaling of a Feed from JSON.
type Item ¶
type Item struct {
types.ItemSource `json:"source"`
SourceType types.SourceType `json:"type"`
FeedTitle string `json:"feed_title"`
}
Item represents a single item or entry (or article) in a feed.
func (*Item) UnmarshalJSON ¶
UnmarshalJSON handles unmarshaling of an Item from JSON.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package atom provides primitives to interact with the openapi HTTP API.
|
Package atom provides primitives to interact with the openapi HTTP API. |
|
extensions
|
|
|
dc
Package dc provides primitives to interact with the openapi HTTP API.
|
Package dc provides primitives to interact with the openapi HTTP API. |
|
googleplay
Package googleplay provides primitives to interact with the openapi HTTP API.
|
Package googleplay provides primitives to interact with the openapi HTTP API. |
|
itunes
Package itunes provides primitives to interact with the openapi HTTP API.
|
Package itunes provides primitives to interact with the openapi HTTP API. |
|
media
Package media provides primitives to interact with the openapi HTTP API.
|
Package media provides primitives to interact with the openapi HTTP API. |
|
rss
Package rss provides primitives to interact with the openapi HTTP API.
|
Package rss provides primitives to interact with the openapi HTTP API. |
|
Package jsonfeed provides primitives to interact with the openapi HTTP API.
|
Package jsonfeed provides primitives to interact with the openapi HTTP API. |
|
Package opengraph provides primitives to interact with the openapi HTTP API.
|
Package opengraph provides primitives to interact with the openapi HTTP API. |
|
Package opml provides primitives to interact with the openapi HTTP API.
|
Package opml provides primitives to interact with the openapi HTTP API. |
|
Package rss provides primitives to interact with the openapi HTTP API.
|
Package rss provides primitives to interact with the openapi HTTP API. |
|
Package schema contains the OpenAPI schema definitions for go-syndication.
|
Package schema contains the OpenAPI schema definitions for go-syndication. |
|
Package sitemap provides primitives to interact with the openapi HTTP API.
|
Package sitemap provides primitives to interact with the openapi HTTP API. |
|
Package types provides primitives to interact with the openapi HTTP API.
|
Package types provides primitives to interact with the openapi HTTP API. |