nyaafeeds

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertFromCat

func ConvertFromCat(category string) (cat string)

ConvertFromCat : Convert a cat to a torznab cat

func ConvertToCat

func ConvertToCat(cat string) string

ConvertToCat : Convert a torznab cat to our cat

Types

type Rss

type Rss struct {
	*feeds.Feed
}

func (*Rss) FeedXml

func (r *Rss) FeedXml() interface{}

FeedXml : return an XML-Ready object for an Rss object

func (*Rss) RssFeed

func (r *Rss) RssFeed() *RssFeed

RssFeed : create a new RssFeed with a generic Feed struct's data

type RssCaps

type RssCaps struct {
	XMLName      xml.Name         `xml:"caps"`
	Server       *RssServer       `xml:"server,omitempty"`
	Limits       *RssLimits       `xml:"limits,omitempty"`
	Registration *RssRegistration `xml:"registration,omitempty"`
	Searching    *RssSearching    `xml:"searching,omitempty"`
	Categories   *RssCategories   `xml:"categories,omitempty"`
}

func (*RssCaps) FeedXml

func (r *RssCaps) FeedXml() interface{}

FeedXml : return an XML-ready object for an RssFeed object

type RssCategories

type RssCategories struct {
	XMLName  xml.Name `xml:"categories"`
	Category []*RssCategoryTorznab
}

type RssCategory

type RssCategory struct {
	XMLName xml.Name `xml:"category"`
	Domain  string   `xml:"domain"`
}

RssCategory is a category for rss item

type RssCategoryTorznab

type RssCategoryTorznab struct {
	XMLName     xml.Name `xml:"category"`
	ID          string   `xml:"id,attr"`
	Name        string   `xml:"name,attr"`
	Subcat      []*RssSubCat
	Description string `xml:"description,attr,omitempty"`
}

type RssEnclosure

type RssEnclosure struct {
	//RSS 2.0 <enclosure url="http://example.com/file.mp3" length="123456789" type="audio/mpeg" />
	XMLName xml.Name `xml:"enclosure"`
	URL     string   `xml:"url,attr"`
	Length  string   `xml:"length,attr"`
	Type    string   `xml:"type,attr"`
}

type RssFeed

type RssFeed struct {
	XMLName        xml.Name `xml:"channel"`
	Xmlns          string   `xml:"-"`
	Title          string   `xml:"title"`       // required
	Link           string   `xml:"link"`        // required
	Description    string   `xml:"description"` // required
	Language       string   `xml:"language,omitempty"`
	Copyright      string   `xml:"copyright,omitempty"`
	ManagingEditor string   `xml:"managingEditor,omitempty"` // Author used
	WebMaster      string   `xml:"webMaster,omitempty"`
	PubDate        string   `xml:"pubDate,omitempty"`       // created or updated
	LastBuildDate  string   `xml:"lastBuildDate,omitempty"` // updated used
	Category       string   `xml:"category,omitempty"`
	Generator      string   `xml:"generator,omitempty"`
	Docs           string   `xml:"docs,omitempty"`
	Cloud          string   `xml:"cloud,omitempty"`
	TTL            int      `xml:"ttl,omitempty"`
	Rating         string   `xml:"rating,omitempty"`
	SkipHours      string   `xml:"skipHours,omitempty"`
	SkipDays       string   `xml:"skipDays,omitempty"`
	Image          *RssImage
	TextInput      *RssTextInput
	Items          []*RssItem
}

func (*RssFeed) FeedXml

func (r *RssFeed) FeedXml() interface{}

FeedXml : return an XML-ready object for an RssFeed object

type RssImage

type RssImage struct {
	XMLName xml.Name `xml:"image"`
	URL     string   `xml:"url"`
	Title   string   `xml:"title"`
	Link    string   `xml:"link"`
	Width   int      `xml:"width,omitempty"`
	Height  int      `xml:"height,omitempty"`
}

type RssItem

type RssItem struct {
	XMLName     xml.Name     `xml:"item"`
	Title       string       `xml:"title"` // required
	Link        interface{}  `xml:"link,omitempty"`
	Description string       `xml:"description"` // required
	Author      string       `xml:"author,omitempty"`
	Category    *RssCategory `xml:"category,omitempty"`
	Comments    string       `xml:"comments,omitempty"`
	Enclosure   *RssEnclosure
	GUID        string      `xml:"guid,omitempty"`    // Id used
	PubDate     string      `xml:"pubDate,omitempty"` // created or updated
	Source      string      `xml:"source,omitempty"`
	Torrent     *RssTorrent `xml:"torrent,omitempty"`
	Torznab     []*RssTorznab
}

type RssLimits

type RssLimits struct {
	XMLName xml.Name `xml:"limits"`
	Max     string   `xml:"max,attr"`
	Default string   `xml:"default,attr"`
}
type RssMagnetLink struct {
	XMLName xml.Name `xml:"link"`
	Text    string   `xml:",cdata"`
}

type RssRegistration

type RssRegistration struct {
	XMLName   xml.Name `xml:"registration"`
	Available string   `xml:"available,attr"`
	Open      string   `xml:"open,attr"`
}

type RssSearch

type RssSearch struct {
	Available       string `xml:"available,attr"`
	SupportedParams string `xml:"supportedParams,attr,omitempty"`
}

type RssSearching

type RssSearching struct {
	XMLName     xml.Name   `xml:"searching"`
	Search      *RssSearch `xml:"search,omitempty"`
	TvSearch    *RssSearch `xml:"tv-search,omitempty"`
	MovieSearch *RssSearch `xml:"movie-search,omitempty"`
}

type RssServer

type RssServer struct {
	XMLName   xml.Name `xml:"server"`
	Xmlns     string   `xml:"xmlns,attr"`
	Version   string   `xml:"version,attr"`
	Title     string   `xml:"title,attr"`
	Strapline string   `xml:"strapline,attr"`
	Email     string   `xml:"email,attr"`
	URL       string   `xml:"url,attr"`
	Image     string   `xml:"image,attr"`
}

type RssSubCat

type RssSubCat struct {
	XMLName     xml.Name `xml:"subcat"`
	ID          string   `xml:"id,attr"`
	Name        string   `xml:"name,attr"`
	Description string   `xml:"description,attr,omitempty"`
}

type RssTextInput

type RssTextInput struct {
	XMLName     xml.Name `xml:"textInput"`
	Title       string   `xml:"title"`
	Description string   `xml:"description"`
	Name        string   `xml:"name"`
	Link        string   `xml:"link"`
}

type RssTorrent

type RssTorrent struct {
	XMLName       xml.Name `xml:"torrent"`
	Xmlns         string   `xml:"xmlns,attr"`
	FileName      string   `xml:"fileName,omitempty"`
	ContentLength string   `xml:"contentLength,omitempty"`
	InfoHash      string   `xml:"infoHash,omitempty"`
	MagnetURI     string   `xml:"magnetUri,omitempty"`
}

type RssTorznab

type RssTorznab struct {
	XMLName xml.Name `xml:"torznab:attr,omitempty"`
	Name    string   `xml:"name,attr,omitempty"`
	Value   string   `xml:"value,attr,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL