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

share_anonymous

package
v0.30.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentService added in v0.14.5

func CurrentService() *anonapp.Service

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

func SetService(svc *anonapp.Service)

SetService 注入 service(bootstrap 调用,装配好的实例——gen 层不触 gorm/dao)

Types

This section is empty.

Jump to

Keyboard shortcuts

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