29 lines
629 B
Plaintext
Executable File
29 lines
629 B
Plaintext
Executable File
syntax = "v1"
|
|
|
|
// ================ 通用響應 ================
|
|
type (
|
|
// 成功響應
|
|
RespOK {}
|
|
|
|
// 分頁響應
|
|
PagerResp {
|
|
Total int64 `json:"total"`
|
|
Size int64 `json:"size"`
|
|
Index int64 `json:"index"`
|
|
}
|
|
|
|
// 錯誤響應
|
|
Resp {
|
|
Code string `json:"code"`
|
|
Message string `json:"message"`
|
|
Data interface{} `json:"data,omitempty"`
|
|
Error interface{} `json:"error,omitempty"` // 可選的錯誤信息
|
|
}
|
|
|
|
BaseReq {}
|
|
|
|
Authorization {
|
|
Authorization string `header:"Authorization" validate:"required"`
|
|
}
|
|
)
|