resourcegrouprule

package
v0.3.20-beta.1 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(resourceGroupMgr *resourcegroup.ResourceGroupManager) http.HandlerFunc

Create returns an HTTP handler function that creates a ResourceGroupRule resource. It utilizes a ResourceGroupManager to execute the logic.

@Summary Create creates a ResourceGroupRule. @Description This endpoint creates a new ResourceGroupRule using the payload. @Tags resourcegrouprule @Accept plain @Accept json @Produce json @Param request body ResourceGroupRulePayload true "resourceGroupRule to create (either plain text or JSON format)" @Success 200 {object} unstructured.Unstructured "Unstructured object" @Failure 400 {string} string "Bad Request" @Failure 401 {string} string "Unauthorized" @Failure 404 {string} string "Not Found" @Failure 405 {string} string "Method Not Allowed" @Failure 429 {string} string "Too Many Requests" @Failure 500 {string} string "Internal Server Error" @Router /rest-api/v1/resource-group-rule [post]

func Delete

func Delete(resourceGroupMgr *resourcegroup.ResourceGroupManager) http.HandlerFunc

Delete returns an HTTP handler function that deletes a ResourceGroupRule resource. It utilizes a ResourceGroupManager to execute the logic.

@Summary Delete removes a ResourceGroupRule by name. @Description This endpoint deletes the ResourceGroupRule by name. @Tags resourcegrouprule @Produce json @Param resourceGroupRuleName path string true "The name of the resource group rule" @Success 200 {string} string "Operation status" @Failure 400 {string} string "Bad Request" @Failure 401 {string} string "Unauthorized" @Failure 404 {string} string "Not Found" @Failure 405 {string} string "Method Not Allowed" @Failure 429 {string} string "Too Many Requests" @Failure 500 {string} string "Internal Server Error" @Router /rest-api/v1/resource-group-rule/{resourceGroupRuleName} [delete]

func Get

func Get(resourceGroupMgr *resourcegroup.ResourceGroupManager) http.HandlerFunc

Get returns an HTTP handler function that reads a resourcegrouprule detail. It utilizes a ResourceGroupManager to execute the logic.

@Summary Get returns a ResourceGroupRule by name. @Description This endpoint returns a ResourceGroupRule by name. @Tags resourcegrouprule @Produce json @Param resourceGroupRuleName path string true "The name of the resource group rule" @Success 200 {object} unstructured.Unstructured "Unstructured object" @Failure 400 {string} string "Bad Request" @Failure 401 {string} string "Unauthorized" @Failure 404 {string} string "Not Found" @Failure 405 {string} string "Method Not Allowed" @Failure 429 {string} string "Too Many Requests" @Failure 500 {string} string "Internal Server Error" @Router /rest-api/v1/resource-group-rule/{resourceGroupRuleName} [get]

func List

func List(resourceGroupMgr *resourcegroup.ResourceGroupManager) http.HandlerFunc

List returns an HTTP handler function that lists all ResourceGroupRule resources. It utilizes a ResourceGroupManager to execute the logic.

@Summary List lists all ResourceGroupRules. @Description This endpoint lists all ResourceGroupRules. @Tags resourcegrouprule @Produce json @Param summary query bool false "Whether to display summary or not. Default to false" @Param orderBy query string false "The order to list the resourceGroupRule. Default to order by name" @Param descending query bool false "Whether to sort the list in descending order. Default to false" @Success 200 {array} unstructured.Unstructured "List of resourceGroupRule objects" @Failure 400 {string} string "Bad Request" @Failure 401 {string} string "Unauthorized" @Failure 404 {string} string "Not Found" @Failure 405 {string} string "Method Not Allowed" @Failure 429 {string} string "Too Many Requests" @Failure 500 {string} string "Internal Server Error" @Router /rest-api/v1/resource-group-rules [get]

func Update

func Update(resourceGroupMgr *resourcegroup.ResourceGroupManager) http.HandlerFunc

Update returns an HTTP handler function that updates a ResourceGroupRule resource. It utilizes a ResourceGroupManager to execute the logic.

@Summary Update updates the ResourceGroupRule metadata by name. @Description This endpoint updates the display name and description of an existing ResourceGroupRule. @Tags resourcegrouprule @Accept plain @Accept json @Produce json @Param request body ResourceGroupRulePayload true "resourceGroupRule to update (either plain text or JSON format)" @Success 200 {object} unstructured.Unstructured "Unstructured object" @Failure 400 {string} string "Bad Request" @Failure 401 {string} string "Unauthorized" @Failure 404 {string} string "Not Found" @Failure 405 {string} string "Method Not Allowed" @Failure 429 {string} string "Too Many Requests" @Failure 500 {string} string "Internal Server Error" @Router /rest-api/v1/resource-group-rule [put]

Types

type ResourceGroupRulePayload

type ResourceGroupRulePayload struct {
	Name        string   `json:"name"`
	Description string   `json:"description"`
	Fields      []string `json:"fields"`
}

func (*ResourceGroupRulePayload) Decode

Decode detects the correct decoder for use on an HTTP request and marshals into a given interface.

func (*ResourceGroupRulePayload) ToEntity

ToEntity converts the payload struct to the corresponding entity struct.

Jump to

Keyboard shortcuts

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