Documentation
¶
Index ¶
- func GetAllServerInfoHandler(c echo.Context) error
- func GetBook(c echo.Context) error
- func GetBookInfos(c echo.Context) error
- func GetBookInfosByDepth(c echo.Context, sortBy string) error
- func GetBookInfosByGroupID(c echo.Context, sortBy string) error
- func GetBookInfosByMaxDepth(c echo.Context, sortBy string) error
- func GetFile(c echo.Context) error
- func GetGeneratedImage(c echo.Context) error
- func GetParentBookInfo(c echo.Context) error
- func GetQrcode(c echo.Context) error
- func GetRawFile(c echo.Context) error
- func GetRegFile(c echo.Context) error
- func GetServerInfoHandler(c echo.Context) error
- func GetTopOfShelfInfo(c echo.Context) error
- func GroupInfo(c echo.Context) error
- func GroupInfoFilter(c echo.Context) error
- func ParseHexColor(s string) (c color.RGBA, err error)
- type ServerStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAllServerInfoHandler ¶
func GetAllServerInfoHandler(c echo.Context) error
func GetBook ¶
func GetBook(c echo.Context) error
GetBook 相关参数: id:书籍的ID,必须项目 &id=2b17a130 author:书籍的作者,未必存在 &author=佚名 sort_page:按照自然文件名重新排序 &sort_page=true 示例 URL: http://127.0.0.1:1234/api/get_book?id=1215a&sort_by=name 示例 URL: http://127.0.0.1:1234/api/get_book?&author=Doe&name=book_name
func GetBookInfos ¶
func GetBookInfos(c echo.Context) error
func GetBookInfosByDepth ¶
func GetBookInfosByGroupID ¶
func GetBookInfosByMaxDepth ¶
func GetFile ¶
func GetFile(c echo.Context) error
GetFile 示例 URL: 127.0.0.1:1234/get_file?id=2b17a13&filename=1.jpg 缩放文件,会转化为jpeg:http://127.0.0.1:1234/api/get_file?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 thumbnail_mode:缩略图模式,同时指定宽高的时候要不要剪切图片 &thumbnail_mode=true 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 GetGeneratedImage(c echo.Context) error
func GetParentBookInfo ¶
func GetParentBookInfo(c echo.Context) error
func GetRawFile ¶
func GetRawFile(c echo.Context) error
func GetServerInfoHandler ¶
func GetServerInfoHandler(c echo.Context) error
func GetTopOfShelfInfo ¶
func GetTopOfShelfInfo(c echo.Context) error
func GroupInfo ¶
func GroupInfo(c echo.Context) error
GroupInfo 示例 URL: http://127.0.0.1:1234/api/group_info?id=1215a&sort_by=filename
func GroupInfoFilter ¶
func GroupInfoFilter(c echo.Context) error
GroupInfoFilter 示例 URL: http://127.0.0.1:1234/api/group_info_filter?id=1215a&sort_by=filename
Types ¶
type ServerStatus ¶
type ServerStatus struct { ServerName string // 服务器描述 ServerHost string // 服务器地址 ServerPort int // 服务器端口(程序运行的端口) NumberOfBooks int // 当前拥有的书籍总数 NumberOfOnLineUser int // TODO:在线用户数 NumberOfOnLineDevices int // TODO:在线设备数 SupportUploadFile bool // 是否支持上传文件 ClientIP string // 客户端IP OSInfo util.SystemStatus // 系统信息 }
ServerStatus 服务器当前状况