ocdp v1
This commit is contained in:
44
backend/internal/adapter/input/http/dto/artifact_dto.go
Normal file
44
backend/internal/adapter/input/http/dto/artifact_dto.go
Normal file
@ -0,0 +1,44 @@
|
||||
package dto
|
||||
|
||||
// RepositoryListResponse Repository 列表响应
|
||||
type RepositoryListResponse struct {
|
||||
RegistryID string `json:"registryId"`
|
||||
RegistryURL string `json:"registryUrl"`
|
||||
Repositories []string `json:"repositories"`
|
||||
Total int `json:"total"`
|
||||
CatalogSupported bool `json:"catalogSupported"` // Whether _catalog API is supported
|
||||
Source string `json:"source"` // Data source: "catalog" | "preconfigured" | "unavailable"
|
||||
Message string `json:"message,omitempty"` // User-friendly message
|
||||
}
|
||||
|
||||
// ArtifactResponse Artifact 响应(简化版本,只包含核心字段)
|
||||
type ArtifactResponse struct {
|
||||
RepositoryName string `json:"repositoryName"`
|
||||
Tag string `json:"tag"`
|
||||
Digest string `json:"digest"`
|
||||
Type string `json:"type"` // chart | image | other
|
||||
Size int64 `json:"size"`
|
||||
CreatedAt string `json:"createdAt"`
|
||||
}
|
||||
|
||||
// TagResponse Tag 响应(前端期望的扁平化结构)
|
||||
type TagResponse struct {
|
||||
RepositoryName string `json:"repositoryName"` // Repository name
|
||||
Tag string `json:"tag"` // Tag name (e.g. "1.0.0", "latest")
|
||||
Type string `json:"type"` // Artifact type: chart, image, other
|
||||
MediaType string `json:"mediaType,omitempty"`
|
||||
Size int64 `json:"size"` // Artifact size (bytes)
|
||||
}
|
||||
|
||||
// ArtifactListResponse Artifact 列表响应(包装格式,用于详细接口)
|
||||
type ArtifactListResponse struct {
|
||||
RepositoryName string `json:"repositoryName"`
|
||||
Artifacts []*ArtifactResponse `json:"artifacts"`
|
||||
Total int `json:"total"`
|
||||
}
|
||||
|
||||
// ValuesSchemaResponse Values Schema 响应
|
||||
type ValuesSchemaResponse struct {
|
||||
Schema string `json:"schema"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user