Documentation
¶
Index ¶
- func AddBooksToStore(books []*model.Book)
- func GetCurrentFS() vfs.FileSystem
- func GetRemoteImageData(book *model.Book, imageName string) ([]byte, error)
- func InitAllStore(cfg ConfigInterface) error
- func InitConfig(c ConfigInterface)
- func InitStore(storePath string, cfg ConfigInterface) error
- func IsRemoteFS() bool
- func IsSkipDir(path string) bool
- func IsSupportFile(checkPath string) bool
- func IsSupportMedia(checkPath string) bool
- func IsSupportTemplate(checkPath string) bool
- func SaveBooksToDatabase(cfg ConfigInterface) error
- func SetCurrentFS(fs vfs.FileSystem)
- type ConfigInterface
- type DirNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRemoteImageData ¶ added in v1.2.17
GetRemoteImageData 获取远程图片数据(用于目录类型书籍)
func InitConfig ¶
func InitConfig(c ConfigInterface)
func InitStore ¶
func InitStore(storePath string, cfg ConfigInterface) error
InitStore 扫描书库路径,取得路径里的书籍 支持本地路径和远程 URL(WebDAV 等)
func IsSupportTemplate ¶
IsSupportTemplate 判断压缩包内的文件是否是支持的模板文件
func SaveBooksToDatabase ¶
func SaveBooksToDatabase(cfg ConfigInterface) error
SaveBooksToDatabase 4,保存扫描结果到数据库
func SetCurrentFS ¶ added in v1.2.17
func SetCurrentFS(fs vfs.FileSystem)
SetCurrentFS 设置当前扫描使用的文件系统
Types ¶
type ConfigInterface ¶
type ConfigInterface interface {
GetStoreUrls() []string
GetMaxScanDepth() int
GetMinImageNum() int
GetTimeoutLimitForScan() int
GetExcludePath() []string
GetSupportMediaType() []string
GetSupportFileType() []string
GetSupportTemplateFile() []string
GetZipFileTextEncoding() string
GetEnableDatabase() bool
GetClearDatabaseWhenExit() bool
GetDebug() bool
}
Click to show internal directories.
Click to hide internal directories.