Documentation ¶
Overview ¶
Package b2types implements internal types common to the B2 API.
Index ¶
- Constants
- type APIInfo
- type Allowance
- type AsReplicationDestination
- type AsReplicationSource
- type AuthorizeAccountResponse
- type CORSRule
- type CancelLargeFileRequest
- type CreateBucketRequest
- type CreateBucketResponse
- type CreateKeyRequest
- type CreateKeyResponse
- type DeleteBucketRequest
- type DeleteFileVersionRequest
- type DeleteKeyRequest
- type DeleteKeyResponse
- type ErrorMessage
- type FileLockConfiguration
- type FinishLargeFileRequest
- type FinishLargeFileResponse
- type GetDownloadAuthorizationRequest
- type GetDownloadAuthorizationResponse
- type GetFileInfoRequest
- type GetFileInfoResponse
- type GetUploadURLRequest
- type GetUploadURLResponse
- type GroupsAPIInfo
- type HideFileRequest
- type HideFileResponse
- type Key
- type LifecycleRule
- type ListBucketsRequest
- type ListBucketsResponse
- type ListFileNamesRequest
- type ListFileNamesResponse
- type ListFileVersionsRequest
- type ListFileVersionsResponse
- type ListKeysRequest
- type ListKeysResponse
- type ListPartsRequest
- type ListPartsResponse
- type ListUnfinishedLargeFilesRequest
- type ListUnfinishedLargeFilesResponse
- type ReplicationConfiguration
- type ReplicationConfigurationResponse
- type ReplicationRules
- type Retention
- type RetentionPeriod
- type ServerSideEncryption
- type StartLargeFileRequest
- type StartLargeFileResponse
- type StorageAPIInfo
- type UpdateBucketRequest
- type UpdateBucketResponse
- type UploadFileResponse
Constants ¶
View Source
const (
V3api = "/b2api/v3/"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIInfo ¶ added in v0.7.0
type APIInfo struct { StorageAPIInfo *StorageAPIInfo `json:"storageApi,omitempty"` GroupsAPIInfo *GroupsAPIInfo `json:"groupsApi,omitempty"` }
type AsReplicationDestination ¶ added in v0.7.0
type AsReplicationSource ¶ added in v0.7.0
type AsReplicationSource struct { ReplicationRules []ReplicationRules `json:"replicationRules,omitempty"` KeyID string `json:"sourceApplicationKeyId,omitempty"` }
type CORSRule ¶ added in v0.7.0
type CORSRule struct { Name string `json:"corsRuleName,omitempty"` AllowedOrigins []string `json:"allowedOrigins,omitempty"` AllowedHeaders []string `json:"allowedHeaders,omitempty"` AllowedOperations []string `json:"allowedOperations,omitempty"` ExposeHeaders []string `json:"exposeHeaders,omitempty"` MaxAgeSeconds int `json:"maxAgeSeconds,omitempty"` }
type CancelLargeFileRequest ¶
type CancelLargeFileRequest struct {
ID string `json:"fileId"`
}
type CreateBucketRequest ¶
type CreateBucketResponse ¶
type CreateBucketResponse struct { BucketID string `json:"bucketId"` Name string `json:"bucketName"` Type string `json:"bucketType"` Info map[string]string `json:"bucketInfo"` LifecycleRules []LifecycleRule `json:"lifecycleRules"` Revision int `json:"revision"` CORSRules []CORSRule `json:"corsRules,omitempty"` DefaultRetention string `json:"defaultRetention,omitempty"` DefaultServerSideEncryption *ServerSideEncryption `json:"defaultServerSideEncryption,omitempty"` FileLockConfig *FileLockConfiguration `json:"fileLockConfiguration,omitempty"` ReplicationConfiguration *ReplicationConfigurationResponse `json:"replicationConfiguration,omitempty"` }
type CreateKeyRequest ¶ added in v0.5.0
type CreateKeyResponse ¶ added in v0.5.0
type CreateKeyResponse Key
type DeleteBucketRequest ¶
type DeleteKeyRequest ¶ added in v0.5.0
type DeleteKeyRequest struct {
KeyID string `json:"applicationKeyId"`
}
type DeleteKeyResponse ¶ added in v0.5.0
type DeleteKeyResponse Key
type ErrorMessage ¶
type FileLockConfiguration ¶ added in v0.7.0
type FileLockConfiguration struct { IsClientAuthorizedToRead bool `json:"isClientAuthorizedToRead"` Val struct { DefaultRetention struct { Mode *string `json:"mode"` Period struct { Duration int `json:"duration"` Unit *string `json:"unit"` } `json:"period"` } `json:"defaultRetention"` IsFileLockEnabled bool `json:"isFileLockEnabled"` } `json:"value"` }
type FinishLargeFileRequest ¶
type FinishLargeFileResponse ¶
type GetFileInfoRequest ¶
type GetFileInfoRequest struct {
ID string `json:"fileId"`
}
type GetFileInfoResponse ¶
type GetFileInfoResponse struct { FileID string `json:"fileId,omitempty"` Name string `json:"fileName,omitempty"` AccountID string `json:"accountId,omitempty"` BucketID string `json:"bucketId,omitempty"` Size int64 `json:"contentLength,omitempty"` SHA1 string `json:"contentSha1,omitempty"` MD5 string `json:"contentMd5,omitempty"` ContentType string `json:"contentType,omitempty"` Info map[string]string `json:"fileInfo,omitempty"` Action string `json:"action,omitempty"` Timestamp int64 `json:"uploadTimestamp,omitempty"` }
type GetUploadURLRequest ¶
type GetUploadURLRequest struct {
BucketID string `json:"bucketId"`
}
type GetUploadURLResponse ¶
type GroupsAPIInfo ¶ added in v0.7.0
type HideFileRequest ¶
type HideFileResponse ¶
type Key ¶ added in v0.5.0
type Key struct { ID string `json:"applicationKeyId"` Secret string `json:"applicationKey"` AccountID string `json:"accountId"` Capabilities []string `json:"capabilities"` Name string `json:"keyName"` Expires int64 `json:"expirationTimestamp"` BucketID string `json:"bucketId"` Prefix string `json:"namePrefix"` }
type LifecycleRule ¶
type ListBucketsRequest ¶
type ListBucketsResponse ¶
type ListBucketsResponse struct {
Buckets []CreateBucketResponse `json:"buckets"`
}
type ListFileNamesRequest ¶
type ListFileNamesResponse ¶
type ListFileNamesResponse struct { Continuation string `json:"nextFileName"` Files []GetFileInfoResponse `json:"files"` }
type ListFileVersionsRequest ¶
type ListFileVersionsResponse ¶
type ListFileVersionsResponse struct { NextName string `json:"nextFileName"` NextID string `json:"nextFileId"` Files []GetFileInfoResponse `json:"files"` }
type ListKeysRequest ¶ added in v0.5.0
type ListKeysResponse ¶ added in v0.5.0
type ListPartsRequest ¶
type ListPartsResponse ¶
type ListUnfinishedLargeFilesRequest ¶ added in v0.2.2
type ListUnfinishedLargeFilesResponse ¶ added in v0.2.2
type ListUnfinishedLargeFilesResponse struct { Files []GetFileInfoResponse `json:"files"` Continuation string `json:"nextFileId"` }
type ReplicationConfiguration ¶ added in v0.7.0
type ReplicationConfiguration struct { AsReplicationSource *AsReplicationSource `json:"asReplicationSource,omitempty"` AsReplicationDestination *AsReplicationDestination `json:"asReplicationDestination,omitempty"` }
type ReplicationConfigurationResponse ¶ added in v0.7.0
type ReplicationConfigurationResponse struct { IsClientAuthorizedToRead bool `json:"isClientAuthorizedToRead,omitempty"` Value *ReplicationConfiguration `json:"value,omitempty"` }
type ReplicationRules ¶ added in v0.7.0
type ReplicationRules struct { DestinationBucketID string `json:"destinationBucketId"` FileNamePrefix string `json:"fileNamePrefix"` IncludeExistingFiles bool `json:"includeExistingFiles"` IsEnabled bool `json:"isEnabled"` Priority int `json:"priority"` ReplicationRuleName string `json:"replicationRuleName"` }
type Retention ¶ added in v0.7.0
type Retention struct { Mode string `json:"mode,omitempty"` Period *RetentionPeriod `json:"period,omitempty"` }
type RetentionPeriod ¶ added in v0.7.0
type ServerSideEncryption ¶ added in v0.7.0
type StartLargeFileRequest ¶
type StartLargeFileResponse ¶
type StartLargeFileResponse struct {
ID string `json:"fileId"`
}
type StorageAPIInfo ¶ added in v0.7.0
type StorageAPIInfo struct { AbsMinPartSize int `json:"absoluteMinimumPartSize"` URI string `json:"apiUrl"` Bucket string `json:"bucketId"` Name string `json:"bucketName"` Capabilities []string `json:"capabilities"` DownloadURI string `json:"downloadUrl"` Type string `json:"storageApi"` Prefix string `json:"namePrefix"` PartSize int `json:"recommendedPartSize"` S3URI string `json:"s3ApiUrl"` }
type UpdateBucketRequest ¶
type UpdateBucketRequest struct { AccountID string `json:"accountId"` BucketID string `json:"bucketId"` Type string `json:"bucketType,omitempty"` Info map[string]string `json:"bucketInfo,omitempty"` LifecycleRules []LifecycleRule `json:"lifecycleRules,omitempty"` IfRevisionIs int `json:"ifRevisionIs,omitempty"` CORSRules []CORSRule `json:"corsRules,omitempty"` DefaultRetention *Retention `json:"defaultRetention,omitempty"` DefaultServerSideEncryption *ServerSideEncryption `json:"defaultServerSideEncryption,omitempty"` FileLockEnabled bool `json:"fileLockEnabled,omitempty"` ReplicationConfiguration *ReplicationConfiguration `json:"replicationConfiguration,omitempty"` }
type UpdateBucketResponse ¶
type UpdateBucketResponse CreateBucketResponse
type UploadFileResponse ¶
type UploadFileResponse GetFileInfoResponse
Click to show internal directories.
Click to hide internal directories.