Expand description
回收站与站点配置接口。 回收站、自动备份、素材上传与站点配置接口。
按子域拆分为目录模块:trash(回收站)、backup(自动备份)、security
(安全)、image_cache(图片磁盘缓存)、asset_purge(孤儿素材清理)、
rate_limit(限流)、upload(素材上传)、site(站点公开配置)、
system(系统启动信息)、webp(WebP 编码)、image_limit(图片尺寸限制)、
runner(代码运行器)、ssr_cache(SSR 页面缓存)。全部公开项经本模块 pub use 聚合,
crate::api::settings::xxx 路径保持不变,外部调用零改动。
- 回收站配置:读取与更新自动清理设置,需要 admin 权限。
- 自动备份配置:读取与更新定时备份设置(含上次结果/下次执行时间),需要 admin。
load_backup_settings/save_last_backup_run同时供备份核心与调度任务复用。 同名BACKUP_*环境变量仅在对应 settings 键缺失时播种初始值(首次部署), 之后以面板写入的 DB 值为准。 - 素材上传配置:读取与更新上传弹窗并发数,需要 admin。
UPLOAD_CONCURRENCY环境变量播种语义与BACKUP_*一致(仅键缺失时生效)。 - 站点公开配置:页脚 GitHub 链接等,
get_site_settings公开读取(前台页脚 SSR),update_site_settings仅 admin。配置持久化到 settings 键值表。 Leptos server function,注册在/api路径下。
Modules§
- asset_
purge 🔒 - backup 🔒
- image_
cache 🔒 - image_
limit 🔒 - rate_
limit 🔒 - runner 🔒
- security 🔒
- site 🔒
- ssr_
cache 🔒 - system 🔒
- trash 🔒
- upload 🔒
- webp 🔒
Structs§
- GetAsset
Purge Settings - Serialized arguments for the
get_asset_purge_settingsserver function. - GetBackup
Settings - Serialized arguments for the
get_backup_settingsserver function. - GetImage
Cache Settings - Serialized arguments for the
get_image_cache_settingsserver function. - GetImage
Limit Settings - Serialized arguments for the
get_image_limit_settingsserver function. - GetRate
Limit Settings - Serialized arguments for the
get_rate_limit_settingsserver function. - GetRunner
Settings - Serialized arguments for the
get_runner_settingsserver function. - GetSecurity
Settings - Serialized arguments for the
get_security_settingsserver function. - GetSite
Card - Serialized arguments for the
get_site_cardserver function. - GetSite
Settings - Serialized arguments for the
get_site_settingsserver function. - GetSsr
Cache Settings - Serialized arguments for the
get_ssr_cache_settingsserver function. - GetSystem
Info - Serialized arguments for the
get_system_infoserver function. - GetTrash
Settings - Serialized arguments for the
get_trash_settingsserver function. - GetUpload
Settings - Serialized arguments for the
get_upload_settingsserver function. - GetWebp
Settings - Serialized arguments for the
get_webp_settingsserver function. - Site
Card - 友链页「交换友链」展示的本站信息。
- Update
Asset Purge Settings - Serialized arguments for the
update_asset_purge_settingsserver function. - Update
Backup Settings - Serialized arguments for the
update_backup_settingsserver function. - Update
Image Cache Settings - Serialized arguments for the
update_image_cache_settingsserver function. - Update
Image Limit Settings - Serialized arguments for the
update_image_limit_settingsserver function. - Update
Rate Limit Settings - Serialized arguments for the
update_rate_limit_settingsserver function. - Update
Runner Settings - Serialized arguments for the
update_runner_settingsserver function. - Update
Security Settings - Serialized arguments for the
update_security_settingsserver function. - Update
Site Settings - Serialized arguments for the
update_site_settingsserver function. - Update
SsrCache Settings - Serialized arguments for the
update_ssr_cache_settingsserver function. - Update
Trash Settings - Serialized arguments for the
update_trash_settingsserver function. - Update
Upload Settings - Serialized arguments for the
update_upload_settingsserver function. - Update
Webp Settings - Serialized arguments for the
update_webp_settingsserver function.
Functions§
- bootstrap_
startup_ 🔒settings - Seed all first-boot settings and bake Tier-B settings into process config.
- get_
asset_ purge_ settings - 读取孤儿素材清理配置(面板用)。
- get_
backup_ settings - 读取自动备份配置(面板用)。
- get_
image_ cache_ settings - 读取图片磁盘缓存配置(面板用)。
- get_
image_ limit_ settings - 读取图片尺寸限制配置(面板用)。
- get_
rate_ limit_ settings - 读取限流配置(面板用)。
- get_
runner_ settings - 读取代码运行器配置(面板用)。
- get_
security_ settings - 读取安全配置(面板用)。
- get_
site_ card - 读取友链交换信息:站名、站点地址与简介。公开接口。
- get_
site_ settings - 读取站点公开配置。
- get_
ssr_ cache_ settings - 读取 SSR 页面缓存配置(面板用)。
- get_
system_ info - 读取系统启动配置的只读快照(面板展示用)。
- get_
trash_ settings - 读取回收站配置。
- get_
upload_ settings - 读取素材上传配置(上传弹窗并发数)。
- get_
webp_ settings - 读取 WebP 配置(面板用)。
- insert_
env_ 🔒seeds - Batch-insert first-boot environment seeds.
- load_
setting_ 🔒values - Load a settings group with one indexed query.
- update_
asset_ purge_ settings - 更新孤儿素材清理配置。
- update_
backup_ settings - 更新自动备份配置。
- update_
image_ cache_ settings - 更新图片磁盘缓存配置。
- update_
image_ limit_ settings - 更新图片尺寸限制配置。
- update_
rate_ limit_ settings - 更新限流配置。
- update_
runner_ settings - 更新代码运行器配置。
- update_
security_ settings - 更新安全配置。
- update_
site_ settings - 更新站点公开配置。
- update_
ssr_ cache_ settings - 更新 SSR 页面缓存配置。
- update_
trash_ settings - 更新回收站配置。
- update_
upload_ settings - 更新素材上传配置。
- update_
webp_ settings - 更新 WebP 配置。
- upsert_
setting 🔒 - 写入(或覆盖)单个 settings 键,同时刷新
updated_at。 - upsert_
settings 🔒 - 一条语句写入(或覆盖)多个 settings 键,同时刷新
updated_at。