controller

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2022 License: MIT Imports: 28 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	GQL_SOFT_ERROR = "Error fetching build logs"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

func New

func New() *Controller

func (*Controller) AutoImportDotEnv added in v0.3.1

func (c *Controller) AutoImportDotEnv(ctx context.Context) error

func (*Controller) ConfirmBrowserOpen

func (c *Controller) ConfirmBrowserOpen(spinnerMsg string, url string) error

func (*Controller) CreateEnvironment added in v0.2.12

func (c *Controller) CreateEnvironment(ctx context.Context, req *entity.CreateEnvironmentRequest) (*entity.Environment, error)

func (*Controller) CreateEphemeralEnvironment added in v0.2.12

func (c *Controller) CreateEphemeralEnvironment(ctx context.Context, req *entity.CreateEphemeralEnvironmentRequest) (*entity.Environment, error)

func (*Controller) CreatePlugin

func (c *Controller) CreatePlugin(ctx context.Context, req *entity.CreatePluginRequest) (*entity.Plugin, error)

func (*Controller) CreateProject

func (c *Controller) CreateProject(ctx context.Context, req *entity.CreateProjectRequest) (*entity.Project, error)

CreateProject creates a project specified by the project request, error otherwise

func (*Controller) CreateProjectFromTemplate added in v0.1.35

CreateProjectFromTemplate creates a project from template specified by the project request, error otherwise

func (*Controller) DeleteEnvironment added in v0.2.12

func (c *Controller) DeleteEnvironment(ctx context.Context, req *entity.DeleteEnvironmentRequest) error

func (*Controller) DeleteEnvsForEnvPlugin added in v0.2.39

func (c *Controller) DeleteEnvsForEnvPlugin(ctx context.Context, names []string) error

func (*Controller) DeleteProject added in v0.2.44

func (c *Controller) DeleteProject(ctx context.Context, projectID string) error

func (*Controller) DeployEnvironmentTriggers added in v0.2.7

func (c *Controller) DeployEnvironmentTriggers(ctx context.Context) error

func (*Controller) GetActiveBuildLogs added in v0.2.5

func (c *Controller) GetActiveBuildLogs(ctx context.Context, numLines int32) error

func (*Controller) GetActiveDeployment added in v0.2.7

func (c *Controller) GetActiveDeployment(ctx context.Context) (*entity.Deployment, error)

func (*Controller) GetActiveDeploymentLogs added in v0.2.2

func (c *Controller) GetActiveDeploymentLogs(ctx context.Context, numLines int32) error

func (*Controller) GetAvailablePlugins

func (c *Controller) GetAvailablePlugins(ctx context.Context, projectId string) ([]string, error)

func (*Controller) GetCurrentEnvironment added in v0.2.41

func (c *Controller) GetCurrentEnvironment(ctx context.Context) (*entity.Environment, error)

GetCurrentEnvironment returns the currently active environment for the Railway project

func (*Controller) GetDeployments added in v0.2.7

func (c *Controller) GetDeployments(ctx context.Context) ([]*entity.Deployment, error)

func (*Controller) GetEnvironmentByName added in v0.2.41

func (c *Controller) GetEnvironmentByName(ctx context.Context, environmentName string) (*entity.Environment, error)

func (*Controller) GetEnvs

func (c *Controller) GetEnvs(ctx context.Context) (*entity.Envs, error)

func (*Controller) GetEnvsForEnvironment added in v0.2.12

func (c *Controller) GetEnvsForEnvironment(ctx context.Context, req *entity.GetEnvsRequest) (*entity.Envs, error)

func (*Controller) GetFullUrlFromStaticUrl added in v0.2.37

func (c *Controller) GetFullUrlFromStaticUrl(staticUrl string) string

func (*Controller) GetLatestDeploymentForEnvironment added in v0.2.22

func (c *Controller) GetLatestDeploymentForEnvironment(ctx context.Context, projectID string, environmentID string) (*entity.Deployment, error)

GetProjectDeploymentsURL returns the URL to access project deployment in browser

func (*Controller) GetLatestVersion

func (c *Controller) GetLatestVersion() (string, error)

func (*Controller) GetProject

func (c *Controller) GetProject(ctx context.Context, projectId string) (*entity.Project, error)

GetProject returns a project of id projectId, error otherwise

func (*Controller) GetProjectByName added in v0.2.34

func (c *Controller) GetProjectByName(ctx context.Context, projectName string) (*entity.Project, error)

GetProjectByName returns a project for the user of name projectName, error otherwise

func (*Controller) GetProjectConfigs added in v0.2.25

func (c *Controller) GetProjectConfigs(ctx context.Context) (*entity.ProjectConfig, error)

func (*Controller) GetProjectDeploymentsURL added in v0.2.7

func (c *Controller) GetProjectDeploymentsURL(ctx context.Context, projectID string) string

GetProjectDeploymentsURL returns the URL to access project deployment in browser

func (*Controller) GetProjects

func (c *Controller) GetProjects(ctx context.Context) ([]*entity.Project, error)

GetProjects returns all projects associated with the user, error otherwise

func (*Controller) GetStarters added in v0.2.38

func (c *Controller) GetStarters(ctx context.Context) ([]*entity.Starter, error)

GetStarters returns all available starters

func (*Controller) GetUser

func (c *Controller) GetUser(ctx context.Context) (*entity.User, error)

func (*Controller) GetWorkflowStatus added in v0.1.35

func (c *Controller) GetWorkflowStatus(ctx context.Context, workflowID string) (entity.WorkflowStatus, error)

GetWorkflowStatus fetches the status of a workflow based on request, error otherwise

func (*Controller) GetWritableGithubScopes added in v0.1.35

func (c *Controller) GetWritableGithubScopes(ctx context.Context) ([]string, error)

GetWritableGithubScopes creates a project specified by the project request, error otherwise

func (*Controller) IsLoggedIn

func (c *Controller) IsLoggedIn(ctx context.Context) (bool, error)

func (*Controller) Login

func (c *Controller) Login(ctx context.Context, isBrowserless bool) (*entity.User, error)

func (*Controller) Logout

func (c *Controller) Logout(ctx context.Context) error

func (*Controller) OpenProjectDeploymentsInBrowser added in v0.1.35

func (c *Controller) OpenProjectDeploymentsInBrowser(ctx context.Context, projectID string) error

OpenProjectDeploymentsInBrowser opens the provided projectId's depolyments in the browser

func (*Controller) OpenProjectInBrowser

func (c *Controller) OpenProjectInBrowser(ctx context.Context, projectID string, environmentID string) error

OpenProjectInBrowser opens the provided projectId in the browser

func (*Controller) OpenProjectPathInBrowser added in v0.2.22

func (c *Controller) OpenProjectPathInBrowser(ctx context.Context, projectID string, environmentID string, path string) error

OpenProjectPathInBrowser opens the provided projectId with the provided path in the browser

func (*Controller) OpenStaticUrlInBrowser added in v0.2.22

func (c *Controller) OpenStaticUrlInBrowser(staticUrl string) error

func (*Controller) PromptIfProtectedEnvironment added in v0.2.39

func (c *Controller) PromptIfProtectedEnvironment(ctx context.Context) error

func (*Controller) SaveEnvsToFile

func (c *Controller) SaveEnvsToFile(ctx context.Context) error

func (*Controller) SendPanic

func (c *Controller) SendPanic(ctx context.Context, panicErr string, stacktrace string, command string) (bool, error)

func (*Controller) UpdateProject

func (c *Controller) UpdateProject(ctx context.Context, req *entity.UpdateProjectRequest) (*entity.Project, error)

UpdateProject updates a project specified by the project request, error otherwise

func (*Controller) Upload added in v0.2.41

func (*Controller) UpsertEnvsForEnvPlugin added in v0.2.39

func (c *Controller) UpsertEnvsForEnvPlugin(ctx context.Context, envs *entity.Envs) error

type LoginResponse

type LoginResponse struct {
	Status string `json:"status,omitempty"`
	Error  string `json:"error,omitempty"`
}

Jump to

Keyboard shortcuts

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