mirror of
https://github.com/sipeed/NanoKVM.git
synced 2026-09-11 00:22:56 -05:00
+ server/proto/download.go + add DownloadImageReq and sha256 argument server/router/download.go + add cancel download router server/service/download/service.go + sha256 decode and check + remove HEAD request + cancel download
17 lines
340 B
Go
17 lines
340 B
Go
package proto
|
|
|
|
type DownloadImageReq struct {
|
|
File string `json:"file" validate:"required"`
|
|
SHA256Sum string `json:"sha256sum"`
|
|
}
|
|
|
|
type ImageEnabledRsp struct {
|
|
Enabled bool `json:"enabled"`
|
|
}
|
|
|
|
type StatusImageRsp struct {
|
|
Status string `json:"status"`
|
|
File string `json:"file"`
|
|
Percentage string `json:"percentage"`
|
|
}
|