Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaiduWeatherResponse ¶
type BaiduWeatherResponse struct {
Status int `json:"status"`
Result struct {
Now struct {
Temp int `json:"temp"` // 实时温度
} `json:"now"`
Indexes []struct {
Name string `json:"name"` // 指数名称(如"穿衣指数")
Brief string `json:"brief"` // 简要建议(如"较冷")
Detail string `json:"detail"` // 详细说明(如"建议着厚外套加毛衣等服装")
} `json:"indexes"`
} `json:"result"`
}
定义百度天气API返回数据的结构体(包含温度和穿衣指数)
type LoginRequest ¶
type RegisterRequest ¶
type RegisterRequest struct {
Username string `json:"username" binding:"required,min=3,max=20"`
Password string `json:"password" binding:"required,min=6,max=30"`
Email string `json:"email" binding:"required,email"`
}
RegisterRequest 定义注册请求结构体
Click to show internal directories.
Click to hide internal directories.