Documentation ¶
Index ¶
- Constants
- type FailedWithReason
- type ResponseIntMap
- type ResponseInterface
- type StatusCode
- type Success
- type SuccessArray
- type SuccessInt
- type SuccessInt64
- type SuccessInt64Array
- type SuccessMap
- type SuccessMapArray
- type SuccessMapInt
- type SuccessMapInt64
- type VueGetUserInfoData
- type VueGetUserInfoResponse
- type VueLoginFailedResponse
- type VueLoginResponse
- type VueLoginResponseData
- type VueLogout
Constants ¶
View Source
const ( // OKCode : OKCode int = 200 // FailedCode : FailedCode int = 210 // AuthFailedCode : AuthFailedCode int = 401 // Status codes: // StatusOK : StatusOK StatusCode = 200 // StatusBadRequest StatusBadRequest StatusCode = 400 StatusForbidden StatusCode = 403 StatusNotFound StatusCode = 404 StatusMethodNotAllowed StatusCode = 405 StatusRequestTimeout StatusCode = 408 StatusInternalServerError StatusCode = 500 StatusNotImplemented StatusCode = 501 StatusBadGateway StatusCode = 502 StatusGatewayTimeout StatusCode = 504 )
response code:
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FailedWithReason ¶
type FailedWithReason struct { Code StatusCode `json:"code"` Msg string `json:"msg"` Data map[string]string `json:"data"` // failed reason, one reason one map item }
FailedWithReason :
type ResponseIntMap ¶
type ResponseIntMap struct { Code StatusCode `json:"code"` Msg string `json:"msg"` Data map[int]int `json:"data"` }
ResponseIntMap :
type ResponseInterface ¶
type ResponseInterface struct { Code StatusCode `json:"code"` Msg string `json:"msg"` Data interface{} `json:"data"` }
common response structs:
type Success ¶
type Success struct { Code StatusCode `json:"code"` Msg string `json:"msg"` }
Success :
type SuccessArray ¶
type SuccessArray struct { Code StatusCode `json:"code"` Msg string `json:"msg"` Data []string `json:"data"` }
SuccessArray :
type SuccessInt ¶
type SuccessInt struct { Code StatusCode `json:"code"` Msg string `json:"msg"` Data int `json:"data"` }
SuccessUint :
type SuccessInt64 ¶
type SuccessInt64 struct { Code StatusCode `json:"code"` Msg string `json:"msg"` Data int64 `json:"data"` }
SuccessUint64 :
type SuccessInt64Array ¶
type SuccessInt64Array struct { Code StatusCode `json:"code"` Msg string `json:"msg"` Data []int64 `json:"data"` }
SuccessArray :
type SuccessMap ¶
type SuccessMap struct { Code StatusCode `json:"code"` Msg string `json:"msg"` Data map[string]string `json:"data"` }
SuccessMap :
type SuccessMapArray ¶
type SuccessMapArray struct { Code StatusCode `json:"code"` Msg string `json:"msg"` Data []map[string]string `json:"data"` }
SuccessMapArray :
type SuccessMapInt ¶
type SuccessMapInt struct { Code StatusCode `json:"code"` Msg string `json:"msg"` Data map[string]int `json:"data"` }
SuccessMapInt :
type SuccessMapInt64 ¶
type SuccessMapInt64 struct { Code StatusCode `json:"code"` Msg string `json:"msg"` Data map[string]int64 `json:"data"` }
SuccessMapInt :
type VueGetUserInfoData ¶
type VueGetUserInfoResponse ¶
type VueGetUserInfoResponse struct { Code StatusCode `json:"code"` Data *VueGetUserInfoData `json:"data"` }
type VueLoginFailedResponse ¶
type VueLoginFailedResponse struct { Code StatusCode `json:"code"` Msg string `json:"message"` }
type VueLoginResponse ¶
type VueLoginResponse struct { Code StatusCode `json:"code"` Data *VueLoginResponseData `json:"data"` }
type VueLoginResponseData ¶
type VueLoginResponseData struct {
Token string `json:"token"`
}
Click to show internal directories.
Click to hide internal directories.