opds

package
v0.0.0-...-07dc153 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AtomTime = "2006-01-02T15:04:05Z"
	DirMime  = "application/atom+xml;profile=opds-catalog;kind=navigation"
	DirRel   = "subsection"
	FileRel  = "http://opds-spec.org/acquisition"
	CoverRel = "http://opds-spec.org/cover"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Author

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

type Entry

type Entry struct {
	ID      string  `xml:"id"`
	Updated string  `xml:"updated"`
	Title   string  `xml:"title"`
	Author  Author  `xml:"author"`
	Summary Summary `xml:"summary"`
	Link    []Link  `xml:"link"`
}

Entry is a struct of OPDS entry properties.

type Feed

type Feed struct {
	XMLName xml.Name `xml:"feed"`
	ID      string   `xml:"id"`
	Title   string   `xml:"title"`
	Xmlns   string   `xml:"xmlns,attr"`
	Updated string   `xml:"updated"`
	Link    []Link   `xml:"link"`
	Entry   []Entry  `xml:"entry"`
}

Feed is a main frame of OPDS.

func BuildFeed

func BuildFeed(id, title, href string, entries []Entry) *Feed
type Link struct {
	Href string `xml:"href,attr"`
	Type string `xml:"type,attr"`
	Rel  string `xml:"rel,attr,ommitempty"`
}

Link is link properties.

type Summary

type Summary struct {
	Type string `xml:"type,attr"`
	Text string `xml:",chardata"`
}

Jump to

Keyboard shortcuts

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