Help us shape the future of Go! Take the 2026 Go Developer Survey

storage

package
v0.15.2 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanPresignOrphans added in v0.14.9

func CleanPresignOrphans(ctx context.Context, c *app.RequestContext)

CleanPresignOrphans 清理远端 presign 孤儿对象(Init 后未 Complete 的直传残留, 24h 宽限期;本地后端由磁盘对账覆盖,恒返回 removed=0) POST /admin/storage/clean-presign-orphans

func GetStorageInfo

func GetStorageInfo(ctx context.Context, c *app.RequestContext)

GetStorageInfo . @router /admin/storage [GET]

func GetStorageInsights added in v0.14.9

func GetStorageInsights(ctx context.Context, c *app.RequestContext)

GetStorageInsights 存储洞察:后端形态/直传策略/双端用量/今日流量/孤儿与回收站规模 GET /admin/storage/insights

func SetJanitor added in v0.14.8

func SetJanitor(j *adminapp.Janitor)

SetJanitor 注入 janitor(bootstrap 调用)——孤儿清理端点与洞察计数 复用后台对账的同一实例,避免双份列举逻辑。

func SetService

func SetService(svc *storageapp.Service)

SetService 注入 service(bootstrap 调用)

func SwitchStorage

func SwitchStorage(ctx context.Context, c *app.RequestContext)

SwitchStorage . @router /admin/storage/switch [POST]

func TestStorageConnection

func TestStorageConnection(ctx context.Context, c *app.RequestContext)

TestStorageConnection . @router /admin/storage/test/:type [GET]

func UpdateStorageConfig

func UpdateStorageConfig(ctx context.Context, c *app.RequestContext)

UpdateStorageConfig . @router /admin/storage/config [PUT] 支持两种请求形态:

  • 旧嵌套(IDL):{type, config:{storage_path/webdav/s3}}
  • 扁平(新契约,v0.7.x):请求体即 conf.StorageConfig 同构 JSON (type/storage_path/quota/s3/webdav/ftp/sftp/azureblob/hdfs/onedrive/oss..obs), 服务端整体校验 → Probe → 热切换 → 持久化。IDL thrift 模型将 config 标为 required 会先拒扁平体,故此处先按顶层字段探测分派。

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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