service.xpcool.com/api/open/v1/tools/time/time.go
夏犀麟 5cd8f0f551 refactor(api): 契约文件 index.go 重命名为 <功能名>.go
- 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 端点全部通过
2026-08-24 18:07:33 +08:00

17 lines
503 B
Go

// Package time defines the GET /tools/time endpoint contract.
package time
import "github.com/gogf/gf/v2/frame/g"
// TimeReq returns the current server time.
type TimeReq struct {
g.Meta `path:"/tools/time" method:"get" tags:"Open/Tools" summary:"Current server time"`
}
// TimeRes is the response of TimeReq.
type TimeRes struct {
Timestamp int64 `json:"timestamp"` // unix seconds
DateTime string `json:"dateTime"` // 2006-01-02 15:04:05
Date string `json:"date"` // 2006-01-02
}