蛋蛋星球-客户端
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

bucket_create.go 360 B

1 개월 전
12345678910111213141516
  1. package qiniu
  2. import (
  3. "github.com/qiniu/api.v7/v7/auth"
  4. "github.com/qiniu/api.v7/v7/storage"
  5. )
  6. func BucketCreate() error {
  7. mac := auth.New(AK, SK)
  8. cfg := storage.Config{
  9. // 是否使用https域名进行资源管理
  10. UseHTTPS: false,
  11. }
  12. bucketManager := storage.NewBucketManager(mac, &cfg)
  13. return bucketManager.CreateBucket("", storage.RIDHuanan)
  14. }