resource

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

func NewHandler

func NewHandler(
	resourceManager *resourcemanager.ResourceManager,
) (*Handler, error)

func (*Handler) GetResource

func (h *Handler) GetResource() http.HandlerFunc

@Id getResource @Summary Get resource @Description Get resource information by resource ID @Tags resource @Produce json @Param resourceID path int true "Resource ID" @Success 200 {object} handler.Response{data=entity.Resource} "Success" @Failure 400 {object} error "Bad Request" @Failure 401 {object} error "Unauthorized" @Failure 429 {object} error "Too Many Requests" @Failure 404 {object} error "Not Found" @Failure 500 {object} error "Internal Server Error" @Router /api/v1/resources/{resourceID} [get]

func (*Handler) GetResourceGraph added in v0.14.0

func (h *Handler) GetResourceGraph() http.HandlerFunc

@Id getResourceGraph @Summary Get resource graph @Description Get resource graph by stack ID @Tags resource @Produce json @Param stackID query uint true "Stack ID" @Success 200 {object} handler.Response{data=entity.ResourceGraph} "Success" @Failure 400 {object} error "Bad Request" @Failure 401 {object} error "Unauthorized" @Failure 429 {object} error "Too Many Requests" @Failure 404 {object} error "Not Found" @Failure 500 {object} error "Internal Server Error" @Router /api/v1/resources/graph [get]

func (*Handler) ListResources

func (h *Handler) ListResources() http.HandlerFunc

@Id listResource @Summary List resource @Description List resource information @Tags resource @Produce json @Param orgID query uint false "The organization ID" @Param projectID query uint false "The project ID" @Param stackID query uint false "The stack ID" @Param resourceType query string false "The resource type" @Param resourcePlane query string false "The resource plane" @Param page query uint false "The current page to fetch. Default to 1" @Param pageSize query uint false "The size of the page. Default to 10" @Param sortBy query string false "Which field to sort the list by. Default to id" @Param ascending query bool false "Whether to sort the list in ascending order. Default to false" @Success 200 {object} handler.Response{data=[]response.PaginatedResourceResponse} "Success" @Failure 400 {object} error "Bad Request" @Failure 401 {object} error "Unauthorized" @Failure 429 {object} error "Too Many Requests" @Failure 404 {object} error "Not Found" @Failure 500 {object} error "Internal Server Error" @Router /api/v1/resources [get]

type ResourceRequestParams

type ResourceRequestParams struct {
	ResourceID uint
}

Jump to

Keyboard shortcuts

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