Documentation
¶
Index ¶
- Constants
- type AtomLink
- type Channel
- type ContentEncoded
- type Date
- type Description
- type Duration
- type DurationInteger
- type Enclosure
- type GUID
- type ITunesCategory
- type ITunesDuration
- type ITunesImage
- type ITunesOwner
- type ITunesSubcategory
- type Item
- type NSBool
- type PSCChapter
- type PSCChapters
- type PodcastAlternateEnclosure
- type PodcastChapters
- type PodcastChat
- type PodcastContentLink
- type PodcastEpisode
- type PodcastFunding
- type PodcastGUID
- type PodcastGeo
- type PodcastISRC
- type PodcastLicense
- type PodcastLiveItem
- type PodcastLiveStatus
- type PodcastLiveValue
- type PodcastLocation
- type PodcastLocked
- type PodcastMedium
- type PodcastOSM
- type PodcastPerson
- type PodcastPodping
- type PodcastPublisher
- type PodcastRemoteItem
- type PodcastSeason
- type PodcastSingleItem
- type PodcastSoundbite
- type PodcastSource
- type PodcastTXT
- type PodcastTrailer
- type PodcastTranscript
- type PodcastValue
- type PodcastValueRecipient
- type PodcastValueTimeSplit
- type RSS
- type RSSVersion
Constants ¶
const ( Hour = Duration(time.Hour) Minute = Duration(time.Minute) Second = Duration(time.Second) Millisecond = Duration(time.Millisecond) Microsecond = Duration(time.Microsecond) Nanosecond = Duration(time.Nanosecond) )
const NamespaceAtom string = "http://www.w3.org/2005/Atom"
NamespaceAtom is the Atom namespace.
const NamespaceContent string = "http://purl.org/rss/1.0/modules/content/"
NamespaceContent is the namespace for RSS format's content module.
const NamespaceGooglePlay string = "http://www.google.com/schemas/play-podcasts/1.0"
NamespaceGooglePlay is the Google Play namespace.
const NamespaceITunes string = "http://www.itunes.com/dtds/podcast-1.0.dtd"
NamespaceITunes is the iTunes namespace.
const NamespacePSC string = "http://podlove.org/simple-chapters"
NamespacePSC is the namespace for Podlove Simple Chapters.
const NamespacePodcast string = "https://podcastindex.org/namespace/1.0"
NamespacePodcast is the Podcasting 2.0 namespace.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AtomLink ¶
type AtomLink struct { XMLName xml.Name `xml:"atom:link"` Href string `xml:"href,attr"` Rel *string `xml:"rel,attr,omitempty"` Type *string `xml:"type,attr,omitempty"` }
AtomLink defines a reference from an entry or feed to a Web resource.
type Channel ¶
type Channel struct { XMLName xml.Name `xml:"channel"` Copyright *string `xml:"copyright"` Description *Description `xml:"description"` Generator *string `xml:"generator"` Language *string `xml:"language"` LastBuildDate *Date `xml:"lastBuildDate"` Link *string `xml:"link"` Title *string `xml:"title"` AtomLink *AtomLink `xml:"atom:link"` ContentEncoded *ContentEncoded ITunesAuthor *string `xml:"itunes:author"` ITunesCategories []ITunesCategory ITunesExplicit *bool `xml:"itunes:explicit"` ITunesImage *ITunesImage ITunesNewFeedURL *string `xml:"itunes:new-feed-url"` ITunesOwner *ITunesOwner ITunesType *string `xml:"itunes:type"` PodcastFundings []PodcastFunding PodcastGUID *PodcastGUID `xml:"podcast:guid"` PodcastLicense *PodcastLicense PodcastLocation *PodcastLocation PodcastLocked *PodcastLocked PodcastMedium *PodcastMedium `xml:"podcast:medium"` PodcastPersons []PodcastPerson PodcastPodping *PodcastPodping PodcastPublisher *PodcastPublisher PodcastRemoteItems []PodcastRemoteItem PodcastSingleItem *PodcastSingleItem PodcastTXTs []PodcastTXT PodcastTrailers []PodcastTrailer PodcastValue *PodcastValue PodcastLiveItems []PodcastLiveItem Items []Item }
Channel represents the podcast's feed.
type ContentEncoded ¶
ContentEncoded is used for podcast's or episode's description.
func (ContentEncoded) MarshalXML ¶
func (encoded ContentEncoded) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type Description ¶
Description is used for podcast's or episode's description.
func (Description) MarshalXML ¶
func (d Description) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type DurationInteger ¶
DurationInteger denotes timestamps and durations during a podcast episode, but which are converted to integer seconds.
func (DurationInteger) MarshalXMLAttr ¶
type Enclosure ¶
type Enclosure struct { XMLName xml.Name `xml:"enclosure"` URL string `xml:"url,attr"` Length int64 `xml:"length,attr"` Mimetype string `xml:"type,attr"` }
Enclosure is used to link to the episode's media file.
type GUID ¶
type GUID struct { XMLName xml.Name `xml:"guid"` GUID string `xml:",chardata"` IsPermaLink *bool `xml:"isPermaLink,attr"` }
GUID is a unique identifier for an episode.
type ITunesCategory ¶
type ITunesCategory struct { XMLName xml.Name `xml:"itunes:category"` Category string `xml:"text,attr"` Subcategory *ITunesSubcategory `xml:"itunes:category"` }
ITunesCategory denotes podcast's category information.
type ITunesDuration ¶
ITunesDuration denotesthe duration of an episode.
func (ITunesDuration) MarshalXML ¶
func (d ITunesDuration) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type ITunesImage ¶
ITunesImage is podcast's or episode's artwork.
type ITunesOwner ¶
type ITunesOwner struct { XMLName xml.Name `xml:"itunes:owner"` Name string `xml:"itunes:name"` Email string `xml:"itunes:email"` }
ITunesOwner is used for owner's contact information.
type ITunesSubcategory ¶
type ITunesSubcategory string
ITunesSubcategory is more granural; it is a subset of Category.
func (ITunesSubcategory) MarshalXML ¶
func (s ITunesSubcategory) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type Item ¶
type Item struct { XMLName xml.Name `xml:"item"` Description *Description `xml:"description"` Enclosure *Enclosure GUID *GUID Link *string `xml:"link"` PubDate *Date `xml:"pubDate"` Title *string `xml:"title"` ContentEncoded *ContentEncoded ITunesDuration *ITunesDuration `xml:"itunes:duration"` ITunesEpisodeNumber *int64 `xml:"itunes:episode"` ITunesEpisodeType *string `xml:"itunes:episodeType"` ITunesExplicit *bool `xml:"itunes:explicit"` ITunesImage *ITunesImage ITunesSeasonNumber *int64 `xml:"itunes:season"` PodcastAlternateEnclosures []PodcastAlternateEnclosure PodcastChapters *PodcastChapters PodcastEpisode *PodcastEpisode PodcastISRC *PodcastISRC PodcastLicense *PodcastLicense PodcastLocation *PodcastLocation PodcastPersons []PodcastPerson PodcastSeason *PodcastSeason PodcastSoundbites []PodcastSoundbite PodcastTXTs []PodcastTXT PodcastTranscripts []PodcastTranscript PodcastValue *PodcastValue PSCChapters *PSCChapters }
Item represents episode of a podcast.
type PSCChapter ¶
PSCChapter is a single chapter in Podlove Simple Chapters.
func (PSCChapter) MarshalXML ¶
func (encoded PSCChapter) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type PSCChapters ¶
type PSCChapters struct { XMLName xml.Name `xml:"psc:chapters"` Version string `xml:"version,attr"` Chapters []PSCChapter }
PSCChapters is the root element for Podlove Simple Chapters.
type PodcastAlternateEnclosure ¶
type PodcastAlternateEnclosure struct { XMLName xml.Name `xml:"podcast:alternateEnclosure"` Mimetype string `xml:"type,attr"` Length *int64 `xml:"length,attr"` Bitrate *int64 `xml:"bitrate,attr"` Height *int64 `xml:"height,attr"` LanguageCode *string `xml:"lang,attr"` Title *string `xml:"title,attr"` Rel *string `xml:"rel,attr"` Default *bool `xml:"default,attr"` Sources []PodcastSource }
PodcastAlternateEnclosure provides different versions of, or companion media to the main `<enclosure>` file. Read more at https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#alternate-enclosure
type PodcastChapters ¶
type PodcastChapters struct { XMLName xml.Name `xml:"podcast:chapters"` URL string `xml:"url,attr"` Mimetype string `xml:"type,attr"` }
PodcastChapters denotes episode's chapters. Read more at https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#chapters
type PodcastChat ¶
type PodcastChat struct { XMLName xml.Name `xml:"podcast:chat"` Server string `xml:"server,attr"` Protocol string `xml:"protocol,attr"` AccountID *string `xml:"accountId,attr"` Space *string `xml:"space,attr"` EmbedURL *string `xml:"embedUrl,attr"` }
PodcastChat is an experimental tag to enable chat during a livestream.
type PodcastContentLink ¶
type PodcastEpisode ¶
type PodcastEpisode struct { XMLName xml.Name `xml:"podcast:episode"` Number float64 `xml:",chardata"` Display *string `xml:"display,attr"` }
PodcastEpisode exists largely for compatibility with PodcastSeason. Read more at https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#season
type PodcastFunding ¶
type PodcastFunding struct { XMLName xml.Name `xml:"podcast:funding"` URL string `xml:"url,attr"` Caption string `xml:",chardata"` }
PodcastFunding denotes donation/funding links. Read more at https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#value
type PodcastGUID ¶
type PodcastGUID string
PodcastGUID is the global identifier for a podcast. Read more at https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#guid
type PodcastGeo ¶
type PodcastGeo struct { Latitude float64 Longitude float64 Altitude *float64 Uncertainty *float64 }
func (PodcastGeo) MarshalXMLAttr ¶
PodcastGeo is a geo URI, conforming to RFC 5870.
type PodcastISRC ¶
PodcastISRC is an experimental tag to store International Standard Recording Codes. Read more at https://isrc.ifpi.org
type PodcastLicense ¶
type PodcastLicense struct { XMLName xml.Name `xml:"podcast:license"` Value string `xml:",chardata"` URL *string `xml:"url,attr"` }
PodcastLicense defines a license that is applied to the audio/video content of a single episode, or the audio/video of the podcast as a whole.
type PodcastLiveItem ¶
type PodcastLiveItem struct { XMLName xml.Name `xml:"podcast:liveItem"` Status PodcastLiveStatus `xml:"status,attr"` StartTime time.Time `xml:"start,attr"` EndTime *time.Time `xml:"end,attr,omitempty"` Description *Description `xml:"description"` Enclosure *Enclosure GUID *GUID Link *string `xml:"link"` Title *string `xml:"title"` ContentEncoded *ContentEncoded ITunesEpisodeNumber *int64 `xml:"itunes:episode"` ITunesEpisodeType *string `xml:"itunes:episodeType"` ITunesExplicit *bool `xml:"itunes:explicit"` ITunesImage *ITunesImage ITunesSeasonNumber *int64 `xml:"itunes:season"` PodcastAlternateEnclosures []PodcastAlternateEnclosure PodcastChat *PodcastChat PodcastContentLinks []PodcastContentLink PodcastEpisode *PodcastEpisode PodcastISRC *PodcastISRC PodcastLiveValue *PodcastLiveValue PodcastLocation *PodcastLocation PodcastPersons []PodcastPerson PodcastSeason *PodcastSeason PodcastSoundbites []PodcastSoundbite PodcastTXTs []PodcastTXT PodcastTranscripts []PodcastTranscript PodcastValue *PodcastValue }
type PodcastLiveStatus ¶
type PodcastLiveStatus string
var ( PodcastLiveStatusPending PodcastLiveStatus = "pending" PodcastLiveStatusLive PodcastLiveStatus = "live" PodcastLiveStatusEnded PodcastLiveStatus = "ended" )
type PodcastLiveValue ¶
type PodcastLiveValue struct { XMLName xml.Name `xml:"podcast:liveValue"` URI string `xml:"uri,attr"` Protocol string `xml:"protocol,attr"` }
PodcastLiveValue is an experimental tag to transmit updates during a livestream.
type PodcastLocation ¶
type PodcastLocation struct { XMLName xml.Name `xml:"podcast:location"` Geo *PodcastGeo `xml:",attr,omitempty"` OSM *PodcastOSM `xml:",attr,omitempty"` Location string `xml:",chardata"` }
PodcastLocation describes editorial focus of podcast's or episode's content. Read more at https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#location
type PodcastLocked ¶
PodcastLocked tells podcast hosting platforms whether they are allowed to import the feed. Read more at https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#locked
func (PodcastLocked) MarshalXML ¶
func (l PodcastLocked) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type PodcastMedium ¶
type PodcastMedium string
PodcastMedium tells what the content contained within the feed is. Read more at https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#medium
var ( PodcastMediumPodcast PodcastMedium = "podcast" PodcastMediumMusic PodcastMedium = "music" PodcastMediumVideo PodcastMedium = "video" PodcastMediumFilm PodcastMedium = "film" PodcastMediumAudioBook PodcastMedium = "audiobook" PodcastMediumNewsletter PodcastMedium = "newsletter" PodcastMediumBlog PodcastMedium = "blog" PodcastMediumPublisher PodcastMedium = "publisher" PodcastMediumPodcastList PodcastMedium = "podcastL" PodcastMediumMusicList PodcastMedium = "musicL" PodcastMediumVideoList PodcastMedium = "videoL" PodcastMediumFilmList PodcastMedium = "filmL" PodcastMediumAudioBookList PodcastMedium = "audiobookL" PodcastMediumNewsletterList PodcastMedium = "newsletterL" PodcastMediumBlogList PodcastMedium = "blogL" PodcastMediumPublisherList PodcastMedium = "publisherL" PodcastMediumMixedList PodcastMedium = "mixed" )
type PodcastOSM ¶
PodcastOSM encodes OpenStreetMap location information.
func (PodcastOSM) MarshalXMLAttr ¶
type PodcastPerson ¶
type PodcastPerson struct { XMLName xml.Name `xml:"podcast:person"` Name string `xml:",chardata"` Group *string `xml:"group,attr"` Role *string `xml:"role,attr"` URL *string `xml:"href,attr"` ImageURL *string `xml:"img,attr"` }
PodcastPerson specifies a person of interest to the podcast. Read more at https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#person
type PodcastPodping ¶
type PodcastPodping struct { XMLName xml.Name `xml:"podcast:podping"` UsesPodping *bool `xml:"usesPodping,attr"` }
PodcastPodping allows feed owners to signal to aggregators that the feed sends out Podping notifications when changes are made to it. Read more at https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#podping
type PodcastPublisher ¶
type PodcastPublisher struct { XMLName xml.Name `xml:"podcast:publisher"` RemoteItems []PodcastRemoteItem }
PodcastPublisher allows a podcast feed to link to it's "publisher feed" parent. Read more at https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#publisher
type PodcastRemoteItem ¶
type PodcastRemoteItem struct { XMLName xml.Name `xml:"podcast:remoteItem"` ItemGUID *string `xml:"itemGuid,attr"` FeedGUID uuid.UUID `xml:"feedGuid,attr"` FeedURL *string `xml:"feedUrl,attr"` Medium *PodcastMedium `xml:"medium,attr"` }
PodcastRemoteItem provides a way to "point" to another feed or item in it. Read more at https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#remote-item
type PodcastSeason ¶
type PodcastSeason struct { XMLName xml.Name `xml:"podcast:season"` Number int `xml:",chardata"` Name *string `xml:"name,attr"` }
PodcastSeason is used for identifying which episodes in a podcast are part of a particular "season". Read more at https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#season
type PodcastSingleItem ¶
type PodcastSingleItem struct { XMLName xml.Name `xml:"podcast:singleItem"` Value bool `xml:",chardata"` }
PodcastSingleItem denotes whether the feed contains a single item or multiple items. It's a proposal described at https://github.com/Podcastindex-org/podcast-namespace/discussions/578
type PodcastSoundbite ¶
type PodcastSoundbite struct { XMLName xml.Name `xml:"podcast:soundbite"` StartTime Duration `xml:"startTime,attr"` Duration Duration `xml:"duration,attr"` Title *string `xml:",chardata"` }
PodcastSoundbite denotes soundbite associated with an episode. Read more at https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#soundbite
type PodcastSource ¶
type PodcastSource struct { XMLName xml.Name `xml:"podcast:source"` URI string `xml:"uri,attr"` ContentType *string `xml:"contentType,attr"` }
PodcastSource defines a uri location for a `<podcast:alternateEnclosure>` media file. Read more at https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#source
type PodcastTXT ¶
type PodcastTXT struct { XMLName xml.Name `xml:"podcast:txt"` TXT string `xml:",chardata"` Purpose *string `xml:"purpose,attr"` }
PodcastTXT is intended for free-form text and is modeled after the DNS "TXT" record. Read more at https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#txt
type PodcastTrailer ¶
type PodcastTrailer struct { XMLName xml.Name `xml:"podcast:trailer"` Title string `xml:",chardata"` PubDate Date `xml:"pubdate,attr"` URL string `xml:"url,attr"` Length *int64 `xml:"length,attr"` Mimetype *string `xml:"type,attr"` Season *int `xml:"season,attr"` }
PodcastTrailer is used to define the location of an audio or video file to be used as a trailer for the entire podcast or a specific season. Read more at https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#trailer
type PodcastTranscript ¶
type PodcastTranscript struct { XMLName xml.Name `xml:"podcast:transcript"` URL string `xml:"url,attr"` Mimetype string `xml:"type,attr"` Language *string `xml:"language,attr"` Rel *string `xml:"rel,attr"` }
PodcastTranscript denotes episode's transcript. Read more at https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#transcript
type PodcastValue ¶
type PodcastValue struct { XMLName xml.Name `xml:"podcast:value"` Type string `xml:"type,attr"` Method string `xml:"method,attr"` Suggested *float64 `xml:"suggested,attr,omitempty"` Recipients []PodcastValueRecipient ValueTimeSplits []PodcastValueTimeSplit }
PodcastValue enables to describe Value 4 Value payments. Read more at https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#value
type PodcastValueRecipient ¶
type PodcastValueRecipient struct { XMLName xml.Name `xml:"podcast:valueRecipient"` Name *string `xml:"name,attr"` CustomKey *string `xml:"customKey,attr"` CustomValue *string `xml:"customValue,attr"` Type string `xml:"type,attr"` Address string `xml:"address,attr"` Split uint `xml:"split,attr"` Fee *bool `xml:"bool,attr"` }
PodcastValueRecipient describes the recipient of Value 4 Value payments. Read more at https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#value
type PodcastValueTimeSplit ¶
type PodcastValueTimeSplit struct { XMLName xml.Name `xml:"podcast:valueTimeSplit"` StartTime DurationInteger `xml:"startTime,attr"` Duration DurationInteger `xml:"duration,attr"` RemoteStartTime *DurationInteger `xml:"remoteStartTime,attr,omitempty"` RemotePercentage *uint `xml:"remotePercentage,attr,omitempty"` Recipients []PodcastValueRecipient RemoteItem PodcastRemoteItem }
PodcastValueTimeSplit describes value splits that are valid for a certain period of time Read more at https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#value-time-split
type RSS ¶
type RSS struct { XMLName xml.Name `xml:"rss"` Version RSSVersion `xml:",attr"` NamespaceAtom NSBool `xml:",attr"` NamespaceContent NSBool `xml:",attr"` NamespaceGooglePlay NSBool `xml:",attr"` NamespaceITunes NSBool `xml:",attr"` NamespacePodcast NSBool `xml:",attr"` NamespacePSC NSBool `xml:",attr"` Channel Channel }
RSS is the root element of podcast's RSS feed, denoting the namespaces and the version of the protocol.
type RSSVersion ¶
type RSSVersion string
RSSVersion denotes the RSS version.