Documentation ¶
Index ¶
Constants ¶
const ( // LinkRelAlternate links are to an alternative version of the same resource. LinkRelAlternate = LinkRelType("alternate") // LinkRelRelated links are to a related resource. LinkRelRelated = LinkRelType("related") // LinkRelSelf links are a self-referential link. LinkRelSelf = LinkRelType("self") // LinkRelAttachment links are to a large or special attachment. LinkRelAttachment = LinkRelType("attachment") // LinkRelSource links are links to the source of information in the resource. LinkRelSource = LinkRelType("source") // LinkRelOther links are any not included in the above. LinkRelOther = LinkRelType("other") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attribute ¶
type Attributes ¶
type Attributes []Attribute
func GetAttributes ¶
func GetAttributes(attrs Attributes, namespace, name string) (out Attributes)
type Category ¶
Category is a category that a feed or entry belongs to. Id should be reasonably unique, and Name can be provided if the desired user-readable name should be different from the Id.
type Entry ¶
type Extension ¶
Extension defines a value that extends a feed. The expression of this depends on the protocol, but generally, they'll be elements not defined by the normal protocol separated by some namespace or object name.
type Extensions ¶
type Extensions []Extension
Extensions defines a set of values to tack on to a specific feed element.
func GetExtensions ¶
func GetExtensions(exts Extensions, namespace, name string) (out Extensions)
Get gets the subset of Extensions where every Extension has namespace and name. If there is no namespace, ignores namespace and just matches the name.
type Feed ¶
type Feed struct { Attributes Attributes FeedMeta Extensions Extensions Entries []Entry }
type FeedMeta ¶
type Link ¶
type Link struct { Href string RelType LinkRelType MediaType string ContentLength int Language string }
Link represents a link to something in a feed. Usually, these are links to a specific resource related to the feed or entry, like self-links, alternative translations, etc. The constants defined for the LinkRel type represent defined Link.RelType for various formats and protocols, but every type isn't guaranteed to work for every format depending on where I am in development.
func GetLinksWithRel ¶
func GetLinksWithRel(ls []Link, rel LinkRelType) (out []Link)
type Person ¶
type Person struct { Name string Link Link Email string Extensions Extensions }