atom1

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2025 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package atom1 provides parsing functionality for Atom feeds.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Author

type Author struct {
	Name  string `xml:"name"`
	URI   string `xml:"uri"`
	Email string `xml:"email"`
	Links []Link `xml:"link"`
}

type Content

type Content struct {
	RAWContent string `xml:",innerxml"`
}

type Feed

type Feed struct {
	XMLName     xml.Name `xml:"feed"`
	Title       string   `xml:"title"`
	Description string   `xml:"subtitle"`
	Author      *Author  `xml:"author"`
	Link        []Link   `xml:"link"`
	Image       *Image   `xml:"image"`
	Items       []Item   `xml:"entry"`
	Updated     string   `xml:"updated"`
}

func Parse

func Parse(r io.Reader) (*Feed, error)

Parse decodes data from r as an Atom 1.0 feed.

type Image

type Image struct {
	XMLName xml.Name `xml:"image"`
	Title   string   `xml:"title"`
	URL     string   `xml:"url"`
	Height  int      `xml:"height"`
	Width   int      `xml:"width"`
}

type Item

type Item struct {
	XMLName xml.Name `xml:"entry"`
	Title   string   `xml:"title"`
	Summary string   `xml:"summary"`
	Content *Content `xml:"content"`
	Links   []Link   `xml:"link"`
	Date    string   `xml:"updated"`
	ID      string   `xml:"id"`
}
type Link struct {
	Href   string `xml:"href,attr"`
	Rel    string `xml:"rel,attr"`
	Type   string `xml:"type,attr"`
	Length uint   `xml:"length,attr"`
}

Jump to

Keyboard shortcuts

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