Documentation ¶
Index ¶
- func AddNameSpace(ctx *gin.Context)
- func CreateSa(ctx *gin.Context)
- func DeleteNs(ctx *gin.Context)
- func DeleteSa(ctx *gin.Context)
- func Gettoken(ctx *gin.Context)
- func ListNs(ctx *gin.Context)
- func ListSa(ctx *gin.Context)
- func SaRouter(r *gin.RouterGroup)
- func UpdateSa(ctx *gin.Context)
- type AddSaNsRequestBody
- type Cluster
- type CreateSaRequestBody
- type ErrorResp
- type NameSpace
- type SaId
- type SaRes
- type UpdateSaRequestBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddNameSpace ¶
@BasePath /api/v1 PingProject godoc @Summary AddNameSpace @Schemes @Description ADD ServiceAccount NameSpace @Tags AddNameSpace @Accept json @Produce json @Security ApiKeyAuth @Param ReqeustBody body AddSaNsRequestBody true "Add Sa NameSpace" @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 /sa/addns [post] @ID AddNameSpace
func CreateSa ¶
@BasePath /api/v1 PingProject godoc @Summary CreateSa @Schemes @Description Create ServiceAccount @Tags CreateSa @Accept json @Produce json @Security ApiKeyAuth @Param ReqeustBody body CreateSaRequestBody true "Create Sa" @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 /sa/create [post] @ID CreateSa
func DeleteNs ¶
@BasePath /api/v1 PingProject godoc @Summary DeleteNs @Schemes @Description Delete ServiceAccount NameSpace @Tags DeleteNs @Accept json @Produce json @Security ApiKeyAuth @Param project_name query string true "Project_Name" @Param cluster_name query string true "Cluster_Name" @Param sa_name query string true "Sa_Name" @Param namespace query string true "NameSpace" @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 /sa/delns [delete] @ID DeleteNs
func DeleteSa ¶
@BasePath /api/v1 PingCluster godoc @Summary DeleteSa @Schemes @Description Delete ServiceAccount @Tags DeleteSa @Accept json @Produce json @Security ApiKeyAuth @Param project_name query string true "Project_Name" @Param cluster_name query string true "Cluster_Name" @Param sa_name query string true "sa_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 /sa/delete [delete] @ID DeleteSa
func Gettoken ¶
@BasePath /api/v1 PingCluster godoc @Summary Gettoken @Schemes @Description Get SaToken For NameSpace @Tags Gettoken @Accept json @Produce json @Security ApiKeyAuth @Param project_name query string true "Project Name" @Param cluster_name query string true "Cluster Name" @Param ns_name query string true "Ns_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 /sa/gettoken [get] @ID Gettoken
func ListNs ¶
@BasePath /api/v1 PingCluster godoc @Summary ListNs @Schemes @Description List All ServiceAccount's NameSpace @Tags ListNs @Accept json @Produce json @Security ApiKeyAuth @Param project_name query string true "Project Name" @Param cluster_name query string true "Cluster Name" @Param sa_name query string true "Sa_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 /sa/listns [get] @ID ListNs
func ListSa ¶
@BasePath /api/v1 PingCluster godoc @Summary ListSa @Schemes @Description List All ServiceAccount @Tags ListSa @Accept json @Produce json @Security ApiKeyAuth @Param project_name query string true "Project Name" @Param cluster_name query string true "Cluster Name" @Param sa_name query string false "Sa 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 /sa/list [get] @ID ListSa
func SaRouter ¶
func SaRouter(r *gin.RouterGroup)
func UpdateSa ¶
@BasePath /api/v1 PingCluster godoc @Summary UpdateSaToken @Schemes @Description Update ServiceAccount SaToken @Tags UpdateSaToken @Accept json @Produce json @Security ApiKeyAuth @Param project_name query string true "Project_Name" @Param cluster_name query string true "Cluster_Name" @Param sa_name query string true "Sa_Name" @Param ReqeustBody body UpdateSaRequestBody true "Update ServiceAccount Token" @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 /sa/update [put] @ID UpdateSa
Types ¶
type AddSaNsRequestBody ¶
type CreateSaRequestBody ¶
type CreateSaRequestBody struct { ProjectName string `json:"project_name" binding:"required"` ClusterName string `json:"cluster_name" binding:"required"` SaName string `json:"sa_name" binding:"required"` SaToken string `json:"sa_token" binding:"required"` Namespace string `json:"namespace" binding:"required"` }
type UpdateSaRequestBody ¶
type UpdateSaRequestBody struct {
SaToken string `json:"sa_token" binding:"required"`
}