Documentation ¶
Index ¶
- Constants
- Variables
- type CertificateVerifyMode
- type Client
- func (c *Client) DoDeleteRequest(ctx context.Context, uri string, options *HTTPRequest, pswd string) (*HTTPResponse, error)
- func (c *Client) DoGetRequest(ctx context.Context, uri string, options *HTTPRequest, pswd string) (*HTTPResponse, error)
- func (c *Client) DoPostRequest(ctx context.Context, uri string, body interface{}, options *HTTPRequest, ...) (*HTTPResponse, error)
- func (c *Client) DoRequest(ctx context.Context, method, uriPath string, body io.Reader, ...) (*HTTPResponse, error)
- type ClientParams
- type HTTPRequest
- type HTTPResponse
- type IHttpClient
Constants ¶
View Source
const ( AuthorizationHeaderName = "Authorization" BearerAuthorizationPrefix = "Bearer " )
Variables ¶
View Source
var ( Routes = endpoints{ // contains filtered or unexported fields } )
Functions ¶
This section is empty.
Types ¶
type CertificateVerifyMode ¶ added in v1.6.0
type CertificateVerifyMode int
const ( // Default: Always verify server certificate, unless the BaseURL is overridden to a value // that uses an ip address, localhost, or a custom port CertificateVerifyAutomatic CertificateVerifyMode = iota // Secure: Always verify server certificate, this is only needed if you override // the default BaseURL and the automatic behavior isn't suitable CertificateVerifyAlways // Insecure: Never verify server certificate CertificateVerifyNever )
func (CertificateVerifyMode) SkipVerifyValue ¶ added in v1.6.0
func (mode CertificateVerifyMode) SkipVerifyValue(baseURL string) bool
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(conf ClientParams) *Client
func (*Client) DoDeleteRequest ¶ added in v1.1.0
func (c *Client) DoDeleteRequest(ctx context.Context, uri string, options *HTTPRequest, pswd string) (*HTTPResponse, error)
func (*Client) DoGetRequest ¶
func (c *Client) DoGetRequest(ctx context.Context, uri string, options *HTTPRequest, pswd string) (*HTTPResponse, error)
func (*Client) DoPostRequest ¶
func (c *Client) DoPostRequest(ctx context.Context, uri string, body interface{}, options *HTTPRequest, pswd string) (*HTTPResponse, error)
type ClientParams ¶
type ClientParams struct { ProjectID string BaseURL string DefaultClient IHttpClient CustomDefaultHeaders map[string]string CertificateVerify CertificateVerifyMode RequestTimeout time.Duration }
type HTTPRequest ¶
type HTTPResponse ¶
Click to show internal directories.
Click to hide internal directories.