Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsValidResponse ¶
Types ¶
type Config ¶
type Config struct { ExtraConfig *ExtraConfig GeneralConfig *GeneralConfig }
var PConfig *Config
type CrabError ¶
type CrabError struct { HttpCode int `json:"-"` ResponseType CrabResponseType `json:"-"` Message string `json:"msg"` Reason string `json:"reason,omitempty"` Status string `json:"status"` }
func NewCrabError ¶
func NewCrabError() *CrabError
func (*CrabError) SetData ¶
func (i *CrabError) SetData(code int, t CrabResponseType, dataList ...interface{})
implement interface CrabResponseInf
type CrabResponse ¶
type CrabResponse struct { HttpCode int `json:"-"` Msg string `json:"msg"` Status string `json:"status"` ResponseType CrabResponseType `json:"-"` Data interface{} `json:"data" swaggertype:"array,object"` }
func NewCrabResponse ¶
func NewCrabResponse() *CrabResponse
func (*CrabResponse) GetRedirectURL ¶
func (ir *CrabResponse) GetRedirectURL() (string, error)
func (*CrabResponse) SetData ¶
func (ir *CrabResponse) SetData(code int, t CrabResponseType, dataList ...interface{})
implement interface CrabResponseInf
type CrabResponseIf ¶
type CrabResponseIf interface {
SetData(code int, t CrabResponseType, dataList ...interface{})
}
type CrabResponseType ¶
type CrabResponseType string
var ( CrabResponseTypeRedirect CrabResponseType = "Redirect" CrabResponseTypeJSON CrabResponseType = "JSON" )
type ExtraConfig ¶
type ExtraConfig struct{}
type GeneralConfig ¶
type GeneralConfig struct { CrabConfig *config.CrabConfig MyConfig *config.MysqlConfig }
Click to show internal directories.
Click to hide internal directories.