Documentation ¶
Overview ¶
Package b2types implements internal types common to the B2 API.
Index ¶
- Constants
- type Allowance
- type AuthorizeAccountResponse
- type CancelLargeFileRequest
- type CreateBucketRequest
- type CreateBucketResponse
- type CreateKeyRequest
- type CreateKeyResponse
- type DeleteBucketRequest
- type DeleteFileVersionRequest
- type DeleteKeyRequest
- type DeleteKeyResponse
- type ErrorMessage
- type FinishLargeFileRequest
- type FinishLargeFileResponse
- type GetDownloadAuthorizationRequest
- type GetDownloadAuthorizationResponse
- type GetFileInfoRequest
- type GetFileInfoResponse
- type GetUploadURLRequest
- type GetUploadURLResponse
- 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 StartLargeFileRequest
- type StartLargeFileResponse
- type UpdateBucketRequest
- type UpdateBucketResponse
- type UploadFileResponse
Constants ¶
View Source
const (
V1api = "/b2api/v1/"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthorizeAccountResponse ¶
type AuthorizeAccountResponse struct { AccountID string `json:"accountId"` AuthToken string `json:"authorizationToken"` URI string `json:"apiUrl"` DownloadURI string `json:"downloadUrl"` MinPartSize int `json:"minimumPartSize"` PartSize int `json:"recommendedPartSize"` AbsMinPartSize int `json:"absoluteMinimumPartSize"` Allowed Allowance `json:"allowed"` }
type CancelLargeFileRequest ¶
type CancelLargeFileRequest struct {
ID string `json:"fileId"`
}
type CreateBucketRequest ¶
type CreateBucketResponse ¶
type CreateKeyRequest ¶
type CreateKeyResponse ¶
type CreateKeyResponse Key
type DeleteBucketRequest ¶
type DeleteKeyRequest ¶
type DeleteKeyRequest struct {
KeyID string `json:"applicationKeyId"`
}
type DeleteKeyResponse ¶
type DeleteKeyResponse Key
type ErrorMessage ¶
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"` 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 HideFileRequest ¶
type HideFileResponse ¶
type Key ¶
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 ¶
type ListKeysResponse ¶
type ListPartsRequest ¶
type ListPartsResponse ¶
type ListUnfinishedLargeFilesResponse ¶
type ListUnfinishedLargeFilesResponse struct { Files []GetFileInfoResponse `json:"files"` Continuation string `json:"nextFileId"` }
type StartLargeFileRequest ¶
type StartLargeFileResponse ¶
type StartLargeFileResponse struct {
ID string `json:"fileId"`
}
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"` }
type UpdateBucketResponse ¶
type UpdateBucketResponse CreateBucketResponse
type UploadFileResponse ¶
type UploadFileResponse GetFileInfoResponse
Click to show internal directories.
Click to hide internal directories.