Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entry ¶
type Entry struct { XMLName xml.Name Title string `xml:"title"` Author []string `xml:"author>name"` Id string `xml:"id"` LastModified string `xml:"updated"` Timestamp string `xml:"published"` PubDate struct { XMLName xml.Name Value string `xml:",chardata"` } `xml:"date"` Content struct { Type string `xml:"type,attr"` ContentWrapper struct { XMLName xml.Name Tags string `xml:",chardata"` LineBreak string `xml:"br"` Comments string `xml:",innerxml"` } } `xml:"content"` Links []entryLink `xml:"link"` }
func MakeEntry ¶
func MakeEntry(book model.CalibreBook) *Entry
type Feed ¶
type Feed struct { XMLName xml.Name Title string `xml:"title"` Author string `xml:"author>name"` Id string `xml:"id"` Updated *model.Time3339 `xml:"updated"` Start feedLink `xml:"link"` Entries []*Entry }
func MakeCatalog ¶
func MakeCatalog(books []model.CalibreBook, updateTime *model.Time3339) *Feed
MakeCatalog creates an OPDS catalog feed for the given books. Optionally, override the update date; if given an empty string, the current time is used.
type Server ¶
type Server struct { *http.Server Library string // Path to the library Books []model.CalibreBook }
func (*Server) HandleCatalog ¶
func (s *Server) HandleCatalog(w http.ResponseWriter, req *http.Request)
HandleCatalog handles requests for path /opds
func (*Server) HandleCover ¶
func (s *Server) HandleCover(w http.ResponseWriter, req *http.Request)
HandleCover handles requests for /get/cover/:id
func (*Server) HandleDownload ¶
func (s *Server) HandleDownload(w http.ResponseWriter, req *http.Request)
HandleDownload handles requests for path /get/epub/:id
func (*Server) HandleThumb ¶
func (s *Server) HandleThumb(w http.ResponseWriter, req *http.Request)
HandleThumb handles requests for /get/thumb/:id
Click to show internal directories.
Click to hide internal directories.