cluster

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClusterRouter

func ClusterRouter(r *gin.RouterGroup)

func CreateCluster

func CreateCluster(ctx *gin.Context)

@BasePath /api/v1 PingProject godoc @Summary CreateCluster @Schemes @Description Create Cluster @Tags CreateCluster @Accept json @Produce json @Security ApiKeyAuth @Param ReqeustBody body CreateClusterRequestBody true "Create Cluster" @Success 200 {object} util.Res {"code":200,"data":null,"msg":""} @Success 400 {object} util.Res {"code":400,"data":null,"msg":""} @Success 404 {object} util.Res {"code":404,"data":null,"msg":""} @Success 500 {object} util.Res {"code":500,"data":null,"msg":""} @Router /cluster/create [post] @ID CreateCluster

func DeleteCluster

func DeleteCluster(ctx *gin.Context)

@BasePath /api/v1 PingCluster godoc @Summary DeleteCluster @Schemes @Description Delete Cluster @Tags DeleteCluster @Accept json @Produce json @Security ApiKeyAuth @Param project_name query string true "Project_Name" @Param cluster_name query string true "Cluster_Name" @Success 200 {object} util.Res {"code":200,"data":null,"msg":""} @Success 400 {object} util.Res {"code":400,"data":null,"msg":""} @Success 404 {object} util.Res {"code":404,"data":null,"msg":""} @Success 500 {object} util.Res {"code":500,"data":null,"msg":""} @Router /cluster/delete [delete] @ID DeleteCluster

func GetClusterId

func GetClusterId(ctx *gin.Context)

@BasePath /api/v1 PingProject godoc @Summary GetClusterId @Schemes @Description Get ClusterID @Tags GetClusterId @Accept json @Produce json @Security ApiKeyAuth @Param project_name query string true "Project Name" @Param cluster_name query string true "Cluster Name" @Success 200 {object} util.Res {"code":200,"data":null,"msg":""} @Success 400 {object} util.Res {"code":400,"data":null,"msg":""} @Success 404 {object} util.Res {"code":404,"data":null,"msg":""} @Success 500 {object} util.Res {"code":500,"data":null,"msg":""} @Router /cluster/get_id [get] @ID GetClusterId

func ListCluster

func ListCluster(ctx *gin.Context)

@BasePath /api/v1 PingCluster godoc @Summary ListCluster @Schemes @Description List Cluster @Tags ListCluster @Accept json @Produce json @Security ApiKeyAuth @Param project_name query string false "Project Name" @Param cluster_name query string false "Cluster Name" @Success 200 {object} util.Res {"code":200,"data":null,"msg":""} @Success 400 {object} util.Res {"code":400,"data":null,"msg":""} @Success 404 {object} util.Res {"code":404,"data":null,"msg":""} @Success 500 {object} util.Res {"code":500,"data":null,"msg":""} @Router /cluster/list [get] @ID ListCluster

func ListGetLabel

func ListGetLabel(ctx *gin.Context)

@BasePath /api/v1 PingCluster godoc @Summary ListGetLabel @Schemes @Description List Cluster for label @Tags ListGetLabel @Accept json @Produce json @Security ApiKeyAuth @Param project_name query string false "Project Name" @Param label_key query string true "Label Key" @Param label_value query string true "Label value" @Success 200 {object} util.Res {"code":200,"data":null,"msg":""} @Success 400 {object} util.Res {"code":400,"data":null,"msg":""} @Success 404 {object} util.Res {"code":404,"data":null,"msg":""} @Success 500 {object} util.Res {"code":500,"data":null,"msg":""} @Router /cluster/label [get] @ID ListGetLabel

func UpdateCluster

func UpdateCluster(ctx *gin.Context)

@BasePath /api/v1 PingCluster godoc @Summary UpdateCluster @Schemes @Description Update Cluster @Tags UpdateCluster @Accept json @Produce json @Security ApiKeyAuth @Param project_name query string true "Project_Name" @Param cluster_id query string true "Cluster_ID" @Param ReqeustBody body UpdateClusterRequestBody true "Update Cluster" @Success 200 {object} util.Res {"code":200,"data":null,"msg":""} @Success 400 {object} util.Res {"code":400,"data":null,"msg":""} @Success 404 {object} util.Res {"code":404,"data":null,"msg":""} @Success 500 {object} util.Res {"code":500,"data":null,"msg":""} @Router /cluster/update [put] @ID UpdateCluster

Types

type Cluster

type Cluster struct {
	Name      string `json:"name"`
	ClusterID int64  `json:"cluster_id"`
}

type ClusterId

type ClusterId struct {
	ClusterId string `json:"cluster_id"`
}

type CreateClusterRequestBody

type CreateClusterRequestBody struct {
	ProjectName string `json:"project_name" binding:"required"`
	ClusterName string `json:"cluster_name" binding:"required"`
	Description string `json:"description"`
}

type ErrorResp

type ErrorResp struct {
	Msg string `json:"msg"`
}

type UpdateClusterRequestBody

type UpdateClusterRequestBody struct {
	ClusterName string `json:"cluster_name"`
	Description string `json:"description"`
}

Jump to

Keyboard shortcuts

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