Documentation
¶
Index ¶
- func CurrentService() *anonapp.Service
- func Download(ctx context.Context, c *app.RequestContext)
- func GenerateCode(ctx context.Context, c *app.RequestContext)
- func Retrieve(ctx context.Context, c *app.RequestContext)
- func SearchByCode(ctx context.Context, c *app.RequestContext)
- func SetService(svc *anonapp.Service)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurrentService ¶ added in v0.14.5
CurrentService 暴露已注入(或惰性构建)的匿名 service 实例。 供 bootstrap 转交给 share 域做取件码铸造——必须共用同一实例, 否则 Redis/内存 KV 两套映射会导致跨实例取件解析失败。
func Download ¶
func Download(ctx context.Context, c *app.RequestContext)
Download . @router /anonymous/download/:code [GET]
func GenerateCode ¶
func GenerateCode(ctx context.Context, c *app.RequestContext)
GenerateCode 上传文件时生成 6 位取件码(端到端:建 file_codes + 取件码映射)。 @router /anonymous/generate [POST]
func Retrieve ¶
func Retrieve(ctx context.Context, c *app.RequestContext)
Retrieve 按取件码取件(校验密码 + 扣减次数,DB 为准)。 @router /anonymous/retrieve [POST]
func SearchByCode ¶
func SearchByCode(ctx context.Context, c *app.RequestContext)
SearchByCode 按码查询分享信息(不下载、不扣次数)。 @router /anonymous/search/:code [GET]
func SetService ¶
SetService 注入 service(bootstrap 调用,装配好的实例——gen 层不触 gorm/dao)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.