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

storage

package
v0.14.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStorageInfo

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

GetStorageInfo . @router /admin/storage [GET]

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