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, timeout time.Duration, url string, ak string, sk string, ...) error
- func GetNextPositionFromResponse(resp *http.Response) (int, bool, error)
- func HMACSHA256(key []byte, data []byte) []byte
- func Head(ctx context.Context, timeout time.Duration, url string, ak string, sk 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 NeedContentLength(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 SealAppendBlob(ctx context.Context, url string, ak string, sk string) error
- func Sign(req *http.Request, ak string, sk string, region string) error
- type Type
Constants ¶
View Source
const ( HeaderXmsDate = "X-Ms-Date" HeaderXmsVersion = "X-Ms-Version" HeaderXmsRequestID = "X-Ms-Request-Id" HeaderXmsBlobType = "X-Ms-Blob-Kind" 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 NeedContentLength ¶ added in v0.11.0
func ParseAmzS3Url ¶
func SealAppendBlob ¶ added in v0.11.0
Types ¶
Click to show internal directories.
Click to hide internal directories.