Documentation ¶
Overview ¶
resourcecontroller implements all controllers for resources
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteResource ¶
func DeleteResource() gin.HandlerFunc
Delete a cluster resource of given group/version/kind by uid.
@Summary Delete a resource by uid @Schemes @Description Delete a resources @Tags resources @Accept application/json @Produce application/json @Param uid path string true "UID" @Success 200 {bool} bool @Failure 403 {string} Forbidden @Failure 401 {string} Unauthorized @Failure 500 {string} Failure message @Router /v2/resources/uid/{uid} [delete] @Security ApiKey || AccessToken
func ExistsResources ¶
func ExistsResources() gin.HandlerFunc
Check if a cluster resource of given uid exists.
@Summary Check cluster resource by uid @Schemes @Description Get a list of cluster resources @Tags resources @Accept application/json @Produce application/json @Param ownerScope query aclmodels.Acl2Scope true "The kind of the owner, currently only support 'Cluster'" @Param ownerSubject query string true "The name og the owner" @Param uid path string true "UID" @Success 204 @Failure 404 {string} NotFound @Failure 401 {string} Unauthorized @Failure 500 {string} Failure message @Router /v2/resources/uid/{uid} [head] @Security ApiKey || AccessToken
func GetResource ¶
func GetResource() gin.HandlerFunc
Get a cluster resources og given group/version/kind/uid.
@Summary Get resource @Schemes @Description Get a resource by uid @Tags resources @Accept application/json @Produce application/json @Param uid path string true "The uid of the resource" @Param ownerScope query aclmodels.Acl2Scope true "The kind of the owner, currently only support 'Cluster'" @Param ownerSubject query string true "The name og the owner" @Param apiversion query string true "ApiVersion" @Param kind query string true "Kind" @Success 200 {array} apiresourcecontracts.ResourceNode @Failure 403 {string} Forbidden @Failure 401 {string} Unauthorized @Failure 500 {string} Failure message @Router /v2/resource/uid/{uid} [get] @Security ApiKey || AccessToken
func GetResourceHashList ¶
func GetResourceHashList() gin.HandlerFunc
Get a list of hashes of saved resources for given cluster. Parameter clusterid must match authorized clusterid
@Summary Get resource hash list @Schemes @Description Get a resource list @Tags resources @Accept application/json @Produce application/json @Param ownerScope query aclmodels.Acl2Scope true "The kind of the owner, currently only support 'Cluster'" @Param ownerSubject query string true "The name og the owner" @Success 200 {array} apiresourcecontracts.HashList @Failure 403 {string} Forbidden @Failure 401 {string} Unauthorized @Failure 500 {string} Failure message @Router /v2/resources/hashes [get] @Security ApiKey || AccessToken
func GetResources ¶
func GetResources() gin.HandlerFunc
Get a list of cluster resources og given group/version/kind.
@Summary Get resources @Schemes @Description Get a list of resources @Tags resources @Accept application/json @Produce application/json @Param ownerScope query aclmodels.Acl2Scope true "The kind of the owner, currently only support 'Cluster'" @Param ownerSubject query string true "The name og the owner" @Param apiversion query string true "ApiVersion" @Param kind query string true "Kind" @Success 200 {array} apiresourcecontracts.ResourceNode @Failure 403 {string} Forbidden @Failure 401 {string} Unauthorized @Failure 500 {string} Failure message @Router /v2/resources [get] @Security ApiKey || AccessToken
func NewResource ¶
func NewResource() gin.HandlerFunc
Register a new resource, the resource is in the payload. Parameter clusterid must match authorized clusterid
@Summary Register resource @Schemes @Description Registers a resource @Tags resources @Accept application/json @Produce application/json @Param rorresource body rorresources.ResourceSet true "ResourceUpdate" @Success 200 {bool} bool @Failure 403 {string} Forbidden @Failure 401 {string} Unauthorized @Failure 500 {string} Failure message @Router /v2/resources [post] @Security ApiKey || AccessToken
func UpdateResource ¶
func UpdateResource() gin.HandlerFunc
Update a cluster resource of given group/version/kind/uid.
@Summary Update resource by uid @Schemes @Description Update a resources @Tags resources @Accept application/json @Produce application/json @Param uid path string true "UID" @Param resourcereport body apiresourcecontracts.ResourceUpdateModel true "ResourceUpdate" @Success 200 {bool} bool @Failure 403 {string} Forbidden @Failure 401 {string} Unauthorized @Failure 500 {string} Failure message @Router /v2/resources/uid/{uid} [put] @Security ApiKey || AccessToken
Types ¶
This section is empty.