Documentation ¶
Index ¶
- type RestClient
- func (r *RestClient) Delete(url string) (*http.Response, error)
- func (r *RestClient) DeleteJson(url string, body interface{}) (*http.Response, error)
- func (r *RestClient) Do(request *http.Request) (*http.Response, error)
- func (r *RestClient) Get(url string) (*http.Response, error)
- func (r *RestClient) Post(url string) (*http.Response, error)
- func (r *RestClient) PostJson(url string, body interface{}) (*http.Response, error)
- func (r *RestClient) Put(url string) (*http.Response, error)
- func (r *RestClient) PutJson(url string, body interface{}) (*http.Response, error)
- func (c *RestClient) WithTimeout(timeout time.Duration) *RestClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RestClient ¶
type RestClient struct {
// contains filtered or unexported fields
}
func New ¶
func New(tokenSource oauth2.TokenSource) *RestClient
func NewWithTimeout ¶
func NewWithTimeout(timeout time.Duration, tokenSource oauth2.TokenSource) *RestClient
func WithClient ¶
func WithClient(client *http.Client) *RestClient
func (*RestClient) DeleteJson ¶ added in v1.1.0
func (r *RestClient) DeleteJson(url string, body interface{}) (*http.Response, error)
func (*RestClient) Post ¶ added in v1.1.0
func (r *RestClient) Post(url string) (*http.Response, error)
func (*RestClient) PostJson ¶
func (r *RestClient) PostJson(url string, body interface{}) (*http.Response, error)
func (*RestClient) Put ¶ added in v1.1.0
func (r *RestClient) Put(url string) (*http.Response, error)
func (*RestClient) PutJson ¶
func (r *RestClient) PutJson(url string, body interface{}) (*http.Response, error)
func (*RestClient) WithTimeout ¶
func (c *RestClient) WithTimeout(timeout time.Duration) *RestClient
Click to show internal directories.
Click to hide internal directories.