Documentation ¶
Index ¶
- func GetCoverImage(stock string, book *model.Book) (image.Image, error)
- type Binary
- type FB2
- func (fb *FB2) GetAuthors() []*model.Author
- func (fb *FB2) GetCover() string
- func (fb *FB2) GetFormat() string
- func (fb *FB2) GetGenres() []string
- func (fb *FB2) GetKeywords() string
- func (fb *FB2) GetLanguage() *model.Language
- func (fb *FB2) GetPlot() string
- func (fb *FB2) GetSerie() *model.Serie
- func (fb *FB2) GetSerieNumber() int
- func (fb *FB2) GetSort() string
- func (fb *FB2) GetTitle() string
- func (fb *FB2) GetYear() string
- func (fb *FB2) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Binary ¶
type Binary struct { ID string `xml:"id,attr"` ContentType string `xml:"content-type,attr"` Content []byte `xml:",chardata"` }
Any binary data that is required for the presentation of this book in base64 format. Currently only images are used.
type FB2 ¶
type FB2 struct { FictionBook xml.Name `xml:"FictionBook"` // Root element Description struct { TitleInfo struct { Authors []struct { FirstName string `xml:"first-name"` MiddleName string `xml:"middle-name"` LastName string `xml:"last-name"` } `xml:"author"` BookTitle string `xml:"book-title"` // Book title Genres []string `xml:"genre"` // Genre of this book Annotation struct { P []string `xml:"p"` } `xml:"annotation"` Keywords string `xml:"keywords"` // Any keywords for this book, intended for use in search engines Date string `xml:"date"` // Date this book was written, can be not exact, e.g. 1863-1867. Lang string `xml:"lang"` // Book language Series []struct { Name string `xml:"name,attr"` Number int `xml:"number,attr"` } `xml:"sequence"` CoverPage struct { Image struct { Href string `xml:"href,attr"` } `xml:"image"` } `xml:"coverpage"` } `xml:"title-info"` PublishInfo struct { Publisher string `xml:"publisher"` // Original (paper) book publisher City string `xml:"city"` // City where the original (paper) book was published Year int `xml:"year"` // Year of the original (paper) publication ISBN string `xml:"isbn"` // ISBN Series []struct { Name string `xml:"name,attr"` Number int `xml:"number,attr"` } `xml:"sequence"` } `xml:"publish-info"` } `xml:"description"` }
func (*FB2) GetAuthors ¶
func (*FB2) GetKeywords ¶ added in v1.0.0
func (*FB2) GetLanguage ¶
func (*FB2) GetSerieNumber ¶
Click to show internal directories.
Click to hide internal directories.