resource

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: Apache-2.0 Imports: 9 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 id path int true "Resource ID" @Success 200 {object} 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/{id} [get]

func (*Handler) ListResources

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

@Id listResource @Summary List resource @Description List resource information @Tags resource @Produce json @Success 200 {object} 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 [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