Documentation ¶
Index ¶
Constants ¶
const (
IDParamName = "featureName"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func NewAPI ¶
func NewAPI( clusterGroupManager *cgroup.Manager, deploymentManager *deployment.CGDeploymentManager, logger logrus.FieldLogger, baseErrorHandler emperror.Handler, ) *API
func (*API) AddRoutes ¶
func (a *API) AddRoutes(group *gin.RouterGroup)
AddRoutes adds cluster group features related API routes
func (*API) Disable ¶
@Summary Disable Feature of Cluster Group @Description disable feature on all members of a cluster group @Tags clustergroup features @Accept json @Produce json @Param orgid path uint true "Organization ID" @Param clusterGroupId path uint true "Cluster Group ID" @Param featureName path string true "Name of the feature" @Success 200 {string} no content @Failure 400 {object} common.ErrorResponse Feature Not Found @Router /api/v1/orgs/{orgid}/clustergroups/{clusterGroupId}/features/{featureName} [delete] @Security bearerAuth
func (*API) Enable ¶
@Summary Enable Feature of Cluster Group @Description enable feature on all members of a cluster group @Tags clustergroup features @Accept json @Produce json @Param orgid path uint true "Organization ID" @Param clusterGroupId path uint true "Cluster Group ID" @Param featureName path string true "Name of the feature" @Param fprop body api.FeatureRequest true "Feature properties" @Success 202 {string} no content @Failure 400 {object} common.ErrorResponse Feature Not Found @Failure 404 {object} common.ErrorResponse @Router /api/v1/orgs/{orgid}/clustergroups/{clusterGroupId}/features/{featureName} [post] @Security bearerAuth
func (*API) Get ¶
@Summary Get Feature of Cluster Group @Description retrieve info about a cluster group feature and it's status on each member cluster @Tags clustergroup features @Accept json @Produce json @Param orgid path uint true "Organization ID" @Param clusterGroupId path uint true "Cluster Group ID" @Param featureName path string true "Name of the feature" @Success 200 {object} api.FeatureResponse @Failure 400 {object} common.ErrorResponse Feature Not Found @Router /api/v1/orgs/{orgid}/clustergroups/{clusterGroupId}/features/{featureName} [get] @Security bearerAuth
func (*API) List ¶
@Summary Get All Features of Cluster Group @Description retrieve info about a cluster group feature and it's status on each member cluster @Tags clustergroup features @Accept json @Produce json @Param orgid path uint true "Organization ID" @Param clusterGroupId path uint true "Cluster Group ID" @Param featureName path string true "Name of the future" @Success 200 {array} api.FeatureResponse @Failure 400 {object} common.ErrorResponse Not Found @Router /api/v1/orgs/{orgid}/clustergroups/{clusterGroupId}/features [get] @Security bearerAuth
func (*API) Sync ¶
@Summary Synchronize / reconcile Feature of Cluster Group @Description Synchronize / reconcile feature on all members of a cluster group @Tags clustergroup features @Accept json @Produce json @Param orgid path uint true "Organization ID" @Param clusterGroupId path uint true "Cluster Group ID" @Param featureName path string true "Name of the feature" @Success 200 {string} no content @Failure 400 {object} common.ErrorResponse Feature Not Found @Router /api/v1/orgs/{orgid}/clustergroups/{clusterGroupId}/features/{featureName}/sync [put] @Security bearerAuth
func (*API) Update ¶
@Summary Update Feature of Cluster Group @Description update properties of a feature @Tags clustergroup features @Accept json @Produce json @Param orgid path uint true "Organization ID" @Param clusterGroupId path uint true "Cluster Group ID" @Param featureName path string true "Name of the feature" @Param fprop body api.FeatureRequest true "Feature properties" @Success 200 {string} no content @Failure 400 {object} common.ErrorResponse Feature Not Found @Failure 404 {object} common.ErrorResponse @Router /api/v1/orgs/{orgid}/clustergroups/{clusterGroupId}/features/{featureName} [put] @Security bearerAuth