github.com/chnsz/golangsdk@v0.0.0-20240506093406-85a3fbfa605b/openstack/obs/type.go (about)

     1  // Copyright 2019 Huawei Technologies Co.,Ltd.
     2  // Licensed under the Apache License, Version 2.0 (the "License"); you may not use
     3  // this file except in compliance with the License.  You may obtain a copy of the
     4  // License at
     5  //
     6  // http://www.apache.org/licenses/LICENSE-2.0
     7  //
     8  // Unless required by applicable law or agreed to in writing, software distributed
     9  // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
    10  // CONDITIONS OF ANY KIND, either express or implied.  See the License for the
    11  // specific language governing permissions and limitations under the License.
    12  
    13  package obs
    14  
    15  // SignatureType defines type of signature
    16  type SignatureType string
    17  
    18  const (
    19  	// SignatureV2 signature type v2
    20  	SignatureV2 SignatureType = "v2"
    21  	// SignatureV4 signature type v4
    22  	SignatureV4 SignatureType = "v4"
    23  	// SignatureObs signature type OBS
    24  	SignatureObs SignatureType = "OBS"
    25  )
    26  
    27  // HttpMethodType defines http method type
    28  type HttpMethodType string
    29  
    30  const (
    31  	HttpMethodGet     HttpMethodType = HTTP_GET
    32  	HttpMethodPut     HttpMethodType = HTTP_PUT
    33  	HttpMethodPost    HttpMethodType = HTTP_POST
    34  	HttpMethodDelete  HttpMethodType = HTTP_DELETE
    35  	HttpMethodHead    HttpMethodType = HTTP_HEAD
    36  	HttpMethodOptions HttpMethodType = HTTP_OPTIONS
    37  )
    38  
    39  // SubResourceType defines the subResource value
    40  type SubResourceType string
    41  
    42  const (
    43  	// SubResourceStoragePolicy subResource value: storagePolicy
    44  	SubResourceStoragePolicy SubResourceType = "storagePolicy"
    45  
    46  	// SubResourceStorageClass subResource value: storageClass
    47  	SubResourceStorageClass SubResourceType = "storageClass"
    48  
    49  	// SubResourceQuota subResource value: quota
    50  	SubResourceQuota SubResourceType = "quota"
    51  
    52  	// SubResourceStorageInfo subResource value: storageinfo
    53  	SubResourceStorageInfo SubResourceType = "storageinfo"
    54  
    55  	// SubResourceLocation subResource value: location
    56  	SubResourceLocation SubResourceType = "location"
    57  
    58  	// SubResourceAcl subResource value: acl
    59  	SubResourceAcl SubResourceType = "acl"
    60  
    61  	// SubResourcePolicy subResource value: policy
    62  	SubResourcePolicy SubResourceType = "policy"
    63  
    64  	// SubResourceCors subResource value: cors
    65  	SubResourceCors SubResourceType = "cors"
    66  
    67  	// SubResourceVersioning subResource value: versioning
    68  	SubResourceVersioning SubResourceType = "versioning"
    69  
    70  	// SubResourceWebsite subResource value: website
    71  	SubResourceWebsite SubResourceType = "website"
    72  
    73  	// SubResourceLogging subResource value: logging
    74  	SubResourceLogging SubResourceType = "logging"
    75  
    76  	// SubResourceLifecycle subResource value: lifecycle
    77  	SubResourceLifecycle SubResourceType = "lifecycle"
    78  
    79  	// SubResourceNotification subResource value: notification
    80  	SubResourceNotification SubResourceType = "notification"
    81  
    82  	// SubResourceEncryption subResource value: encryption
    83  	SubResourceEncryption SubResourceType = "encryption"
    84  
    85  	// SubResourceReplication subResource value: replication
    86  	SubResourceReplication SubResourceType = "replication"
    87  
    88  	// SubResourceTagging subResource value: tagging
    89  	SubResourceTagging SubResourceType = "tagging"
    90  
    91  	// SubResourceDelete subResource value: delete
    92  	SubResourceDelete SubResourceType = "delete"
    93  
    94  	// SubResourceVersions subResource value: versions
    95  	SubResourceVersions SubResourceType = "versions"
    96  
    97  	// SubResourceUploads subResource value: uploads
    98  	SubResourceUploads SubResourceType = "uploads"
    99  
   100  	// SubResourceRestore subResource value: restore
   101  	SubResourceRestore SubResourceType = "restore"
   102  
   103  	// SubResourceMetadata subResource value: metadata
   104  	SubResourceMetadata SubResourceType = "metadata"
   105  
   106  	// SubResourceRequestPayment subResource value: requestPayment
   107  	SubResourceRequestPayment SubResourceType = "requestPayment"
   108  
   109  	// SubResourceAppend subResource value: append
   110  	SubResourceAppend SubResourceType = "append"
   111  
   112  	// SubResourceModify subResource value: modify
   113  	SubResourceModify SubResourceType = "modify"
   114  
   115  	// SubResourceRename subResource value: rename
   116  	SubResourceRename SubResourceType = "rename"
   117  
   118  	// SubResourceCustomDomain subResource value: customdomain
   119  	SubResourceCustomDomain SubResourceType = "customdomain"
   120  
   121  	// SubResourceMirrorBackToSource subResource value: mirrorBackToSource
   122  	SubResourceMirrorBackToSource SubResourceType = "mirrorBackToSource"
   123  )
   124  
   125  // objectKeyType defines the objectKey value
   126  type objectKeyType string
   127  
   128  const (
   129  	// objectKeyExtensionPolicy objectKey value: v1/extension_policy
   130  	objectKeyExtensionPolicy objectKeyType = "v1/extension_policy"
   131  
   132  	// objectKeyAsyncFetchJob objectKey value: v1/async-fetch/jobs
   133  	objectKeyAsyncFetchJob objectKeyType = "v1/async-fetch/jobs"
   134  )
   135  
   136  // AclType defines bucket/object acl type
   137  type AclType string
   138  
   139  const (
   140  	AclPrivate                 AclType = "private"
   141  	AclPublicRead              AclType = "public-read"
   142  	AclPublicReadWrite         AclType = "public-read-write"
   143  	AclAuthenticatedRead       AclType = "authenticated-read"
   144  	AclBucketOwnerRead         AclType = "bucket-owner-read"
   145  	AclBucketOwnerFullControl  AclType = "bucket-owner-full-control"
   146  	AclLogDeliveryWrite        AclType = "log-delivery-write"
   147  	AclPublicReadDelivery      AclType = "public-read-delivered"
   148  	AclPublicReadWriteDelivery AclType = "public-read-write-delivered"
   149  )
   150  
   151  // StorageClassType defines bucket storage class
   152  type StorageClassType string
   153  
   154  const (
   155  	//StorageClassStandard storage class: STANDARD
   156  	StorageClassStandard StorageClassType = "STANDARD"
   157  
   158  	//StorageClassWarm storage class: WARM
   159  	StorageClassWarm StorageClassType = "WARM"
   160  
   161  	//StorageClassCold storage class: COLD
   162  	StorageClassCold StorageClassType = "COLD"
   163  
   164  	//StorageClassDeepArchive storage class: DEEP_ARCHIVE
   165  	StorageClassDeepArchive StorageClassType = "DEEP_ARCHIVE"
   166  
   167  	storageClassStandardIA StorageClassType = "STANDARD_IA"
   168  	storageClassGlacier    StorageClassType = "GLACIER"
   169  )
   170  
   171  // PermissionType defines permission type
   172  type PermissionType string
   173  
   174  const (
   175  	// PermissionRead permission type: READ
   176  	PermissionRead PermissionType = "READ"
   177  
   178  	// PermissionWrite permission type: WRITE
   179  	PermissionWrite PermissionType = "WRITE"
   180  
   181  	// PermissionReadAcp permission type: READ_ACP
   182  	PermissionReadAcp PermissionType = "READ_ACP"
   183  
   184  	// PermissionWriteAcp permission type: WRITE_ACP
   185  	PermissionWriteAcp PermissionType = "WRITE_ACP"
   186  
   187  	// PermissionFullControl permission type: FULL_CONTROL
   188  	PermissionFullControl PermissionType = "FULL_CONTROL"
   189  )
   190  
   191  // GranteeType defines grantee type
   192  type GranteeType string
   193  
   194  const (
   195  	// GranteeGroup grantee type: Group
   196  	GranteeGroup GranteeType = "Group"
   197  
   198  	// GranteeUser grantee type: CanonicalUser
   199  	GranteeUser GranteeType = "CanonicalUser"
   200  )
   201  
   202  // GroupUriType defines grantee uri type
   203  type GroupUriType string
   204  
   205  const (
   206  	// GroupAllUsers grantee uri type: AllUsers
   207  	GroupAllUsers GroupUriType = "AllUsers"
   208  
   209  	// GroupAuthenticatedUsers grantee uri type: AuthenticatedUsers
   210  	GroupAuthenticatedUsers GroupUriType = "AuthenticatedUsers"
   211  
   212  	// GroupLogDelivery grantee uri type: LogDelivery
   213  	GroupLogDelivery GroupUriType = "LogDelivery"
   214  )
   215  
   216  // EnabledType defines a common status type
   217  type EnabledType string
   218  
   219  const (
   220  	Enabled  EnabledType = "Enabled"
   221  	Disabled EnabledType = "Disabled"
   222  )
   223  
   224  // VersioningStatusType defines bucket version status
   225  type VersioningStatusType string
   226  
   227  const (
   228  	// VersioningStatusEnabled version status: Enabled
   229  	VersioningStatusEnabled VersioningStatusType = "Enabled"
   230  
   231  	// VersioningStatusSuspended version status: Suspended
   232  	VersioningStatusSuspended VersioningStatusType = "Suspended"
   233  )
   234  
   235  // ProtocolType defines protocol type
   236  type ProtocolType string
   237  
   238  const (
   239  	// ProtocolHttp prorocol type: http
   240  	ProtocolHttp ProtocolType = "http"
   241  
   242  	// ProtocolHttps prorocol type: https
   243  	ProtocolHttps ProtocolType = "https"
   244  )
   245  
   246  // RuleStatusType defines lifeCycle rule status
   247  type RuleStatusType string
   248  
   249  const (
   250  	// RuleStatusEnabled rule status: Enabled
   251  	RuleStatusEnabled RuleStatusType = "Enabled"
   252  
   253  	// RuleStatusDisabled rule status: Disabled
   254  	RuleStatusDisabled RuleStatusType = "Disabled"
   255  )
   256  
   257  // RestoreTierType defines restore options
   258  type RestoreTierType string
   259  
   260  const (
   261  	// RestoreTierExpedited restore options: Expedited
   262  	RestoreTierExpedited RestoreTierType = "Expedited"
   263  
   264  	// RestoreTierStandard restore options: Standard
   265  	RestoreTierStandard RestoreTierType = "Standard"
   266  
   267  	// RestoreTierBulk restore options: Bulk
   268  	RestoreTierBulk RestoreTierType = "Bulk"
   269  )
   270  
   271  // MetadataDirectiveType defines metadata operation indicator
   272  type MetadataDirectiveType string
   273  
   274  const (
   275  	// CopyMetadata metadata operation: COPY
   276  	CopyMetadata MetadataDirectiveType = "COPY"
   277  
   278  	// ReplaceNew metadata operation: REPLACE_NEW
   279  	ReplaceNew MetadataDirectiveType = "REPLACE_NEW"
   280  
   281  	// ReplaceMetadata metadata operation: REPLACE
   282  	ReplaceMetadata MetadataDirectiveType = "REPLACE"
   283  )
   284  
   285  // EventType defines bucket notification type of events
   286  type EventType string
   287  
   288  const (
   289  	// ObjectCreatedAll type of events: ObjectCreated:*
   290  	ObjectCreatedAll EventType = "ObjectCreated:*"
   291  
   292  	// ObjectCreatedPut type of events: ObjectCreated:Put
   293  	ObjectCreatedPut EventType = "ObjectCreated:Put"
   294  
   295  	// ObjectCreatedPost type of events: ObjectCreated:Post
   296  	ObjectCreatedPost EventType = "ObjectCreated:Post"
   297  
   298  	// ObjectCreatedCopy type of events: ObjectCreated:Copy
   299  	ObjectCreatedCopy EventType = "ObjectCreated:Copy"
   300  
   301  	// ObjectCreatedCompleteMultipartUpload type of events: ObjectCreated:CompleteMultipartUpload
   302  	ObjectCreatedCompleteMultipartUpload EventType = "ObjectCreated:CompleteMultipartUpload"
   303  
   304  	// ObjectRemovedAll type of events: ObjectRemoved:*
   305  	ObjectRemovedAll EventType = "ObjectRemoved:*"
   306  
   307  	// ObjectRemovedDelete type of events: ObjectRemoved:Delete
   308  	ObjectRemovedDelete EventType = "ObjectRemoved:Delete"
   309  
   310  	// ObjectRemovedDeleteMarkerCreated type of events: ObjectRemoved:DeleteMarkerCreated
   311  	ObjectRemovedDeleteMarkerCreated EventType = "ObjectRemoved:DeleteMarkerCreated"
   312  )
   313  
   314  // PayerType defines type of payer
   315  type PayerType string
   316  
   317  const (
   318  	// BucketOwnerPayer type of payer: BucketOwner
   319  	BucketOwnerPayer PayerType = "BucketOwner"
   320  
   321  	// RequesterPayer type of payer: Requester
   322  	RequesterPayer PayerType = "Requester"
   323  
   324  	// Requester header for requester-Pays
   325  	Requester PayerType = "requester"
   326  )
   327  
   328  // FetchPolicyStatusType defines type of fetch policy status
   329  type FetchPolicyStatusType string
   330  
   331  const (
   332  	// FetchStatusOpen type of status: open
   333  	FetchStatusOpen FetchPolicyStatusType = "open"
   334  
   335  	// FetchStatusClosed type of status: closed
   336  	FetchStatusClosed FetchPolicyStatusType = "closed"
   337  )
   338  
   339  // AvailableZoneType defines type of az redundancy
   340  type AvailableZoneType string
   341  
   342  const (
   343  	AvailableZoneMultiAz AvailableZoneType = "3az"
   344  )
   345  
   346  // FSStatusType defines type of file system status
   347  type FSStatusType string
   348  
   349  const (
   350  	FSStatusEnabled  FSStatusType = "Enabled"
   351  	FSStatusDisabled FSStatusType = "Disabled"
   352  )
   353  
   354  // BucketType defines type of bucket
   355  type BucketType string
   356  
   357  const (
   358  	OBJECT BucketType = "OBJECT"
   359  	POSIX  BucketType = "POSIX"
   360  )
   361  
   362  // RedundancyType defines type of redundancyType
   363  type BucketRedundancyType string
   364  
   365  const (
   366  	BucketRedundancyClassic BucketRedundancyType = "CLASSIC"
   367  	BucketRedundancyFusion  BucketRedundancyType = "FUSION"
   368  )