Documentation
¶
Index ¶
- func BuildBookName(book BookIndex) (res string)
- func BuildBookURL(path, urlPrefix, pathPrefix string) string
- func GenerateID(args ...[]string) string
- func GetFirstStr(items []string) string
- func NewBookIndexMapping() *mapping.IndexMappingImpl
- func ParseFB2(reader io.Reader, encoder LibEncodeType, rules ...fb2parse.HandlingRule) (res fb2parse.FB2File, err error)
- func ParseYear(date string) (res uint16)
- func SliceHasString(haystack []string, needle string) bool
- func TransformStr(val string) string
- type BookIndex
- type BookInfo
- type CntAtomic32
- type IBooksInfoRepo
- type IBooksLibraryRepo
- type ILibMarksRepo
- type IMarshal
- type ISearchIndex
- type IUnmarshal
- type LibEncodeType
- type Libraries
- type Library
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildBookName ¶ added in v1.12.0
func BuildBookURL ¶ added in v1.12.0
func GenerateID ¶ added in v1.12.0
func GetFirstStr ¶ added in v1.12.0
func NewBookIndexMapping ¶
func NewBookIndexMapping() *mapping.IndexMappingImpl
func ParseFB2 ¶ added in v1.12.0
func ParseFB2(reader io.Reader, encoder LibEncodeType, rules ...fb2parse.HandlingRule, ) (res fb2parse.FB2File, err error)
func SliceHasString ¶ added in v1.12.0
func TransformStr ¶ added in v1.12.0
Types ¶
type BookIndex ¶
type BookIndex struct {
Year uint16 `json:"year"`
ID string
ISBN string `json:"isbn"`
Titles string `json:"name"`
Authors string `json:"auth"`
Sequences string `json:"seq"`
Date string `json:"date"`
Genres string `json:"genr"`
Publisher string `json:"publ"`
Lang string `json:"lng"`
}
func NewFB2Index ¶ added in v1.12.0
type BookInfo ¶ added in v1.12.0
type BookInfo struct {
Offset uint64 `json:"from"`
Size uint64 `json:"size"`
SizeCompressed uint64 `json:"sizec"`
LibName string `json:"lib"`
Src string `json:"src"`
Index BookIndex `json:"-"`
Details struct {
Images []fb2parse.FB2Binary
Annotation string
} `json:"-"`
}
func (*BookInfo) ReadDetails ¶ added in v1.12.0
type CntAtomic32 ¶
type CntAtomic32 uint32
func (*CntAtomic32) Inc ¶
func (c *CntAtomic32) Inc(delta uint32) uint32
func (*CntAtomic32) Total ¶
func (c *CntAtomic32) Total() uint32
type IBooksInfoRepo ¶ added in v1.12.0
type IBooksLibraryRepo ¶ added in v1.12.0
type ILibMarksRepo ¶ added in v1.12.0
type ISearchIndex ¶
type IUnmarshal ¶ added in v1.12.0
type LibEncodeType ¶ added in v1.12.0
type LibEncodeType string
const ( LibEncodeMarshaler LibEncodeType = "marshaler" LibEncodeParser LibEncodeType = "parser" )
type Libraries ¶ added in v1.12.0
func NewLibraries ¶ added in v1.12.0
Click to show internal directories.
Click to hide internal directories.