Commit all code. Should be mostly functional.
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
package opds
|
||||
|
||||
import (
|
||||
"encoding/xml"
|
||||
"golang.org/x/tools/blog/atom"
|
||||
)
|
||||
|
||||
type Feed struct {
|
||||
XMLName xml.Name `xml:"http://www.w3.org/2005/Atom feed"`
|
||||
XmlLang string `xml:"xml:lang,attr" default:"en"`
|
||||
XmlnsDc string `xml:"xmlns:dc,attr" default:"http://purl.org/dc/terms/"`
|
||||
XmlnsPse string `xml:"xmlns:pse,attr" default:"http://vaemendis.net/opds-pse/ns"`
|
||||
XmlnsOpds string `xml:"xmlns:opds,attr" default:"http://opds-spec.org/2010/catalog"`
|
||||
XmlnsOpenSearch string `xml:"xmlns:opensearch,attr" default:"http://a9.com/-/spec/opensearch/1.1/"`
|
||||
ID string `xml:"id"`
|
||||
Link []Link `xml:"link"`
|
||||
Title string `xml:"title"`
|
||||
Updated atom.TimeStr `xml:"updated"`
|
||||
Author *Author `xml:"author,omitempty"`
|
||||
Entry []*Entry `xml:"entry"`
|
||||
}
|
||||
|
||||
type Author struct {
|
||||
Name string `xml:"name,omitempty"`
|
||||
URI string `xml:"uri,omitempty"`
|
||||
Email string `xml:"email,omitempty"`
|
||||
InnerXML string `xml:",innerxml"`
|
||||
}
|
||||
|
||||
type Entry struct {
|
||||
Title string `xml:"title"`
|
||||
ID string `xml:"id"`
|
||||
Author *Author `xml:"author,omitempty"`
|
||||
Published atom.TimeStr `xml:"published,omitempty"`
|
||||
Updated atom.TimeStr `xml:"updated,omitempty"`
|
||||
DcPublisher string `xml:"dc:publisher,omitempty"`
|
||||
Link []Link `xml:"link"`
|
||||
Summary *Text `xml:"summary,omitempty"`
|
||||
Content *Text `xml:"content,omitempty"`
|
||||
}
|
||||
|
||||
type Link struct {
|
||||
Rel string `xml:"rel,attr,omitempty"`
|
||||
Href string `xml:"href,attr"`
|
||||
Type string `xml:"type,attr,omitempty"`
|
||||
HrefLang string `xml:"hreflang,attr,omitempty"`
|
||||
Title string `xml:"title,attr,omitempty"`
|
||||
Length uint `xml:"length,attr,omitempty"`
|
||||
PseCount uint `xml:"pse:count,attr,omitempty"`
|
||||
}
|
||||
|
||||
type Text struct {
|
||||
Type string `xml:"type,attr,omitempty"`
|
||||
Body string `xml:",chardata"`
|
||||
}
|
||||
Reference in New Issue
Block a user