Documentation ¶
Index ¶
- type Handler
- func (h *Handler) ApplyStack() http.HandlerFunc
- func (h *Handler) CreateStack() http.HandlerFunc
- func (h *Handler) DeleteStack() http.HandlerFunc
- func (h *Handler) DestroyStack() http.HandlerFunc
- func (h *Handler) GenerateStack() http.HandlerFunc
- func (h *Handler) GetStack() http.HandlerFunc
- func (h *Handler) ListStacks() http.HandlerFunc
- func (h *Handler) PreviewStack() http.HandlerFunc
- func (h *Handler) UpdateStack() http.HandlerFunc
- type StackRequestParams
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( stackManager *stackmanager.StackManager, ) (*Handler, error)
func (*Handler) ApplyStack ¶
func (h *Handler) ApplyStack() http.HandlerFunc
@Summary Apply stack @Description Apply stack information by stack ID @Produce json @Param id path int true "Stack ID" @Success 200 {object} entity.Stack "Success" @Failure 400 {object} errors.DetailError "Bad Request" @Failure 401 {object} errors.DetailError "Unauthorized" @Failure 429 {object} errors.DetailError "Too Many Requests" @Failure 404 {object} errors.DetailError "Not Found" @Failure 500 {object} errors.DetailError "Internal Server Error" @Router /api/v1/stack/{stackID}/apply [post]
func (*Handler) CreateStack ¶
func (h *Handler) CreateStack() http.HandlerFunc
@Summary Create stack @Description Create a new stack @Accept json @Produce json @Param stack body CreateStackRequest true "Created stack" @Success 200 {object} entity.Stack "Success" @Failure 400 {object} errors.DetailError "Bad Request" @Failure 401 {object} errors.DetailError "Unauthorized" @Failure 429 {object} errors.DetailError "Too Many Requests" @Failure 404 {object} errors.DetailError "Not Found" @Failure 500 {object} errors.DetailError "Internal Server Error" @Router /api/v1/project/{projectName}/stack/{stackName} [post]
func (*Handler) DeleteStack ¶
func (h *Handler) DeleteStack() http.HandlerFunc
@Summary Delete stack @Description Delete specified stack by ID @Produce json @Param id path int true "Stack ID" @Success 200 {object} entity.Stack "Success" @Failure 400 {object} errors.DetailError "Bad Request" @Failure 401 {object} errors.DetailError "Unauthorized" @Failure 429 {object} errors.DetailError "Too Many Requests" @Failure 404 {object} errors.DetailError "Not Found" @Failure 500 {object} errors.DetailError "Internal Server Error" @Router /api/v1/project/{projectName}/stack/{stackName} [delete] @Router /api/v1/stack/{stackID} [delete]
func (*Handler) DestroyStack ¶
func (h *Handler) DestroyStack() http.HandlerFunc
@Summary Destroy stack @Description Destroy stack information by stack ID @Produce json @Param id path int true "Stack ID" @Success 200 {object} entity.Stack "Success" @Failure 400 {object} errors.DetailError "Bad Request" @Failure 401 {object} errors.DetailError "Unauthorized" @Failure 429 {object} errors.DetailError "Too Many Requests" @Failure 404 {object} errors.DetailError "Not Found" @Failure 500 {object} errors.DetailError "Internal Server Error" @Router /api/v1/stack/{stackID}/destroy [post]
func (*Handler) GenerateStack ¶
func (h *Handler) GenerateStack() http.HandlerFunc
@Summary Generate stack @Description Generate stack information by stack ID @Produce json @Param id path int true "Stack ID" @Success 200 {object} entity.Stack "Success" @Failure 400 {object} errors.DetailError "Bad Request" @Failure 401 {object} errors.DetailError "Unauthorized" @Failure 429 {object} errors.DetailError "Too Many Requests" @Failure 404 {object} errors.DetailError "Not Found" @Failure 500 {object} errors.DetailError "Internal Server Error" @Router /api/v1/stack/{stackID}/generate [post]
func (*Handler) GetStack ¶
func (h *Handler) GetStack() http.HandlerFunc
@Summary Get stack @Description Get stack information by stack ID @Produce json @Param id path int true "Stack ID" @Success 200 {object} entity.Stack "Success" @Failure 400 {object} errors.DetailError "Bad Request" @Failure 401 {object} errors.DetailError "Unauthorized" @Failure 429 {object} errors.DetailError "Too Many Requests" @Failure 404 {object} errors.DetailError "Not Found" @Failure 500 {object} errors.DetailError "Internal Server Error" @Router /api/v1/stack/{stackID} [get]
func (*Handler) ListStacks ¶
func (h *Handler) ListStacks() http.HandlerFunc
@Summary List stacks @Description List all stacks @Produce json @Success 200 {object} entity.Stack "Success" @Failure 400 {object} errors.DetailError "Bad Request" @Failure 401 {object} errors.DetailError "Unauthorized" @Failure 429 {object} errors.DetailError "Too Many Requests" @Failure 404 {object} errors.DetailError "Not Found" @Failure 500 {object} errors.DetailError "Internal Server Error" @Router /api/v1/stack [get]
func (*Handler) PreviewStack ¶
func (h *Handler) PreviewStack() http.HandlerFunc
@Summary Preview stack @Description Preview stack information by stack ID @Produce json @Param id path int true "Stack ID" @Success 200 {object} entity.Stack "Success" @Failure 400 {object} errors.DetailError "Bad Request" @Failure 401 {object} errors.DetailError "Unauthorized" @Failure 429 {object} errors.DetailError "Too Many Requests" @Failure 404 {object} errors.DetailError "Not Found" @Failure 500 {object} errors.DetailError "Internal Server Error" @Router /api/v1/stack/{stackID}/preview [post]
func (*Handler) UpdateStack ¶
func (h *Handler) UpdateStack() http.HandlerFunc
@Summary Update stack @Description Update the specified stack @Accept json @Produce json @Param stack body UpdateStackRequest true "Updated stack" @Success 200 {object} entity.Stack "Success" @Failure 400 {object} errors.DetailError "Bad Request" @Failure 401 {object} errors.DetailError "Unauthorized" @Failure 429 {object} errors.DetailError "Too Many Requests" @Failure 404 {object} errors.DetailError "Not Found" @Failure 500 {object} errors.DetailError "Internal Server Error" @Router /api/v1/stack/{stackID} [put]