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.
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.
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.
BucketIDstring`json:"bucketId"`//The ID of the bucket that the file will go in.
Namestring`json:"fileName"`// The name of the file. See Files for requirements on file names.
ContentTypestring`json:"contentType"`// The MIME type of the content of the file, which will be returned in the Content-Type header when downloading the file. Use the Content-Type b2/x-auto to automatically set the stored Content-Type post upload. In the case where a file extension is absent or the lookup fails, the Content-Type is set to application/octet-stream.
Infomap[string]string`json:"fileInfo"`// A JSON object holding the name/value pairs for the custom file info.
}
// StartLargeFileResponse is the response to StartLargeFileRequest
typeStartLargeFileResponsestruct{
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.
AccountIDstring`json:"accountId"`// The identifier for the account.
BucketIDstring`json:"bucketId"`// The unique ID of the bucket.
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.
UploadTimestampTimestamp`json:"uploadTimestamp"`// This is a UTC time when this file was uploaded.
}
// GetUploadPartURLRequest is passed to b2_get_upload_part_url
typeGetUploadPartURLRequeststruct{
IDstring`json:"fileId"`// The unique identifier of the file being uploaded.
}
// GetUploadPartURLResponse is received from b2_get_upload_url
typeGetUploadPartURLResponsestruct{
IDstring`json:"fileId"`// The unique identifier of the file being uploaded.
UploadURLstring`json:"uploadUrl"`// The URL that can be used to upload files to this bucket, see b2_upload_part.
AuthorizationTokenstring`json:"authorizationToken"`// The authorizationToken that must be used when uploading files to this bucket, see b2_upload_part.
}
// UploadPartResponse is the response to b2_upload_part
typeUploadPartResponsestruct{
IDstring`json:"fileId"`// The unique identifier of the file being uploaded.
PartNumberint64`json:"partNumber"`// Which part this is (starting from 1)
Sizeint64`json:"contentLength"`// The number of bytes stored in the file.
SHA1string`json:"contentSha1"`// The SHA1 of the bytes stored in the file.
}
// FinishLargeFileRequest is passed to b2_finish_large_file
//
// The response is a FileInfo object (with extra AccountID and BucketID fields which we ignore).
//
// Large files do not have a SHA1 checksum. The value will always be "none".
typeFinishLargeFileRequeststruct{
IDstring`json:"fileId"`// The unique identifier of the file being uploaded.
SHA1s[]string`json:"partSha1Array"`// A JSON array of hex SHA1 checksums of the parts of the large file. This is a double-check that the right parts were uploaded in the right order, and that none were missed. Note that the part numbers start at 1, and the SHA1 of the part 1 is the first string in the array, at index 0.