Documentation ¶
Index ¶
- Constants
- func NewKubeControllers(client *kubernetes.KubeClient, groupService service.GroupService) controller.Controller
- func ProxyKubeAPIServer(config *rest.Config) gin.HandlerFunc
- type KubeController
- func (kc *KubeController) Create(c *gin.Context)
- func (kc *KubeController) Delete(c *gin.Context)
- func (kc *KubeController) Get(c *gin.Context)
- func (kc *KubeController) List(c *gin.Context)
- func (kc *KubeController) Name() string
- func (kc *KubeController) PodExec(c *gin.Context)
- func (kc *KubeController) PodLogs(c *gin.Context)
- func (kc *KubeController) RegisterRoute(api *gin.RouterGroup)
- func (kc *KubeController) Update(c *gin.Context)
- type KubeResource
Constants ¶
const ( KubeNamespace = "namespaces" KubeDeployment = "deployments" KubeStatefulset = "statefulsets" KubeDaemonset = "daemonsets" KubePod = "pods" KubeService = "services" KubeIngress = "ingresses" )
Variables ¶
This section is empty.
Functions ¶
func NewKubeControllers ¶
func NewKubeControllers(client *kubernetes.KubeClient, groupService service.GroupService) controller.Controller
func ProxyKubeAPIServer ¶
func ProxyKubeAPIServer(config *rest.Config) gin.HandlerFunc
Types ¶
type KubeController ¶
type KubeController struct {
// contains filtered or unexported fields
}
func (*KubeController) Create ¶
func (kc *KubeController) Create(c *gin.Context)
@Summary Create kube resource @Description Create kube resource @Accept json @Produce json @Tags k8s @Security JWT @Param app body map[string]interface{} true "k8s json info" @Success 200 {object} common.Response{data=map[string]interface{}} @Router /api/v1/namespaces/:namespace/:resource [post]
func (*KubeController) Delete ¶
func (kc *KubeController) Delete(c *gin.Context)
@Summary Delete kube resource @Description Delete kube resource @Accept json @Produce json @Tags k8s @Security JWT @Success 200 {object} common.Response @Router /api/v1/namespaces/:namespace/:resource/:name [delete]
func (*KubeController) Get ¶
func (kc *KubeController) Get(c *gin.Context)
@Summary Get kube resource @Description Get kube resource @Accept json @Produce json @Tags k8s @Security JWT @Success 200 {object} common.Response{data=map[string]interface{}} @Router /api/v1/namespaces/:namespace/:resource/:name [get]
func (*KubeController) List ¶
func (kc *KubeController) List(c *gin.Context)
@Summary List kube resource @Description List kube resource @Accept json @Produce json @Tags k8s @Security JWT @Success 200 {object} common.Response{data=map[string]interface{}} @Router /api/v1/namespaces/:namespace/:resource [get]
func (*KubeController) Name ¶
func (kc *KubeController) Name() string
func (*KubeController) PodExec ¶
func (kc *KubeController) PodExec(c *gin.Context)
func (*KubeController) PodLogs ¶
func (kc *KubeController) PodLogs(c *gin.Context)
func (*KubeController) RegisterRoute ¶
func (kc *KubeController) RegisterRoute(api *gin.RouterGroup)
func (*KubeController) Update ¶
func (kc *KubeController) Update(c *gin.Context)
@Summary Update kube resource @Description Update kube resource @Accept json @Produce json @Tags k8s @Security JWT @Param app body map[string]interface{} true "k8s json info" @Success 200 {object} common.Response{data=map[string]interface{}} @Router /api/v1/namespaces/:namespace/:resource/:name [put]