Documentation
      ¶
    
    
  
    
  
    Index ¶
- func EncodePath(pathName string) string
 - func GetCanonicalRequest(extractedSignedHeaders http.Header, payload, queryStr, urlPath, method string) string
 - func GetSignature(signingKey []byte, stringToSign string) string
 - func GetSignedHeaders(signedHeaders http.Header) string
 - func GetSigningKey(secretKey string, t time.Time, region string, serviceType string) []byte
 - func GetStringToSign(canonicalRequest string, t time.Time, scope string) string
 - func MustGetLocalIP4() (ipList set.StringSet)
 - func MustNewSignedV4Request(method string, urlStr string, contentLength int64, body io.ReadSeeker, ...) *http.Request
 - func NewMockPoolClient(t *testing.T) (client.PoolClient, func())
 - func NewRequest(method, urlStr string, contentLength int64, body io.ReadSeeker) (*http.Request, error)
 - func S3EncodeName(name string, encodingType string) (result string)
 - func SignRequestV4(req *http.Request, accessKey, secretKey string, st ServiceType) error
 - func TmpDirPath(t *testing.T) string
 - func XmlDecoder(body io.Reader, v interface{}, size int64) error
 - type ServiceType
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodePath ¶ added in v0.0.2
EncodePath encode the strings from UTF-8 byte representations to HTML hex escape sequences
This is necessary since regular url.Parse() and url.Encode() functions do not support UTF-8 non english characters cannot be parsed due to the nature in which url.Encode() is written
This function on the other hand is a direct replacement for url.Encode() technique to support pretty much every UTF-8 character.
func GetCanonicalRequest ¶ added in v0.0.2
func GetCanonicalRequest(extractedSignedHeaders http.Header, payload, queryStr, urlPath, method string) string
GetCanonicalRequest generate a canonical request of style
canonicalRequest =
<HTTPMethod>\n <CanonicalURI>\n <CanonicalQueryString>\n <CanonicalHeaders>\n <SignedHeaders>\n <HashedPayload>
func GetSignature ¶ added in v0.0.2
GetSignature final signature in hexadecimal form.
func GetSignedHeaders ¶ added in v0.0.2
GetSignedHeaders generate a string i.e alphabetically sorted, semicolon-separated list of lowercase request header names
func GetSigningKey ¶ added in v0.0.2
GetSigningKey hmac seed to calculate final signature.
func GetStringToSign ¶ added in v0.0.2
GetStringToSign a string based on selected query values.
func MustGetLocalIP4 ¶
MustGetLocalIP4 returns IPv4 addresses of localhost. It panics on error.
func MustNewSignedV4Request ¶ added in v0.0.2
func MustNewSignedV4Request(method string, urlStr string, contentLength int64, body io.ReadSeeker, st ServiceType, accessKey, secretKey string, t *testing.T) *http.Request
MustNewSignedV4Request NewSignedV4Request
func NewMockPoolClient ¶ added in v0.0.2
func NewMockPoolClient(t *testing.T) (client.PoolClient, func())
func NewRequest ¶ added in v0.0.2
func NewRequest(method, urlStr string, contentLength int64, body io.ReadSeeker) (*http.Request, error)
NewRequest Returns new HTTP request object.
func S3EncodeName ¶
S3EncodeName encodes string in response when encodingType is specified in AWS S3 requests.
func SignRequestV4 ¶ added in v0.0.2
func SignRequestV4(req *http.Request, accessKey, secretKey string, st ServiceType) error
SignRequestV4 Sign given request using Signature V4.
func TmpDirPath ¶
Types ¶
type ServiceType ¶ added in v0.0.2
type ServiceType string