Documentation ¶
Index ¶
- func Init(appID, appKey string, options ...)
- type Cache
- type Request
- func Get(ctx context.Context, appID string, path string, param map[string]string, ...) (resp *Request)
- func NewRequest(ctx context.Context, from string, to string, path string, ...) *Request
- func Post(ctx context.Context, appID string, path string, param map[string]string, ...) (resp *Request)
- func Put(ctx context.Context, appID string, path string, param map[string]string, ...) (resp *Request)
- type Response
- type ResponseError
- type School
- type Server
- type ServiceOptionFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Request ¶
type Request struct { *gorequest.SuperAgent ResponseData *Response RawData string *http.Response url.Values // contains filtered or unexported fields }
func NewRequest ¶
func (*Request) AttributesFromRequestBody ¶
type Response ¶
type Response struct { Cache bool `json:"cache"` Data interface{} `json:"data"` Error int `json:"error"` Msg string `json:"msg"` }
func (*Response) UnmarshalJSON ¶
type ResponseError ¶
type ResponseError struct { Errors []error // 请求错误 HttpCode int // http错误 Code int // 业务错误码 Msg string // 业务错误信息 Remark string // 备注 }
func (ResponseError) Error ¶
func (r ResponseError) Error() string
type ServiceOptionFunc ¶
type ServiceOptionFunc func(*Server)
func Debug ¶
func Debug() ServiceOptionFunc
func Endpoint ¶
func Endpoint(e string) ServiceOptionFunc
Click to show internal directories.
Click to hide internal directories.