Documentation ¶
Index ¶
- type Client
- func (c *Client) AddConnector(connect Connector)
- func (c *Client) Authenticate(ctx context.Context) (err error)
- func (c *Client) Body(payload interface{}) (body []byte, err error)
- func (f *Client) Delete(path string, body interface{}) (resp *http.Response, err error)
- func (f *Client) Do(urls string, body []byte, types string) (resp *http.Response, err error)
- func (f *Client) Get(path string, body interface{}) (resp *http.Response, err error)
- func (c *Client) GetURL() (url string)
- func (c *Client) Parameter(u *http.Request) (r *http.Request)
- func (f *Client) Post(path string, body interface{}) (resp *http.Response, err error)
- func (f *Client) Put(path string, body interface{}) (resp *http.Response, err error)
- func (c *Client) Refresh(ctx context.Context)
- func (c *Client) SetCode(code string)
- func (c *Client) SetHeader(a, b string)
- func (c *Client) SetParameter(a, b string)
- func (c *Client) SetState(state string)
- func (c *Client) UnsetAllHeader()
- func (c *Client) UnsetAllParam()
- func (c *Client) UnsetHeader(b string)
- func (c *Client) UnsetParameter(b string)
- type Config
- type Connector
- type Oauth
- type Tok
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Oauth *oauth2.Config Legged *clientcredentials.Config QueryValues url.Values Types int Code string State string AuthOpt []oauth2.AuthCodeOption AuthExange []oauth2.AuthCodeOption AuthStyle int Connector Connector Headers map[string]string Param map[string]string Token *oauth2.Token Host string Client *http.Client // contains filtered or unexported fields }
Client is the request client
func (*Client) AddConnector ¶
AddConnector add interface to client obj
func (*Client) Authenticate ¶
Authentification ask autorisation api
func (*Client) UnsetHeader ¶
UnsetHeader delete on element of the header
func (*Client) UnsetParameter ¶
UnsetParameter unset one parameter
type Config ¶
type Config struct { Types int `json:"type"` Oauth Oauth `json:"oauth"` Host string `json:"url"` BaseURL string `json:"baseurl"` Key string `json:"key"` Headers map[string]string `json:"headers"` Param map[string]string `json:"param"` Body []byte `json:"body"` Code string `json:"code"` State string `json:"state"` }
Config represent the request
Click to show internal directories.
Click to hide internal directories.