Documentation
¶
Overview ¶
Package atom provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT.
Package atom contains objects and methods defining the Atom syndication format.
Index ¶
- type Authors
- type Categories
- type Category
- type CommonAttributes
- type Content
- type Contributors
- type DateConstruct
- type Email
- type Entry
- func (e *Entry) GetAuthors() []string
- func (e *Entry) GetCategories() []string
- func (e *Entry) GetContent() *string
- func (e *Entry) GetContributors() []string
- func (e *Entry) GetDescription() string
- func (e *Entry) GetID() string
- func (e *Entry) GetImage() *types.ImageInfo
- func (e *Entry) GetLanguage() *string
- func (e *Entry) GetLink() string
- func (e *Entry) GetMediaGroup() *media.MediaGroup
- func (e *Entry) GetPublishedDate() *time.Time
- func (e *Entry) GetRights() *string
- func (e *Entry) GetTitle() string
- func (e *Entry) GetUpdatedDate() *time.Time
- func (e *Entry) Validate() error
- type Feed
- func (f *Feed) GetAuthors() []string
- func (f *Feed) GetCategories() []string
- func (f *Feed) GetContributors() []string
- func (f *Feed) GetDescription() string
- func (f *Feed) GetImage() *types.ImageInfo
- func (f *Feed) GetItems() []types.ItemSource
- func (f *Feed) GetLanguage() *string
- func (f *Feed) GetLink() string
- func (f *Feed) GetPublishedDate() *time.Time
- func (f *Feed) GetRights() *string
- func (f *Feed) GetSourceURL() string
- func (f *Feed) GetTitle() string
- func (f *Feed) GetUpdateInterval() time.Duration
- func (f *Feed) GetUpdatedDate() *time.Time
- func (f *Feed) SetImage(image *types.ImageInfo)
- func (f *Feed) SetSourceURL(url string)
- func (f *Feed) Validate() error
- type FeedMetadata
- type Generator
- type ID
- type Icon
- type Link
- type LinkRel
- type Links
- type Logo
- type Name
- type PersonConstruct
- type Published
- type Rights
- type Source
- type Subtitle
- type Summary
- type TextConstruct
- type Title
- type Type
- type URI
- type UndefinedContent
- type Updated
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authors ¶
type Authors = []PersonConstruct
Authors a list of persons who maintain authorship of the feed.
type Categories ¶
type Categories = []Category
Categories a list of categories associated with the feed.
type Category ¶
type Category struct {
// Base establishes the base URI (or IRI) for resolving any relative references found within the effective scope of the xml:base attribute.
Base *string `json:"base,omitempty" validate:"omitempty" xml:"base,attr,omitempty"`
// Lang indicates the natural language for the element and its descendents.
Lang *string `json:"lang,omitempty" validate:"omitempty,iso3166_1_alpha2|iso3166_1_alpha3|bcp47_language_tag" xml:"lang,attr,omitempty"`
// XMLName represents the XML namespace of an element.
XMLName xml.Name `json:"XMLName"`
// Attributes are any attributes of the element.
Attributes externalRef2.Attributes `json:"attributes" xml:",any,attr"`
// Label provides a human-readable label for display in end-user applications.
Label *xml.Attr `json:"label,omitempty" xml:"label,attr,omitempty"`
// Scheme is an IRI that identifies a categorization scheme.
Scheme *xml.Attr `json:"scheme,omitempty" xml:"scheme,attr,omitempty"`
// Term is a string that identifies the category to which the entry or feed belongs.
Term xml.Attr `json:"term" validate:"required" xml:"term,attr"`
// UndefinedContent represents additional undefined, unstructed text content for the element.
UndefinedContent *UndefinedContent `json:"undefined_content,omitempty" xml:",chardata"`
}
Category defines model for Category.
type CommonAttributes ¶
type CommonAttributes struct {
// Base establishes the base URI (or IRI) for resolving any relative references found within the effective scope of the xml:base attribute.
Base *string `json:"base,omitempty" validate:"omitempty" xml:"base,attr,omitempty"`
// Lang indicates the natural language for the element and its descendents.
Lang *string `json:"lang,omitempty" validate:"omitempty,iso3166_1_alpha2|iso3166_1_alpha3|bcp47_language_tag" xml:"lang,attr,omitempty"`
// Attributes are any attributes of the element.
Attributes externalRef2.Attributes `json:"attributes" xml:",any,attr"`
}
CommonAttributes are common attributes across Atom elements.
type Content ¶
type Content struct {
// Base establishes the base URI (or IRI) for resolving any relative references found within the effective scope of the xml:base attribute.
Base *string `json:"base,omitempty" validate:"omitempty" xml:"base,attr,omitempty"`
// Lang indicates the natural language for the element and its descendents.
Lang *string `json:"lang,omitempty" validate:"omitempty,iso3166_1_alpha2|iso3166_1_alpha3|bcp47_language_tag" xml:"lang,attr,omitempty"`
// XMLName represents the XML namespace of an element.
XMLName xml.Name `json:"XMLName"`
// Attributes are any attributes of the element.
Attributes externalRef2.Attributes `json:"attributes" xml:",any,attr"`
// Source is an attribute that links to the source content.
Source *string `json:"src,omitempty" validate:"omitempty,uri" xml:"src,attr,omitempty"`
// Type represents what the content of the element is.
Type *Type `json:"type,omitempty" validate:"omitempty,mimetype" xml:"type,attr,omitempty"`
Value *string `json:"value,omitempty" xml:",chardata"`
}
Content defines model for Content.
type Contributors ¶
type Contributors = []PersonConstruct
Contributors a list of persons who contributed to the feed.
type DateConstruct ¶
type DateConstruct struct {
// Base establishes the base URI (or IRI) for resolving any relative references found within the effective scope of the xml:base attribute.
Base *string `json:"base,omitempty" validate:"omitempty" xml:"base,attr,omitempty"`
// Lang indicates the natural language for the element and its descendents.
Lang *string `json:"lang,omitempty" validate:"omitempty,iso3166_1_alpha2|iso3166_1_alpha3|bcp47_language_tag" xml:"lang,attr,omitempty"`
// XMLName represents the XML namespace of an element.
XMLName xml.Name `json:"XMLName"`
// Attributes are any attributes of the element.
Attributes externalRef2.Attributes `json:"attributes" xml:",any,attr"`
Value types.DateTime `json:"value" validate:"required" xml:",chardata"`
}
DateConstruct defines model for DateConstruct.
type Email ¶
type Email struct {
// XMLName represents the XML namespace of an element.
XMLName xml.Name `json:"XMLName"`
Value string `json:"value" validate:"omitempty,email" xml:",chardata"`
}
Email is an element that conveys an email address.
type Entry ¶
type Entry struct {
// Base establishes the base URI (or IRI) for resolving any relative references found within the effective scope of the xml:base attribute.
Base *string `json:"base,omitempty" validate:"omitempty" xml:"base,attr,omitempty"`
// DCContributor is an entity responsible for making contributions to the resource.
DCContributor *externalRef0.DCContributor `json:"dc_contributor,omitempty" xml:"http://purl.org/dc/elements/1.1/ contributor,omitempty"`
// DCCoverage is the spatial or temporal topic of the resource, spatial applicability of the resource, or jurisdiction under which the resource is relevant.
DCCoverage *externalRef0.DCCoverage `json:"dc_coverage,omitempty" xml:"http://purl.org/dc/elements/1.1/ coverage,omitempty"`
// DCCreator is an entity primarily responsible for making the resource.
DCCreator *externalRef0.DCCreator `json:"dc_creator,omitempty" xml:"http://purl.org/dc/elements/1.1/ creator,omitempty"`
// DCDate is a point or period of time associated with an event in the lifecycle of the resource.
DCDate *externalRef0.DCDate `json:"dc_date,omitempty" xml:"http://purl.org/dc/elements/1.1/ date,omitempty"`
// DCDescription may include but is not limited to: an abstract, table of contents, reference to a graphical representation of content or a free-text account of the content.
DCDescription *externalRef0.DCDescription `json:"dc_description,omitempty" xml:"http://purl.org/dc/elements/1.1/ description,omitempty"`
// DCFormat is the file format, physical medium, or dimensions of the resource.
DCFormat *externalRef0.DCFormat `json:"dc_format,omitempty" xml:"http://purl.org/dc/elements/1.1/ format,omitempty"`
// DCIdentifier is an unambiguous reference to the resource within a given context.
DCIdentifier *externalRef0.DCIdentifier `json:"dc_identifier,omitempty" xml:"http://purl.org/dc/elements/1.1/ identifier,omitempty"`
// DCLanguage identifies the language used by the related resource using an HTML language code.
DCLanguage *externalRef0.DCLanguage `` /* 126-byte string literal not displayed */
// DCPublisher is an entity responsible for making the resource available.
DCPublisher *externalRef0.DCPublisher `json:"dc_publisher,omitempty" xml:"http://purl.org/dc/elements/1.1/ publisher,omitempty"`
// DCRelation is a related resource.
DCRelation *externalRef0.DCRelation `json:"dc_relation,omitempty" xml:"http://purl.org/dc/elements/1.1/ relation,omitempty"`
// DCRights is information about rights held in and over the resource.
DCRights *externalRef0.DCRights `json:"dc_rights,omitempty" xml:"http://purl.org/dc/elements/1.1/ rights,omitempty"`
// DCSource is a related resource from which the described resource is derived.
DCSource *externalRef0.DCSource `json:"dc_source,omitempty" xml:"http://purl.org/dc/elements/1.1/ source,omitempty"`
// DCSubject is the topic of the resource.
DCSubject *externalRef0.DCSubject `json:"dc_subject,omitempty" xml:"http://purl.org/dc/elements/1.1/ subject,omitempty"`
// DCTitle is a name by which the resource is formally known.
DCTitle *externalRef0.DCTitle `json:"dc_title,omitempty" xml:"http://purl.org/dc/elements/1.1/ title,omitempty"`
// DCType is the nature or genre of the resource.
DCType *externalRef0.DCType `json:"dc_type,omitempty" xml:"http://purl.org/dc/elements/1.1/ type,omitempty"`
// ID is an element that conveys a permanent, universally unique identifier for an entry or feed.
ID ID `json:"id" validate:"required" xml:"id"`
// Lang indicates the natural language for the element and its descendents.
Lang *string `json:"lang,omitempty" validate:"omitempty,iso3166_1_alpha2|iso3166_1_alpha3|bcp47_language_tag" xml:"lang,attr,omitempty"`
// MediaBackLinks allows inclusion of all the URLs pointing to a media object.
MediaBackLinks externalRef1.MediaBacklinks `json:"media_backlinks,omitempty" xml:"http://search.yahoo.com/mrss/ backLink,omitempty"`
// MediaCategory allows a taxonomy to be set that gives an indication of the type of media content, and its particular contents.
MediaCategory *externalRef1.MediaCategory `json:"media_category" xml:"http://search.yahoo.com/mrss/ category,omitempty"`
// MediaComments is a list of comments the media object has received.
MediaComments externalRef1.MediaComments `json:"MediaComments,omitempty"`
// MediaCommunity stands for the community related content. This allows inclusion of the user perception about a media object in the form of view count, ratings and tags.
MediaCommunity *externalRef1.MediaCommunity `json:"media_community" xml:"http://search.yahoo.com/mrss/ community,omitempty"`
// MediaCopyright is copyright information for the media object.
MediaCopyright *externalRef1.MediaCopyright `json:"media_copyright" xml:"media copyright,omitempty"`
// MediaCredits a list of credits for the object.
MediaCredits externalRef1.MediaCredits `json:"media_credits" xml:"credit,omitempty"`
// MediaDescription is a short description describing the media object typically a sentence in length.
MediaDescription *externalRef1.MediaDescription `json:"media_description" xml:"http://search.yahoo.com/mrss/ description,omitempty"`
// MediaEmbed allows inclusion of player-specific information in the form of key-value (Param) pairs.
MediaEmbed *externalRef1.MediaEmbed `json:"media_embed" xml:"http://search.yahoo.com/mrss/ embed,omitempty"`
// MediaGroup allows grouping of <media:content> elements that are effectively the same content, yet different representations. For instance: the same song recorded in both the WAV and MP3 format.
MediaGroup *externalRef1.MediaGroup `json:"media_group,omitempty" xml:"http://search.yahoo.com/mrss/ group,omitempty"`
// MediaHashes a list of hashes for the object.
MediaHashes externalRef1.MediaHashes `json:"media_hashes" xml:"hash,omitempty"`
// MediaKeywords are highly relevant keywords describing the media object with typically a maximum of 10 words. The keywords and phrases should be comma-delimited.
MediaKeywords *externalRef1.MediaKeywords `json:"media_keywords" xml:"http://search.yahoo.com/mrss/ keywords,omitempty"`
// MediaLicense link to specify the machine-readable license associated with the content.
MediaLicense *externalRef1.MediaLicense `json:"media_license" xml:"http://search.yahoo.com/mrss/ license,omitempty"`
// MediaPeerLink contains P2P link.
MediaPeerLink *externalRef1.MediaPeerLink `json:"media_peerlink" xml:"http://search.yahoo.com/mrss/ peerLink,omitempty"`
// MediaPlayer allows the media object to be accessed through a web browser media player console.
MediaPlayer *externalRef1.MediaPlayer `json:"media_player" xml:"http://search.yahoo.com/mrss/ player,omitempty"`
// MediaPrice includes pricing information about a media object. If this tag is not present, the media object is supposed to be free.
MediaPrice *externalRef1.MediaPrice `json:"media_price" xml:"http://search.yahoo.com/mrss/ price,omitempty"`
// MediaRating allows the permissible audience to be declared. If this element is not included, it assumes that no restrictions are necessary.
MediaRating *externalRef1.MediaRating `json:"media_rating" xml:"http://search.yahoo.com/mrss/ rating,omitempty"`
// MediaResponses allows inclusion of a list of all media responses a media object has received.
MediaResponses externalRef1.MediaResponses `json:"media_responses" xml:"http://search.yahoo.com/mrss/ response,omitempty"`
// MediaRestriction allows restrictions to be placed on the aggregator rendering the media in the feed.
MediaRestriction *externalRef1.MediaRestriction `json:"media_restriction" xml:"http://search.yahoo.com/mrss/ restriction,omitempty"`
// MediaRights specifies the rights information of a media object.
MediaRights *externalRef1.MediaRights `json:"media_rights" xml:"http://search.yahoo.com/mrss/ rights,omitempty"`
// MediaScenes specifies various scenes within a media object.
MediaScenes externalRef1.MediaScenes `json:"media_scenes" xml:"http://search.yahoo.com/mrss/ scene,omitempty"`
// MediaStatus specifies the status of a media object -- whether it's still active or it has been blocked/deleted.
MediaStatus *externalRef1.MediaStatus `json:"media_status" xml:"http://search.yahoo.com/mrss/ status,omitempty"`
// MediaSubTitle contains subtitle/CC link.
MediaSubTitle *externalRef1.MediaSubTitle `json:"media_subtitle,omitempty" xml:"http://search.yahoo.com/mrss/ subTitle,omitempty"`
// MediaTexts a list of texts for the object.
MediaTexts externalRef1.MediaTexts `json:"media_texts" xml:"text,omitempty"`
// MediaThumbnails a list of thumbnails for the object.
MediaThumbnails externalRef1.MediaThumbnails `json:"media_thumbnails" xml:"thumbnail,omitempty"`
// MediaTitle is the title of the particular media object.
MediaTitle *externalRef1.MediaTitle `json:"media_title" xml:"http://search.yahoo.com/mrss/ title,omitempty"`
// XMLName represents the XML namespace of an element.
XMLName xml.Name `json:"XMLName"`
// Attributes are any attributes of the element.
Attributes externalRef2.Attributes `json:"attributes" xml:",any,attr"`
// Authors a list of persons who maintain authorship of the feed.
Authors Authors `json:"authors,omitempty" validate:"omitempty,gt=0,dive" xml:"author,omitempty"`
// Categories a list of categories associated with the feed.
Categories Categories `json:"categories,omitempty" validate:"dive" xml:"category,omitempty"`
// Content either contains or links to the content of the entry.
Content *Content `json:"content,omitempty" xml:"content,omitempty"`
// Contributors a list of persons who contributed to the feed.
Contributors Contributors `json:"contributors,omitempty" validate:"omitempty,gt=0,dive" xml:"contributor,omitempty"`
// Extensions records any elements that are unknown extensions to the schema.
Extensions externalRef2.Extensions `json:"extensions,omitempty" xml:",any"`
// Links a list of links associated with the feed.
Links Links `json:"links,omitempty" validate:"dive" xml:"link,omitempty"`
// Published is an element of type Date construct indicating an instant in time associated with an event early in the life cycle of the entry.
Published *Published `json:"published,omitempty" xml:"published,omitempty"`
// Rights is an element of type Text construct that conveys information about rights held in and over an entry or feed.
Rights *Rights `json:"rights,omitempty" xml:"rights,omitempty"`
// Source contains the metadata from the source feed for the entry.
Source *Source `json:"source,omitempty" validate:"omitempty" xml:"source,omitempty"`
// Summary is an element of type Text construct that conveys a short summary, abstract, or excerpt of an entry.
Summary *Summary `json:"summary,omitempty" xml:"summary,omitempty"`
// Title is an element of type Text construct that conveys a human-readable title for an entry or feed.
Title Title `json:"title" validate:"required" xml:"title"`
// Updated is an element of type Date construct indicating the most recent instant in time when an entry or feed was modified in a way the publisher considers significant.
Updated Updated `json:"updated" validate:"required" xml:"updated"`
}
Entry defines model for Entry.
func (*Entry) GetAuthors ¶
GetAuthors retrieves the authors (if any) of the Entry. This will be the list of values from any <author> and <dc:creator> elements.
func (*Entry) GetCategories ¶
GetCategories retrieves the categories (if any) of the Entry. The categories are returned as strings.
func (*Entry) GetContent ¶
GetContent returns the content of the Entry (if any). This will be either the <content> element value or its source attribute.
func (*Entry) GetContributors ¶
GetContributors retrieves the contributors (if any) of the Entry. This will be the list of values from any <contributor> and <dc:contributor> elements.
func (*Entry) GetDescription ¶
GetDescription retrieves the <summary> (if any) of the Entry.
func (*Entry) GetID ¶
GetID returns an "id" for the Entry. This will be the value of the <id> element, if present, or an empty string if not present.
func (*Entry) GetImage ¶
GetImage retrieves the image (if any) for the Entry. The image is returned as a types.ImageInfo object.
func (*Entry) GetLanguage ¶
GetLanguage retrieves the language of the Entry. This will be the first value found from either <dc:language> or <lang> elements.
func (*Entry) GetLink ¶
GetLink retrieves the <link> associated with the Entry on the source webpage. This should usually be the link element with rel="self". If that is not found, an empty string is returned. Additional links may be present and can be retrieved directly from the Links field as needed.
func (*Entry) GetMediaGroup ¶
func (e *Entry) GetMediaGroup() *media.MediaGroup
GetMediaGroup returns any media.MediaGroup object for the entry.
func (*Entry) GetPublishedDate ¶
GetPublishedDate returns the <published> of the Entry (if any). If there is no publish date, it will return a DateTime equal to Unix epoch.
func (*Entry) GetRights ¶
GetRights retrieves the rights (copyright) of the Entry. This will be the first value found from either <dc:rights> or <rights> elements.
func (*Entry) GetUpdatedDate ¶
GetUpdatedDate returns the <updated> of the Entry.
type Feed ¶
type Feed struct {
// Base establishes the base URI (or IRI) for resolving any relative references found within the effective scope of the xml:base attribute.
Base *string `json:"base,omitempty" validate:"omitempty" xml:"base,attr,omitempty"`
// DCContributor is an entity responsible for making contributions to the resource.
DCContributor *externalRef0.DCContributor `json:"dc_contributor,omitempty" xml:"http://purl.org/dc/elements/1.1/ contributor,omitempty"`
// DCCoverage is the spatial or temporal topic of the resource, spatial applicability of the resource, or jurisdiction under which the resource is relevant.
DCCoverage *externalRef0.DCCoverage `json:"dc_coverage,omitempty" xml:"http://purl.org/dc/elements/1.1/ coverage,omitempty"`
// DCCreator is an entity primarily responsible for making the resource.
DCCreator *externalRef0.DCCreator `json:"dc_creator,omitempty" xml:"http://purl.org/dc/elements/1.1/ creator,omitempty"`
// DCDate is a point or period of time associated with an event in the lifecycle of the resource.
DCDate *externalRef0.DCDate `json:"dc_date,omitempty" xml:"http://purl.org/dc/elements/1.1/ date,omitempty"`
// DCDescription may include but is not limited to: an abstract, table of contents, reference to a graphical representation of content or a free-text account of the content.
DCDescription *externalRef0.DCDescription `json:"dc_description,omitempty" xml:"http://purl.org/dc/elements/1.1/ description,omitempty"`
// DCFormat is the file format, physical medium, or dimensions of the resource.
DCFormat *externalRef0.DCFormat `json:"dc_format,omitempty" xml:"http://purl.org/dc/elements/1.1/ format,omitempty"`
// DCIdentifier is an unambiguous reference to the resource within a given context.
DCIdentifier *externalRef0.DCIdentifier `json:"dc_identifier,omitempty" xml:"http://purl.org/dc/elements/1.1/ identifier,omitempty"`
// DCLanguage identifies the language used by the related resource using an HTML language code.
DCLanguage *externalRef0.DCLanguage `` /* 126-byte string literal not displayed */
// DCPublisher is an entity responsible for making the resource available.
DCPublisher *externalRef0.DCPublisher `json:"dc_publisher,omitempty" xml:"http://purl.org/dc/elements/1.1/ publisher,omitempty"`
// DCRelation is a related resource.
DCRelation *externalRef0.DCRelation `json:"dc_relation,omitempty" xml:"http://purl.org/dc/elements/1.1/ relation,omitempty"`
// DCRights is information about rights held in and over the resource.
DCRights *externalRef0.DCRights `json:"dc_rights,omitempty" xml:"http://purl.org/dc/elements/1.1/ rights,omitempty"`
// DCSource is a related resource from which the described resource is derived.
DCSource *externalRef0.DCSource `json:"dc_source,omitempty" xml:"http://purl.org/dc/elements/1.1/ source,omitempty"`
// DCSubject is the topic of the resource.
DCSubject *externalRef0.DCSubject `json:"dc_subject,omitempty" xml:"http://purl.org/dc/elements/1.1/ subject,omitempty"`
// DCTitle is a name by which the resource is formally known.
DCTitle *externalRef0.DCTitle `json:"dc_title,omitempty" xml:"http://purl.org/dc/elements/1.1/ title,omitempty"`
// DCType is the nature or genre of the resource.
DCType *externalRef0.DCType `json:"dc_type,omitempty" xml:"http://purl.org/dc/elements/1.1/ type,omitempty"`
// ID is an element that conveys a permanent, universally unique identifier for an entry or feed.
ID ID `json:"id" validate:"required" xml:"id"`
// Lang indicates the natural language for the element and its descendents.
Lang *string `json:"lang,omitempty" validate:"omitempty,iso3166_1_alpha2|iso3166_1_alpha3|bcp47_language_tag" xml:"lang,attr,omitempty"`
// MediaBackLinks allows inclusion of all the URLs pointing to a media object.
MediaBackLinks externalRef1.MediaBacklinks `json:"media_backlinks,omitempty" xml:"http://search.yahoo.com/mrss/ backLink,omitempty"`
// MediaCategory allows a taxonomy to be set that gives an indication of the type of media content, and its particular contents.
MediaCategory *externalRef1.MediaCategory `json:"media_category" xml:"http://search.yahoo.com/mrss/ category,omitempty"`
// MediaComments is a list of comments the media object has received.
MediaComments externalRef1.MediaComments `json:"MediaComments,omitempty"`
// MediaCommunity stands for the community related content. This allows inclusion of the user perception about a media object in the form of view count, ratings and tags.
MediaCommunity *externalRef1.MediaCommunity `json:"media_community" xml:"http://search.yahoo.com/mrss/ community,omitempty"`
// MediaCopyright is copyright information for the media object.
MediaCopyright *externalRef1.MediaCopyright `json:"media_copyright" xml:"media copyright,omitempty"`
// MediaCredits a list of credits for the object.
MediaCredits externalRef1.MediaCredits `json:"media_credits" xml:"credit,omitempty"`
// MediaDescription is a short description describing the media object typically a sentence in length.
MediaDescription *externalRef1.MediaDescription `json:"media_description" xml:"http://search.yahoo.com/mrss/ description,omitempty"`
// MediaEmbed allows inclusion of player-specific information in the form of key-value (Param) pairs.
MediaEmbed *externalRef1.MediaEmbed `json:"media_embed" xml:"http://search.yahoo.com/mrss/ embed,omitempty"`
// MediaHashes a list of hashes for the object.
MediaHashes externalRef1.MediaHashes `json:"media_hashes" xml:"hash,omitempty"`
// MediaKeywords are highly relevant keywords describing the media object with typically a maximum of 10 words. The keywords and phrases should be comma-delimited.
MediaKeywords *externalRef1.MediaKeywords `json:"media_keywords" xml:"http://search.yahoo.com/mrss/ keywords,omitempty"`
// MediaLicense link to specify the machine-readable license associated with the content.
MediaLicense *externalRef1.MediaLicense `json:"media_license" xml:"http://search.yahoo.com/mrss/ license,omitempty"`
// MediaPeerLink contains P2P link.
MediaPeerLink *externalRef1.MediaPeerLink `json:"media_peerlink" xml:"http://search.yahoo.com/mrss/ peerLink,omitempty"`
// MediaPlayer allows the media object to be accessed through a web browser media player console.
MediaPlayer *externalRef1.MediaPlayer `json:"media_player" xml:"http://search.yahoo.com/mrss/ player,omitempty"`
// MediaPrice includes pricing information about a media object. If this tag is not present, the media object is supposed to be free.
MediaPrice *externalRef1.MediaPrice `json:"media_price" xml:"http://search.yahoo.com/mrss/ price,omitempty"`
// MediaRating allows the permissible audience to be declared. If this element is not included, it assumes that no restrictions are necessary.
MediaRating *externalRef1.MediaRating `json:"media_rating" xml:"http://search.yahoo.com/mrss/ rating,omitempty"`
// MediaResponses allows inclusion of a list of all media responses a media object has received.
MediaResponses externalRef1.MediaResponses `json:"media_responses" xml:"http://search.yahoo.com/mrss/ response,omitempty"`
// MediaRestriction allows restrictions to be placed on the aggregator rendering the media in the feed.
MediaRestriction *externalRef1.MediaRestriction `json:"media_restriction" xml:"http://search.yahoo.com/mrss/ restriction,omitempty"`
// MediaRights specifies the rights information of a media object.
MediaRights *externalRef1.MediaRights `json:"media_rights" xml:"http://search.yahoo.com/mrss/ rights,omitempty"`
// MediaScenes specifies various scenes within a media object.
MediaScenes externalRef1.MediaScenes `json:"media_scenes" xml:"http://search.yahoo.com/mrss/ scene,omitempty"`
// MediaStatus specifies the status of a media object -- whether it's still active or it has been blocked/deleted.
MediaStatus *externalRef1.MediaStatus `json:"media_status" xml:"http://search.yahoo.com/mrss/ status,omitempty"`
// MediaSubTitle contains subtitle/CC link.
MediaSubTitle *externalRef1.MediaSubTitle `json:"media_subtitle,omitempty" xml:"http://search.yahoo.com/mrss/ subTitle,omitempty"`
// MediaTexts a list of texts for the object.
MediaTexts externalRef1.MediaTexts `json:"media_texts" xml:"text,omitempty"`
// MediaThumbnails a list of thumbnails for the object.
MediaThumbnails externalRef1.MediaThumbnails `json:"media_thumbnails" xml:"thumbnail,omitempty"`
// MediaTitle is the title of the particular media object.
MediaTitle *externalRef1.MediaTitle `json:"media_title" xml:"http://search.yahoo.com/mrss/ title,omitempty"`
// XMLName represents the XML namespace of an element.
XMLName xml.Name `json:"XMLName"`
// Attributes are any attributes of the element.
Attributes externalRef2.Attributes `json:"attributes" xml:",any,attr"`
// Authors a list of persons who maintain authorship of the feed.
Authors Authors `json:"authors,omitempty" validate:"omitempty,gt=0,dive" xml:"author,omitempty"`
// Categories a list of categories associated with the feed.
Categories Categories `json:"categories,omitempty" validate:"dive" xml:"category,omitempty"`
// Contributors a list of persons who contributed to the feed.
Contributors Contributors `json:"contributors,omitempty" validate:"omitempty,gt=0,dive" xml:"contributor,omitempty"`
// Entries is the list of <entry> elements for the feed.
Entries []Entry `json:"entry,omitempty" validate:"dive" xml:"entry,omitempty"`
// Generator is an element identifies the agent used to generate a feed.
Generator *Generator `json:"generator,omitempty" xml:"generator,omitempty"`
// Icon is an element that contains a URI to an icon suitable for representing a feed.
Icon *Icon `json:"icon,omitempty" xml:"icon,omitempty"`
// Links a list of links associated with the feed.
Links Links `json:"links,omitempty" validate:"dive" xml:"link,omitempty"`
// Logo is an element that contains a URI to an logo suitable for representing a feed.
Logo *Logo `json:"logo,omitempty" validate:"omitempty" xml:"logo,omitempty"`
// Published is an element of type Date construct indicating an instant in time associated with an event early in the life cycle of the entry.
Published *Published `json:"published,omitempty" xml:"published,omitempty"`
// Rights is an element of type Text construct that conveys information about rights held in and over an entry or feed.
Rights *Rights `json:"rights,omitempty" xml:"rights,omitempty"`
// Subtitle is an element of type Text construct that conveys a human-readable subtitle for an entry or feed.
Subtitle *Subtitle `json:"subtitle,omitempty" xml:"subtitle,omitempty"`
// Title is an element of type Text construct that conveys a human-readable title for an entry or feed.
Title Title `json:"title" validate:"required" xml:"title"`
// Updated is an element of type Date construct indicating the most recent instant in time when an entry or feed was modified in a way the publisher considers significant.
Updated Updated `json:"updated" validate:"required" xml:"updated"`
}
Feed defines model for Feed.
func (*Feed) GetAuthors ¶
GetAuthors retrieves the authors (if any) of the Feed. This will be the list of values from any <author> and <dc:creator> elements.
func (*Feed) GetCategories ¶
GetCategories retrieves the categories (if any) of the Feed. The categories are returned as strings.
func (*Feed) GetContributors ¶
GetContributors retrieves the contributors (if any) of the Feed. This will be the list of values from any <contributor> and <dc:contributor> elements.
func (*Feed) GetDescription ¶
GetDescription retrieves the <description> (if any) of the Feed.
func (*Feed) GetImage ¶
GetImage retrieves the image (if any) for the Feed. The image is returned as a types.ImageInfo object. The value will be the first found of <media:thumbnail> element.
func (*Feed) GetItems ¶
func (f *Feed) GetItems() []types.ItemSource
GetItems returns a slice of Entry values for the Feed.
func (*Feed) GetLanguage ¶
GetLanguage retrieves the language of the Feed. This will be the first value found from either <dc:language> or <lang> elements.
func (*Feed) GetLink ¶
GetLink retrieves the <link> of the Feed. This is the link to the website associated with the Atom feed. Even the spec is ambiguous about what link attributes constitute the correct combination to indicate the site, so we apply some guesses here.
func (*Feed) GetPublishedDate ¶
GetPublishedDate returns the <published> element of the Feed.
func (*Feed) GetRights ¶
GetRights retrieves the rights (copyright) of the Feed. This will be the first value found from either <dc:rights> or <rights> elements.
func (*Feed) GetSourceURL ¶
GetSourceURL retrieves the URL that links to the Atom file for the Feed. This will be any <link> element present with a "rel" attribute of "self" and ideally with a mime-type indicating Atom content.
func (*Feed) GetUpdateInterval ¶
func (*Feed) GetUpdatedDate ¶
GetUpdatedDate returns the <updated> of the Feed.
func (*Feed) SetSourceURL ¶
SetSourceURL will set a source URL, indicating the URL of the Atom document, in the Feed.
type FeedMetadata ¶
type FeedMetadata struct {
// Base establishes the base URI (or IRI) for resolving any relative references found within the effective scope of the xml:base attribute.
Base *string `json:"base,omitempty" validate:"omitempty" xml:"base,attr,omitempty"`
// ID is an element that conveys a permanent, universally unique identifier for an entry or feed.
ID ID `json:"id" validate:"required" xml:"id"`
// Lang indicates the natural language for the element and its descendents.
Lang *string `json:"lang,omitempty" validate:"omitempty,iso3166_1_alpha2|iso3166_1_alpha3|bcp47_language_tag" xml:"lang,attr,omitempty"`
// XMLName represents the XML namespace of an element.
XMLName xml.Name `json:"XMLName"`
// Attributes are any attributes of the element.
Attributes externalRef2.Attributes `json:"attributes" xml:",any,attr"`
// Authors a list of persons who maintain authorship of the feed.
Authors Authors `json:"authors,omitempty" validate:"omitempty,gt=0,dive" xml:"author,omitempty"`
// Categories a list of categories associated with the feed.
Categories Categories `json:"categories,omitempty" validate:"dive" xml:"category,omitempty"`
// Contributors a list of persons who contributed to the feed.
Contributors Contributors `json:"contributors,omitempty" validate:"omitempty,gt=0,dive" xml:"contributor,omitempty"`
// Generator is an element identifies the agent used to generate a feed.
Generator *Generator `json:"generator,omitempty" xml:"generator,omitempty"`
// Icon is an element that contains a URI to an icon suitable for representing a feed.
Icon *Icon `json:"icon,omitempty" xml:"icon,omitempty"`
// Links a list of links associated with the feed.
Links Links `json:"links,omitempty" validate:"dive" xml:"link,omitempty"`
// Logo is an element that contains a URI to an logo suitable for representing a feed.
Logo *Logo `json:"logo,omitempty" validate:"omitempty" xml:"logo,omitempty"`
// Published is an element of type Date construct indicating an instant in time associated with an event early in the life cycle of the entry.
Published *Published `json:"published,omitempty" xml:"published,omitempty"`
// Rights is an element of type Text construct that conveys information about rights held in and over an entry or feed.
Rights *Rights `json:"rights,omitempty" xml:"rights,omitempty"`
// Subtitle is an element of type Text construct that conveys a human-readable subtitle for an entry or feed.
Subtitle *Subtitle `json:"subtitle,omitempty" xml:"subtitle,omitempty"`
// Title is an element of type Text construct that conveys a human-readable title for an entry or feed.
Title Title `json:"title" validate:"required" xml:"title"`
// Updated is an element of type Date construct indicating the most recent instant in time when an entry or feed was modified in a way the publisher considers significant.
Updated Updated `json:"updated" validate:"required" xml:"updated"`
}
FeedMetadata defines model for FeedMetadata.
type Generator ¶
type Generator struct {
// Base establishes the base URI (or IRI) for resolving any relative references found within the effective scope of the xml:base attribute.
Base *string `json:"base,omitempty" validate:"omitempty" xml:"base,attr,omitempty"`
// Lang indicates the natural language for the element and its descendents.
Lang *string `json:"lang,omitempty" validate:"omitempty,iso3166_1_alpha2|iso3166_1_alpha3|bcp47_language_tag" xml:"lang,attr,omitempty"`
// XMLName represents the XML namespace of an element.
XMLName xml.Name `json:"XMLName"`
// Attributes are any attributes of the element.
Attributes externalRef2.Attributes `json:"attributes" xml:",any,attr"`
URI *string `json:"uri,omitempty" validate:"omitempty,url" xml:"uri,attr,omitempty"`
// Value is an element value that is optional.
Value *externalRef2.OptionalValue `json:"value,omitempty" xml:",chardata"`
Version *string `json:"version,omitempty" xml:"version,attr,omitempty"`
}
Generator defines model for Generator.
type ID ¶
type ID struct {
// Base establishes the base URI (or IRI) for resolving any relative references found within the effective scope of the xml:base attribute.
Base *string `json:"base,omitempty" validate:"omitempty" xml:"base,attr,omitempty"`
// Lang indicates the natural language for the element and its descendents.
Lang *string `json:"lang,omitempty" validate:"omitempty,iso3166_1_alpha2|iso3166_1_alpha3|bcp47_language_tag" xml:"lang,attr,omitempty"`
// XMLName represents the XML namespace of an element.
XMLName xml.Name `json:"XMLName"`
// Attributes are any attributes of the element.
Attributes externalRef2.Attributes `json:"attributes" xml:",any,attr"`
// Value is the value of the ID
Value string `json:"value" validate:"required,uri|urn_rfc2141|ascii" xml:",chardata"`
}
ID defines model for ID.
type Icon ¶
type Icon struct {
// Base establishes the base URI (or IRI) for resolving any relative references found within the effective scope of the xml:base attribute.
Base *string `json:"base,omitempty" validate:"omitempty" xml:"base,attr,omitempty"`
// Lang indicates the natural language for the element and its descendents.
Lang *string `json:"lang,omitempty" validate:"omitempty,iso3166_1_alpha2|iso3166_1_alpha3|bcp47_language_tag" xml:"lang,attr,omitempty"`
// XMLName represents the XML namespace of an element.
XMLName xml.Name `json:"XMLName"`
// Attributes are any attributes of the element.
Attributes externalRef2.Attributes `json:"attributes" xml:",any,attr"`
Value string `json:"value" validate:"required,uri|urn_rfc2141|uuid" xml:",chardata"`
}
Icon defines model for Icon.
type Link ¶
type Link struct {
// Base establishes the base URI (or IRI) for resolving any relative references found within the effective scope of the xml:base attribute.
Base *string `json:"base,omitempty" validate:"omitempty" xml:"base,attr,omitempty"`
// Lang indicates the natural language for the element and its descendents.
Lang *string `json:"lang,omitempty" validate:"omitempty,iso3166_1_alpha2|iso3166_1_alpha3|bcp47_language_tag" xml:"lang,attr,omitempty"`
// XMLName represents the XML namespace of an element.
XMLName xml.Name `json:"XMLName"`
// Attributes are any attributes of the element.
Attributes externalRef2.Attributes `json:"attributes" xml:",any,attr"`
// Href contains the URL of the related resource.
Href string `json:"href" validate:"required,url|hostname" xml:"href,attr"`
// HrefLang identifies the language used by the related resource using an HTML language code.
HrefLang *string `` /* 129-byte string literal not displayed */
// Length contains the resource's size, in bytes.
Length *int `json:"length,omitempty" validate:"omitempty,number" xml:"length,attr,omitempty"`
// Rel contains a keyword that identifies the nature of the relationship between the linked resouce and the element.
Rel LinkRel `` /* 170-byte string literal not displayed */
// Title provides a human-readable description of the resource.
Title *string `json:"title,omitempty" xml:"title,attr,omitempty"`
// Type identifies the resource's MIME media type.
Type *string `json:"type,omitempty" validate:"omitempty,mimetype" xml:"type,attr,omitempty"`
// UndefinedContent represents additional undefined, unstructed text content for the element.
UndefinedContent *UndefinedContent `json:"undefined_content,omitempty" xml:",chardata"`
}
Link defines model for Link.
type LinkRel ¶
type LinkRel string
LinkRel contains a keyword that identifies the nature of the relationship between the linked resouce and the element.
const ( LinkRelAlternate LinkRel = "alternate" LinkRelEdit LinkRel = "edit" LinkRelEnclosure LinkRel = "enclosure" LinkRelHttpschemasGoogleComg2005Feed LinkRel = "http://schemas.google.com/g/2005#feed" LinkRelHub LinkRel = "hub" LinkRelNext LinkRel = "next" LinkRelRelated LinkRel = "related" LinkRelSelf LinkRel = "self" LinkRelStandout LinkRel = "standout" LinkRelVia LinkRel = "via" )
Defines values for LinkRel.
type Logo ¶
type Logo struct {
// Base establishes the base URI (or IRI) for resolving any relative references found within the effective scope of the xml:base attribute.
Base *string `json:"base,omitempty" validate:"omitempty" xml:"base,attr,omitempty"`
// Lang indicates the natural language for the element and its descendents.
Lang *string `json:"lang,omitempty" validate:"omitempty,iso3166_1_alpha2|iso3166_1_alpha3|bcp47_language_tag" xml:"lang,attr,omitempty"`
// Attributes are any attributes of the element.
Attributes externalRef2.Attributes `json:"attributes" xml:",any,attr"`
Value *string `json:"value" validate:"required,uri|urn_rfc2141|uuid" xml:",chardata"`
}
Logo defines model for Logo.
type Name ¶
type Name struct {
// XMLName represents the XML namespace of an element.
XMLName xml.Name `json:"XMLName"`
Value string `json:"value" validate:"required" xml:",chardata"`
}
Name is an element that conveys a human-readable name.
type PersonConstruct ¶
type PersonConstruct struct {
// Base establishes the base URI (or IRI) for resolving any relative references found within the effective scope of the xml:base attribute.
Base *string `json:"base,omitempty" validate:"omitempty" xml:"base,attr,omitempty"`
// Lang indicates the natural language for the element and its descendents.
Lang *string `json:"lang,omitempty" validate:"omitempty,iso3166_1_alpha2|iso3166_1_alpha3|bcp47_language_tag" xml:"lang,attr,omitempty"`
// Attributes are any attributes of the element.
Attributes externalRef2.Attributes `json:"attributes" xml:",any,attr"`
// Email is an element that conveys an email address.
Email *Email `json:"email,omitempty" xml:"email,omitempty"`
// Extensions records any elements that are unknown extensions to the schema.
Extensions externalRef2.Extensions `json:"extensions,omitempty" xml:",any"`
Name Name `json:"name" validate:"required" xml:"name"`
// URI is an element that conveys an IRI (URI).
URI *URI `json:"uri,omitempty" validate:"omitempty" xml:"uri,omitempty"`
}
PersonConstruct defines model for PersonConstruct.
func (*PersonConstruct) String ¶
func (p *PersonConstruct) String() string
String returns string-ified format of the PersonConstruct. This will be the format "name (email)". The email part is omitted if the PersonConstruct has no email.
func (*PersonConstruct) Validate ¶
func (p *PersonConstruct) Validate() error
Validate ensures that the PersonConstruct is valid. If not, it returns a non-nil error containing details of any failed validation.
type Published ¶
type Published struct {
// Base establishes the base URI (or IRI) for resolving any relative references found within the effective scope of the xml:base attribute.
Base *string `json:"base,omitempty" validate:"omitempty" xml:"base,attr,omitempty"`
// Lang indicates the natural language for the element and its descendents.
Lang *string `json:"lang,omitempty" validate:"omitempty,iso3166_1_alpha2|iso3166_1_alpha3|bcp47_language_tag" xml:"lang,attr,omitempty"`
// XMLName represents the XML namespace of an element.
XMLName xml.Name `json:"XMLName"`
// Attributes are any attributes of the element.
Attributes externalRef2.Attributes `json:"attributes" xml:",any,attr"`
Value types.DateTime `json:"value" validate:"required" xml:",chardata"`
}
Published defines model for Published.
type Rights ¶
type Rights struct {
// Base establishes the base URI (or IRI) for resolving any relative references found within the effective scope of the xml:base attribute.
Base *string `json:"base,omitempty" validate:"omitempty" xml:"base,attr,omitempty"`
// Lang indicates the natural language for the element and its descendents.
Lang *string `json:"lang,omitempty" validate:"omitempty,iso3166_1_alpha2|iso3166_1_alpha3|bcp47_language_tag" xml:"lang,attr,omitempty"`
// XMLName represents the XML namespace of an element.
XMLName xml.Name `json:"XMLName"`
// Attributes are any attributes of the element.
Attributes externalRef2.Attributes `json:"attributes" xml:",any,attr"`
// Type represents what the content of the element is.
Type *Type `json:"type,omitempty" validate:"omitempty,mimetype" xml:"type,attr,omitempty"`
// Value is the actual text value of the construct.
Value string `json:"value" xml:",chardata"`
}
Rights defines model for Rights.
type Subtitle ¶
type Subtitle struct {
// Base establishes the base URI (or IRI) for resolving any relative references found within the effective scope of the xml:base attribute.
Base *string `json:"base,omitempty" validate:"omitempty" xml:"base,attr,omitempty"`
// Lang indicates the natural language for the element and its descendents.
Lang *string `json:"lang,omitempty" validate:"omitempty,iso3166_1_alpha2|iso3166_1_alpha3|bcp47_language_tag" xml:"lang,attr,omitempty"`
// XMLName represents the XML namespace of an element.
XMLName xml.Name `json:"XMLName"`
// Attributes are any attributes of the element.
Attributes externalRef2.Attributes `json:"attributes" xml:",any,attr"`
// Type represents what the content of the element is.
Type *Type `json:"type,omitempty" validate:"omitempty,mimetype" xml:"type,attr,omitempty"`
// Value is the actual text value of the construct.
Value string `json:"value" xml:",chardata"`
}
Subtitle defines model for Subtitle.
type Summary ¶
type Summary struct {
// Base establishes the base URI (or IRI) for resolving any relative references found within the effective scope of the xml:base attribute.
Base *string `json:"base,omitempty" validate:"omitempty" xml:"base,attr,omitempty"`
// Lang indicates the natural language for the element and its descendents.
Lang *string `json:"lang,omitempty" validate:"omitempty,iso3166_1_alpha2|iso3166_1_alpha3|bcp47_language_tag" xml:"lang,attr,omitempty"`
// XMLName represents the XML namespace of an element.
XMLName xml.Name `json:"XMLName"`
// Attributes are any attributes of the element.
Attributes externalRef2.Attributes `json:"attributes" xml:",any,attr"`
// Type represents what the content of the element is.
Type *Type `json:"type,omitempty" validate:"omitempty,mimetype" xml:"type,attr,omitempty"`
// Value is the actual text value of the construct.
Value string `json:"value" xml:",chardata"`
}
Summary defines model for Summary.
type TextConstruct ¶
type TextConstruct struct {
// Base establishes the base URI (or IRI) for resolving any relative references found within the effective scope of the xml:base attribute.
Base *string `json:"base,omitempty" validate:"omitempty" xml:"base,attr,omitempty"`
// Lang indicates the natural language for the element and its descendents.
Lang *string `json:"lang,omitempty" validate:"omitempty,iso3166_1_alpha2|iso3166_1_alpha3|bcp47_language_tag" xml:"lang,attr,omitempty"`
// Attributes are any attributes of the element.
Attributes externalRef2.Attributes `json:"attributes" xml:",any,attr"`
// Type represents what the content of the element is.
Type *Type `json:"type,omitempty" validate:"omitempty,mimetype" xml:"type,attr,omitempty"`
// Value is the actual text value of the construct.
Value string `json:"value" xml:",chardata"`
}
TextConstruct defines model for TextConstruct.
type Title ¶
type Title struct {
// Base establishes the base URI (or IRI) for resolving any relative references found within the effective scope of the xml:base attribute.
Base *string `json:"base,omitempty" validate:"omitempty" xml:"base,attr,omitempty"`
// Lang indicates the natural language for the element and its descendents.
Lang *string `json:"lang,omitempty" validate:"omitempty,iso3166_1_alpha2|iso3166_1_alpha3|bcp47_language_tag" xml:"lang,attr,omitempty"`
// XMLName represents the XML namespace of an element.
XMLName xml.Name `json:"XMLName"`
// Attributes are any attributes of the element.
Attributes externalRef2.Attributes `json:"attributes" xml:",any,attr"`
// Type represents what the content of the element is.
Type *Type `json:"type,omitempty" validate:"omitempty,mimetype" xml:"type,attr,omitempty"`
// Value is the actual text value of the construct.
Value string `json:"value" xml:",chardata"`
}
Title defines model for Title.
type URI ¶
type URI struct {
// XMLName represents the XML namespace of an element.
XMLName xml.Name `json:"XMLName"`
Value string `json:"value" validate:"required,uri|urn_rfc2141|uuid" xml:",chardata"`
}
URI is an element that conveys an IRI (URI).
type UndefinedContent ¶
type UndefinedContent = string
UndefinedContent represents additional undefined, unstructed text content for the element.
type Updated ¶
type Updated struct {
// Base establishes the base URI (or IRI) for resolving any relative references found within the effective scope of the xml:base attribute.
Base *string `json:"base,omitempty" validate:"omitempty" xml:"base,attr,omitempty"`
// Lang indicates the natural language for the element and its descendents.
Lang *string `json:"lang,omitempty" validate:"omitempty,iso3166_1_alpha2|iso3166_1_alpha3|bcp47_language_tag" xml:"lang,attr,omitempty"`
// XMLName represents the XML namespace of an element.
XMLName xml.Name `json:"XMLName"`
// Attributes are any attributes of the element.
Attributes externalRef2.Attributes `json:"attributes" xml:",any,attr"`
Value types.DateTime `json:"value" validate:"required" xml:",chardata"`
}
Updated defines model for Updated.