deploy

package
v0.4.13-beta.22 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package deploy defines core deployment types, handlers, and orchestration interfaces used by the daemon for managing application deployments. High-level deployment workflows, lifecycle management, and integration logic are implemented in the internal/deploy package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeployRequest

type DeployRequest struct {
	Name        string          `json:"name" validate:"required"`
	Description string          `json:"description,omitempty"`
	UserId      string          `json:"user_id" validate:"required"`
	Source      string          `json:"source" validate:"required,oneof=remote image"`
	Runtime     string          `json:"runtime" validate:"required,oneof=static golang php python nodejs ruby dotnet java docker k3s custom"`
	Version     string          `json:"version,omitempty"`
	RunCmd      string          `json:"run_cmd,omitempty"`
	BuildCmd    string          `json:"build_cmd,omitempty"`
	Port        int             `json:"port,omitempty"`
	WorkingDir  string          `json:"working_dir,omitempty"`
	StaticDir   string          `json:"static_dir,omitempty"`
	Image       string          `json:"image,omitempty"`
	EnvVars     map[string]any  `json:"env_vars,omitempty"`
	Secrets     map[string]any  `json:"secrets,omitempty"`
	Remote      store.RemoteObj `json:"remote,omitempty"`
	Domain      string          `json:"domain,omitempty"`
}

func (*DeployRequest) GetRuntimeObj added in v0.4.11

func (dr *DeployRequest) GetRuntimeObj() store.RuntimeObj

type DeployResponse

type DeployResponse struct {
	Success   bool      `json:"success"`
	ID        string    `json:"id,omitempty"`
	Name      string    `json:"name,omitempty"`
	CreatedAt time.Time `json:"created_at,omitempty"`
}

type Deployer

type Deployer struct {
	// contains filtered or unexported fields
}

type DeploymentHandler

type DeploymentHandler struct {
	// contains filtered or unexported fields
}

func NewDeploymentHandler

func NewDeploymentHandler(deployer *Deployer, logger *shared.Logger) *DeploymentHandler

func (*DeploymentHandler) CreateDeployment

func (h *DeploymentHandler) CreateDeployment(w http.ResponseWriter, r *http.Request)

func (*DeploymentHandler) ListDeployments

func (h *DeploymentHandler) ListDeployments(w http.ResponseWriter, r *http.Request)

type HandleDeployment

type HandleDeployment interface {
	Deploy(ctx context.Context, req *DeployRequest) (*DeployResponse, error)
	GetDeployment(ctx context.Context, id string) (*store.Deployment, error)
	ListDeployments(ctx context.Context, id string, limit, offset int) ([]*store.Deployment, error)
	UpdateDeploymentStatus(ctx context.Context, id string, status store.Status) error
}

Jump to

Keyboard shortcuts

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