Documentation ¶
Index ¶
- Constants
- Variables
- func AliSign(req *http.Request, ak, sk, region string) error
- func AmzSign(req *http.Request, ak string, sk string, region string) error
- func AzblobSign(req *http.Request, account string, key string) error
- func CreateAppendBlob(ctx context.Context, url string, ak string, sk string) error
- func Delete(ctx context.Context, url string, ak string, sk string, region string) error
- func Do(ctx context.Context, method string, url string, ak string, sk string, ...) (*http.Response, error)
- func GetNextPositionFromResponse(resp *http.Response) (int, bool, error)
- func HMACSHA256(key []byte, data []byte) []byte
- func Head(ctx context.Context, url string, ak string, sk string, region string) (*http.Response, error)
- func IsAliOss(url string) bool
- func IsAmzS3(url string) bool
- func IsAzblob(url string) bool
- func IsObs(url string) bool
- func IsSupportAppend(url string) bool
- func ObsSign(req *http.Request, ak string, sk string, bucket string, obj string) error
- func ParseAliOssURL(url string) (bool, string, string)
- func ParseAmzS3Url(url string) (bool, string)
- func ParseObsURL(url string) (bool, string, string)
- func Sign(req *http.Request, ak string, sk string, region string) error
- type Type
Constants ¶
View Source
const ( HeaderAuthorization = "Authorization" HeaderDate = "Date" HeaderContentLength = "Content-Length" HeaderContentEncoding = "Content-Encoding" HeaderContentLanguage = "Content-Language" HeaderContentType = "Content-Type" HeaderContentMD5 = "Content-MD5" HeaderIfModifiedSince = "If-Modified-Since" HeaderIfMatch = "If-Match" HeaderIfNoneMatch = "If-None-Match" HeaderIfUnmodifiedSince = "If-Unmodified-Since" HeaderRange = "Range" HeaderXmsDate = "X-Ms-Date" HeaderXmsVersion = "X-Ms-Version" HeaderXmsRequestID = "X-Ms-Request-Id" HeaderXmsBlobType = "X-Ms-Blob-Type" HeaderOssAppendNextPositionHeader = "X-Rgw-Next-Append-Position" HeaderObsAppendNextPositionHeader = "X-Obs-Next-Append-Position" HeaderAliOssAppendNextPositionHeader = "X-Oss-Next-Append-Position" HeaderAzblobAppendOffsetHeader = "X-Ms-Blob-Append-Offset" HeaderAzblobAppendPositionHeader = "X-Ms-Blob-Condition-Appendpos" HeaderAmzDate = "X-Amz-Date" HeaderAmzContentSHA256 = "X-Amz-Content-Sha256" HeaderAliOssPrefix = "x-oss-" HeaderAliContentSHA256 = "X-Oss-Content-Sha256" HeaderAliDate = "X-Oss-Date" AmzServiceS3 = "s3" UnsignedPayloadHash = "UNSIGNED-PAYLOAD" AmzS3SigningAlgorithm = "AWS4-HMAC-SHA256" AuthorizationHeader = "Authorization" )
Variables ¶
View Source
var (
AmzSignIgnoredHeaders = map[string]struct{}{
"Authorization": {},
"User-Agent": {},
"X-Amzn-Trace-Id": {},
"Expect": {},
}
)
Functions ¶
func CreateAppendBlob ¶
func HMACSHA256 ¶
HMACSHA256 computes a HMAC-SHA256 of data given the provided key.
func IsSupportAppend ¶
func ParseAmzS3Url ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.