Pass the checksum type along in the request
This commit is contained in:
parent
d1485d7c5f
commit
7287b8e198
|
@ -8,6 +8,7 @@ import (
|
||||||
|
|
||||||
type BackupRequest struct {
|
type BackupRequest struct {
|
||||||
Checksum string `json:"checksum"`
|
Checksum string `json:"checksum"`
|
||||||
|
ChecksumType string `json:"checksum_type"`
|
||||||
Size int64 `json:"size"`
|
Size int64 `json:"size"`
|
||||||
Successful bool `json:"successful"`
|
Successful bool `json:"successful"`
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ const (
|
||||||
|
|
||||||
type ArchiveDetails struct {
|
type ArchiveDetails struct {
|
||||||
Checksum string `json:"checksum"`
|
Checksum string `json:"checksum"`
|
||||||
|
ChecksumType string `json:"checksum_type"`
|
||||||
Size int64 `json:"size"`
|
Size int64 `json:"size"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,6 +28,7 @@ type ArchiveDetails struct {
|
||||||
func (ad *ArchiveDetails) ToRequest(successful bool) api.BackupRequest {
|
func (ad *ArchiveDetails) ToRequest(successful bool) api.BackupRequest {
|
||||||
return api.BackupRequest{
|
return api.BackupRequest{
|
||||||
Checksum: ad.Checksum,
|
Checksum: ad.Checksum,
|
||||||
|
ChecksumType: ad.ChecksumType,
|
||||||
Size: ad.Size,
|
Size: ad.Size,
|
||||||
Successful: successful,
|
Successful: successful,
|
||||||
}
|
}
|
||||||
|
@ -146,6 +148,7 @@ func (b *Backup) Details() *ArchiveDetails {
|
||||||
|
|
||||||
return &ArchiveDetails{
|
return &ArchiveDetails{
|
||||||
Checksum: checksum,
|
Checksum: checksum,
|
||||||
|
ChecksumType: "sha1",
|
||||||
Size: sz,
|
Size: sz,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user