Documentation

Index

Constants

View Source
const (
	IDParamName = "id"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

API implements the Cluster Group Management API actions.

func NewAPI

func NewAPI(
	clusterGroupManager *cgroup.Manager,
	deploymentManager *pkgDep.CGDeploymentManager,
	logger logrus.FieldLogger,
	baseErrorHandler emperror.Handler,
) *API

func (*API) AddRoutes

func (a *API) AddRoutes(group *gin.RouterGroup)

AddRoutes adds cluster group related API routes

func (*API) Create

func (n *API) Create(c *gin.Context)

@Summary Create Cluster Group @Description create a group of clusters, joining clusters together with a name @Tags clustergroups @Accept json @Produce json @Param orgid path int true "Organization ID" @Param cgroup body api.CreateRequest true "Create Cluster Group Request" @Success 201 {object} api.CreateResponse @Failure 400 {object} common.ErrorResponse @Failure 404 {object} common.ErrorResponse @Router /api/v1/orgs/{orgid}/clustergroups [post] @Security bearerAuth

func (*API) Delete

func (n *API) Delete(c *gin.Context)

@Summary Delete Cluster Group @Description delete a cluster group, disable all enabled features, delete related deployments @Tags clustergroups @Accept json @Produce json @Param orgid path int true "Organization ID" @Param clusterGroupId path int true "Cluster Group ID" @Success 200 {string} no content @Failure 400 {object} common.ErrorResponse @Router /api/v1/orgs/{orgid}/clustergroups/{clusterGroupId} [delete] @Security bearerAuth

func (*API) Get

func (a *API) Get(c *gin.Context)

@Summary Get Cluster Group @Description retrieve info about a cluster group, members, status of member clusters, features @Tags clustergroups @Accept json @Produce json @Param orgid path int true "Organization ID" @Param clusterGroupId path int true "Cluster Group ID" @Success 200 {object} api.ClusterGroup @Failure 400 {object} common.ErrorResponse Cluster Group Not Found @Router /api/v1/orgs/{orgid}/clustergroups/{clusterGroupId} [get] @Security bearerAuth

func (*API) List

func (a *API) List(c *gin.Context)

@Summary List Cluster Groups of an Organization @Description retrieve list of cluster groups of an organization @Tags clustergroups @Accept json @Produce json @Param orgid path int true "Organization ID" @Success 200 {array} api.ClusterGroup @Failure 400 {object} common.ErrorResponse Cluster Group Not Found @Router /api/v1/orgs/{orgid}/clustergroups [get] @Security bearerAuth

func (*API) Update

func (n *API) Update(c *gin.Context)

@Summary Update Cluster Group @Description update name & member clusters for a cluster group @Tags clustergroups @Accept json @Produce json @Param orgid path int true "Organization ID" @Param clusterGroupId path int true "Cluster Group ID" @Param cgroup body api.UpdateRequest true "Update Cluster Group Request" @Success 202 {object} api.UpdateResponse @Failure 400 {object} common.ErrorResponse Cluster Group Not Found @Failure 404 {object} common.ErrorResponse @Router /api/v1/orgs/{orgid}/clustergroups/{clusterGroupId} [put] @Security bearerAuth

Directories

Path Synopsis
common
deployment
feature