コード例 #1
0
ファイル: createbucket.go プロジェクト: cronosun/buranv1
func CreateBucket(t btesting.T, bucketTypeId typing.BucketTypeId,
	outBucketId *typing.BucketId) {

	t.Request(btesting.Request{
		Input: btesting.Object{
			"Operation": "CreateBucket",
			"Data": btesting.Object{
				"TypeId": writer.BucketType(bucketTypeId),
			},
		},
		Expecting: btesting.Object{
			"Code": eval.RetcodeOk(),
			"Data": btesting.Object{
				"Id": eval.IsAnyBucketId(outBucketId),
			},
		},
	})
}
コード例 #2
0
ファイル: createbucket.go プロジェクト: cronosun/buranv1
func CreateBucketWithMetadata(t btesting.T, bucketTypeId typing.BucketTypeId,
	metadata map[string][]byte,
	outBucketId *typing.BucketId) {
	t.Request(btesting.Request{
		Input: btesting.Object{
			"Operation": "CreateBucket",
			"Data": btesting.Object{
				"TypeId":   writer.BucketType(bucketTypeId),
				"Metadata": writer.Metadata(metadata),
			},
		},
		Expecting: btesting.Object{
			"Code": eval.RetcodeOk(),
			"Data": btesting.Object{
				"Id": eval.IsAnyBucketId(outBucketId),
			},
		},
	})
}