deployment

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppSources

type AppSources struct {
	AppId    string         `json:"appId"`
	Artifact build.Artifact `json:"artifact,omitempty"`
	BuildId  string         `json:"buildId,omitempty"`
}

type Deployment

type Deployment struct {
	ID           string                       `json:"id"`
	Name         string                       `json:"name"`
	Description  string                       `json:"description"`
	Organization common.OrganizationReference `json:"organization"`
	Apps         []DeploymentApp              `json:"apps"`
}

type DeploymentApp

type DeploymentApp struct {
	Project            common.ProjectReference `json:"project"`
	App                common.AppReference     `json:"app"`
	DeploymentSettings DeploymentAppSettings   `json:"deploymentSettings"`
}

type DeploymentAppSettings

type DeploymentAppSettings struct {
	ProjectEnvironment common.ProjectEnvironmentReference `json:"projectEnvironment"`
	Scale              string                             `json:"scale"`
	Hostname           string                             `json:"hostname"`
	Availability       string                             `json:"availability"`
	Path               string                             `json:"path"`
}

type DeploymentRun

type DeploymentRun struct {
	ID                 string                       `json:"id"`
	Status             string                       `json:"status"`
	DeploymentId       string                       `json:"deploymentId"`
	DeploymentSnapshot Deployment                   `json:"deploymentSnapshot"`
	Organization       common.OrganizationReference `json:"organization"`
	Pipeline           Pipeline                     `json:"pipeline"`
}

type DeploymentService

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

func NewService

func NewService() *DeploymentService

func (*DeploymentService) CreateRun

func (ds *DeploymentService) CreateRun(organizationId, deploymentId string, appSources []AppSources) (*DeploymentRun, error)

func (*DeploymentService) GetDeploymentRun

func (ds *DeploymentService) GetDeploymentRun(organizationId, deploymentId, runId string) (*DeploymentRun, error)

func (*DeploymentService) SearchDeployments

func (ds *DeploymentService) SearchDeployments(organizationId, nameOrId string, pageSize, pageNum int) ([]Deployment, error)

type IDeploymentService

type IDeploymentService interface {
	// contains filtered or unexported methods
}

type LogMessageData

type LogMessageData struct {
	Level        string   `json:"level"`
	Message      string   `json:"message"`
	RunId        string   `json:"runId"`
	Timestamp    int64    `json:"timestamp"`
	Id           string   `json:"id"`
	Parents      []string `json:"parents"`
	Organization struct {
		Id   string `json:"id"`
		Name string `json:"name"`
	} `json:"organization"`
}

Define the first data type (current structure)

type Pipeline

type Pipeline struct {
	Steps []Step `json:"steps"`
}

type RunMessageData

type RunMessageData struct {
	Type   string `json:"type"`
	RunId  string `json:"RunId"`
	Id     string `json:"id"`
	Status string `json:"status"`
}

Define the second data type (new structure)

type StatusModel

type StatusModel struct {
	Pipeline       Pipeline
	OrganizationId string
	DeploymentId   string
	RunId          string
	Service        DeploymentService
	AppUrl         string
}

func (StatusModel) Init

func (m StatusModel) Init() tea.Cmd

func (StatusModel) RenderTree

func (m StatusModel) RenderTree(pipeLine Pipeline) string

func (StatusModel) Update

func (m StatusModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (StatusModel) UpdateStatusForId

func (m StatusModel) UpdateStatusForId(id string, status string)

func (StatusModel) View

func (m StatusModel) View() string

type Step

type Step struct {
	ID            string `json:"id"`
	Status        string `json:"status"`
	Type          string `json:"type"`
	Name          string `json:"name"`
	ParallelSteps []Step `json:"parallelSteps,omitempty"`
	Tasks         []Task `json:"tasks,omitempty"`
}

type Task

type Task struct {
	ID     string `json:"id"`
	Status string `json:"status"`
	Type   string `json:"type"`
}

type WebSocketMessage

type WebSocketMessage struct {
	EventStreamTopic string          `json:"eventStreamTopic"`
	OrganizationId   string          `json:"organizationId"`
	Data             json.RawMessage `json:"data"`
}

Jump to

Keyboard shortcuts

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