vendor: update all dependencies
This commit is contained in:
parent
3f0789e2db
commit
08021c4636
2474 changed files with 435818 additions and 282709 deletions
14
vendor/github.com/yunify/qingstor-sdk-go/CHANGELOG.md
generated
vendored
14
vendor/github.com/yunify/qingstor-sdk-go/CHANGELOG.md
generated
vendored
|
@ -1,6 +1,18 @@
|
|||
# Change Log
|
||||
All notable changes to QingStor SDK for Go will be documented in this file.
|
||||
|
||||
## [v2.2.14] - 2018-6-9
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix head application/json file failed
|
||||
|
||||
## [v2.2.13] - 2018-5-31
|
||||
|
||||
### Added
|
||||
|
||||
- Add storage class support
|
||||
|
||||
## [v2.2.12] - 2018-4-8
|
||||
|
||||
### Changed
|
||||
|
@ -150,6 +162,8 @@ All notable changes to QingStor SDK for Go will be documented in this file.
|
|||
|
||||
- QingStor SDK for the Go programming language.
|
||||
|
||||
[v2.2.14]: https://github.com/yunify/qingstor-sdk-go/compare/v2.2.13...v2.2.14
|
||||
[v2.2.13]: https://github.com/yunify/qingstor-sdk-go/compare/v2.2.12...v2.2.13
|
||||
[v2.2.12]: https://github.com/yunify/qingstor-sdk-go/compare/v2.2.11...v2.2.12
|
||||
[v2.2.11]: https://github.com/yunify/qingstor-sdk-go/compare/v2.2.10...v2.2.11
|
||||
[v2.2.10]: https://github.com/yunify/qingstor-sdk-go/compare/v2.2.9...v2.2.10
|
||||
|
|
6
vendor/github.com/yunify/qingstor-sdk-go/glide.lock
generated
vendored
6
vendor/github.com/yunify/qingstor-sdk-go/glide.lock
generated
vendored
|
@ -1,5 +1,5 @@
|
|||
hash: 08f9d9c9c14c4e5927e38688e6bab5bc44b5cb920d05b2523de680a115f5a6b7
|
||||
updated: 2017-11-25T11:24:10.452444+08:00
|
||||
hash: 6e1d4e547cdd58944ef920192480d29edd118cac0e8269d793315066d1249b4e
|
||||
updated: 2018-05-10T11:43:20.637418+08:00
|
||||
imports:
|
||||
- name: github.com/DATA-DOG/godog
|
||||
version: 272624afcc2fc5f818ce069e2e417e7b4fa8bb6c
|
||||
|
@ -7,7 +7,7 @@ imports:
|
|||
- colors
|
||||
- gherkin
|
||||
- name: github.com/pengsrc/go-shared
|
||||
version: b98065a377794d577e2a0e32869378b9ce4b8952
|
||||
version: db9bcfc423552eef790d989bb81ef055d0d26286
|
||||
subpackages:
|
||||
- buffer
|
||||
- check
|
||||
|
|
2
vendor/github.com/yunify/qingstor-sdk-go/glide.yaml
generated
vendored
2
vendor/github.com/yunify/qingstor-sdk-go/glide.yaml
generated
vendored
|
@ -8,4 +8,4 @@ import:
|
|||
|
||||
# Shared packages
|
||||
- package: github.com/pengsrc/go-shared
|
||||
version: v0.1.1
|
||||
version: db9bcfc423552eef790d989bb81ef055d0d26286
|
||||
|
|
6
vendor/github.com/yunify/qingstor-sdk-go/request/builder/qingstor.go
generated
vendored
6
vendor/github.com/yunify/qingstor-sdk-go/request/builder/qingstor.go
generated
vendored
|
@ -77,20 +77,20 @@ func (qb *QingStorBuilder) BuildHTTPRequest(o *data.Operation, i *reflect.Value)
|
|||
|
||||
logger.Infof(nil, fmt.Sprintf(
|
||||
"Built QingStor request: [%d] %s",
|
||||
convert.StringToUnixTimestamp(httpRequest.Header.Get("Date"), convert.RFC822),
|
||||
convert.StringToTimestamp(httpRequest.Header.Get("Date"), convert.RFC822),
|
||||
httpRequest.URL.String(),
|
||||
))
|
||||
|
||||
logger.Infof(nil, fmt.Sprintf(
|
||||
"QingStor request headers: [%d] %s",
|
||||
convert.StringToUnixTimestamp(httpRequest.Header.Get("Date"), convert.RFC822),
|
||||
convert.StringToTimestamp(httpRequest.Header.Get("Date"), convert.RFC822),
|
||||
fmt.Sprint(httpRequest.Header),
|
||||
))
|
||||
|
||||
if qb.baseBuilder.parsedBodyString != "" {
|
||||
logger.Infof(nil, fmt.Sprintf(
|
||||
"QingStor request body string: [%d] %s",
|
||||
convert.StringToUnixTimestamp(httpRequest.Header.Get("Date"), convert.RFC822),
|
||||
convert.StringToTimestamp(httpRequest.Header.Get("Date"), convert.RFC822),
|
||||
qb.baseBuilder.parsedBodyString,
|
||||
))
|
||||
}
|
||||
|
|
2
vendor/github.com/yunify/qingstor-sdk-go/request/request.go
generated
vendored
2
vendor/github.com/yunify/qingstor-sdk-go/request/request.go
generated
vendored
|
@ -217,7 +217,7 @@ func (r *Request) send() error {
|
|||
if retries > 0 {
|
||||
logger.Infof(nil, fmt.Sprintf(
|
||||
"Sending request: [%d] %s %s",
|
||||
convert.StringToUnixTimestamp(r.HTTPRequest.Header.Get("Date"), convert.RFC822),
|
||||
convert.StringToTimestamp(r.HTTPRequest.Header.Get("Date"), convert.RFC822),
|
||||
r.Operation.RequestMethod,
|
||||
r.HTTPRequest.Host,
|
||||
))
|
||||
|
|
10
vendor/github.com/yunify/qingstor-sdk-go/request/signer/qingstor.go
generated
vendored
10
vendor/github.com/yunify/qingstor-sdk-go/request/signer/qingstor.go
generated
vendored
|
@ -87,7 +87,7 @@ func (qss *QingStorSigner) BuildSignature(request *http.Request) (string, error)
|
|||
|
||||
logger.Debugf(nil, fmt.Sprintf(
|
||||
"QingStor authorization: [%d] %s",
|
||||
convert.StringToUnixTimestamp(request.Header.Get("Date"), convert.RFC822),
|
||||
convert.StringToTimestamp(request.Header.Get("Date"), convert.RFC822),
|
||||
authorization,
|
||||
))
|
||||
|
||||
|
@ -113,7 +113,7 @@ func (qss *QingStorSigner) BuildQuerySignature(request *http.Request, expires in
|
|||
|
||||
logger.Debugf(nil, fmt.Sprintf(
|
||||
"QingStor query signature: [%d] %s",
|
||||
convert.StringToUnixTimestamp(request.Header.Get("Date"), convert.RFC822),
|
||||
convert.StringToTimestamp(request.Header.Get("Date"), convert.RFC822),
|
||||
query,
|
||||
))
|
||||
|
||||
|
@ -143,7 +143,7 @@ func (qss *QingStorSigner) BuildStringToSign(request *http.Request) (string, err
|
|||
|
||||
logger.Debugf(nil, fmt.Sprintf(
|
||||
"QingStor string to sign: [%d] %s",
|
||||
convert.StringToUnixTimestamp(request.Header.Get("Date"), convert.RFC822),
|
||||
convert.StringToTimestamp(request.Header.Get("Date"), convert.RFC822),
|
||||
stringToSign,
|
||||
))
|
||||
|
||||
|
@ -169,7 +169,7 @@ func (qss *QingStorSigner) BuildQueryStringToSign(request *http.Request, expires
|
|||
|
||||
logger.Debugf(nil, fmt.Sprintf(
|
||||
"QingStor query string to sign: [%d] %s",
|
||||
convert.StringToUnixTimestamp(request.Header.Get("Date"), convert.RFC822),
|
||||
convert.StringToTimestamp(request.Header.Get("Date"), convert.RFC822),
|
||||
stringToSign,
|
||||
))
|
||||
|
||||
|
@ -233,7 +233,7 @@ func (qss *QingStorSigner) buildCanonicalizedResource(request *http.Request) (st
|
|||
|
||||
logger.Debugf(nil, fmt.Sprintf(
|
||||
"QingStor canonicalized resource: [%d] %s",
|
||||
convert.StringToUnixTimestamp(request.Header.Get("Date"), convert.RFC822),
|
||||
convert.StringToTimestamp(request.Header.Get("Date"), convert.RFC822),
|
||||
path,
|
||||
))
|
||||
|
||||
|
|
50
vendor/github.com/yunify/qingstor-sdk-go/request/unpacker/base.go
generated
vendored
50
vendor/github.com/yunify/qingstor-sdk-go/request/unpacker/base.go
generated
vendored
|
@ -71,7 +71,7 @@ func (b *BaseUnpacker) exposeStatusCode() error {
|
|||
case *int:
|
||||
logger.Infof(nil, fmt.Sprintf(
|
||||
"QingStor response status code: [%d] %d",
|
||||
convert.StringToUnixTimestamp(b.httpResponse.Header.Get("Date"), convert.RFC822),
|
||||
convert.StringToTimestamp(b.httpResponse.Header.Get("Date"), convert.RFC822),
|
||||
b.httpResponse.StatusCode,
|
||||
))
|
||||
value.Set(reflect.ValueOf(&b.httpResponse.StatusCode))
|
||||
|
@ -84,7 +84,7 @@ func (b *BaseUnpacker) exposeStatusCode() error {
|
|||
func (b *BaseUnpacker) parseResponseHeaders() error {
|
||||
logger.Infof(nil, fmt.Sprintf(
|
||||
"QingStor response headers: [%d] %s",
|
||||
convert.StringToUnixTimestamp(b.httpResponse.Header.Get("Date"), convert.RFC822),
|
||||
convert.StringToTimestamp(b.httpResponse.Header.Get("Date"), convert.RFC822),
|
||||
fmt.Sprint(b.httpResponse.Header),
|
||||
))
|
||||
|
||||
|
@ -152,7 +152,7 @@ func (b *BaseUnpacker) parseResponseBody() error {
|
|||
|
||||
logger.Infof(nil, fmt.Sprintf(
|
||||
"QingStor response body string: [%d] %s",
|
||||
convert.StringToUnixTimestamp(b.httpResponse.Header.Get("Date"), convert.RFC822),
|
||||
convert.StringToTimestamp(b.httpResponse.Header.Get("Date"), convert.RFC822),
|
||||
string(buffer.Bytes()),
|
||||
))
|
||||
|
||||
|
@ -167,23 +167,37 @@ func (b *BaseUnpacker) parseResponseBody() error {
|
|||
}
|
||||
|
||||
func (b *BaseUnpacker) parseResponseElements() error {
|
||||
if b.isResponseRight() {
|
||||
if b.httpResponse.Header.Get("Content-Type") == "application/json" {
|
||||
buffer := &bytes.Buffer{}
|
||||
buffer.ReadFrom(b.httpResponse.Body)
|
||||
b.httpResponse.Body.Close()
|
||||
if !b.isResponseRight() {
|
||||
return nil
|
||||
}
|
||||
|
||||
logger.Infof(nil, fmt.Sprintf(
|
||||
"QingStor response body string: [%d] %s",
|
||||
convert.StringToUnixTimestamp(b.httpResponse.Header.Get("Date"), convert.RFC822),
|
||||
string(buffer.Bytes()),
|
||||
))
|
||||
// Do not parse GetObject and ImageProcess's body.
|
||||
if b.operation.APIName == "GET Object" ||
|
||||
b.operation.APIName == "Image Process" {
|
||||
return nil
|
||||
}
|
||||
|
||||
err := json.Unmarshal(buffer.Bytes(), b.output.Interface())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if b.httpResponse.Header.Get("Content-Type") != "application/json" {
|
||||
return nil
|
||||
}
|
||||
|
||||
buffer := &bytes.Buffer{}
|
||||
buffer.ReadFrom(b.httpResponse.Body)
|
||||
b.httpResponse.Body.Close()
|
||||
|
||||
if buffer.Len() == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
logger.Infof(nil, fmt.Sprintf(
|
||||
"QingStor response body string: [%d] %s",
|
||||
convert.StringToTimestamp(b.httpResponse.Header.Get("Date"), convert.RFC822),
|
||||
string(buffer.Bytes()),
|
||||
))
|
||||
|
||||
err := json.Unmarshal(buffer.Bytes(), b.output.Interface())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
75
vendor/github.com/yunify/qingstor-sdk-go/service/object.go
generated
vendored
75
vendor/github.com/yunify/qingstor-sdk-go/service/object.go
generated
vendored
|
@ -180,7 +180,8 @@ type CompleteMultipartUploadInput struct {
|
|||
XQSEncryptionCustomerKeyMD5 *string `json:"X-QS-Encryption-Customer-Key-MD5,omitempty" name:"X-QS-Encryption-Customer-Key-MD5" location:"headers"`
|
||||
|
||||
// Object parts
|
||||
ObjectParts []*ObjectPartType `json:"object_parts,omitempty" name:"object_parts" location:"elements"`
|
||||
ObjectParts []*ObjectPartType `json:"object_parts" name:"object_parts" location:"elements"` // Required
|
||||
|
||||
}
|
||||
|
||||
// Validate validates the input for CompleteMultipartUpload.
|
||||
|
@ -193,6 +194,13 @@ func (v *CompleteMultipartUploadInput) Validate() error {
|
|||
}
|
||||
}
|
||||
|
||||
if len(v.ObjectParts) == 0 {
|
||||
return errors.ParameterRequiredError{
|
||||
ParameterName: "ObjectParts",
|
||||
ParentName: "CompleteMultipartUploadInput",
|
||||
}
|
||||
}
|
||||
|
||||
if len(v.ObjectParts) > 0 {
|
||||
for _, property := range v.ObjectParts {
|
||||
if err := property.Validate(); err != nil {
|
||||
|
@ -370,14 +378,29 @@ type GetObjectOutput struct {
|
|||
// The response body
|
||||
Body io.ReadCloser `location:"body"`
|
||||
|
||||
// The Cache-Control general-header field is used to specify directives for caching mechanisms in both requests and responses.
|
||||
CacheControl *string `json:"Cache-Control,omitempty" name:"Cache-Control" location:"headers"`
|
||||
// In a multipart/form-data body, the HTTP Content-Disposition general header is a header that can be used on the subpart of a multipart body to give information about the field it applies to.
|
||||
ContentDisposition *string `json:"Content-Disposition,omitempty" name:"Content-Disposition" location:"headers"`
|
||||
// The Content-Encoding entity header is used to compress the media-type.
|
||||
ContentEncoding *string `json:"Content-Encoding,omitempty" name:"Content-Encoding" location:"headers"`
|
||||
// The Content-Language entity header is used to describe the language(s) intended for the audience.
|
||||
ContentLanguage *string `json:"Content-Language,omitempty" name:"Content-Language" location:"headers"`
|
||||
// Object content length
|
||||
ContentLength *int64 `json:"Content-Length,omitempty" name:"Content-Length" location:"headers"`
|
||||
// Range of response data content
|
||||
ContentRange *string `json:"Content-Range,omitempty" name:"Content-Range" location:"headers"`
|
||||
// The Content-Type entity header is used to indicate the media type of the resource.
|
||||
ContentType *string `json:"Content-Type,omitempty" name:"Content-Type" location:"headers"`
|
||||
// MD5sum of the object
|
||||
ETag *string `json:"ETag,omitempty" name:"ETag" location:"headers"`
|
||||
// The Expires header contains the date/time after which the response is considered stale.
|
||||
Expires *string `json:"Expires,omitempty" name:"Expires" location:"headers"`
|
||||
LastModified *time.Time `json:"Last-Modified,omitempty" name:"Last-Modified" format:"RFC 822" location:"headers"`
|
||||
// Encryption algorithm of the object
|
||||
XQSEncryptionCustomerAlgorithm *string `json:"X-QS-Encryption-Customer-Algorithm,omitempty" name:"X-QS-Encryption-Customer-Algorithm" location:"headers"`
|
||||
// Storage class of the object
|
||||
XQSStorageClass *string `json:"X-QS-Storage-Class,omitempty" name:"X-QS-Storage-Class" location:"headers"`
|
||||
}
|
||||
|
||||
// Close will close the underlay body.
|
||||
|
@ -478,6 +501,8 @@ type HeadObjectOutput struct {
|
|||
LastModified *time.Time `json:"Last-Modified,omitempty" name:"Last-Modified" format:"RFC 822" location:"headers"`
|
||||
// Encryption algorithm of the object
|
||||
XQSEncryptionCustomerAlgorithm *string `json:"X-QS-Encryption-Customer-Algorithm,omitempty" name:"X-QS-Encryption-Customer-Algorithm" location:"headers"`
|
||||
// Storage class of the object
|
||||
XQSStorageClass *string `json:"X-QS-Storage-Class,omitempty" name:"X-QS-Storage-Class" location:"headers"`
|
||||
}
|
||||
|
||||
// ImageProcess does Image process with the action on the object
|
||||
|
@ -648,11 +673,34 @@ type InitiateMultipartUploadInput struct {
|
|||
XQSEncryptionCustomerKey *string `json:"X-QS-Encryption-Customer-Key,omitempty" name:"X-QS-Encryption-Customer-Key" location:"headers"`
|
||||
// MD5sum of encryption key
|
||||
XQSEncryptionCustomerKeyMD5 *string `json:"X-QS-Encryption-Customer-Key-MD5,omitempty" name:"X-QS-Encryption-Customer-Key-MD5" location:"headers"`
|
||||
// Specify the storage class for object
|
||||
// XQSStorageClass's available values: STANDARD, STANDARD_IA
|
||||
XQSStorageClass *string `json:"X-QS-Storage-Class,omitempty" name:"X-QS-Storage-Class" location:"headers"`
|
||||
}
|
||||
|
||||
// Validate validates the input for InitiateMultipartUpload.
|
||||
func (v *InitiateMultipartUploadInput) Validate() error {
|
||||
|
||||
if v.XQSStorageClass != nil {
|
||||
xQSStorageClassValidValues := []string{"STANDARD", "STANDARD_IA"}
|
||||
xQSStorageClassParameterValue := fmt.Sprint(*v.XQSStorageClass)
|
||||
|
||||
xQSStorageClassIsValid := false
|
||||
for _, value := range xQSStorageClassValidValues {
|
||||
if value == xQSStorageClassParameterValue {
|
||||
xQSStorageClassIsValid = true
|
||||
}
|
||||
}
|
||||
|
||||
if !xQSStorageClassIsValid {
|
||||
return errors.ParameterValueNotAllowedError{
|
||||
ParameterName: "XQSStorageClass",
|
||||
ParameterValue: xQSStorageClassParameterValue,
|
||||
AllowedValues: xQSStorageClassValidValues,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -799,6 +847,8 @@ func (s *Bucket) OptionsObjectRequest(objectKey string, input *OptionsObjectInpu
|
|||
RequestURI: "/<bucket-name>/<object-key>",
|
||||
StatusCodes: []int{
|
||||
200, // OK
|
||||
304, // Object not modified
|
||||
412, // Object precondition failed
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -949,6 +999,9 @@ type PutObjectInput struct {
|
|||
XQSFetchSource *string `json:"X-QS-Fetch-Source,omitempty" name:"X-QS-Fetch-Source" location:"headers"`
|
||||
// Move source, format (/<bucket-name>/<object-key>)
|
||||
XQSMoveSource *string `json:"X-QS-Move-Source,omitempty" name:"X-QS-Move-Source" location:"headers"`
|
||||
// Specify the storage class for object
|
||||
// XQSStorageClass's available values: STANDARD, STANDARD_IA
|
||||
XQSStorageClass *string `json:"X-QS-Storage-Class,omitempty" name:"X-QS-Storage-Class" location:"headers"`
|
||||
|
||||
// The request body
|
||||
Body io.Reader `location:"body"`
|
||||
|
@ -957,6 +1010,26 @@ type PutObjectInput struct {
|
|||
// Validate validates the input for PutObject.
|
||||
func (v *PutObjectInput) Validate() error {
|
||||
|
||||
if v.XQSStorageClass != nil {
|
||||
xQSStorageClassValidValues := []string{"STANDARD", "STANDARD_IA"}
|
||||
xQSStorageClassParameterValue := fmt.Sprint(*v.XQSStorageClass)
|
||||
|
||||
xQSStorageClassIsValid := false
|
||||
for _, value := range xQSStorageClassValidValues {
|
||||
if value == xQSStorageClassParameterValue {
|
||||
xQSStorageClassIsValid = true
|
||||
}
|
||||
}
|
||||
|
||||
if !xQSStorageClassIsValid {
|
||||
return errors.ParameterValueNotAllowedError{
|
||||
ParameterName: "XQSStorageClass",
|
||||
ParameterValue: xQSStorageClassParameterValue,
|
||||
AllowedValues: xQSStorageClassValidValues,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
2
vendor/github.com/yunify/qingstor-sdk-go/version.go
generated
vendored
2
vendor/github.com/yunify/qingstor-sdk-go/version.go
generated
vendored
|
@ -20,4 +20,4 @@
|
|||
package sdk
|
||||
|
||||
// Version number.
|
||||
const Version = "2.2.12"
|
||||
const Version = "2.2.14"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue