-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathpulp.go
22 lines (18 loc) · 943 Bytes
/
pulp.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package api
type CreateUploadRequest struct {
Size int64 `json:"size" validate:"required"` // Size of the upload in bytes
ChunkSize int64 `json:"chunk_size" validate:"required"` // Size of the chunk
Sha256 string `json:"sha256" validate:"required"` // SHA-256 checksum of the file
}
type PulpUploadChunkRequest struct {
UploadHref string `param:"upload_href" validate:"required"` // Upload identifier
File string `form:"file" validate:"required"` // A chunk of the uploaded file
Sha256 string `form:"sha256" validate:"required"` // SHA-256 checksum of the chunk
}
type FinishUploadRequest struct {
UploadHref string `param:"upload_href" validate:"required"` // Upload identifier
Sha256 string `json:"sha256" validate:"required"` // Expected SHA-256 checksum for the file
}
type TaskRequest struct {
TaskHref string `param:"task_href" validate:"required"` // Task identifier
}