Documentation
¶
Overview ¶
Package opds provides types and functions to create OPDS content.
Index ¶
Constants ¶
const ( OPDSTypeNavigation = "application/atom+xml; profile=opds-catalog; kind=navigation" // OPDSTypeAcquisistion is the link type for acquisition. OPDSTypeAcquisistion = "application/atom+xml; profile=opds-catalog; kind=acquisition" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Category ¶
type Category struct {
Scheme string `xml:"scheme,attr"`
Term string `xml:"term,attr"`
Label string `xml:"label,attr"`
}
Category represent the book category with scheme and term to machine handling.
type Entry ¶
type Entry struct {
Title string `xml:"title"`
ID UUID `xml:"id"`
Identifier UUID `xml:"dc:identifier"`
Updated Time `xml:"updated"`
Rights string `xml:"rights,omitempty"`
Publisher string `xml:"dc:publisher,omitempty"`
Author []Author `xml:"author,omitempty"`
Language string `xml:"dc:language,omitempty"`
Issued *Time `xml:"dc:issued,omitempty"`
Published *Time `xml:"published,omitempty"`
Category []Category `xml:"category,omitempty"`
Links []Link `xml:"link,omitempty"`
Summary *Content `xml:"summary,omitempty"`
Content *Content `xml:"content,omitempty"`
Series []Serie `xml:"Series"`
}
Entry an atom entry in the feed.
type Feed ¶
type Feed struct {
XMLName xml.Name `xml:"feed"`
XMLns string `xml:"xmlns,attr"`
XMLnsDC string `xml:"xmlns:dc,attr"`
Lang string `xml:"xml:lang,attr"`
ID UUID `xml:"id"`
Title string `xml:"title"`
Author []Author `xml:"author,omitempty"`
Updated Time `xml:"updated"`
Entries []Entry `xml:"entry"`
Links []Link `xml:"link"`
TotalResults int `xml:"totalResults,omitempty"`
ItemsPerPage int `xml:"itemsPerPage,omitempty"`
FeedType string `xml:"-"`
}
Feed root element for acquisition or navigation feed.
type IndirectAcquisition ¶
type IndirectAcquisition struct {
TypeAcquisition string `xml:"type,attr"`
IndirectAcquisition []IndirectAcquisition `xml:"indirectAcquisition"`
}
IndirectAcquisition represent the link mostly for buying or borrowing a book.
type Link ¶
type Link struct {
Rel string `xml:"rel,attr"`
Href string `xml:"href,attr"`
TypeLink string `xml:"type,attr,omitempty"`
Title string `xml:"title,attr,omitempty"`
FacetGroup string `xml:"facetGroup,attr,omitempty"`
Count int `xml:"count,attr,omitempty"`
IndirectAcquisition []IndirectAcquisition `xml:"indirectAcquisition,omitempty"`
}
Link link to different resources.
type Serie ¶
type Serie struct {
Name string `xml:"name,attr"`
URL string `xml:"url,attr"`
Position float32 `xml:"position,attr"`
}
Serie store serie information from schema.org.
type Time ¶
Time is wrapper around time.Time that can marshal into an RFC3339 format.
func (Time) MarshalText ¶
MarshalText encodes the Time instance in RFC3339 format.
type UUID ¶
UUID is a wrapper around uuid.UUID that can be marshaled into a "urn:uuid" identifier.
func (UUID) MarshalText ¶
MarshalText encoded an UUID into a "urn:uuid" format.