oss

package
v0.6.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeaderAuthorization = "Authorization"
	HeaderDate          = "Date"

	HeaderContentLength = "Content-Length"
	HeaderContentType   = "Content-Type"
	HeaderContentMd5    = "Content-MD5"

	HeaderOssCallback      = "X-OSS-Callback"
	HeaderOssCallbackVar   = "X-OSS-Callback-Var"
	HeaderOssSecurityToken = "X-OSS-Security-Token"
)

Variables

Functions

func CalculateAuthorization

func CalculateAuthorization(metadata *RequestMetadata, keyId string, keySecret string) string

CalculateAuthorization calculates authorization for OSS request

func Date

func Date() string

func GetEndpointUrl added in v0.3.2

func GetEndpointUrl() string

func GetPutObjectUrl added in v0.3.2

func GetPutObjectUrl(bucket, key string) string

Types

type Pair

type Pair struct {
	First string
	Last  string
}

type Pairs

type Pairs []*Pair

func (Pairs) Len

func (h Pairs) Len() int

func (Pairs) Less

func (h Pairs) Less(i, j int) bool

func (Pairs) Swap

func (h Pairs) Swap(i, j int)

type RequestMetadata

type RequestMetadata struct {
	// Request verb
	Verb string
	// Request header
	Header map[string]string
	// OSS bucket name
	Bucket string
	// OSS object name
	Object string
	// OSS Parameters
	Params map[string]string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL