atom

package module
v0.0.0-...-de290f8 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2013 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Overview

Package atom implements the syndication format Atom.

http://tools.ietf.org/html/rfc4287

Index

Constants

View Source
const MIME = "application/atom+xml"

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	Term   string `xml:"term,attr"`
	Scheme string `xml:"scheme,attr,omitempty"`
	Label  string `xml:"label,attr,omitempty"`
}

type Common

type Common struct {
	ID           string     `xml:"id,omitempty"`
	Title        string     `xml:"title"`
	Subtitle     string     `xml:"subtitle,omitempty"`
	Categories   []Category `xml:"category"`
	Author       *Person    `xml:"author"`
	Contributors []Person   `xml:"contributor"`
	Updated      string     `xml:"updated,omitempty"`
	Published    string     `xml:"published,omitempty"`
	Links        []Link     `xml:"link"`
	Rights       string     `xml:"rights,omitempty"`
}

type Content

type Content struct {
	Type string `xml:"type,attr,omitempty"`
	Data string `xml:",chardata"`
}

type Entry

type Entry struct {
	XMLName xml.Name `xml:"http://www.w3.org/2005/Atom entry"`
	Common
	Source  string  `xml:"source,omitempty"`
	Content Content `xml:"content"`
}

type Feed

type Feed struct {
	XMLName xml.Name `xml:"http://www.w3.org/2005/Atom feed"`
	Common
	Entries []Entry `xml:"entry"`
}

func (*Feed) String

func (f *Feed) String() string

func (*Feed) WriteTo

func (f *Feed) WriteTo(w io.Writer) (int64, error)
type Link struct {
	Rel  string `xml:"rel,attr,omitempty"`
	Type string `xml:"type,attr,omitempty"`
	URI  string `xml:"href,attr"`
}

type Person

type Person struct {
	Name  string `xml:"name"`
	URI   string `xml:"uri,omitempty"`
	Email string `xml:"email,omitempty"`
}

Jump to

Keyboard shortcuts

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