IDstring`json:"fileId"`// The unique identifier for this version of this file. Used with b2_get_file_info, b2_download_file_by_id, and b2_delete_file_version.
Namestring`json:"fileName"`// The name of this file, which can be used with b2_download_file_by_name.
Actionstring`json:"action"`// Either "upload" or "hide". "upload" means a file that was uploaded to B2 Cloud Storage. "hide" means a file version marking the file as hidden, so that it will not show up in b2_list_file_names. The result of b2_list_file_names will contain only "upload". The result of b2_list_file_versions may have both.
Sizeint64`json:"size"`// The number of bytes in the file.
UploadTimestampTimestamp`json:"uploadTimestamp"`// This is a UTC time when this file was uploaded.
SHA1string`json:"contentSha1"`// The SHA1 of the bytes stored in the file.
ContentTypestring`json:"contentType"`// The MIME type of the file.
Infomap[string]string`json:"fileInfo"`// The custom information that was uploaded with the file. This is a JSON object, holding the name/value pairs that were uploaded with the file.
// AuthorizeAccountResponse is as returned from the b2_authorize_account call
typeAuthorizeAccountResponsestruct{
AccountIDstring`json:"accountId"`// The identifier for the account.
AuthorizationTokenstring`json:"authorizationToken"`// An authorization token to use with all calls, other than b2_authorize_account, that need an Authorization header.
APIURLstring`json:"apiUrl"`// The base URL to use for all API calls except for uploading and downloading files.
DownloadURLstring`json:"downloadUrl"`// The base URL to use for downloading files.
}
// ListBucketsResponse is as returned from the b2_list_buckets call
typeListBucketsResponsestruct{
Buckets[]Bucket`json:"buckets"`
}
// ListFileNamesRequest is as passed to b2_list_file_names or b2_list_file_versions
typeListFileNamesRequeststruct{
BucketIDstring`json:"bucketId"`// required - The bucket to look for file names in.
StartFileNamestring`json:"startFileName,omitempty"`// optional - The first file name to return. If there is a file with this name, it will be returned in the list. If not, the first file name after this the first one after this name.
MaxFileCountint`json:"maxFileCount,omitempty"`// optional - The maximum number of files to return from this call. The default value is 100, and the maximum allowed is 1000.
StartFileIDstring`json:"startFileId,omitempty"`// optional - What to pass in to startFileId for the next search to continue where this one left off.
}
// ListFileNamesResponse is as received from b2_list_file_names or b2_list_file_versions
typeListFileNamesResponsestruct{
Files[]File`json:"files"`// An array of objects, each one describing one file.
NextFileName*string`json:"nextFileName"`// What to pass in to startFileName for the next search to continue where this one left off, or null if there are no more files.
NextFileID*string`json:"nextFileId"`// What to pass in to startFileId for the next search to continue where this one left off, or null if there are no more files.
}
// GetUploadURLRequest is passed to b2_get_upload_url
typeGetUploadURLRequeststruct{
BucketIDstring`json:"bucketId"`// The ID of the bucket that you want to upload to.
}
// GetUploadURLResponse is received from b2_get_upload_url
typeGetUploadURLResponsestruct{
BucketIDstring`json:"bucketId"`// The unique ID of the bucket.
UploadURLstring`json:"uploadUrl"`// The URL that can be used to upload files to this bucket, see b2_upload_file.
AuthorizationTokenstring`json:"authorizationToken"`// The authorizationToken that must be used when uploading files to this bucket, see b2_upload_file.
}
// FileInfo is received from b2_upload_file and b2_get_file_info
typeFileInfostruct{
IDstring`json:"fileId"`// The unique identifier for this version of this file. Used with b2_get_file_info, b2_download_file_by_id, and b2_delete_file_version.
Namestring`json:"fileName"`// The name of this file, which can be used with b2_download_file_by_name.
Actionstring`json:"action"`// Either "upload" or "hide". "upload" means a file that was uploaded to B2 Cloud Storage. "hide" means a file version marking the file as hidden, so that it will not show up in b2_list_file_names. The result of b2_list_file_names will contain only "upload". The result of b2_list_file_versions may have both.
AccountIDstring`json:"accountId"`// Your account ID.
BucketIDstring`json:"bucketId"`// The bucket that the file is in.
Sizeint64`json:"contentLength"`// The number of bytes stored in the file.
SHA1string`json:"contentSha1"`// The SHA1 of the bytes stored in the file.
ContentTypestring`json:"contentType"`// The MIME type of the file.
Infomap[string]string`json:"fileInfo"`// The custom information that was uploaded with the file. This is a JSON object, holding the name/value pairs that were uploaded with the file.
}
// CreateBucketRequest is used to create a bucket
typeCreateBucketRequeststruct{
AccountIDstring`json:"accountId"`
Namestring`json:"bucketName"`
Typestring`json:"bucketType"`
}
// DeleteBucketRequest is used to create a bucket
typeDeleteBucketRequeststruct{
IDstring`json:"bucketId"`
AccountIDstring`json:"accountId"`
}
// DeleteFileRequest is used to delete a file version
typeDeleteFileRequeststruct{
IDstring`json:"fileId"`// The ID of the file, as returned by b2_upload_file, b2_list_file_names, or b2_list_file_versions.
Namestring`json:"fileName"`// The name of this file.
}
// HideFileRequest is used to delete a file
typeHideFileRequeststruct{
BucketIDstring`json:"bucketId"`// The bucket containing the file to hide.
Namestring`json:"fileName"`// The name of the file to hide.
}
// GetFileInfoRequest is used to return a FileInfo struct with b2_get_file_info
typeGetFileInfoRequeststruct{
IDstring`json:"fileId"`// The ID of the file, as returned by b2_upload_file, b2_list_file_names, or b2_list_file_versions.