From 14be0a826e4cd95d0c4614d76010fe47357c7bc7 Mon Sep 17 00:00:00 2001 From: toranger Date: Thu, 9 May 2019 10:31:03 +0800 Subject: [PATCH] annotation the logging and inventory function --- bucket_inventory.go | 10 ++++++---- bucket_logging.go | 6 ++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/bucket_inventory.go b/bucket_inventory.go index 65b58ed..17ed781 100644 --- a/bucket_inventory.go +++ b/bucket_inventory.go @@ -7,6 +7,8 @@ import ( "net/http" ) +// Notice bucket_inventory only for test. can not use + // BucketGetInventoryResult same struct to options type BucketGetInventoryResult BucketPutInventoryOptions @@ -72,7 +74,7 @@ type ListBucketInventoryConfigResult struct { } // PutBucketInventory https://cloud.tencent.com/document/product/436/33707 -func (s *BucketService) PutBucketInventory(ctx context.Context, id string, opt *BucketPutInventoryOptions) (*Response, error) { +func (s *BucketService) PutBucketInventoryTest(ctx context.Context, id string, opt *BucketPutInventoryOptions) (*Response, error) { u := fmt.Sprintf("/?inventory&id=%s", id) sendOpt := sendOptions{ baseURL: s.client.BaseURL.BucketURL, @@ -86,7 +88,7 @@ func (s *BucketService) PutBucketInventory(ctx context.Context, id string, opt * } // GetBucketInventory https://cloud.tencent.com/document/product/436/33705 -func (s *BucketService) GetBucketInventory(ctx context.Context, id string) (*BucketGetInventoryResult, *Response, error) { +func (s *BucketService) GetBucketInventoryTest(ctx context.Context, id string) (*BucketGetInventoryResult, *Response, error) { u := fmt.Sprintf("/?inventory&id=%s", id) var res BucketGetInventoryResult sendOpt := sendOptions{ @@ -100,7 +102,7 @@ func (s *BucketService) GetBucketInventory(ctx context.Context, id string) (*Buc } // DeleteBucketInventory https://cloud.tencent.com/document/product/436/33704 -func (s *BucketService) DeleteBucketInventory(ctx context.Context, id string) (*Response, error) { +func (s *BucketService) DeleteBucketInventoryTest(ctx context.Context, id string) (*Response, error) { u := fmt.Sprintf("/?inventory&id=%s", id) sendOpt := sendOptions{ baseURL: s.client.BaseURL.BucketURL, @@ -112,7 +114,7 @@ func (s *BucketService) DeleteBucketInventory(ctx context.Context, id string) (* } // ListBucketInventoryConfigurations https://cloud.tencent.com/document/product/436/33706 -func (s *BucketService) ListBucketInventoryConfigurations(ctx context.Context, token string) (*ListBucketInventoryConfigResult, *Response, error) { +func (s *BucketService) ListBucketInventoryConfigurationsTest(ctx context.Context, token string) (*ListBucketInventoryConfigResult, *Response, error) { var res ListBucketInventoryConfigResult var u string if token == "" { diff --git a/bucket_logging.go b/bucket_logging.go index 5bb79a2..d4ea513 100644 --- a/bucket_logging.go +++ b/bucket_logging.go @@ -6,6 +6,8 @@ import ( "net/http" ) +// Notice bucket logging function is testing, can not use. + // BucketLoggingEnabled main struct of logging type BucketLoggingEnabled struct { TargetBucket string `xml:"TargetBucket"` @@ -25,7 +27,7 @@ type BucketGetLoggingResult struct { } // PutBucketLogging https://cloud.tencent.com/document/product/436/17054 -func (s *BucketService) PutBucketLogging(ctx context.Context, opt *BucketPutLoggingOptions) (*Response, error) { +func (s *BucketService) PutBucketLoggingTest(ctx context.Context, opt *BucketPutLoggingOptions) (*Response, error) { sendOpt := sendOptions{ baseURL: s.client.BaseURL.BucketURL, uri: "/?logging", @@ -37,7 +39,7 @@ func (s *BucketService) PutBucketLogging(ctx context.Context, opt *BucketPutLogg } // GetBucketLogging https://cloud.tencent.com/document/product/436/17053 -func (s *BucketService) GetBucketLogging(ctx context.Context) (*BucketGetLoggingResult, *Response, error) { +func (s *BucketService) GetBucketLoggingTest(ctx context.Context) (*BucketGetLoggingResult, *Response, error) { var res BucketGetLoggingResult sendOpt := sendOptions{ baseURL: s.client.BaseURL.BucketURL,