- tools/{uuid,md5,random,time,ip}/index.go → 对应 <功能名>.go(git mv 保留历史)
- 目录名=包名=文件名三一致,扩展时目录内按功能加文件(ocr.go → + idcard.go + invoice.go)
- doc.go / AGENTS.md / PROJECT_STRUCTURE.md 同步规则说明
- 冒烟测试 5 端点全部通过
16 lines
431 B
Go
16 lines
431 B
Go
// Package uuid defines the GET /tools/uuid endpoint contract.
|
|
package uuid
|
|
|
|
import "github.com/gogf/gf/v2/frame/g"
|
|
|
|
// UUIDReq generates a unique ID.
|
|
type UUIDReq struct {
|
|
g.Meta `path:"/tools/uuid" method:"get" tags:"Open/Tools" summary:"Generate a unique ID"`
|
|
Short bool `json:"short"` // true: 8-char short code; false: 32-char ID
|
|
}
|
|
|
|
// UUIDRes is the response of UUIDReq.
|
|
type UUIDRes struct {
|
|
UUID string `json:"uuid"`
|
|
}
|