Documentation ¶
Index ¶
- Constants
- func AuthHeaderValue(signature, accessKey string, signedHeaders []string) string
- func CanonicalHeaders(r *http.Request, signerHeaders []string) string
- func CanonicalQueryString(r *http.Request) string
- func CanonicalRequest(r *http.Request, signedHeaders []string) (string, error)
- func CanonicalURI(r *http.Request) string
- func HexEncodeSHA256Hash(body []byte) (string, error)
- func RequestPayload(r *http.Request) ([]byte, error)
- func SignStringToSign(stringToSign string, signingKey []byte) (string, error)
- func SignedHeaders(r *http.Request) []string
- func StringToSign(canonicalRequest string, t time.Time) (string, error)
- type HttpClientGo
- func (client HttpClientGo) CheckDeletedDiag(d *schema.ResourceData, err error, response *http.Response, msg string) ([]byte, diag.Diagnostics)
- func (client *HttpClientGo) Do() (*http.Response, error)
- func (client *HttpClientGo) WithBody(body interface{}) *HttpClientGo
- func (client *HttpClientGo) WithHeader(header map[string]string) *HttpClientGo
- func (client *HttpClientGo) WithMethod(method string) *HttpClientGo
- func (client *HttpClientGo) WithOKCodes(arr []int) *HttpClientGo
- func (client *HttpClientGo) WithTransport() *HttpClientGo
- func (client *HttpClientGo) WithUrl(url string) *HttpClientGo
- func (client *HttpClientGo) WithUrlWithoutEndpoint(cfg *config.HcsConfig, srv, region, path string) *HttpClientGo
- type Signer
Constants ¶
View Source
const ( MethodGet = "GET" MethodPost = "POST" MethodPut = "PUT" MethodDelete = "DELETE" )
View Source
const ( BasicDateFormat = "20060102T150405Z" Algorithm = "SDK-HMAC-SHA256" HeaderXDate = "X-Sdk-Date" HeaderHost = "host" HeaderAuthorization = "Authorization" HeaderContentSha256 = "X-Sdk-content-sha256" )
Variables ¶
This section is empty.
Functions ¶
func AuthHeaderValue ¶
func CanonicalQueryString ¶
func CanonicalRequest ¶
func CanonicalURI ¶
func HexEncodeSHA256Hash ¶
func SignStringToSign ¶
Create the HWS Signature.
func SignedHeaders ¶
Types ¶
type HttpClientGo ¶
type HttpClientGo struct { Client *golangsdk.ServiceClient Method string Url string RequestOpts golangsdk.RequestOpts Header map[string]string Error error Transport *http.Transport }
func NewHttpClientGo ¶
func NewHttpClientGo(c *config.HcsConfig, product, region string) (*HttpClientGo, error)
func (HttpClientGo) CheckDeletedDiag ¶
func (client HttpClientGo) CheckDeletedDiag(d *schema.ResourceData, err error, response *http.Response, msg string) ([]byte, diag.Diagnostics)
func (*HttpClientGo) WithBody ¶
func (client *HttpClientGo) WithBody(body interface{}) *HttpClientGo
func (*HttpClientGo) WithHeader ¶
func (client *HttpClientGo) WithHeader(header map[string]string) *HttpClientGo
func (*HttpClientGo) WithMethod ¶
func (client *HttpClientGo) WithMethod(method string) *HttpClientGo
func (*HttpClientGo) WithOKCodes ¶
func (client *HttpClientGo) WithOKCodes(arr []int) *HttpClientGo
func (*HttpClientGo) WithTransport ¶
func (client *HttpClientGo) WithTransport() *HttpClientGo
func (*HttpClientGo) WithUrl ¶
func (client *HttpClientGo) WithUrl(url string) *HttpClientGo
func (*HttpClientGo) WithUrlWithoutEndpoint ¶
func (client *HttpClientGo) WithUrlWithoutEndpoint(cfg *config.HcsConfig, srv, region, path string) *HttpClientGo
Click to show internal directories.
Click to hide internal directories.