Documentation ¶
Index ¶
- Variables
- func WebHttpApiResponseHandler(resp interface{}) (code int, data map[string]interface{})
- type IWebHTTPApi
- type WebHTTPApi
- func (w *WebHTTPApi) Code() int
- func (w *WebHTTPApi) Data() interface{}
- func (w *WebHTTPApi) Extra() map[string]interface{}
- func (w *WebHTTPApi) HttpCode() int
- func (w *WebHTTPApi) Limit() int64
- func (w *WebHTTPApi) Message() string
- func (w *WebHTTPApi) Page() int64
- func (w *WebHTTPApi) SetCode(code int) *WebHTTPApi
- func (w *WebHTTPApi) SetData(data interface{}) *WebHTTPApi
- func (w *WebHTTPApi) SetExtra(extra map[string]interface{}) *WebHTTPApi
- func (w *WebHTTPApi) SetHttpCode(httpCode int) *WebHTTPApi
- func (w *WebHTTPApi) SetLimit(limit int64) *WebHTTPApi
- func (w *WebHTTPApi) SetMessage(message string) *WebHTTPApi
- func (w *WebHTTPApi) SetPage(page int64) *WebHTTPApi
- func (w *WebHTTPApi) SetTotal(total int64) *WebHTTPApi
- func (w *WebHTTPApi) Total() int64
Constants ¶
This section is empty.
Variables ¶
View Source
var RespSuccess = NewWebHTTPApi(200).SetMessage("success")
Functions ¶
Types ¶
type IWebHTTPApi ¶
type WebHTTPApi ¶
type WebHTTPApi struct {
// contains filtered or unexported fields
}
func NewWebHTTPApi ¶
func NewWebHTTPApi(code int) *WebHTTPApi
NewWebHTTPApi create a new WebHTTPApi for user quickly create a response code: response "code" in body
func (*WebHTTPApi) Code ¶
func (w *WebHTTPApi) Code() int
func (*WebHTTPApi) Data ¶
func (w *WebHTTPApi) Data() interface{}
func (*WebHTTPApi) Extra ¶
func (w *WebHTTPApi) Extra() map[string]interface{}
func (*WebHTTPApi) HttpCode ¶
func (w *WebHTTPApi) HttpCode() int
func (*WebHTTPApi) Limit ¶
func (w *WebHTTPApi) Limit() int64
func (*WebHTTPApi) Message ¶
func (w *WebHTTPApi) Message() string
func (*WebHTTPApi) Page ¶
func (w *WebHTTPApi) Page() int64
func (*WebHTTPApi) SetCode ¶
func (w *WebHTTPApi) SetCode(code int) *WebHTTPApi
func (*WebHTTPApi) SetData ¶
func (w *WebHTTPApi) SetData(data interface{}) *WebHTTPApi
func (*WebHTTPApi) SetExtra ¶
func (w *WebHTTPApi) SetExtra(extra map[string]interface{}) *WebHTTPApi
func (*WebHTTPApi) SetHttpCode ¶
func (w *WebHTTPApi) SetHttpCode(httpCode int) *WebHTTPApi
func (*WebHTTPApi) SetLimit ¶
func (w *WebHTTPApi) SetLimit(limit int64) *WebHTTPApi
func (*WebHTTPApi) SetMessage ¶
func (w *WebHTTPApi) SetMessage(message string) *WebHTTPApi
func (*WebHTTPApi) SetPage ¶
func (w *WebHTTPApi) SetPage(page int64) *WebHTTPApi
func (*WebHTTPApi) SetTotal ¶
func (w *WebHTTPApi) SetTotal(total int64) *WebHTTPApi
func (*WebHTTPApi) Total ¶
func (w *WebHTTPApi) Total() int64
Click to show internal directories.
Click to hide internal directories.