Documentation ¶
Index ¶
- type ClusterController
- func (this *ClusterController) AddCluster()
- func (this *ClusterController) ClusterSecurityCheck()
- func (this *ClusterController) DeleteCluster()
- func (this *ClusterController) GetClusters()
- func (this *ClusterController) ProxyOperator()
- func (this *ClusterController) Scope()
- func (this *ClusterController) UpdateCluster()
- type DeploymentController
- type NSController
- type NetworkPolicyController
- type PodController
- type ServiceController
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterController ¶
type ClusterController struct {
beego.Controller
}
集群接口
func (*ClusterController) AddCluster ¶
func (this *ClusterController) AddCluster()
@Title AddCluster @Description Add ClusterOBJ "authType=KubeConfig, 需要 上传KubeConfig文件; authType=BearerToken, 需要设置 masterUrl、bearerToken 参数" @Param token header string true "authToken" @Param authType formData string true "default: BearerToken、KubeConfig" @Param masterUrl formData string false "ApiServer 访问地址" @Param bearerToken formData string false "ApiServer 访问token" @Param k8sFile formData file false "KubeConfig 文件" @Param clusterName formData string true "clusterName" @Param type formData string true "类型 Kubernetes Openshift Rancher" @Param isForce formData bool false true "force" @Success 200 {object} models.Result @router /add [post]
func (*ClusterController) ClusterSecurityCheck ¶
func (this *ClusterController) ClusterSecurityCheck()
@Title ClusterSecurityCheck @Description ClusterSecurityCheck @Param token header string true "authToken" @Param body body models.ClusterCheck true "集群检查" @Success 200 {object} models.Result @router /securitycheck [post]
func (*ClusterController) DeleteCluster ¶
func (this *ClusterController) DeleteCluster()
@Title DeleteCluster @Description delete ClusterOBJ @Param token header string true "authToken" @Param id path string "" true "Id" @Success 200 {object} models.Result @router /:id [delete]
func (*ClusterController) GetClusters ¶
func (this *ClusterController) GetClusters()
@Title GetClusters @Description Get ClusterOBJ List(不支持租户查询) @Param token header string true "authToken" @Param body body models.ClusterOBJ false "集群" @Param from query int 0 false "from" @Param limit query int 20 false "limit" @Success 200 {object} models.Result @router / [post]
func (*ClusterController) ProxyOperator ¶
func (this *ClusterController) ProxyOperator()
@Title ProxyOperator @Description ClusterSecurityCheck @Param token header string true "authToken" @Param close query bool false false "是否关闭" @Param targetUrl query string "" true "目标地址" @Success 200 {object} models.Result @router /proxy [post]
func (*ClusterController) Scope ¶
func (this *ClusterController) Scope()
@Title Scope @Description Scope @Param token header string true "authToken" @Param id path string "" true "Id" @Param isActive query bool false true "是否激活" @Success 200 {object} models.Result @router /:id/scope [post]
func (*ClusterController) UpdateCluster ¶
func (this *ClusterController) UpdateCluster()
@Title UpdateCluster @Description Update ClusterOBJ @Param token header string true "authToken" @Param id path string "" true "Id" @Param body body models.ClusterOBJ true "集群" @Success 200 {object} models.Result @router /:id [put]
type DeploymentController ¶
type DeploymentController struct {
beego.Controller
}
Deployment接口
func (*DeploymentController) GetDeploymentList ¶
func (this *DeploymentController) GetDeploymentList()
@Title GetDeployment @Description Get Deployment List @Param token header string true "authToken" @Param body body models.Deployment false "Deployment" @Param from query int 0 false "from" @Param limit query int 20 false "limit" @Success 200 {object} models.Result @router / [post]
type NSController ¶
type NSController struct {
beego.Controller
}
命名空间接口
func (*NSController) BindAccount ¶
func (this *NSController) BindAccount()
@Title BindAccount @Description BindAccount(绑定租户) @Param token header string true "authToken" @Param nsId path string "" true "nsId" @Param body body models.NameSpace true "命名空间" @Success 200 {object} models.Result @router /:nsId/bindaccount [put]
func (*NSController) GetNameSpaceList ¶
func (this *NSController) GetNameSpaceList()
@Title GetNameSpaces @Description Get NameSpace List @Param token header string true "authToken" @Param body body models.NameSpace false "命名空间" @Param from query int 0 false "from" @Param limit query int 20 false "limit" @Success 200 {object} models.Result @router / [post]
func (*NSController) UnBindAccount ¶
func (this *NSController) UnBindAccount()
@Title UnBindAccount @Description UnBindAccount(解除绑定) @Param token header string true "authToken" @Param nsId path string "" true "nsId" @Param body body models.NameSpace true "命名空间" @Success 200 {object} models.Result @router /:nsId/unbindaccount [delete]
func (*NSController) UpdateNameSpace ¶
func (this *NSController) UpdateNameSpace()
@Title UpdateNameSpace @Description Update NameSpace @Param token header string true "authToken" @Param id path string "" true "Id" @Param body body models.NameSpace true "命名空间" @Success 200 {object} models.Result @router /:id [put]
type NetworkPolicyController ¶
type NetworkPolicyController struct {
beego.Controller
}
NetworkPolicy 接口
func (*NetworkPolicyController) AddNetworkPolicy ¶
func (this *NetworkPolicyController) AddNetworkPolicy()
@Title AddNetworkPolicy @Description Add NetworkPolicy @Param token header string true "authToken" @Param body body models.NetworkPolicy true "网络策略" @Success 200 {object} models.Result @router /add [post]
func (*NetworkPolicyController) DeleteNetworkPolicy ¶
func (this *NetworkPolicyController) DeleteNetworkPolicy()
@Title DeleteNetworkPolicy @Description Delete NetworkPolicy @Param token header string true "authToken" @Param id path string "" true "Id" @Success 200 {object} models.Result @router /:id [delete]
func (*NetworkPolicyController) GetNetworkPolicysList ¶
func (this *NetworkPolicyController) GetNetworkPolicysList()
@Title GetNetworkPolicy @Description Get NetworkPolicy List @Param token header string true "authToken" @Param body body models.NetworkPolicy false "网络策略" @Param from query int 0 false "from" @Param limit query int 20 false "limit" @Success 200 {object} models.Result @router / [post]
func (*NetworkPolicyController) UpdateNetworkPolicy ¶
func (this *NetworkPolicyController) UpdateNetworkPolicy()
@Title UpdateNetworkPolicy @Description Update NetworkPolicy @Param token header string true "authToken" @Param id path string "" true "Id" @Param body body models.NetworkPolicy true "网络策略" @Success 200 {object} models.Result @router /:id [put]
type PodController ¶
type PodController struct {
beego.Controller
}
Pod接口
func (*PodController) GetPodsList ¶
func (this *PodController) GetPodsList()
@Title GetPod @Description Get Pod List @Param token header string true "authToken" @Param body body models.Pod false "Pod" @Param from query int 0 false "from" @Param limit query int 20 false "limit" @Success 200 {object} models.Result @router / [post]
type ServiceController ¶
type ServiceController struct {
beego.Controller
}
Service 接口
func (*ServiceController) GetServicesList ¶
func (this *ServiceController) GetServicesList()
@Title GetService @Description Get Service List @Param token header string true "authToken" @Param body body models.Service false "Service" @Param from query int 0 false "from" @Param limit query int 20 false "limit" @Success 200 {object} models.Result @router / [post]