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

45 lines
1.2 KiB
Go
Raw Normal View History

2022-10-09 16:17:15 +08:00
package dto
import "time"
type ImageRepoCreate struct {
Name string `json:"name" validate:"required"`
DownloadUrl string `json:"downloadUrl"`
Protocol string `json:"protocol"`
Username string `json:"username" validate:"max=256"`
Password string `json:"password" validate:"max=256"`
2022-10-09 16:17:15 +08:00
Auth bool `json:"auth"`
}
type ImageRepoUpdate struct {
ID uint `json:"id"`
DownloadUrl string `json:"downloadUrl"`
Protocol string `json:"protocol"`
2023-08-08 22:30:16 +08:00
Username string `json:"username" validate:"max=256"`
Password string `json:"password" validate:"max=256"`
2022-10-09 16:17:15 +08:00
Auth bool `json:"auth"`
}
type ImageRepoInfo struct {
ID uint `json:"id"`
CreatedAt time.Time `json:"createdAt"`
Name string `json:"name"`
DownloadUrl string `json:"downloadUrl"`
Protocol string `json:"protocol"`
2022-10-09 16:17:15 +08:00
Username string `json:"username"`
Auth bool `json:"auth"`
Status string `json:"status"`
Message string `json:"message"`
2022-10-09 16:17:15 +08:00
}
type ImageRepoOption struct {
ID uint `json:"id"`
Name string `json:"name"`
DownloadUrl string `json:"downloadUrl"`
}
type ImageRepoDelete struct {
2023-02-23 11:39:47 +08:00
Ids []uint `json:"ids" validate:"required"`
}