Documentation
¶
Index ¶
- func DeleteBookCache(c echo.Context) error
- func DeleteBookmark(c echo.Context) error
- func DownloadEpub(c echo.Context) error
- func DownloadZip(c echo.Context) error
- func GetAllBookmarks(c echo.Context) error
- func GetBook(c echo.Context) error
- func GetCover(c echo.Context) error
- func GetFile(c echo.Context) error
- func GetGeneratedImage(c echo.Context) error
- func GetParentBook(c echo.Context) error
- func GetQrcode(c echo.Context) error
- func GetRawFile(c echo.Context) error
- func GetReadingHistory(c echo.Context) error
- func GetRegFile(c echo.Context) error
- func GetServerInfoHandler(c echo.Context) error
- func GetStores(c echo.Context) error
- func GetTailscaleStatus(c echo.Context) error
- func GetTailscaleStatusSSE(c echo.Context) error
- func GetTopOfShelfInfo(c echo.Context) error
- func Healthz(c echo.Context) error
- func ParseHexColor(s string) (c color.RGBA, err error)
- func StoreBookmark(c echo.Context) error
- type ReadingHistoryResponse
- type StoreInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteBookCache ¶ added in v1.2.11
DeleteBookCache 删除书籍的元数据和缓存文件 示例 URL: http://127.0.0.1:1234/api/delete_book_cache?id=2b17a13 相关参数: id:书籍的ID,必须参数 &id=2b17a13 delete_metadata: 是否删除元数据JSON文件,可选参数,默认 true &delete_metadata=true delete_cover: 是否删除封面缓存文件,可选参数,默认 true &delete_cover=true delete_image_cache: 是否删除图片缓存目录,可选参数,默认 true &delete_image_cache=true
func DeleteBookmark ¶ added in v1.2.12
DeleteBookmark 删除特定书签的 API 处理函数 DELETE /api/delete-bookmark 参数:book_id, mark_type, page_index
func DownloadEpub ¶ added in v1.2.11
DownloadEpub 将书籍转换为 EPUB 格式下载 示例 URL: http://127.0.0.1:1234/api/download-epub?id=2b17a13 相关参数: id:书籍的ID,必须参数 &id=2b17a13
func DownloadZip ¶ added in v1.2.11
DownloadZip 将 TypeDir 类型的书籍打包为 zip 文件下载 示例 URL: http://127.0.0.1:1234/api/download-zip?id=2b17a13 相关参数: id:书籍的ID,必须参数 &id=2b17a13
func GetAllBookmarks ¶ added in v1.1.8
GetAllBookmarks 获取所有书签的 API 处理函数
func GetBook ¶
GetBook 相关参数: id: 书籍的ID,必须项目 &id=2b17a130 sort_by:页面排序方法,可选 &sort_by=filename 示例 URL: http://127.0.0.1:1234/api/get-book?id=1215a&sort_by=filename
func GetCover ¶ added in v1.2.0
GetCover 获取书籍封面 相关参数: id:书籍的ID,必须参数 &id=2B17a resize_height:可选参数,指定封面高度,默认值为352 &resize_height=500 示例 URL: http://127.0.0.1:1234/api/get-cover?id=2b17a13 示例 URL(自定义高度): http://127.0.0.1:1234/api/get-cover?id=2b17a13&resize_height=500
func GetFile ¶
GetFile 示例 URL: 127.0.0.1:1234/get_file?id=2b17a13&filename=1.jpg 缩放文件,会转化为jpeg:http://127.0.0.1:1234/api/get-file?id=2b17a13&resize_width=300&resize_height=400&id=597e06&filename=01.jpeg 相关参数: id:书籍的ID,必须参数 &id=2B17a filename:获取的文件名,必须参数 &filename=01.jpg 可选参数: resize_width:指定宽度,缩放图片 &resize_width=300 resize_height:指定高度,缩放图片 &resize_height=300 resize_max_width:指定宽度上限,图片宽度大于这个上限时缩小图片 &resize_max_width=740 resize_max_height:指定高度上限,图片高度大于这个上限时缩小图片 &resize_max_height=300 auto_crop:自动切白边,数字是切白边的阈值,范围是0~100 &auto_crop=10 gray:黑白化 &gray=true blurhash:获取对应图片的blurhash,不是原始图片 &blurhash=3 blurhash_image:获取对应图片的blurhash图片,不是原始图片 &blurhash_image=3 base64:返回Base64编码的图片 &base64=true
func GetGeneratedImage ¶
func GetParentBook ¶
func GetRawFile ¶
GetRawFile 输出书籍原始文件;本地/VFS/远端 Comigo 都保留 Range,供音视频拖动播放。
func GetReadingHistory ¶ added in v1.2.11
GetReadingHistory 获取阅读历史的 API 处理函数 参数:
- limit: 限制返回数量 (drawer用,如10),优先级高于分页参数
- page: 页码 (设置页面分页用,默认1)
- page_size: 每页数量 (默认20)
func GetServerInfoHandler ¶
GetServerInfoHandler 获取服务器信息的API处理函数
func GetTailscaleStatus ¶
GetTailscaleStatus 处理Tailscale网络的身份信息查询请求
func GetTailscaleStatusSSE ¶ added in v1.2.37
GetTailscaleStatusSSE 通过 SSE 推送 Tailscale 状态,替代设置页里的轮询。
func GetTopOfShelfInfo ¶
func ParseHexColor ¶
ParseHexColor 用于解析如 "#FFFFFF" 或 "FFFFFF" 格式的十六进制颜色字符串
func StoreBookmark ¶
Types ¶
type ReadingHistoryResponse ¶ added in v1.2.11
type ReadingHistoryResponse struct {
Items []model.BookinfoWithBookMark `json:"items"` // 阅读历史列表
TotalCount int `json:"total_count"` // 总数量
Page int `json:"page"` // 当前页码
PageSize int `json:"page_size"` // 每页数量
TotalPages int `json:"total_pages"` // 总页数
}
ReadingHistoryResponse 阅读历史响应结构
Source Files
¶
- bookmark_common.go
- delete_book_cache.go
- delete_bookmark.go
- download_common.go
- download_epub.go
- download_zip.go
- get_book.go
- get_book_info.go
- get_cover.go
- get_file.go
- get_generated_image.go
- get_qrcode.go
- get_raw_file.go
- get_reg_file.go
- get_server_status.go
- get_stores.go
- get_tailscale_status.go
- healthz.go
- image_query_validation.go
- reading_history.go
- remote_comigo.go
- update_bookmark.go