diff --git a/cos/conf.go b/cos/conf.go index b8724d7..516c013 100644 --- a/cos/conf.go +++ b/cos/conf.go @@ -17,6 +17,7 @@ type Conf struct { RetryTimes int UA string Domain string + Bucket string } func getDefaultConf() *Conf { diff --git a/cos/option.go b/cos/option.go index 0c4b1cd..d6bc8af 100644 --- a/cos/option.go +++ b/cos/option.go @@ -6,4 +6,5 @@ type Option struct { SecretKey string `mapstructure:"secret_key" json:"secret_key"` Region string `mapstructure:"region" json:"region"` Domain string `mapstructure:"domain" json:"domain"` + Bucket string `mapstructure:"bucket" json:"bucket"` } diff --git a/cos/setup_test.go b/cos/setup_test.go index 85a82c1..6d24b95 100644 --- a/cos/setup_test.go +++ b/cos/setup_test.go @@ -12,7 +12,8 @@ const ( ) func setUp() { - client = New(&Option{"1254217795", "AKIDkOq6C6qLgstiMqmGF2d3HKBpHYeZlpAH", "Rny65tVv9BQuHUVKxOehZFqJbifYN7g3", "ap-chengdu", "mycloud.com"}) + client = New(&Option{"1254217795", "AKIDkOq6C6qLgstiMqmGF2d3HKBpHYeZlpAH", "Rny65tVv9BQuHUVKxOehZFqJbifYN7g3", "ap-chengdu", "myqcloud.com", "omnipay-entity-dev"}) + } func assert(want, condition, got interface{}) {