stack

package
v0.13.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 16 Imported by: 1

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(
	stackManager *stackmanager.StackManager,
) (*Handler, error)

func (*Handler) ApplyStack

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

@Id applyStack @Summary Apply stack @Description Apply stack information by stack ID @Tags stack @Produce json @Param stack_id path int true "Stack ID" @Param specID query string false "The Spec ID to use for the apply. Will generate a new spec if omitted." @Param force query bool false "Force the apply even when the stack is locked. May cause concurrency issues!!!" @Param dryrun query bool false "Apply in dry-run mode" @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/stacks/{stack_id}/apply [post]

func (*Handler) CreateStack

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

@Id createStack @Summary Create stack @Description Create a new stack @Tags stack @Accept json @Produce json @Param stack body request.CreateStackRequest true "Created stack" @Param fromTemplate query bool false "Whether to create an AppConfig from template when creating the stack" @Param initTopology query bool false "Whether to initialize an AppTopology from template when creating the stack" @Success 200 {object} entity.Stack "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/stacks [post]

func (*Handler) DeleteStack

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

@Id deleteStack @Summary Delete stack @Description Delete specified stack by ID @Tags stack @Produce json @Param stack_id path int true "Stack 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/stacks/{stack_id} [delete]

func (*Handler) DestroyStack

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

@Id destroyStack @Summary Destroy stack @Description Destroy stack information by stack ID @Tags stack @Produce json @Param stack_id path int true "Stack ID" @Param force query bool false "Force the destroy even when the stack is locked. May cause concurrency issues!!!" @Param dryrun query bool false "Destroy in dry-run mode" @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/stacks/{stack_id}/destroy [post]

func (*Handler) GenerateStack

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

@Id generateStack @Summary Generate stack @Description Generate stack information by stack ID @Tags stack @Produce json @Param stack_id path int true "Stack ID" @Param format query string false "The format to generate the spec in. Choices are: spec. Default to spec." @Param force query bool false "Force the generate even when the stack is locked" @Success 200 {object} v1.Spec "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/stacks/{stack_id}/generate [post]

func (*Handler) GetStack

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

@Id getStack @Summary Get stack @Description Get stack information by stack ID @Tags stack @Produce json @Param stack_id path int true "Stack ID" @Success 200 {object} entity.Stack "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/stacks/{stack_id} [get]

func (*Handler) ListStacks

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

@Id listStack @Summary List stacks @Description List all stacks @Tags stack @Produce json @Param projectID query uint false "ProjectID to filter stacks by. Default to all" @Param orgID query uint false "OrgID to filter stacks by. Default to all" @Param projectName query string false "ProjectName to filter stacks by. Default to all" @Param cloud query string false "Cloud to filter stacks by. Default to all" @Param env query string false "Environment to filter stacks by. Default to all" @Param getLastSyncedBase query bool false "Whether to get last synced base revision. Default to false" @Success 200 {object} []entity.Stack "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/stacks [get]

func (*Handler) PreviewStack

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

@Id previewStack @Summary Preview stack @Description Preview stack information by stack ID @Tags stack @Produce json @Param stack_id path int true "Stack ID" @Param output query string false "Output format. Choices are: json, default. Default to default output format in Kusion." @Param detail query bool false "Show detailed output" @Param specID query string false "The Spec ID to use for the preview. Default to the last one generated." @Param force query bool false "Force the preview even when the stack is locked" @Success 200 {object} models.Changes "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/stacks/{stack_id}/preview [post]

func (*Handler) UpdateStack

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

@Id updateStack @Summary Update stack @Description Update the specified stack @Tags stack @Accept json @Produce json @Param stack_id path int true "Stack ID" @Param stack body request.UpdateStackRequest true "Updated stack" @Success 200 {object} entity.Stack "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/stacks/{stack_id} [put]

type StackRequestParams

type StackRequestParams struct {
	StackID   uint
	Workspace string
	Format    string
	Detail    bool
	Dryrun    bool
}

Jump to

Keyboard shortcuts

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