entity

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2023 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const (
	STATUS_BUILDING  = "BUILDING"
	STATUS_DEPLOYING = "DEPLOYING"
	STATUS_SUCCESS   = "SUCCESS"
	STATUS_REMOVED   = "REMOVED"
	STATUS_FAILED    = "FAILED"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CobraFunction

type CobraFunction func(cmd *cobra.Command, args []string) error

type CommandRequest

type CommandRequest struct {
	Cmd  *cobra.Command
	Args []string
}

type CreateEnvironmentRequest

type CreateEnvironmentRequest struct {
	Name      string `json:"name,omitempty"`
	ProjectID string `json:"projectId,omitempty"`
}

type CreateEphemeralEnvironmentRequest

type CreateEphemeralEnvironmentRequest struct {
	Name              string `json:"name,omitempty"`
	ProjectID         string `json:"projectId,omitempty"`
	BaseEnvironmentID string `json:"baseEnvironmentId"`
}

type CreatePluginRequest

type CreatePluginRequest struct {
	ProjectID string
	Plugin    string
}

type CreateProjectFromTemplateRequest

type CreateProjectFromTemplateRequest struct {
	Name      string            // Required
	Owner     string            // Required
	Template  string            // Required
	IsPrivate bool              // Optional
	Plugins   []string          // Optional
	Variables map[string]string // Optional
}

type CreateProjectFromTemplateResult

type CreateProjectFromTemplateResult struct {
	WorkflowID string
	ProjectID  string
}

type CreateProjectRequest

type CreateProjectRequest struct {
	Name        *string  // Optional
	Description *string  // Optional
	Plugins     []string // Optional
}

type DeleteEnvironmentRequest

type DeleteEnvironmentRequest struct {
	EnvironmentId string `json:"environmentId,omitempty"`
	ProjectID     string `json:"projectId,omitempty"`
}

type DeleteVariableRequest

type DeleteVariableRequest struct {
	ProjectID     string
	EnvironmentID string
	PluginID      string
	ServiceID     string
	Name          string
}

type DeployEnvironmentTriggersRequest

type DeployEnvironmentTriggersRequest struct {
	ProjectID     string
	EnvironmentID string
	ServiceID     string
}

type Deployment

type Deployment struct {
	ID         string          `json:"id"`
	ProjectID  string          `json:"projectId"`
	BuildLogs  string          `json:"buildLogs"`
	DeployLogs string          `json:"deployLogs"`
	Status     string          `json:"status"`
	StaticUrl  string          `json:"staticUrl"`
	Meta       *DeploymentMeta `json:"meta"`
}

type DeploymentByIDRequest

type DeploymentByIDRequest struct {
	ProjectID    string `json:"projectId"`
	DeploymentID string `json:"deploymentId"`
	GQL          DeploymentGQL
}

type DeploymentGQL

type DeploymentGQL struct {
	ID         bool `json:"id"`
	BuildLogs  bool `json:"buildLogs"`
	DeployLogs bool `json:"deployLogs"`
	Status     bool `json:"status"`
}

type DeploymentLogsRequest

type DeploymentLogsRequest struct {
	ProjectID    string `json:"projectId"`
	DeploymentID string `json:"deploymentId"`
	NumLines     int32  `json:"numLines"`
}

type DeploymentMeta

type DeploymentMeta struct {
	Repo          string `json:"repo"`
	Branch        string `json:"branch"`
	CommitHash    string `json:"commitHash"`
	CommitMessage string `json:"commitMessage"`
}

type DownRequest

type DownRequest struct {
	ProjectID     string
	EnvironmentID string
}

type Environment

type Environment struct {
	Id   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

type Envs

type Envs map[string]string

func (Envs) Delete

func (e Envs) Delete(name string)

func (Envs) Get

func (e Envs) Get(name string) string

func (Envs) Has

func (e Envs) Has(name string) bool

func (Envs) Set

func (e Envs) Set(name, value string)

type GetEnvsForPluginRequest

type GetEnvsForPluginRequest struct {
	ProjectID     string
	EnvironmentID string
	PluginID      string
}

type GetEnvsRequest

type GetEnvsRequest struct {
	ProjectID     string
	EnvironmentID string
	ServiceID     string
}

type HandlerFunction

type HandlerFunction func(context.Context, *CommandRequest) error

type PanicFunction

type PanicFunction func(context.Context, string, string, string, []string) error

type PanicRequest

type PanicRequest struct {
	Command       string
	PanicError    string
	Stacktrace    string
	ProjectID     string
	EnvironmentID string
	Version       string
}

type Plugin

type Plugin struct {
	ID   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

type PluginList

type PluginList struct {
	Plugins []*Plugin `json:"plugins,omitempty"`
}

type Project

type Project struct {
	Id           string         `json:"id,omitempty"`
	Name         string         `json:"name,omitempty"`
	UpdatedAt    string         `json:"updatedAt,omitempty"`
	Environments []*Environment `json:"environments,omitempty"`
	Plugins      []*Plugin      `json:"plugins,omitempty"`
	Team         *string        `json:"team,omitempty"`
	Services     []*Service     `json:"services,omitempty"`
}

type ProjectConfig

type ProjectConfig struct {
	ProjectPath     string          `json:"projectPath,omitempty"`
	Project         string          `json:"project,omitempty"`
	Environment     string          `json:"environment,omitempty"`
	LockedEnvsNames map[string]bool `json:"lockedEnvsNames,omitempty"`
}

type ProjectToken

type ProjectToken struct {
	ProjectId     string `json:"projectId"`
	EnvironmentId string `json:"environmentId"`
}

type RootConfig

type RootConfig struct {
	User     UserConfig               `json:"user"`
	Projects map[string]ProjectConfig `json:"projects"`
}

type Service

type Service struct {
	ID   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

type Starter

type Starter struct {
	Title  string `json:"title"`
	Url    string `json:"url"`
	Source string `json:"source"`
}

type StarterEnvVar

type StarterEnvVar struct {
	Name     string
	Desc     string
	Default  string
	Optional bool
}

type UpErrorResponse

type UpErrorResponse struct {
	Message   string `json:"message"`
	RequestID string `json:"reqId"`
}

type UpRequest

type UpRequest struct {
	Data          bytes.Buffer
	ProjectID     string
	EnvironmentID string
	ServiceID     string
}

type UpResponse

type UpResponse struct {
	URL              string
	DeploymentDomain string
}

type UpdateEnvsRequest

type UpdateEnvsRequest struct {
	ProjectID     string
	EnvironmentID string
	PluginID      string
	ServiceID     string
	Envs          *Envs
	Replace       bool
}

type UpdateProjectRequest

type UpdateProjectRequest struct {
	Id          string  // Required
	Name        *string // Optional
	Description *string // Optional
}

type UploadRequest

type UploadRequest struct {
	ProjectID     string
	EnvironmentID string
	ServiceID     string
	RootDir       string
}

type User

type User struct {
	Id     string `json:"id,omitempty"`
	Name   string `json:"name,omitempty"`
	Email  string `json:"email,omitempty"`
	Has2FA bool
}

type UserConfig

type UserConfig struct {
	Token string `json:"token"`
}

type WorkflowStatus

type WorkflowStatus string
var (
	WorkflowRunning  WorkflowStatus = "Running"
	WorkflowComplete WorkflowStatus = "Complete"
	WorkflowError    WorkflowStatus = "Error"
)

func (WorkflowStatus) IsComplete

func (s WorkflowStatus) IsComplete() bool

func (WorkflowStatus) IsError

func (s WorkflowStatus) IsError() bool

func (WorkflowStatus) IsRunning

func (s WorkflowStatus) IsRunning() bool

type WorkflowStatusResponse

type WorkflowStatusResponse struct {
	Status WorkflowStatus `json:"status"`
}

Jump to

Keyboard shortcuts

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