Documentation
¶
Index ¶
- func Download(c *gin.Context)
- func Exec(c *gin.Context)
- func MultiUpload(c *gin.Context)
- func Namespace(c *gin.Context)
- func Pods(c *gin.Context)
- func Pvcs(c *gin.Context)
- func Terminal(c *gin.Context)
- func UploadPVC(c *gin.Context)
- func UploadPods(c *gin.Context)
- type DownloadQuery
- type ExecQuery
- type MultiUploadQuery
- type NamespaceSQuery
- type PodsQuery
- type PvcsQuery
- type TerminalQuery
- type UploadPVCQuery
- type UploadQuery
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Download ¶
Download @Summary Download @description 从容器下载到本地 @Tags Kubernetes Api Proxy @Accept json @Param namespace query DownloadQuery true "namespace" default(default) @Param pod query DownloadQuery true "pod" default(nginx-test-76996486df) @Param container query DownloadQuery true "container" default(nginx-0) @Param dest_paths query DownloadQuery true "dest_paths" default(/root) @Param style query DownloadQuery true "style" default(rar) @Success 200 {object} handlers.JSONResult @Failure 500 {object} handlers.JSONResult @Router /api/kubeapiproxy/download [get]
func Exec ¶
Exec @Summary Exec @description 在pod的容器中执行 @Tags Kubernetes Api Proxy @Param namespace query ExecQuery true "namespace" @Param pods query ExecQuery true "Pod名称" @Param container query ExecQuery true "容器名称" @Param command query ExecQuery true "命令" @Param stdout query ExecQuery false "标准输出" @Param stderr query ExecQuery false "错误输出" @Param tty query ExecQuery false "终端" @Success 200 {object} handlers.JSONResult @Failure 500 {object} handlers.JSONResult @Router /api/kubeapiproxy/exec [get]
func MultiUpload ¶
MultiUpload @Summary MultiUpload @description 批量上传到容器 @Tags Kubernetes Api Proxy @Accept multipart/form-data @Param namespace query MultiUploadQuery true "namespace" default(default) @Param pods query MultiUploadQuery true "pods" default(nginx-test-76996486df) @Param dest_path query MultiUploadQuery false "dest_path" default(/root/) @Param files formData file true "files" @Success 200 {object} handlers.JSONResult @Failure 500 {object} handlers.JSONResult @Router /api/kubeapiproxy/multiupload [post]
func Namespace ¶
Namespace @Summary Namespace @description 命名空间列表 @Tags Kubernetes Api Proxy @Param namespace query NamespaceSQuery false "namespace" @Param field_selector query NamespaceSQuery false "field_selector" @Param label_selector query NamespaceSQuery false "label_selector" @Param limit query NamespaceSQuery false "limit" @Param continue query NamespaceSQuery false "continue" @Success 200 {object} handlers.JSONResult @Failure 500 {object} handlers.JSONResult @Router /api/kubeapiproxy/namespace [get]
func Pods ¶
Pods @Summary Pods @description 命名空间下Pod资源列表 @Tags Kubernetes Api Proxy @Param namespace query PodsQuery false "namespace" default(test) @Param pods query PodsQuery false "pods" @Param field_selector query PodsQuery false "field_selector" @Param label_selector query PodsQuery false "label_selector" @Param limit query PodsQuery false "limit" default(10) @Param continue query PodsQuery false "continue" @Success 200 {object} handlers.JSONResult @Failure 500 {object} handlers.JSONResult @Router /api/kubeapiproxy/pods [get]
func Pvcs ¶ added in v1.0.6
Pvcs @Summary Pvcs @description 命名空间下Pvc资源列表 @Tags Kubernetes Api Proxy @Param namespace query PvcsQuery false "namespace" default(test) @Param pvcs query PvcsQuery false "pvcs" @Param field_selector query PvcsQuery false "field_selector" @Param label_selector query PvcsQuery false "label_selector" @Success 200 {object} handlers.JSONResult @Failure 500 {object} handlers.JSONResult @Router /api/kubeapiproxy/pvcs [get]
func Terminal ¶
Terminal @Summary Container terminal @description pod 中容器的终端 @Tags Kubernetes Api Proxy @Param namespace query TerminalQuery true "namespace" default(default) @Param pod query TerminalQuery true "Pod名称" @Param container query TerminalQuery true "容器名称" @Param shell query TerminalQuery false "shell" default(sh[bash/sh/cmd]) @Success 200 {object} handlers.JSONResult @Failure 500 {object} handlers.JSONResult @Router /api/kubeapiproxy/terminal [get]
func UploadPVC ¶ added in v1.0.6
UploadPVC @Summary Upload @description 上传到PVC @Tags Kubernetes Api Proxy @Accept multipart/form-data @Param namespace query UploadQuery true "namespace" default(default) @Param pvc query UploadQuery true "pvc" default(nginx-test-76996486df) @Param files formData file true "files" @Success 200 {object} handlers.JSONResult @Failure 500 {object} handlers.JSONResult @Router /api/kubeapiproxy/uploadpvc [post]
func UploadPods ¶ added in v1.0.6
UploadPods @Summary Upload @description 上传到容器 @Tags Kubernetes Api Proxy @Accept multipart/form-data @Param namespace query UploadQuery true "namespace" default(default) @Param pod query UploadQuery true "pod" default(nginx-test-76996486df) @Param containers query UploadQuery true "containers" default(nginx-0) @Param dest_path query UploadQuery false "dest_path" default(/root/) @Param files formData file true "files" @Success 200 {object} handlers.JSONResult @Failure 500 {object} handlers.JSONResult @Router /api/kubeapiproxy/upload [post]
Types ¶
type DownloadQuery ¶
type DownloadQuery struct { Namespace string `json:"namespace" form:"namespace" binding:"required"` Pod string `json:"pod" form:"pod" binding:"required"` Container string `json:"container" form:"container" binding:"required"` DestPaths []string `json:"dest_paths" form:"dest_paths" binding:"required"` Style string `json:"style" form:"style"` }
type ExecQuery ¶
type ExecQuery struct { Namespace string `json:"namespace" form:"namespace" binding:"required"` Pod string `json:"pod" form:"pod" binding:"required"` Container string `json:"container" form:"container" binding:"required"` Stdout bool `json:"stdout" form:"stdout"` Stderr bool `json:"stderr" form:"stderr"` Tty bool `json:"tty" form:"tty"` Commands []string `json:"commands" form:"commands"` }
type MultiUploadQuery ¶
type NamespaceSQuery ¶
type NamespaceSQuery struct { Namespace string `json:"namespace" form:"namespace"` FieldSelector string `json:"field_selector" form:"field_selector"` LabelSelector string `json:"label_selector" form:"label_selector"` Limit int64 `json:"limit" form:"limit"` Continue string `json:"continue" form:"continue"` }
type PodsQuery ¶
type PodsQuery struct { Namespace string `json:"namespace" form:"namespace"` Pods []string `json:"pods" form:"pods"` FieldSelector string `json:"field_selector" form:"field_selector"` LabelSelector string `json:"label_selector" form:"label_selector"` Limit int64 `json:"limit" form:"limit"` Continue string `json:"continue" form:"continue"` }
type PvcsQuery ¶ added in v1.0.6
type PvcsQuery struct { Namespace string `json:"namespace" form:"namespace"` Pvcs []string `json:"pvcs" form:"pvcs"` FieldSelector string `json:"field_selector" form:"field_selector"` LabelSelector string `json:"label_selector" form:"label_selector"` Limit int64 `json:"limit" form:"limit"` Continue string `json:"continue" form:"continue"` }