Documentation ¶
Index ¶
- Variables
- func DeleteJson(url string, headers map[string]string, body, data interface{}) error
- func DeleteJsonCtx(ctx context.Context, opName, url string, headers map[string]string, ...) error
- func GetJson(url string, headers map[string]string, body, data interface{}) error
- func GetJsonCtx(ctx context.Context, opName, url string, headers map[string]string, ...) error
- func HeadJson(url string, headers map[string]string, body, data interface{}) error
- func HeadJsonCtx(ctx context.Context, opName, url string, headers map[string]string, ...) error
- func PostJson(url string, headers map[string]string, body, data interface{}) error
- func PostJsonCtx(ctx context.Context, opName, url string, headers map[string]string, ...) error
- func PutJson(url string, headers map[string]string, body, data interface{}) error
- func PutJsonCtx(ctx context.Context, opName, url string, headers map[string]string, ...) error
- type Client
- func (c *Client) Delete(url string, headers map[string]string, body interface{}) (*Response, error)
- func (c *Client) DeleteCtx(ctx context.Context, opName, url string, headers map[string]string, ...) (*Response, error)
- func (c *Client) DeleteJson(url string, headers map[string]string, body, data interface{}) error
- func (c *Client) DeleteJsonCtx(ctx context.Context, opName, url string, headers map[string]string, ...) error
- func (c *Client) Do(method, url string, headers map[string]string, body interface{}) (*Response, error)
- func (c *Client) DoCtx(ctx context.Context, opName, method, url string, headers map[string]string, ...) (*Response, error)
- func (c *Client) DoJson(method, url string, headers map[string]string, body, data interface{}) error
- func (c *Client) DoJsonCtx(ctx context.Context, opName, method, url string, headers map[string]string, ...) error
- func (c *Client) DoReq(req *http.Request) (*Response, error)
- func (c *Client) Get(url string, headers map[string]string, body interface{}) (*Response, error)
- func (c *Client) GetCtx(ctx context.Context, opName, url string, headers map[string]string, ...) (*Response, error)
- func (c *Client) GetJson(url string, headers map[string]string, body, data interface{}) error
- func (c *Client) GetJsonCtx(ctx context.Context, opName, url string, headers map[string]string, ...) error
- func (c *Client) GetMarshalFunc() func(v interface{}) ([]byte, error)
- func (c *Client) Head(url string, headers map[string]string, body interface{}) (*Response, error)
- func (c *Client) HeadCtx(ctx context.Context, opName, url string, headers map[string]string, ...) (*Response, error)
- func (c *Client) HeadJson(url string, headers map[string]string, body, data interface{}) error
- func (c *Client) HeadJsonCtx(ctx context.Context, opName, url string, headers map[string]string, ...) error
- func (c *Client) Post(url string, headers map[string]string, body interface{}) (*Response, error)
- func (c *Client) PostCtx(ctx context.Context, opName, url string, headers map[string]string, ...) (*Response, error)
- func (c *Client) PostJson(url string, headers map[string]string, body, data interface{}) error
- func (c *Client) PostJsonCtx(ctx context.Context, opName, url string, headers map[string]string, ...) error
- func (c *Client) Put(url string, headers map[string]string, body interface{}) (*Response, error)
- func (c *Client) PutCtx(ctx context.Context, opName, url string, headers map[string]string, ...) (*Response, error)
- func (c *Client) PutJson(url string, headers map[string]string, body, data interface{}) error
- func (c *Client) PutJsonCtx(ctx context.Context, opName, url string, headers map[string]string, ...) error
- type CodeMessageData
- type Response
- func Delete(url string, headers map[string]string, body interface{}) (*Response, error)
- func DeleteCtx(ctx context.Context, opName, url string, headers map[string]string, ...) (*Response, error)
- func Get(url string, headers map[string]string, body interface{}) (*Response, error)
- func GetCtx(ctx context.Context, opName, url string, headers map[string]string, ...) (*Response, error)
- func Head(url string, headers map[string]string, body interface{}) (*Response, error)
- func HeadCtx(ctx context.Context, opName, url string, headers map[string]string, ...) (*Response, error)
- func Post(url string, headers map[string]string, body interface{}) (*Response, error)
- func PostCtx(ctx context.Context, opName, url string, headers map[string]string, ...) (*Response, error)
- func Put(url string, headers map[string]string, body interface{}) (*Response, error)
- func PutCtx(ctx context.Context, opName, url string, headers map[string]string, ...) (*Response, error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func DeleteJson ¶
func DeleteJsonCtx ¶
func GetJsonCtx ¶
func HeadJsonCtx ¶
func PostJsonCtx ¶
Types ¶
type Client ¶
type Client struct { BaseUrl string Client *http.Client MarshalFunc func(v interface{}) ([]byte, error) UnmarshalFunc func(data []byte, v interface{}) error }
func (*Client) DeleteJson ¶
func (*Client) DeleteJsonCtx ¶
func (*Client) GetJsonCtx ¶
func (*Client) GetMarshalFunc ¶
func (*Client) HeadJsonCtx ¶
func (*Client) PostJsonCtx ¶
type CodeMessageData ¶
type CodeMessageData struct {
Code, Message string
Data interface{}
}
func (*CodeMessageData) ValidateResponse ¶
func (cmd *CodeMessageData) ValidateResponse(resp *Response) error
Click to show internal directories.
Click to hide internal directories.