59 lines
2.0 KiB
Go
59 lines
2.0 KiB
Go
package model
|
|
|
|
type Vendor struct {
|
|
Name string
|
|
OEMUrl string
|
|
OEMDir string
|
|
AppFrontUserImageName string
|
|
AppFrontAdminImageName string
|
|
}
|
|
|
|
var (
|
|
vendorMap = map[string]*Vendor{
|
|
"standard": {
|
|
Name: "standard",
|
|
OEMUrl: "https://artifactory.yizhisec.com/artifactory/yizhisec-release/oem/release/2.1.0-std/oem.tar.gz",
|
|
OEMDir: "oem",
|
|
AppFrontUserImageName: "hub.yizhisec.com/hybridscope/v2/front-user:latest",
|
|
AppFrontAdminImageName: "hub.yizhisec.com/build/hybirdscope/front/admin:latest",
|
|
},
|
|
"elink": {
|
|
Name: "elink",
|
|
OEMUrl: "https://artifactory.yizhisec.com/artifactory/yizhisec-release/oem/release/2.1.0-std/oem_csgElink.tar.gz",
|
|
OEMDir: "oem_csgElink",
|
|
AppFrontUserImageName: "hub.yizhisec.com/hybridscope/v2/front-user-elink:latest",
|
|
AppFrontAdminImageName: "hub.yizhisec.com/build/hybirdscope/front/admin:latest",
|
|
},
|
|
"noah": {
|
|
Name: "noah",
|
|
OEMUrl: "https://artifactory.yizhisec.com/artifactory/yizhisec-release/oem/release/2.1.0-std/oem_noah.tar.gz",
|
|
OEMDir: "oem_noah",
|
|
AppFrontUserImageName: "hub.yizhisec.com/hybridscope/v2/front-user:latest",
|
|
AppFrontAdminImageName: "hub.yizhisec.com/build/hybirdscope/front/admin:latest",
|
|
},
|
|
"heishuimeng": {
|
|
Name: "heishuimeng",
|
|
OEMUrl: "https://artifactory.yizhisec.com/artifactory/yizhisec-release/oem/release/2.1.0-std/oem_heishuimeng.tar.gz",
|
|
OEMDir: "oem_heishuimeng",
|
|
AppFrontUserImageName: "hub.yizhisec.com/hybridscope/v2/front-user:latest",
|
|
AppFrontAdminImageName: "hub.yizhisec.com/build/hybirdscope/front/admin:latest",
|
|
},
|
|
}
|
|
)
|
|
|
|
func GetVendor(name string) *Vendor {
|
|
if vendor, ok := vendorMap[name]; ok {
|
|
return vendor
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func GetVendorNames() []string {
|
|
names := make([]string, 0, len(vendorMap))
|
|
for name := range vendorMap {
|
|
names = append(names, name)
|
|
}
|
|
return names
|
|
}
|