yunion.io/x/cloudmux@v0.3.10-0-alpha.1/pkg/multicloud/bucket_base.go (about)

     1  // Copyright 2019 Yunion
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  package multicloud
    16  
    17  import (
    18  	api "yunion.io/x/cloudmux/pkg/apis/compute"
    19  	"yunion.io/x/cloudmux/pkg/cloudprovider"
    20  )
    21  
    22  type SBaseBucket struct {
    23  	SResourceBase
    24  }
    25  
    26  func (b *SBaseBucket) MaxPartCount() int {
    27  	return 10000
    28  }
    29  
    30  func (b *SBaseBucket) MaxPartSizeBytes() int64 {
    31  	return 5 * 1000 * 1000 * 1000
    32  }
    33  
    34  func (b *SBaseBucket) GetId() string {
    35  	return ""
    36  }
    37  
    38  func (b *SBaseBucket) GetName() string {
    39  	return ""
    40  }
    41  
    42  func (b *SBaseBucket) GetGlobalId() string {
    43  	return ""
    44  }
    45  
    46  func (b *SBaseBucket) GetStatus() string {
    47  	return api.BUCKET_STATUS_READY
    48  }
    49  
    50  func (b *SBaseBucket) Refresh() error {
    51  	return nil
    52  }
    53  
    54  func (b *SBaseBucket) IsEmulated() bool {
    55  	return false
    56  }
    57  
    58  func (b *SBaseBucket) LimitSupport() cloudprovider.SBucketStats {
    59  	return cloudprovider.SBucketStats{
    60  		SizeBytes:   -1,
    61  		ObjectCount: -1,
    62  	}
    63  }
    64  
    65  func (b *SBaseBucket) GetLimit() cloudprovider.SBucketStats {
    66  	return cloudprovider.SBucketStats{}
    67  }
    68  
    69  func (b *SBaseBucket) SetLimit(limit cloudprovider.SBucketStats) error {
    70  	return nil
    71  }
    72  
    73  func (b *SBaseBucket) SetWebsite(conf cloudprovider.SBucketWebsiteConf) error {
    74  	return cloudprovider.ErrNotImplemented
    75  }
    76  
    77  func (b *SBaseBucket) GetWebsiteConf() (cloudprovider.SBucketWebsiteConf, error) {
    78  	return cloudprovider.SBucketWebsiteConf{}, cloudprovider.ErrNotImplemented
    79  }
    80  
    81  func (b *SBaseBucket) DeleteWebSiteConf() error {
    82  	return cloudprovider.ErrNotImplemented
    83  }
    84  
    85  func (b *SBaseBucket) SetCORS(rules []cloudprovider.SBucketCORSRule) error {
    86  	return cloudprovider.ErrNotImplemented
    87  }
    88  
    89  func (b *SBaseBucket) GetCORSRules() ([]cloudprovider.SBucketCORSRule, error) {
    90  	return nil, cloudprovider.ErrNotImplemented
    91  }
    92  
    93  func (b *SBaseBucket) DeleteCORS() error {
    94  	return cloudprovider.ErrNotImplemented
    95  }
    96  
    97  func (b *SBaseBucket) SetReferer(conf cloudprovider.SBucketRefererConf) error {
    98  	return cloudprovider.ErrNotImplemented
    99  }
   100  
   101  func (b *SBaseBucket) GetReferer() (cloudprovider.SBucketRefererConf, error) {
   102  	return cloudprovider.SBucketRefererConf{}, cloudprovider.ErrNotImplemented
   103  }
   104  
   105  func (b *SBaseBucket) GetCdnDomains() ([]cloudprovider.SCdnDomain, error) {
   106  	return nil, cloudprovider.ErrNotImplemented
   107  }
   108  
   109  func (b *SBaseBucket) GetPolicy() ([]cloudprovider.SBucketPolicyStatement, error) {
   110  	return nil, cloudprovider.ErrNotImplemented
   111  }
   112  
   113  func (b *SBaseBucket) SetPolicy(policy cloudprovider.SBucketPolicyStatementInput) error {
   114  	return cloudprovider.ErrNotImplemented
   115  }
   116  
   117  func (b *SBaseBucket) DeletePolicy(id []string) ([]cloudprovider.SBucketPolicyStatement, error) {
   118  	return nil, cloudprovider.ErrNotImplemented
   119  }
   120  
   121  func (b *SBaseBucket) ListMultipartUploads() ([]cloudprovider.SBucketMultipartUploads, error) {
   122  	return nil, cloudprovider.ErrNotImplemented
   123  }