atom: kylelemons.net/go/atom Index | Files

package atom

import "kylelemons.net/go/atom"

Package atom implements the syndication format Atom.

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

Index

Package Files

atom.go

Constants

const MIME = "application/atom+xml"

type Category Uses

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

type Common Uses

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 Uses

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

type Entry Uses

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 Uses

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

func (*Feed) String Uses

func (f *Feed) String() string

func (*Feed) WriteTo Uses

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 Uses

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

Package atom imports 3 packages (graph) and is imported by 1 packages. Updated 2018-05-18. Refresh now. Tools for package owners.