project

package
v0.25.1 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetProjectEnvVars

func GetProjectEnvVars(project *Project, params ProjectEnvVarParams, telemetryEnabled bool) map[string]string

func GetProjectHostname

func GetProjectHostname(workspaceId string, projectName string) string

Types

type FileStatus

type FileStatus struct {
	Name     string `json:"name" validate:"required"`
	Extra    string `json:"extra" validate:"required"`
	Staging  Status `json:"staging" validate:"required"`
	Worktree Status `json:"worktree" validate:"required"`

} // @name FileStatus

type GitStatus

type GitStatus struct {
	CurrentBranch string        `json:"currentBranch" validate:"required"`
	Files         []*FileStatus `json:"fileStatus" validate:"required"`

} // @name GitStatus

type Project

type Project struct {
	config.ProjectConfig
	WorkspaceId string        `json:"workspaceId" validate:"required"`
	ApiKey      string        `json:"-"`
	Target      string        `json:"target" validate:"required"`
	State       *ProjectState `json:"state,omitempty" validate:"optional"`

} // @name Project

func (*Project) GetConfigHash

func (p *Project) GetConfigHash() (string, error)

GetConfigHash returns a SHA-256 hash of the project's build configuration, repository URL, and environment variables.

type ProjectEnvVarParams

type ProjectEnvVarParams struct {
	ApiUrl    string
	ServerUrl string
	ClientId  string
}

type ProjectInfo

type ProjectInfo struct {
	Name             string `json:"name" validate:"required"`
	Created          string `json:"created" validate:"required"`
	IsRunning        bool   `json:"isRunning" validate:"required"`
	ProviderMetadata string `json:"providerMetadata,omitempty" validate:"optional"`
	WorkspaceId      string `json:"workspaceId" validate:"required"`

} // @name ProjectInfo

type ProjectState

type ProjectState struct {
	UpdatedAt string     `json:"updatedAt" validate:"required"`
	Uptime    uint64     `json:"uptime" validate:"required"`
	GitStatus *GitStatus `json:"gitStatus" validate:"required"`

} // @name ProjectState

type Status

type Status string // @name Status

Status status code of a file in the Worktree

const (
	Unmodified         Status = "Unmodified"
	Untracked          Status = "Untracked"
	Modified           Status = "Modified"
	Added              Status = "Added"
	Deleted            Status = "Deleted"
	Renamed            Status = "Renamed"
	Copied             Status = "Copied"
	UpdatedButUnmerged Status = "Updated but unmerged"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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