2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 07:57:21 +08:00

feat: 优化容器模版显示

This commit is contained in:
2026-01-16 20:53:40 +08:00
parent 0fd6db3249
commit 7988804603
5 changed files with 75 additions and 24 deletions

View File

@@ -6,21 +6,22 @@ import (
)
type Template struct {
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Slug string `json:"slug"`
Icon string `json:"icon"`
Name string `json:"name"`
Description string `json:"description"`
Categories []string `json:"categories"`
Version string `json:"version"`
Compose string `json:"compose"`
Environments []struct {
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Slug string `json:"slug"`
Icon string `json:"icon"`
Name string `json:"name"`
Description string `json:"description"`
Website string `json:"website"`
Categories []string `json:"categories"`
Architectures []string `json:"architectures"`
Compose string `json:"compose"`
Environments []struct {
Name string `json:"name"` // 变量名
Description string `json:"description"` // 变量描述
Type string `json:"type"` // 变量类型, text, password, number, port, select
Options map[string]string `json:"options,omitempty"` // 下拉框选项key -> value
Default string `json:"default"` // 默认值
Default any `json:"default"` // 默认值string or number
} `json:"environments"`
}