Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackendRequestParams ¶
type BackendRequestParams struct {
BackendID uint
}
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler( backendManager *backendmanager.BackendManager, ) (*Handler, error)
func (*Handler) CreateBackend ¶
func (h *Handler) CreateBackend() http.HandlerFunc
@Id createBackend @Summary Create backend @Description Create a new backend @Tags backend @Accept json @Produce json @Param backend body request.CreateBackendRequest true "Created backend" @Success 200 {object} entity.Backend "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/backends [post]
func (*Handler) DeleteBackend ¶
func (h *Handler) DeleteBackend() http.HandlerFunc
@Id deleteBackend @Summary Delete backend @Description Delete specified backend by ID @Tags backend @Produce json @Param id path int true "Backend ID" @Success 200 {object} string "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/backends/{id} [delete]
func (*Handler) GetBackend ¶
func (h *Handler) GetBackend() http.HandlerFunc
@Id getBackend @Summary Get backend @Description Get backend information by backend ID @Tags backend @Produce json @Param id path int true "Backend ID" @Success 200 {object} entity.Backend "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/backends/{id} [get]
func (*Handler) ListBackends ¶
func (h *Handler) ListBackends() http.HandlerFunc
@Id listBackend @Summary List backends @Description List all backends @Tags backend @Produce json @Success 200 {object} entity.Backend "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/backends [get]
func (*Handler) UpdateBackend ¶
func (h *Handler) UpdateBackend() http.HandlerFunc
@Id updateBackend @Summary Update backend @Description Update the specified backend @Tags backend @Accept json @Produce json @Param id path int true "Backend ID" @Param backend body request.UpdateBackendRequest true "Updated backend" @Success 200 {object} entity.Backend "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/backends/{id} [put]