Help us shape the future of Go! Take the 2026 Go Developer Survey

atom

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: MIT Imports: 10 Imported by: 55

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

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

Category is category metadata for Feeds and Entries

type Content

type Content struct {
	Src   string `json:"src,omitempty"`
	Type  string `json:"type,omitempty"`
	Value string `json:"value,omitempty"`
}

Content either contains or links to the content of the entry

type Entry

type Entry struct {
	Title           string         `json:"title,omitempty"`
	ID              string         `json:"id,omitempty"`
	Updated         string         `json:"updated,omitempty"`
	UpdatedParsed   *time.Time     `json:"updatedParsed,omitempty"`
	Summary         string         `json:"summary,omitempty"`
	Authors         []*Person      `json:"authors,omitempty"`
	Contributors    []*Person      `json:"contributors,omitempty"`
	Categories      []*Category    `json:"categories,omitempty"`
	Links           []*Link        `json:"links,omitempty"`
	Rights          string         `json:"rights,omitempty"`
	Published       string         `json:"published,omitempty"`
	PublishedParsed *time.Time     `json:"publishedParsed,omitempty"`
	Source          *Source        `json:"source,omitempty"`
	Content         *Content       `json:"content,omitempty"`
	Extensions      ext.Extensions `json:"extensions,omitempty"`
}

Entry is an Atom Entry

type Feed

type Feed struct {
	Title         string         `json:"title,omitempty"`
	ID            string         `json:"id,omitempty"`
	Updated       string         `json:"updated,omitempty"`
	UpdatedParsed *time.Time     `json:"updatedParsed,omitempty"`
	Subtitle      string         `json:"subtitle,omitempty"`
	Links         []*Link        `json:"links,omitempty"`
	Language      string         `json:"language,omitempty"`
	Generator     *Generator     `json:"generator,omitempty"`
	Icon          string         `json:"icon,omitempty"`
	Rights        string         `json:"rights,omitempty"`
	Contributors  []*Person      `json:"contributors,omitempty"`
	Authors       []*Person      `json:"authors,omitempty"`
	Categories    []*Category    `json:"categories,omitempty"`
	Entries       []*Entry       `json:"entries"`
	Extensions    ext.Extensions `json:"extensions,omitempty"`
	Version       string         `json:"version"`
}

Feed is an Atom Feed

func (Feed) String

func (f Feed) String() string

type Generator

type Generator struct {
	Value   string `json:"value,omitempty"`
	URI     string `json:"uri,omitempty"`
	Version string `json:"version,omitempty"`
}

Generator identifies the agent used to generate a feed, for debugging and other purposes.

type Link struct {
	Href     string `json:"href,omitempty"`
	Hreflang string `json:"hreflang,omitempty"`
	Rel      string `json:"rel,omitempty"`
	Type     string `json:"type,omitempty"`
	Title    string `json:"title,omitempty"`
	Length   string `json:"length,omitempty"`
}

Link is an Atom link that defines a reference from an entry or feed to a Web resource

type Parser

type Parser struct{}

Parser is an Atom Parser

func (*Parser) Parse

func (ap *Parser) Parse(feed io.Reader) (*Feed, error)

Parse parses an xml feed into an atom.Feed

type Person

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

Person represents a person in an Atom feed for things like Authors, Contributors, etc

type Source

type Source struct {
	Title         string         `json:"title,omitempty"`
	ID            string         `json:"id,omitempty"`
	Updated       string         `json:"updated,omitempty"`
	UpdatedParsed *time.Time     `json:"updatedParsed,omitempty"`
	Subtitle      string         `json:"subtitle,omitempty"`
	Links         []*Link        `json:"links,omitempty"`
	Generator     *Generator     `json:"generator,omitempty"`
	Icon          string         `json:"icon,omitempty"`
	Rights        string         `json:"rights,omitempty"`
	Contributors  []*Person      `json:"contributors,omitempty"`
	Authors       []*Person      `json:"authors,omitempty"`
	Categories    []*Category    `json:"categories,omitempty"`
	Extensions    ext.Extensions `json:"extensions,omitempty"`
}

Source contains the feed information for another feed if a given entry came from that feed.

Jump to

Keyboard shortcuts

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