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
}