mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-12-24 09:06:02 +08:00
v2.0
This commit is contained in:
17
server/internal/model/response.go
Normal file
17
server/internal/model/response.go
Normal file
@@ -0,0 +1,17 @@
|
||||
// Package model
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package model
|
||||
|
||||
// Response HTTP响应
|
||||
type Response struct {
|
||||
Code int `json:"code" example:"0" description:"状态码"`
|
||||
Message string `json:"message,omitempty" example:"操作成功" description:"提示消息"`
|
||||
Data interface{} `json:"data,omitempty" description:"数据集"`
|
||||
Error interface{} `json:"error,omitempty" description:"错误信息"`
|
||||
Timestamp int64 `json:"timestamp" example:"1640966400" description:"服务器时间戳"`
|
||||
TraceID string `json:"traceID" v:"0" example:"d0bb93048bc5c9164cdee845dcb7f820" description:"链路ID"`
|
||||
}
|
||||
Reference in New Issue
Block a user