v1

package
v0.0.0-...-de354b7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 27, 2022 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// EndOfTransmission end
	EndOfTransmission = "\u0004"
)
View Source
const (
	TimedOutReason = "ProgressDeadlineExceeded"
)

Variables

View Source
var AppV1APIVersion = "apps/v1"
View Source
var BatchV1BetaVersion = "batch/v1beta1"
View Source
var CronJobKind = "CronJob"
View Source
var DeploymentKind = "Deployment"

Functions

func DeleteCRD

func DeleteCRD(c *gin.Context)

DeleteCRD @Summary 删除CRD自定义资源 @accept application/json @Param cluster path string true "Cluster" @Param group path string true "Group" @Param version path string true "Version" @Param resource path string true "Resource" @Param namespace path string true "Namespace" @Param name path string true "Name" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/crd/{group}/{version}/{resource}/{namespace}/{name} [delete]

func DeleteConfigmap

func DeleteConfigmap(c *gin.Context)

DeleteConfigmap @Summary 删除Configmap资源 @accept application/json @Param cluster path string true "Cluster" @Param namespace path string true "Namespace" @Param name path string true "Name" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/configmaps/{namespace}/{name} [delete]

func DeleteCronJob

func DeleteCronJob(c *gin.Context)

func DeleteDeployment

func DeleteDeployment(c *gin.Context)

func DeleteHorizontalPodAutoScaler

func DeleteHorizontalPodAutoScaler(c *gin.Context)

DeleteHorizontalPodAutoScaler @Summary 删除弹性伸缩资源 @accept application/json @Param cluster path string true "Cluster" @Param namespace path string true "Namespace" @Param name path string true "Name" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/horizontalpodautoscalers/{namespace}/{name} [delete]

func DeleteJob

func DeleteJob(c *gin.Context)

func DeletePod

func DeletePod(c *gin.Context)

func DeploymentDoAction

func DeploymentDoAction(c *gin.Context)

func DownloadPodContainerLog

func DownloadPodContainerLog(c *gin.Context)

func ForceUpdate

func ForceUpdate(deployment *appsv1.Deployment)

func GetCRD

func GetCRD(c *gin.Context)

GetCRD @Summary 获取CRD自定义资源 @accept application/json @Param cluster path string true "Cluster" @Param group path string true "Group" @Param version path string true "Version" @Param resource path string true "Resource" @Param namespace path string true "Namespace" @Param name path string true "Name" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/crd/{group}/{version}/{resource}/{namespace}/{name} [get]

func GetCRDs

func GetCRDs(c *gin.Context)

GetCRDs @Summary 获取CRD自定义资源列表 @accept application/json @Param cluster path string true "Cluster" @Param group path string true "Group" @Param version path string true "Version" @Param resource path string true "Resource" @Param namespace path string true "Namespace" @Param name path string true "Name" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/crd/{group}/{version}/{resource}/{namespace} [get]

func GetConfigmap

func GetConfigmap(c *gin.Context)

GetConfigmap @Summary 获取Configmap资源 @accept application/json @Param cluster path string true "Cluster" @Param namespace path string true "Namespace" @Param name path string true "Name" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/configmaps/{namespace}/{name} [get]

func GetConfigmapList

func GetConfigmapList(c *gin.Context)

GetConfigmapList @Summary 获取Configmap资源列表 @accept application/json @Param cluster path string true "Cluster" @Param param query metadata.CommonQueryParameter true "LabelSelector" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/configmaps [get]

func GetCronJob

func GetCronJob(c *gin.Context)

func GetCronJobs

func GetCronJobs(c *gin.Context)

func GetDeployment

func GetDeployment(c *gin.Context)

@Summary 查看deployment @accept application/json @Produce application/json @Param cluster path string true "Cluster" @Param namespace path string true "Namespace" @Param deploymentName path string true "DeploymentName" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/deployments/{namespace}/{deploymentName} [get]

func GetDeploymentCondition

func GetDeploymentCondition(status appsv1.DeploymentStatus, condType appsv1.DeploymentConditionType) *appsv1.DeploymentCondition

GetDeploymentCondition returns the condition with the provided type.

func GetDeploymentPods

func GetDeploymentPods(c *gin.Context)

func GetDeploymentStatus

func GetDeploymentStatus(c *gin.Context)

func GetDeployments

func GetDeployments(c *gin.Context)

@Summary 查看deployment列表 @Produce json @Param cluster path string true "Cluster" @Param namespace query string true "Namespace" @Param label query string false "Label" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/deployments [get]

func GetEvents

func GetEvents(c *gin.Context)

func GetHorizontalPodAutoScaler

func GetHorizontalPodAutoScaler(c *gin.Context)

GetHorizontalPodAutoScaler @Summary 获取弹性伸缩资源 @accept application/json @Param cluster path string true "Cluster" @Param namespace path string true "Namespace" @Param name path string true "Name" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/horizontalpodautoscalers/{namespace}/{name} [get]

func GetHorizontalPodAutoScalerList

func GetHorizontalPodAutoScalerList(c *gin.Context)

GetHorizontalPodAutoScalerList @Summary 获取弹性伸缩资源列表 @accept application/json @Param cluster path string true "Cluster" @Param param query metadata.CommonQueryParameter true "LabelSelector" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/horizontalpodautoscalers [get]

func GetJob

func GetJob(c *gin.Context)

func GetJobs

func GetJobs(c *gin.Context)

func GetNamespaces

func GetNamespaces(c *gin.Context)

func GetNodes

func GetNodes(c *gin.Context)

func GetPod

func GetPod(c *gin.Context)

func GetPodLog

func GetPodLog(c *gin.Context)

func GetPods

func GetPods(c *gin.Context)

func GetService

func GetService(c *gin.Context)

func GetServices

func GetServices(c *gin.Context)

func PatchDeployment

func PatchDeployment(c *gin.Context)

PatchDeployment @Summary 批量更新deployment @Produce json @Param cluster path string true "Cluster" @Param namespace path string true "Namespace" @Param deploymentName path string true "DeploymentName" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/deployments/{namespace}/{deploymentName} [patch]

func PodWebSSH

func PodWebSSH(c *gin.Context)

func PostCRD

func PostCRD(c *gin.Context)

PostCRD @Summary 创建CRD资源 @accept application/json @Param cluster path string true "Cluster" @Param group path string true "Group" @Param version path string true "Version" @Param resource path string true "Resource" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/crd/{group}/{version}/{resource} [post]

func PostConfigmap

func PostConfigmap(c *gin.Context)

PostConfigmap @Summary 创建Configmap资源 @accept application/json @Param cluster path string true "Cluster" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/configmaps [post]

func PostCronJob

func PostCronJob(c *gin.Context)

func PostDeployment

func PostDeployment(c *gin.Context)

PostDeployment @Summary 创建deployment @accept application/json @Param cluster path string true "Cluster" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/deployments [post]

func PostHorizontalPodAutoScaler

func PostHorizontalPodAutoScaler(c *gin.Context)

PostHorizontalPodAutoScaler @Summary 创建弹性伸缩资源 @accept application/json @Param cluster path string true "Cluster" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/horizontalpodautoscalers [post]

func PutCRD

func PutCRD(c *gin.Context)

PutCRD @Summary 更新CRD自定义资源 @accept application/json @Param cluster path string true "Cluster" @Param group path string true "Group" @Param version path string true "Version" @Param resource path string true "Resource" @Param namespace path string true "Namespace" @Param name path string true "Name" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/crd/{group}/{version}/{resource}/{namespace}/{name} [put]

func PutConfigmap

func PutConfigmap(c *gin.Context)

PutConfigmap @Summary 更新Configmap资源 @accept application/json @Param cluster path string true "Cluster" @Param namespace path string true "Namespace" @Param name path string true "Name" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/configmaps/{namespace}/{name} [put]

func PutCronJob

func PutCronJob(c *gin.Context)

func PutDeployment

func PutDeployment(c *gin.Context)

@Summary 更新deployment @Produce json @Param cluster path string true "Cluster" @Param namespace path string true "Namespace" @Param deploymentName path string true "DeploymentName" @Param RequestBody body v1.DeploymentBody true "RequestBody" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/deployments/{namespace}/{deploymentName} [put]

func PutHorizontalPodAutoScaler

func PutHorizontalPodAutoScaler(c *gin.Context)

PutHorizontalPodAutoScaler @Summary 更新弹性伸缩资源 @accept application/json @Param cluster path string true "Cluster" @Param namespace path string true "Namespace" @Param name path string true "Name" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/horizontalpodautoscalers/{namespace}/{name} [put]

func WatchPods

func WatchPods(c *gin.Context)

Types

type CronJobBody

type CronJobBody struct {
	Spec  v1beta1.CronJobSpec `json:"spec" form:"spec"`
	Image string              `json:"image" form:"image"`
	Label string              `json:"label" form:"label"`
}

type CronJobUri

type CronJobUri struct {
	Cluster     string `uri:"cluster" binding:"required"`
	Namespace   string `uri:"namespace" binding:"required"`
	CronJobName string `uri:"cronjobName" binding:"required"`
}

type CronJobsQuery

type CronJobsQuery struct {
	Namespace string `form:"namespace"`
	Label     string `form:"label"`
}

type CronJobsUri

type CronJobsUri struct {
	Cluster string `uri:"cluster" binding:"required"`
}

type DeploymentActionQuery

type DeploymentActionQuery struct {
	Action string `form:"action" binding:"required"`
}

type DeploymentBody

type DeploymentBody struct {
	Image    string `json:"image" form:"image"`
	Label    string `json:"label" form:"label"`
	Replicas string `json:"replicas" form:"replicas"`
}

type DeploymentQuery

type DeploymentQuery struct {
	Label string `json:"label" form:"label"`
}

type DeploymentUri

type DeploymentUri struct {
	Cluster        string `uri:"cluster" binding:"required"`
	Namespace      string `uri:"namespace" binding:"required"`
	DeploymentName string `uri:"deploymentName" binding:"required"`
}

type DeploymentsQuery

type DeploymentsQuery struct {
	Namespace string `form:"namespace"`
	Label     string `form:"label"`
}

type DeploymentsUri

type DeploymentsUri struct {
	Cluster string `uri:"cluster" binding:"required"`
}

type EventsQuery

type EventsQuery struct {
	Namespace string `json:"namespace" form:"namespace" binding:"required"`
	Name      string `json:"name" form:"name" binding:"required"`
	Kind      string `json:"kind" form:"kind" binding:"required"`
	Uid       string `json:"uid" form:"uid" binding:"required"`
}

type EventsUri

type EventsUri struct {
	Cluster string `uri:"cluster" binding:"required"`
}

type ExtraPod

type ExtraPod struct {
	*corev1.Pod
	FormatStatus *k8s.PodFormatStatus `json:"formatStatus"`
}

type ExtraPodList

type ExtraPodList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []*ExtraPod `json:"items"`
}

type ExtraPodResp

type ExtraPodResp struct {
	Object *ExtraPod `json:"object"`
	Type   string    `json:"type"`
}

type JobUri

type JobUri struct {
	Cluster   string `uri:"cluster" binding:"required"`
	Namespace string `uri:"namespace" binding:"required"`
	JobName   string `uri:"jobName" binding:"required"`
}

type JobsQuery

type JobsQuery struct {
	Namespace string `form:"namespace"`
	Label     string `form:"label"`
}

type JobsUri

type JobsUri struct {
	Cluster string `uri:"cluster" binding:"required"`
}

type NamespacesUri

type NamespacesUri struct {
	Cluster string `uri:"cluster" binding:"required"`
}

type NodesUri

type NodesUri struct {
	Cluster string `uri:"cluster" binding:"required"`
}

type PodLogQuery

type PodLogQuery struct {
	Container  string `form:"container" binding:"required"`
	Follow     string `form:"follow" binding:"required"`
	Previous   string `form:"previous" binding:"required"`
	Timestamps string `form:"timestamps" binding:"required"`
	TailLines  string `form:"tailLines" binding:"required"`
}

type PodQuery

type PodQuery struct {
}

type PodUri

type PodUri struct {
	Cluster   string `uri:"cluster" binding:"required"`
	Namespace string `uri:"namespace" binding:"required"`
	PodName   string `uri:"podName" binding:"required"`
}

type PodsQuery

type PodsQuery struct {
	Namespace string `form:"namespace"`
	Label     string `form:"label"`
}

type PodsUri

type PodsUri struct {
	Cluster string `uri:"cluster" binding:"required"`
}

type ServiceQuery

type ServiceQuery struct {
}

type ServiceUri

type ServiceUri struct {
	Cluster     string `uri:"cluster" binding:"required"`
	Namespace   string `uri:"namespace" binding:"required"`
	ServiceName string `uri:"serviceName" binding:"required"`
}

type ServicesQuery

type ServicesQuery struct {
	Namespace string `form:"namespace"`
}

type ServicesUri

type ServicesUri struct {
	Cluster string `uri:"cluster" binding:"required"`
}

type TerminalMessage

type TerminalMessage struct {
	Operation string `json:"operation"`
	Data      string `json:"data"`
	Rows      uint16 `json:"rows"`
	Cols      uint16 `json:"cols"`
}

type WebSSHQuery

type WebSSHQuery struct {
	Container string `form:"container" binding:"required"`
}

type WebTerminal

type WebTerminal struct {
	// contains filtered or unexported fields
}

func (*WebTerminal) Close

func (t *WebTerminal) Close() error

func (*WebTerminal) Done

func (t *WebTerminal) Done()

func (*WebTerminal) Next

func (*WebTerminal) Read

func (t *WebTerminal) Read(p []byte) (n int, err error)

func (*WebTerminal) Stderr

func (t *WebTerminal) Stderr() io.Writer

func (*WebTerminal) Stdin

func (t *WebTerminal) Stdin() io.Reader

func (*WebTerminal) Stdout

func (t *WebTerminal) Stdout() io.Writer

func (*WebTerminal) Tty

func (t *WebTerminal) Tty() bool

func (*WebTerminal) Write

func (t *WebTerminal) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL