data_api

package
v1.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2025 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBook

func GetBook(c echo.Context) error

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 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 GetParentBook

func GetParentBook(c echo.Context) error

func GetQrcode

func GetQrcode(c echo.Context) error

GetQrcode 下载服务器配置

func GetRawFile

func GetRawFile(c echo.Context) error

func GetRegFile

func GetRegFile(c echo.Context) error

GetRegFile 注册表文件

func GetServerInfoHandler

func GetServerInfoHandler(c echo.Context) error

GetServerInfoHandler 获取服务器信息的API处理函数

func GetTailscaleStatus

func GetTailscaleStatus(c echo.Context) error

GetTailscaleStatus 处理Tailscale网络的身份信息查询请求

func GetTopOfShelfInfo

func GetTopOfShelfInfo(c echo.Context) error

func ParseHexColor

func ParseHexColor(s string) (c color.RGBA, err error)

ParseHexColor 用于解析如 "#FFFFFF" 或 "FFFFFF" 格式的十六进制颜色字符串

func StoreBookmark

func StoreBookmark(c echo.Context) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL