1Panel/agent/app/dto/image.go
ssongliu 157fff8481
feat: 镜像拉取、推送、构建改为任务方式实现 (#6598)
Co-authored-by: ssonglius11 <ssonglius11@163.com>
2024-09-27 14:33:32 +08:00

48 lines
1.2 KiB
Go

package dto
import "time"
type ImageInfo struct {
ID string `json:"id"`
CreatedAt time.Time `json:"createdAt"`
IsUsed bool `json:"isUsed"`
Tags []string `json:"tags"`
Size string `json:"size"`
}
type ImageLoad struct {
Path string `json:"path" validate:"required"`
}
type ImageBuild struct {
TaskID string `json:"taskID"`
From string `json:"from" validate:"required"`
Name string `json:"name" validate:"required"`
Dockerfile string `json:"dockerfile" validate:"required"`
Tags []string `json:"tags"`
}
type ImagePull struct {
TaskID string `json:"taskID"`
RepoID uint `json:"repoID"`
ImageName string `json:"imageName" validate:"required"`
}
type ImageTag struct {
SourceID string `json:"sourceID" validate:"required"`
TargetName string `json:"targetName" validate:"required"`
}
type ImagePush struct {
TaskID string `json:"taskID"`
RepoID uint `json:"repoID" validate:"required"`
TagName string `json:"tagName" validate:"required"`
Name string `json:"name" validate:"required"`
}
type ImageSave struct {
TagName string `json:"tagName" validate:"required"`
Path string `json:"path" validate:"required"`
Name string `json:"name" validate:"required"`
}