feat: remove preheat tag validate with required (#1363)
Signed-off-by: Gaius <gaius.qi@gmail.com>
This commit is contained in:
parent
c8ea36186f
commit
866eafe2c7
|
|
@ -18,7 +18,7 @@ package job
|
|||
|
||||
type PreheatRequest struct {
|
||||
URL string `json:"url" validate:"required,url"`
|
||||
Tag string `json:"tag" validate:"required"`
|
||||
Tag string `json:"tag" validate:"omitempty"`
|
||||
Digest string `json:"digest" validate:"omitempty"`
|
||||
Filter string `json:"filter" validate:"omitempty"`
|
||||
Headers map[string]string `json:"headers" validate:"omitempty"`
|
||||
|
|
|
|||
|
|
@ -47,11 +47,15 @@ var tracer = otel.Tracer("manager")
|
|||
type PreheatType string
|
||||
|
||||
const (
|
||||
// PreheatImageType is image type of preheat job.
|
||||
PreheatImageType PreheatType = "image"
|
||||
|
||||
// PreheatFileType is file type of preheat job.
|
||||
PreheatFileType PreheatType = "file"
|
||||
)
|
||||
|
||||
const (
|
||||
// Timeout is the default timeout of http client.
|
||||
timeout = 1 * time.Minute
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue