17 lines
554 B
Go
17 lines
554 B
Go
// Package open_tools_random 定义 POST /tools/random 接口契约。
|
|
package open_tools_random
|
|
|
|
import "github.com/gogf/gf/v2/frame/g"
|
|
|
|
// RandomReq 生成随机字符串。
|
|
type RandomReq struct {
|
|
g.Meta `path:"/tools/random" method:"post" tags:"Open/Tools" summary:"生成随机字符串"`
|
|
Length int `json:"length" d:"16" v:"min:1|max:128#length must be 1-128"`
|
|
Type string `json:"type" d:"alnum" v:"in:alnum,digits,letters#unsupported type"`
|
|
}
|
|
|
|
// RandomRes 是 RandomReq 的响应。
|
|
type RandomRes struct {
|
|
Value string `json:"value"`
|
|
}
|