1Panel/backend/app/dto/image.go

46 lines
1.2 KiB
Go
Raw Normal View History

package dto
import "time"
type ImageInfo struct {
ID string `json:"id"`
CreatedAt time.Time `json:"createdAt"`
IsUsed bool `json:"isUsed"`
2022-10-11 17:46:52 +08:00
Tags []string `json:"tags"`
Size string `json:"size"`
}
type ImageLoad struct {
Path string `json:"path" validate:"required"`
}
2022-10-11 14:20:51 +08:00
type ImageBuild struct {
From string `json:"from" validate:"required"`
2022-10-12 13:42:58 +08:00
Name string `json:"name" validate:"required"`
Dockerfile string `json:"dockerfile" validate:"required"`
Tags []string `json:"tags"`
2022-10-11 14:20:51 +08:00
}
type ImagePull struct {
RepoID uint `json:"repoID"`
ImageName string `json:"imageName" validate:"required"`
}
2022-10-11 17:46:52 +08:00
type ImageTag struct {
RepoID uint `json:"repoID"`
2022-10-11 17:46:52 +08:00
SourceID string `json:"sourceID" validate:"required"`
TargetName string `json:"targetName" validate:"required"`
2022-10-11 17:46:52 +08:00
}
type ImagePush struct {
RepoID uint `json:"repoID" validate:"required"`
2022-10-11 17:46:52 +08:00
TagName string `json:"tagName" validate:"required"`
Name string `json:"name" validate:"required"`
}
type ImageSave struct {
2022-10-11 17:46:52 +08:00
TagName string `json:"tagName" validate:"required"`
Path string `json:"path" validate:"required"`
2022-10-11 17:46:52 +08:00
Name string `json:"name" validate:"required"`
}