deploy

package
v0.4.7-beta.2 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2025 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     store.RuntimeObj  `json:"runtime" validate:"required"`
	Version     string            `json:"version,omitempty" validate:"omitempty"`
	RunCmd      string            `json:"run_cmd,omitempty" validate:"required_unless=Runtime static docker k3s,omitempty"`
	BuildCmd    string            `json:"build_cmd,omitempty" validate:"omitempty"`
	Port        int               `json:"port,omitempty" validate:"required_unless=Runtime static docker k3s,omitempty,number"`
	WorkingDir  string            `json:"working_dir,omitempty" validate:"omitempty"`
	StaticDir   string            `json:"static_dir,omitempty" validate:"omitempty"`
	Image       string            `json:"image,omitempty" validate:"omitempty"`
	EnvVars     map[string]string `json:"env_vars,omitempty" validate:"omitempty"`
	Secrets     map[string]string `json:"secrets,omitempty" validate:"omitempty"`
	Remote      store.RemoteObj   `json:"remote,omitempty" validate:"omitempty"`
	Domain      string            `json:"domain,omitempty" validate:"omitempty"`
	DNSProvider string            `json:"dns_provider,omitempty" validate:"omitempty"`
}

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
}

type ListDeploymentsResponse

type ListDeploymentsResponse struct {
	Deployments []*store.Deployment `json:"deployments"`
	Total       int                 `json:"total"`
}

Jump to

Keyboard shortcuts

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