atom

package
v0.0.0-...-0a97e14 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package atom defines XML data structures for an Atom feed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Atom

type Atom struct {
	XMLName   xml.Name `xml:"http://www.w3.org/2005/Atom feed"`
	Title     string   `xml:"title"`
	Subtitle  string   `xml:"subtitle"`
	Id        string   `xml:"id"`
	Updated   string   `xml:"updated"`
	Rights    string   `xml:"rights"`
	Link      Link     `xml:"link"`
	Author    Author   `xml:"author"`
	EntryList []Entry  `xml:"entry"`
}

func New

func New() *Atom

func (*Atom) Convert

func (a *Atom) Convert() []*entity.Post

func (*Atom) Diff

func (a *Atom) Diff(latest time.Time, underCondition bool) []*entity.Post

type Author

type Author struct {
	Name  string `xml:"name"`
	Email string `xml:"email"`
}

type Entry

type Entry struct {
	Title   string `xml:"title"`
	Summary string `xml:"summary"`
	Content string `xml:"content"`
	Id      string `xml:"id"`
	Updated string `xml:"updated"`
	Link    Link   `xml:"link"`
	Author  Author `xml:"author"`
}
type Link struct {
	Href string `xml:"href,attr"`
}

Jump to

Keyboard shortcuts

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