31 lines
687 B
Go
31 lines
687 B
Go
|
// Code generated by goctl. DO NOT EDIT.
|
||
|
// goctl 1.7.3
|
||
|
|
||
|
package types
|
||
|
|
||
|
type CreateShortURLRequest struct {
|
||
|
URL string `json:"url" validate:"required"`
|
||
|
}
|
||
|
|
||
|
type RespOK struct {
|
||
|
}
|
||
|
|
||
|
type Status struct {
|
||
|
Code int64 `json:"code"` // 狀態碼
|
||
|
Message string `json:"message"` // 訊息
|
||
|
Data interface{} `json:"data,omitempty"` // 可選的資料,當有返回時才出現
|
||
|
Error interface{} `json:"error,omitempty"` // 可選的錯誤信息
|
||
|
}
|
||
|
|
||
|
type URLCodeResponse struct {
|
||
|
Code string `json:"short_code"`
|
||
|
}
|
||
|
|
||
|
type URLRequest struct {
|
||
|
ShortCode string `path:"short_code"`
|
||
|
}
|
||
|
|
||
|
type URLResponse struct {
|
||
|
URL string `json:"url" validate:"required"`
|
||
|
}
|