69 lines
1.8 KiB
Go
69 lines
1.8 KiB
Go
package container
|
|
|
|
type CreateParam struct {
|
|
ContainerGroupName string `json:"containerGroupName"`
|
|
Name string `json:"name"`
|
|
Image string `json:"image"`
|
|
Cpu string `json:"cpu,omitempty"`
|
|
Memory string `json:"memory,omitempty"`
|
|
Port int32 `json:"port,omitempty"`
|
|
NodePort int32 `json:"nodePort,omitempty"`
|
|
MountPath string `json:"mountPath,omitempty"`
|
|
Args []string `json:"args,omitempty"`
|
|
Envs []struct {
|
|
Name string `json:"name,omitempty"`
|
|
Value string `json:"value,omitempty"`
|
|
} `json:"envs,omitempty"`
|
|
CreateParameter CreateParameter `json:"createParameter,omitempty"`
|
|
}
|
|
|
|
type K8sCreateParam struct {
|
|
}
|
|
|
|
type EciCreateParam struct {
|
|
}
|
|
|
|
func (k K8sCreateParam) ContainerCreateParameter() {
|
|
}
|
|
|
|
func (e EciCreateParam) ContainerCreateParameter() {
|
|
}
|
|
|
|
// 删除容器参数
|
|
type DeleteParam struct {
|
|
Name string `json:"name,omitempty"`
|
|
DeleteParameter DeleteParameter `json:"deleteParameter,omitempty"`
|
|
}
|
|
|
|
func (k K8sDeleteParam) ContainerDeleteParameter() {
|
|
}
|
|
func (e EciDeleteParam) ContainerDeleteParameter() {
|
|
}
|
|
|
|
type K8sDeleteParam struct {
|
|
}
|
|
|
|
type EciDeleteParam struct {
|
|
RegionId string `json:"regionId,omitempty"`
|
|
ContainerGroupId string `json:"containerGroupId,omitempty"`
|
|
}
|
|
|
|
// 获取容器信息
|
|
type GetParam struct {
|
|
Name string `json:"name,omitempty"`
|
|
GetParameter GetParameter `json:"getParameter,omitempty"`
|
|
}
|
|
|
|
func (g K8sGetParam) ContainerGetParameter() {
|
|
}
|
|
func (g EciGetParam) ContainerGetParameter() {
|
|
}
|
|
|
|
type K8sGetParam struct {
|
|
}
|
|
|
|
type EciGetParam struct {
|
|
RegionId string `json:"regionId,omitempty"`
|
|
ContainerGroupName string `json:"containerGroupName,omitempty"`
|
|
}
|