feeds

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RssVersion1 = "1.0"
	RssVersion2 = "2.0"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Attachment

type Attachment struct {
	Type   string
	Length uint64
	URL    string
}

Attachment todo

type Author

type Author struct {
	Email string
	Name  string
}

Author todo

type GenericFeed

type GenericFeed struct {
	Author      *Author
	Base        string
	Copyright   string
	Created     time.Time
	Description string
	ID          string
	Image       *Image
	Items       []*Item
	Language    string
	Link        *Link
	Subtitle    string
	Title       string
	Updated     time.Time
}

GenericFeed todo

func (*GenericFeed) Add

func (f *GenericFeed) Add(item *Item)

Add todo

type Image

type Image struct {
	Height uint64
	Link   string
	Title  string
	URL    string
	Width  uint64
}

Image todo

type Item

type Item struct {
	Authors     []*Author
	Category    string
	Content     string
	Created     time.Time
	Description string
	Attachment  *Attachment
	ID          string
	Link        *Link
	Source      *Link
	Title       string
	Updated     time.Time
}

Item todo

func (*Item) GetPlainBody

func (i *Item) GetPlainBody() string

GetPlainBody todo

type Link struct {
	Href string
	Rel  string
}

Link todo

type Rss

type Rss struct {
	*GenericFeed
	// contains filtered or unexported fields
}

Rss todo

func NewRss

func NewRss(genericFeed *GenericFeed, version string) *Rss

NewRss todo

func (*Rss) ToXML

func (rss *Rss) ToXML() interface{}

ToXML todo

type RssXml

type RssXml struct {
	XMLName          xml.Name `xml:"rss"`
	Channel          *rssFeed `xml:"channel"`
	ContentNamespace string   `xml:"xmlns:content,attr"`
	Version          string   `xml:"version,attr"`
}

RssXml todo

type YandexNews

type YandexNews struct {
	*GenericFeed
}

YandexNews todo

func NewYandexNews

func NewYandexNews(genericFeed *GenericFeed) *YandexNews

NewYandexNews todo

func (*YandexNews) ToXML

func (yn *YandexNews) ToXML() interface{}

ToXML todo

type YandexNewsXML

type YandexNewsXML struct {
	XMLName         xml.Name `xml:"rss"`
	Channel         *ynFeed  `xml:"channel"`
	YandexNamespace string   `xml:"xmlns:yandex,attr"`
	MediaNamespace  string   `xml:"xmlns:media,attr"`
	Version         string   `xml:"version,attr"`
}

YandexNewsXML todo

Jump to

Keyboard shortcuts

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