Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit851e7b6

Browse files
committed
Add features in bos
1 parenta1bc6ec commit851e7b6

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

‎bce/config.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626

2727
// Constants and default values for the package bce
2828
const (
29-
SDK_VERSION="0.9.204"
29+
SDK_VERSION="0.9.205"
3030
URI_PREFIX="/"// now support uri without prefix "v1" so just set root path
3131
DEFAULT_DOMAIN="baidubce.com"
3232
DEFAULT_PROTOCOL="http"

‎services/bos/api/bucket.go‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,17 @@ func PutBucket(cli bce.Client, bucket string, args *PutBucketArgs, ctx *BosConte
139139
iflen(args.TagList)!=0 {
140140
req.SetHeader(http.BCE_TAG,args.TagList)
141141
}
142+
ifargs.EnableMultiAz {
143+
jsonBytes,jsonErr:=json.Marshal(args)
144+
ifjsonErr!=nil {
145+
return"",jsonErr
146+
}
147+
body,err:=bce.NewBodyFromBytes(jsonBytes)
148+
iferr!=nil {
149+
return"",err
150+
}
151+
req.SetBody(body)
152+
}
142153
}
143154
resp:=&bce.BceResponse{}
144155
iferr:=SendRequest(cli,req,resp,ctx);err!=nil {

‎services/bos/api/model.go‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ type PrefixType struct {
5959
}
6060

6161
typePutBucketArgsstruct {
62-
TagListstring
62+
TagListstring`json:"-"`
63+
EnableMultiAzbool`json:"enableMultiAz"`
6364
}
6465

6566
// ListObjectsResult defines the result structure of ListObjects api.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp