Documentation
¶
Overview ¶
Copyright © 2025 NAME HERE <EMAIL ADDRESS>
Copyright © 2025 NAME HERE <EMAIL ADDRESS>
Index ¶
- Constants
- func AddCreateCmd(rootCmd *cobra.Command, opts GlobalOptions)
- func AddCreateWorkspaceCmd(create *cobra.Command, opts GlobalOptions)
- func AddDeleteCmd(rootCmd *cobra.Command, opt GlobalOptions)
- func AddDeleteWorkspaceCmd(delete *cobra.Command, opts GlobalOptions)
- func AddExecCmd(rootCmd *cobra.Command, opts GlobalOptions)
- func AddGenerateCmd(rootCmd *cobra.Command, opts GlobalOptions)
- func AddGenerateDockerCmd(generate *cobra.Command, opts *GenerateOpts)
- func AddGenerateImagesCmd(generate *cobra.Command, opts *GenerateOpts)
- func AddGenerateKubernetesCmd(generate *cobra.Command, opts *GenerateOpts)
- func AddGitCmd(rootCmd *cobra.Command, opts GlobalOptions)
- func AddGitPullCmd(git *cobra.Command, opts GlobalOptions)
- func AddGoCmd(rootCmd *cobra.Command)
- func AddLicensesCmd(rootCmd *cobra.Command)
- func AddListCmd(rootCmd *cobra.Command, opts GlobalOptions)
- func AddListPlansCmd(list *cobra.Command, opts GlobalOptions)
- func AddLogCmd(rootCmd *cobra.Command, opts GlobalOptions)
- func AddMonitorCmd(rootCmd *cobra.Command, opts GlobalOptions)
- func AddOpenCmd(rootCmd *cobra.Command, opts GlobalOptions)
- func AddOpenWorkspaceCmd(open *cobra.Command, opts GlobalOptions)
- func AddSetEnvVarCmd(p *cobra.Command, opts GlobalOptions)
- func AddStartCmd(rootCmd *cobra.Command, opts GlobalOptions)
- func AddStartPipelineCmd(start *cobra.Command, opts GlobalOptions)
- func AddUpdateCmd(rootCmd *cobra.Command)
- func AddVersionCmd(rootCmd *cobra.Command)
- func Execute()
- func GetRootCmd() *cobra.Command
- func SelfUpdate() error
- type Browser
- type Client
- type CreateCmd
- type CreateWorkspaceCmd
- type CreateWorkspaceOpts
- type DeleteCmd
- type DeleteWorkspaceCmd
- type DeleteWorkspaceOpts
- type Env
- type ErrResponse
- type ExecCmd
- type ExecOptions
- type GenerateCmd
- type GenerateDockerCmd
- func (c *GenerateDockerCmd) CloneRepository(client Client, fs *cs.FileSystem, git git.Git, clonedir string) error
- func (c *GenerateDockerCmd) GenerateDocker(fs *cs.FileSystem, exp exporter.Exporter, git git.Git, csClient Client) error
- func (c *GenerateDockerCmd) RunE(cc *cobra.Command, args []string) error
- type GenerateDockerOpts
- type GenerateImagesCmd
- type GenerateImagesOpts
- type GenerateKubernetesCmd
- type GenerateKubernetesOpts
- type GenerateOpts
- type GitCmd
- type GitPullCmd
- type GitPullOpts
- type GlobalOptions
- type GoCmd
- type LicensesCmd
- type ListCmd
- type ListPlansCmd
- type ListTeamsCmd
- type ListWorkspacesCmd
- type LogCmd
- type LogCmdScope
- type LogEntry
- type MockBrowser
- type MockBrowser_Expecter
- type MockBrowser_OpenIde_Call
- type MockClient
- func (_mock *MockClient) DeleteWorkspace(wsId int) error
- func (_mock *MockClient) DeployWorkspace(args api.DeployWorkspaceArgs) (*api.Workspace, error)
- func (_m *MockClient) EXPECT() *MockClient_Expecter
- func (_mock *MockClient) ExecCommand(workspaceId int, command string, workdir string, env map[string]string) (string, string, error)
- func (_mock *MockClient) GetPipelineState(wsId int, stage string) ([]api.PipelineStatus, error)
- func (_mock *MockClient) GetWorkspace(workspaceId int) (api.Workspace, error)
- func (_mock *MockClient) GitPull(wsId int, remote string, branch string) error
- func (_mock *MockClient) ListTeams() ([]api.Team, error)
- func (_mock *MockClient) ListWorkspacePlans() ([]api.WorkspacePlan, error)
- func (_mock *MockClient) ListWorkspaces(teamId int) ([]api.Workspace, error)
- func (_mock *MockClient) SetEnvVarOnWorkspace(workspaceId int, vars map[string]string) error
- func (_mock *MockClient) StartPipelineStage(wsId int, profile string, stage string) error
- type MockClient_DeleteWorkspace_Call
- func (_c *MockClient_DeleteWorkspace_Call) Return(err error) *MockClient_DeleteWorkspace_Call
- func (_c *MockClient_DeleteWorkspace_Call) Run(run func(wsId int)) *MockClient_DeleteWorkspace_Call
- func (_c *MockClient_DeleteWorkspace_Call) RunAndReturn(run func(wsId int) error) *MockClient_DeleteWorkspace_Call
- type MockClient_DeployWorkspace_Call
- func (_c *MockClient_DeployWorkspace_Call) Return(v *api.Workspace, err error) *MockClient_DeployWorkspace_Call
- func (_c *MockClient_DeployWorkspace_Call) Run(run func(args api.DeployWorkspaceArgs)) *MockClient_DeployWorkspace_Call
- func (_c *MockClient_DeployWorkspace_Call) RunAndReturn(run func(args api.DeployWorkspaceArgs) (*api.Workspace, error)) *MockClient_DeployWorkspace_Call
- type MockClient_ExecCommand_Call
- type MockClient_Expecter
- func (_e *MockClient_Expecter) DeleteWorkspace(wsId interface{}) *MockClient_DeleteWorkspace_Call
- func (_e *MockClient_Expecter) DeployWorkspace(args interface{}) *MockClient_DeployWorkspace_Call
- func (_e *MockClient_Expecter) ExecCommand(workspaceId interface{}, command interface{}, workdir interface{}, ...) *MockClient_ExecCommand_Call
- func (_e *MockClient_Expecter) GetPipelineState(wsId interface{}, stage interface{}) *MockClient_GetPipelineState_Call
- func (_e *MockClient_Expecter) GetWorkspace(workspaceId interface{}) *MockClient_GetWorkspace_Call
- func (_e *MockClient_Expecter) GitPull(wsId interface{}, remote interface{}, branch interface{}) *MockClient_GitPull_Call
- func (_e *MockClient_Expecter) ListTeams() *MockClient_ListTeams_Call
- func (_e *MockClient_Expecter) ListWorkspacePlans() *MockClient_ListWorkspacePlans_Call
- func (_e *MockClient_Expecter) ListWorkspaces(teamId interface{}) *MockClient_ListWorkspaces_Call
- func (_e *MockClient_Expecter) SetEnvVarOnWorkspace(workspaceId interface{}, vars interface{}) *MockClient_SetEnvVarOnWorkspace_Call
- func (_e *MockClient_Expecter) StartPipelineStage(wsId interface{}, profile interface{}, stage interface{}) *MockClient_StartPipelineStage_Call
- type MockClient_GetPipelineState_Call
- func (_c *MockClient_GetPipelineState_Call) Return(vs []api.PipelineStatus, err error) *MockClient_GetPipelineState_Call
- func (_c *MockClient_GetPipelineState_Call) Run(run func(wsId int, stage string)) *MockClient_GetPipelineState_Call
- func (_c *MockClient_GetPipelineState_Call) RunAndReturn(run func(wsId int, stage string) ([]api.PipelineStatus, error)) *MockClient_GetPipelineState_Call
- type MockClient_GetWorkspace_Call
- func (_c *MockClient_GetWorkspace_Call) Return(v api.Workspace, err error) *MockClient_GetWorkspace_Call
- func (_c *MockClient_GetWorkspace_Call) Run(run func(workspaceId int)) *MockClient_GetWorkspace_Call
- func (_c *MockClient_GetWorkspace_Call) RunAndReturn(run func(workspaceId int) (api.Workspace, error)) *MockClient_GetWorkspace_Call
- type MockClient_GitPull_Call
- func (_c *MockClient_GitPull_Call) Return(err error) *MockClient_GitPull_Call
- func (_c *MockClient_GitPull_Call) Run(run func(wsId int, remote string, branch string)) *MockClient_GitPull_Call
- func (_c *MockClient_GitPull_Call) RunAndReturn(run func(wsId int, remote string, branch string) error) *MockClient_GitPull_Call
- type MockClient_ListTeams_Call
- type MockClient_ListWorkspacePlans_Call
- func (_c *MockClient_ListWorkspacePlans_Call) Return(vs []api.WorkspacePlan, err error) *MockClient_ListWorkspacePlans_Call
- func (_c *MockClient_ListWorkspacePlans_Call) Run(run func()) *MockClient_ListWorkspacePlans_Call
- func (_c *MockClient_ListWorkspacePlans_Call) RunAndReturn(run func() ([]api.WorkspacePlan, error)) *MockClient_ListWorkspacePlans_Call
- type MockClient_ListWorkspaces_Call
- func (_c *MockClient_ListWorkspaces_Call) Return(vs []api.Workspace, err error) *MockClient_ListWorkspaces_Call
- func (_c *MockClient_ListWorkspaces_Call) Run(run func(teamId int)) *MockClient_ListWorkspaces_Call
- func (_c *MockClient_ListWorkspaces_Call) RunAndReturn(run func(teamId int) ([]api.Workspace, error)) *MockClient_ListWorkspaces_Call
- type MockClient_SetEnvVarOnWorkspace_Call
- func (_c *MockClient_SetEnvVarOnWorkspace_Call) Return(err error) *MockClient_SetEnvVarOnWorkspace_Call
- func (_c *MockClient_SetEnvVarOnWorkspace_Call) Run(run func(workspaceId int, vars map[string]string)) *MockClient_SetEnvVarOnWorkspace_Call
- func (_c *MockClient_SetEnvVarOnWorkspace_Call) RunAndReturn(run func(workspaceId int, vars map[string]string) error) *MockClient_SetEnvVarOnWorkspace_Call
- type MockClient_StartPipelineStage_Call
- func (_c *MockClient_StartPipelineStage_Call) Return(err error) *MockClient_StartPipelineStage_Call
- func (_c *MockClient_StartPipelineStage_Call) Run(run func(wsId int, profile string, stage string)) *MockClient_StartPipelineStage_Call
- func (_c *MockClient_StartPipelineStage_Call) RunAndReturn(run func(wsId int, profile string, stage string) error) *MockClient_StartPipelineStage_Call
- type MockEnv
- type MockEnv_Expecter
- type MockEnv_GetApiToken_Call
- type MockEnv_GetApiUrl_Call
- type MockEnv_GetTeamId_Call
- type MockEnv_GetWorkspaceId_Call
- type MockPrompt
- type MockPrompt_Expecter
- type MockPrompt_InputPrompt_Call
- type MonitorCmd
- type MonitorOpts
- type OpenCmd
- type OpenWorkspaceCmd
- type Prompt
- type Proxy
- type SSE
- type SetEnvVarCmd
- type SetEnvVarOptions
- type StartCmd
- type StartPipelineCmd
- type StartPipelineOpts
- type UpdateCmd
- type VersionCmd
Constants ¶
const IdeServer string = "codesphere-ide"
Variables ¶
This section is empty.
Functions ¶
func AddCreateCmd ¶ added in v0.4.0
func AddCreateCmd(rootCmd *cobra.Command, opts GlobalOptions)
func AddCreateWorkspaceCmd ¶ added in v0.4.0
func AddCreateWorkspaceCmd(create *cobra.Command, opts GlobalOptions)
func AddDeleteCmd ¶ added in v0.6.0
func AddDeleteCmd(rootCmd *cobra.Command, opt GlobalOptions)
func AddDeleteWorkspaceCmd ¶ added in v0.6.0
func AddDeleteWorkspaceCmd(delete *cobra.Command, opts GlobalOptions)
func AddExecCmd ¶ added in v0.3.0
func AddExecCmd(rootCmd *cobra.Command, opts GlobalOptions)
func AddGenerateCmd ¶ added in v0.9.0
func AddGenerateCmd(rootCmd *cobra.Command, opts GlobalOptions)
func AddGenerateDockerCmd ¶ added in v0.11.0
func AddGenerateDockerCmd(generate *cobra.Command, opts *GenerateOpts)
func AddGenerateImagesCmd ¶ added in v0.11.0
func AddGenerateImagesCmd(generate *cobra.Command, opts *GenerateOpts)
func AddGenerateKubernetesCmd ¶ added in v0.11.0
func AddGenerateKubernetesCmd(generate *cobra.Command, opts *GenerateOpts)
func AddGitCmd ¶ added in v0.10.0
func AddGitCmd(rootCmd *cobra.Command, opts GlobalOptions)
func AddGitPullCmd ¶ added in v0.10.0
func AddGitPullCmd(git *cobra.Command, opts GlobalOptions)
func AddLicensesCmd ¶
func AddListCmd ¶
func AddListCmd(rootCmd *cobra.Command, opts GlobalOptions)
func AddListPlansCmd ¶ added in v0.4.0
func AddListPlansCmd(list *cobra.Command, opts GlobalOptions)
func AddLogCmd ¶
func AddLogCmd(rootCmd *cobra.Command, opts GlobalOptions)
func AddMonitorCmd ¶ added in v0.9.0
func AddMonitorCmd(rootCmd *cobra.Command, opts GlobalOptions)
func AddOpenCmd ¶ added in v0.3.0
func AddOpenCmd(rootCmd *cobra.Command, opts GlobalOptions)
func AddOpenWorkspaceCmd ¶ added in v0.3.0
func AddOpenWorkspaceCmd(open *cobra.Command, opts GlobalOptions)
func AddSetEnvVarCmd ¶
func AddSetEnvVarCmd(p *cobra.Command, opts GlobalOptions)
func AddStartCmd ¶ added in v0.6.0
func AddStartCmd(rootCmd *cobra.Command, opts GlobalOptions)
func AddStartPipelineCmd ¶ added in v0.6.0
func AddStartPipelineCmd(start *cobra.Command, opts GlobalOptions)
func AddUpdateCmd ¶ added in v0.9.0
func AddVersionCmd ¶
func GetRootCmd ¶
func SelfUpdate ¶ added in v0.9.0
func SelfUpdate() error
Types ¶
type Client ¶
type Client interface { ListTeams() ([]api.Team, error) ListWorkspaces(teamId int) ([]api.Workspace, error) GetWorkspace(workspaceId int) (api.Workspace, error) SetEnvVarOnWorkspace(workspaceId int, vars map[string]string) error ExecCommand(workspaceId int, command string, workdir string, env map[string]string) (string, string, error) ListWorkspacePlans() ([]api.WorkspacePlan, error) DeployWorkspace(args api.DeployWorkspaceArgs) (*api.Workspace, error) DeleteWorkspace(wsId int) error StartPipelineStage(wsId int, profile string, stage string) error GetPipelineState(wsId int, stage string) ([]api.PipelineStatus, error) GitPull(wsId int, remote string, branch string) error }
func NewClient ¶
func NewClient(opts GlobalOptions) (Client, error)
type CreateCmd ¶ added in v0.4.0
type CreateCmd struct {
// contains filtered or unexported fields
}
type CreateWorkspaceCmd ¶ added in v0.4.0
type CreateWorkspaceCmd struct { Opts CreateWorkspaceOpts // contains filtered or unexported fields }
func (*CreateWorkspaceCmd) CreateWorkspace ¶ added in v0.4.0
type CreateWorkspaceOpts ¶ added in v0.4.0
type DeleteCmd ¶ added in v0.6.0
type DeleteCmd struct {
// contains filtered or unexported fields
}
type DeleteWorkspaceCmd ¶ added in v0.6.0
type DeleteWorkspaceCmd struct { Opts DeleteWorkspaceOpts Prompt Prompt // contains filtered or unexported fields }
func (*DeleteWorkspaceCmd) DeleteWorkspace ¶ added in v0.6.0
func (c *DeleteWorkspaceCmd) DeleteWorkspace(client Client, wsId int) error
type DeleteWorkspaceOpts ¶ added in v0.6.0
type DeleteWorkspaceOpts struct { GlobalOptions Confirmed *bool }
type ErrResponse ¶
type ExecCmd ¶ added in v0.3.0
type ExecCmd struct { Opts ExecOptions // contains filtered or unexported fields }
func (*ExecCmd) ExecCommand ¶ added in v0.3.0
type ExecOptions ¶ added in v0.3.0
type ExecOptions struct { GlobalOptions EnvVar *[]string WorkDir *string }
type GenerateCmd ¶ added in v0.9.0
type GenerateCmd struct { Opts *GenerateOpts // contains filtered or unexported fields }
type GenerateDockerCmd ¶ added in v0.11.0
type GenerateDockerCmd struct { Opts *GenerateDockerOpts // contains filtered or unexported fields }
func (*GenerateDockerCmd) CloneRepository ¶ added in v0.11.0
func (c *GenerateDockerCmd) CloneRepository(client Client, fs *cs.FileSystem, git git.Git, clonedir string) error
func (*GenerateDockerCmd) GenerateDocker ¶ added in v0.11.0
func (c *GenerateDockerCmd) GenerateDocker(fs *cs.FileSystem, exp exporter.Exporter, git git.Git, csClient Client) error
type GenerateDockerOpts ¶ added in v0.11.0
type GenerateDockerOpts struct { *GenerateOpts BaseImage string Envs []string }
type GenerateImagesCmd ¶ added in v0.11.0
type GenerateImagesCmd struct { Opts *GenerateImagesOpts // contains filtered or unexported fields }
func (*GenerateImagesCmd) GenerateImages ¶ added in v0.11.0
func (c *GenerateImagesCmd) GenerateImages(fs *cs.FileSystem, exp exporter.Exporter) error
type GenerateImagesOpts ¶ added in v0.11.0
type GenerateImagesOpts struct { *GenerateOpts Registry string ImagePrefix string }
type GenerateKubernetesCmd ¶ added in v0.11.0
type GenerateKubernetesCmd struct { Opts *GenerateKubernetesOpts // contains filtered or unexported fields }
func (*GenerateKubernetesCmd) GenerateKubernetes ¶ added in v0.11.0
func (c *GenerateKubernetesCmd) GenerateKubernetes(fs *cs.FileSystem, exp exporter.Exporter) error
type GenerateKubernetesOpts ¶ added in v0.11.0
type GenerateOpts ¶ added in v0.11.0
type GitPullCmd ¶ added in v0.10.0
type GitPullCmd struct { Opts GitPullOpts // contains filtered or unexported fields }
GitPullCmd represents the pull command
type GitPullOpts ¶ added in v0.10.0
type GitPullOpts struct { GlobalOptions Remote *string Branch *string }
type GlobalOptions ¶
func (GlobalOptions) GetApiUrl ¶
func (o GlobalOptions) GetApiUrl() string
func (GlobalOptions) GetTeamId ¶
func (o GlobalOptions) GetTeamId() (int, error)
func (GlobalOptions) GetWorkspaceId ¶
func (o GlobalOptions) GetWorkspaceId() (int, error)
type LicensesCmd ¶
type LicensesCmd struct {
// contains filtered or unexported fields
}
type ListPlansCmd ¶ added in v0.4.0
type ListPlansCmd struct { Opts GlobalOptions // contains filtered or unexported fields }
type ListTeamsCmd ¶
type ListTeamsCmd struct {
// contains filtered or unexported fields
}
type ListWorkspacesCmd ¶
type ListWorkspacesCmd struct { Opts GlobalOptions // contains filtered or unexported fields }
func (*ListWorkspacesCmd) ListWorkspaces ¶
func (l *ListWorkspacesCmd) ListWorkspaces(client Client) ([]api.Workspace, error)
type LogCmdScope ¶
type LogCmdScope struct {
// contains filtered or unexported fields
}
type MockBrowser ¶ added in v0.3.0
MockBrowser is an autogenerated mock type for the Browser type
func NewMockBrowser ¶ added in v0.3.0
func NewMockBrowser(t interface { mock.TestingT Cleanup(func()) }) *MockBrowser
NewMockBrowser creates a new instance of MockBrowser. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockBrowser) EXPECT ¶ added in v0.3.0
func (_m *MockBrowser) EXPECT() *MockBrowser_Expecter
func (*MockBrowser) OpenIde ¶ added in v0.3.0
func (_mock *MockBrowser) OpenIde(path string) error
OpenIde provides a mock function for the type MockBrowser
type MockBrowser_Expecter ¶ added in v0.3.0
type MockBrowser_Expecter struct {
// contains filtered or unexported fields
}
func (*MockBrowser_Expecter) OpenIde ¶ added in v0.3.0
func (_e *MockBrowser_Expecter) OpenIde(path interface{}) *MockBrowser_OpenIde_Call
OpenIde is a helper method to define mock.On call
- path
type MockBrowser_OpenIde_Call ¶ added in v0.3.0
MockBrowser_OpenIde_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OpenIde'
func (*MockBrowser_OpenIde_Call) Return ¶ added in v0.3.0
func (_c *MockBrowser_OpenIde_Call) Return(err error) *MockBrowser_OpenIde_Call
func (*MockBrowser_OpenIde_Call) Run ¶ added in v0.3.0
func (_c *MockBrowser_OpenIde_Call) Run(run func(path string)) *MockBrowser_OpenIde_Call
func (*MockBrowser_OpenIde_Call) RunAndReturn ¶ added in v0.3.0
func (_c *MockBrowser_OpenIde_Call) RunAndReturn(run func(path string) error) *MockBrowser_OpenIde_Call
type MockClient ¶
MockClient is an autogenerated mock type for the Client type
func NewMockClient ¶
func NewMockClient(t interface { mock.TestingT Cleanup(func()) }) *MockClient
NewMockClient creates a new instance of MockClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockClient) DeleteWorkspace ¶ added in v0.6.0
func (_mock *MockClient) DeleteWorkspace(wsId int) error
DeleteWorkspace provides a mock function for the type MockClient
func (*MockClient) DeployWorkspace ¶ added in v0.4.0
func (_mock *MockClient) DeployWorkspace(args api.DeployWorkspaceArgs) (*api.Workspace, error)
DeployWorkspace provides a mock function for the type MockClient
func (*MockClient) EXPECT ¶
func (_m *MockClient) EXPECT() *MockClient_Expecter
func (*MockClient) ExecCommand ¶ added in v0.3.0
func (_mock *MockClient) ExecCommand(workspaceId int, command string, workdir string, env map[string]string) (string, string, error)
ExecCommand provides a mock function for the type MockClient
func (*MockClient) GetPipelineState ¶ added in v0.6.0
func (_mock *MockClient) GetPipelineState(wsId int, stage string) ([]api.PipelineStatus, error)
GetPipelineState provides a mock function for the type MockClient
func (*MockClient) GetWorkspace ¶ added in v0.3.0
func (_mock *MockClient) GetWorkspace(workspaceId int) (api.Workspace, error)
GetWorkspace provides a mock function for the type MockClient
func (*MockClient) GitPull ¶ added in v0.10.0
func (_mock *MockClient) GitPull(wsId int, remote string, branch string) error
GitPull provides a mock function for the type MockClient
func (*MockClient) ListTeams ¶
func (_mock *MockClient) ListTeams() ([]api.Team, error)
ListTeams provides a mock function for the type MockClient
func (*MockClient) ListWorkspacePlans ¶ added in v0.4.0
func (_mock *MockClient) ListWorkspacePlans() ([]api.WorkspacePlan, error)
ListWorkspacePlans provides a mock function for the type MockClient
func (*MockClient) ListWorkspaces ¶
func (_mock *MockClient) ListWorkspaces(teamId int) ([]api.Workspace, error)
ListWorkspaces provides a mock function for the type MockClient
func (*MockClient) SetEnvVarOnWorkspace ¶
func (_mock *MockClient) SetEnvVarOnWorkspace(workspaceId int, vars map[string]string) error
SetEnvVarOnWorkspace provides a mock function for the type MockClient
func (*MockClient) StartPipelineStage ¶ added in v0.6.0
func (_mock *MockClient) StartPipelineStage(wsId int, profile string, stage string) error
StartPipelineStage provides a mock function for the type MockClient
type MockClient_DeleteWorkspace_Call ¶ added in v0.6.0
MockClient_DeleteWorkspace_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteWorkspace'
func (*MockClient_DeleteWorkspace_Call) Return ¶ added in v0.6.0
func (_c *MockClient_DeleteWorkspace_Call) Return(err error) *MockClient_DeleteWorkspace_Call
func (*MockClient_DeleteWorkspace_Call) Run ¶ added in v0.6.0
func (_c *MockClient_DeleteWorkspace_Call) Run(run func(wsId int)) *MockClient_DeleteWorkspace_Call
func (*MockClient_DeleteWorkspace_Call) RunAndReturn ¶ added in v0.6.0
func (_c *MockClient_DeleteWorkspace_Call) RunAndReturn(run func(wsId int) error) *MockClient_DeleteWorkspace_Call
type MockClient_DeployWorkspace_Call ¶ added in v0.4.0
MockClient_DeployWorkspace_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeployWorkspace'
func (*MockClient_DeployWorkspace_Call) Return ¶ added in v0.4.0
func (_c *MockClient_DeployWorkspace_Call) Return(v *api.Workspace, err error) *MockClient_DeployWorkspace_Call
func (*MockClient_DeployWorkspace_Call) Run ¶ added in v0.4.0
func (_c *MockClient_DeployWorkspace_Call) Run(run func(args api.DeployWorkspaceArgs)) *MockClient_DeployWorkspace_Call
func (*MockClient_DeployWorkspace_Call) RunAndReturn ¶ added in v0.4.0
func (_c *MockClient_DeployWorkspace_Call) RunAndReturn(run func(args api.DeployWorkspaceArgs) (*api.Workspace, error)) *MockClient_DeployWorkspace_Call
type MockClient_ExecCommand_Call ¶ added in v0.3.0
MockClient_ExecCommand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExecCommand'
func (*MockClient_ExecCommand_Call) Return ¶ added in v0.3.0
func (_c *MockClient_ExecCommand_Call) Return(s string, s1 string, err error) *MockClient_ExecCommand_Call
func (*MockClient_ExecCommand_Call) Run ¶ added in v0.3.0
func (_c *MockClient_ExecCommand_Call) Run(run func(workspaceId int, command string, workdir string, env map[string]string)) *MockClient_ExecCommand_Call
func (*MockClient_ExecCommand_Call) RunAndReturn ¶ added in v0.3.0
func (_c *MockClient_ExecCommand_Call) RunAndReturn(run func(workspaceId int, command string, workdir string, env map[string]string) (string, string, error)) *MockClient_ExecCommand_Call
type MockClient_Expecter ¶
type MockClient_Expecter struct {
// contains filtered or unexported fields
}
func (*MockClient_Expecter) DeleteWorkspace ¶ added in v0.6.0
func (_e *MockClient_Expecter) DeleteWorkspace(wsId interface{}) *MockClient_DeleteWorkspace_Call
DeleteWorkspace is a helper method to define mock.On call
- wsId
func (*MockClient_Expecter) DeployWorkspace ¶ added in v0.4.0
func (_e *MockClient_Expecter) DeployWorkspace(args interface{}) *MockClient_DeployWorkspace_Call
DeployWorkspace is a helper method to define mock.On call
- args
func (*MockClient_Expecter) ExecCommand ¶ added in v0.3.0
func (_e *MockClient_Expecter) ExecCommand(workspaceId interface{}, command interface{}, workdir interface{}, env interface{}) *MockClient_ExecCommand_Call
ExecCommand is a helper method to define mock.On call
- workspaceId
- command
- workdir
- env
func (*MockClient_Expecter) GetPipelineState ¶ added in v0.6.0
func (_e *MockClient_Expecter) GetPipelineState(wsId interface{}, stage interface{}) *MockClient_GetPipelineState_Call
GetPipelineState is a helper method to define mock.On call
- wsId
- stage
func (*MockClient_Expecter) GetWorkspace ¶ added in v0.3.0
func (_e *MockClient_Expecter) GetWorkspace(workspaceId interface{}) *MockClient_GetWorkspace_Call
GetWorkspace is a helper method to define mock.On call
- workspaceId
func (*MockClient_Expecter) GitPull ¶ added in v0.10.0
func (_e *MockClient_Expecter) GitPull(wsId interface{}, remote interface{}, branch interface{}) *MockClient_GitPull_Call
GitPull is a helper method to define mock.On call
- wsId
- remote
- branch
func (*MockClient_Expecter) ListTeams ¶
func (_e *MockClient_Expecter) ListTeams() *MockClient_ListTeams_Call
ListTeams is a helper method to define mock.On call
func (*MockClient_Expecter) ListWorkspacePlans ¶ added in v0.4.0
func (_e *MockClient_Expecter) ListWorkspacePlans() *MockClient_ListWorkspacePlans_Call
ListWorkspacePlans is a helper method to define mock.On call
func (*MockClient_Expecter) ListWorkspaces ¶
func (_e *MockClient_Expecter) ListWorkspaces(teamId interface{}) *MockClient_ListWorkspaces_Call
ListWorkspaces is a helper method to define mock.On call
- teamId
func (*MockClient_Expecter) SetEnvVarOnWorkspace ¶
func (_e *MockClient_Expecter) SetEnvVarOnWorkspace(workspaceId interface{}, vars interface{}) *MockClient_SetEnvVarOnWorkspace_Call
SetEnvVarOnWorkspace is a helper method to define mock.On call
- workspaceId
- vars
func (*MockClient_Expecter) StartPipelineStage ¶ added in v0.6.0
func (_e *MockClient_Expecter) StartPipelineStage(wsId interface{}, profile interface{}, stage interface{}) *MockClient_StartPipelineStage_Call
StartPipelineStage is a helper method to define mock.On call
- wsId
- profile
- stage
type MockClient_GetPipelineState_Call ¶ added in v0.6.0
MockClient_GetPipelineState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPipelineState'
func (*MockClient_GetPipelineState_Call) Return ¶ added in v0.6.0
func (_c *MockClient_GetPipelineState_Call) Return(vs []api.PipelineStatus, err error) *MockClient_GetPipelineState_Call
func (*MockClient_GetPipelineState_Call) Run ¶ added in v0.6.0
func (_c *MockClient_GetPipelineState_Call) Run(run func(wsId int, stage string)) *MockClient_GetPipelineState_Call
func (*MockClient_GetPipelineState_Call) RunAndReturn ¶ added in v0.6.0
func (_c *MockClient_GetPipelineState_Call) RunAndReturn(run func(wsId int, stage string) ([]api.PipelineStatus, error)) *MockClient_GetPipelineState_Call
type MockClient_GetWorkspace_Call ¶ added in v0.3.0
MockClient_GetWorkspace_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetWorkspace'
func (*MockClient_GetWorkspace_Call) Return ¶ added in v0.3.0
func (_c *MockClient_GetWorkspace_Call) Return(v api.Workspace, err error) *MockClient_GetWorkspace_Call
func (*MockClient_GetWorkspace_Call) Run ¶ added in v0.3.0
func (_c *MockClient_GetWorkspace_Call) Run(run func(workspaceId int)) *MockClient_GetWorkspace_Call
func (*MockClient_GetWorkspace_Call) RunAndReturn ¶ added in v0.3.0
func (_c *MockClient_GetWorkspace_Call) RunAndReturn(run func(workspaceId int) (api.Workspace, error)) *MockClient_GetWorkspace_Call
type MockClient_GitPull_Call ¶ added in v0.10.0
MockClient_GitPull_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GitPull'
func (*MockClient_GitPull_Call) Return ¶ added in v0.10.0
func (_c *MockClient_GitPull_Call) Return(err error) *MockClient_GitPull_Call
func (*MockClient_GitPull_Call) Run ¶ added in v0.10.0
func (_c *MockClient_GitPull_Call) Run(run func(wsId int, remote string, branch string)) *MockClient_GitPull_Call
func (*MockClient_GitPull_Call) RunAndReturn ¶ added in v0.10.0
func (_c *MockClient_GitPull_Call) RunAndReturn(run func(wsId int, remote string, branch string) error) *MockClient_GitPull_Call
type MockClient_ListTeams_Call ¶
MockClient_ListTeams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListTeams'
func (*MockClient_ListTeams_Call) Return ¶
func (_c *MockClient_ListTeams_Call) Return(vs []api.Team, err error) *MockClient_ListTeams_Call
func (*MockClient_ListTeams_Call) Run ¶
func (_c *MockClient_ListTeams_Call) Run(run func()) *MockClient_ListTeams_Call
func (*MockClient_ListTeams_Call) RunAndReturn ¶
func (_c *MockClient_ListTeams_Call) RunAndReturn(run func() ([]api.Team, error)) *MockClient_ListTeams_Call
type MockClient_ListWorkspacePlans_Call ¶ added in v0.4.0
MockClient_ListWorkspacePlans_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListWorkspacePlans'
func (*MockClient_ListWorkspacePlans_Call) Return ¶ added in v0.4.0
func (_c *MockClient_ListWorkspacePlans_Call) Return(vs []api.WorkspacePlan, err error) *MockClient_ListWorkspacePlans_Call
func (*MockClient_ListWorkspacePlans_Call) Run ¶ added in v0.4.0
func (_c *MockClient_ListWorkspacePlans_Call) Run(run func()) *MockClient_ListWorkspacePlans_Call
func (*MockClient_ListWorkspacePlans_Call) RunAndReturn ¶ added in v0.4.0
func (_c *MockClient_ListWorkspacePlans_Call) RunAndReturn(run func() ([]api.WorkspacePlan, error)) *MockClient_ListWorkspacePlans_Call
type MockClient_ListWorkspaces_Call ¶
MockClient_ListWorkspaces_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListWorkspaces'
func (*MockClient_ListWorkspaces_Call) Return ¶
func (_c *MockClient_ListWorkspaces_Call) Return(vs []api.Workspace, err error) *MockClient_ListWorkspaces_Call
func (*MockClient_ListWorkspaces_Call) Run ¶
func (_c *MockClient_ListWorkspaces_Call) Run(run func(teamId int)) *MockClient_ListWorkspaces_Call
func (*MockClient_ListWorkspaces_Call) RunAndReturn ¶
func (_c *MockClient_ListWorkspaces_Call) RunAndReturn(run func(teamId int) ([]api.Workspace, error)) *MockClient_ListWorkspaces_Call
type MockClient_SetEnvVarOnWorkspace_Call ¶
MockClient_SetEnvVarOnWorkspace_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetEnvVarOnWorkspace'
func (*MockClient_SetEnvVarOnWorkspace_Call) Return ¶
func (_c *MockClient_SetEnvVarOnWorkspace_Call) Return(err error) *MockClient_SetEnvVarOnWorkspace_Call
func (*MockClient_SetEnvVarOnWorkspace_Call) Run ¶
func (_c *MockClient_SetEnvVarOnWorkspace_Call) Run(run func(workspaceId int, vars map[string]string)) *MockClient_SetEnvVarOnWorkspace_Call
func (*MockClient_SetEnvVarOnWorkspace_Call) RunAndReturn ¶
func (_c *MockClient_SetEnvVarOnWorkspace_Call) RunAndReturn(run func(workspaceId int, vars map[string]string) error) *MockClient_SetEnvVarOnWorkspace_Call
type MockClient_StartPipelineStage_Call ¶ added in v0.6.0
MockClient_StartPipelineStage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StartPipelineStage'
func (*MockClient_StartPipelineStage_Call) Return ¶ added in v0.6.0
func (_c *MockClient_StartPipelineStage_Call) Return(err error) *MockClient_StartPipelineStage_Call
func (*MockClient_StartPipelineStage_Call) Run ¶ added in v0.6.0
func (_c *MockClient_StartPipelineStage_Call) Run(run func(wsId int, profile string, stage string)) *MockClient_StartPipelineStage_Call
func (*MockClient_StartPipelineStage_Call) RunAndReturn ¶ added in v0.6.0
func (_c *MockClient_StartPipelineStage_Call) RunAndReturn(run func(wsId int, profile string, stage string) error) *MockClient_StartPipelineStage_Call
type MockEnv ¶
MockEnv is an autogenerated mock type for the Env type
func NewMockEnv ¶
NewMockEnv creates a new instance of MockEnv. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockEnv) EXPECT ¶
func (_m *MockEnv) EXPECT() *MockEnv_Expecter
func (*MockEnv) GetApiToken ¶
GetApiToken provides a mock function for the type MockEnv
func (*MockEnv) GetWorkspaceId ¶
GetWorkspaceId provides a mock function for the type MockEnv
type MockEnv_Expecter ¶
type MockEnv_Expecter struct {
// contains filtered or unexported fields
}
func (*MockEnv_Expecter) GetApiToken ¶
func (_e *MockEnv_Expecter) GetApiToken() *MockEnv_GetApiToken_Call
GetApiToken is a helper method to define mock.On call
func (*MockEnv_Expecter) GetApiUrl ¶
func (_e *MockEnv_Expecter) GetApiUrl() *MockEnv_GetApiUrl_Call
GetApiUrl is a helper method to define mock.On call
func (*MockEnv_Expecter) GetTeamId ¶
func (_e *MockEnv_Expecter) GetTeamId() *MockEnv_GetTeamId_Call
GetTeamId is a helper method to define mock.On call
func (*MockEnv_Expecter) GetWorkspaceId ¶
func (_e *MockEnv_Expecter) GetWorkspaceId() *MockEnv_GetWorkspaceId_Call
GetWorkspaceId is a helper method to define mock.On call
type MockEnv_GetApiToken_Call ¶
MockEnv_GetApiToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetApiToken'
func (*MockEnv_GetApiToken_Call) Return ¶
func (_c *MockEnv_GetApiToken_Call) Return(s string, err error) *MockEnv_GetApiToken_Call
func (*MockEnv_GetApiToken_Call) Run ¶
func (_c *MockEnv_GetApiToken_Call) Run(run func()) *MockEnv_GetApiToken_Call
func (*MockEnv_GetApiToken_Call) RunAndReturn ¶
func (_c *MockEnv_GetApiToken_Call) RunAndReturn(run func() (string, error)) *MockEnv_GetApiToken_Call
type MockEnv_GetApiUrl_Call ¶
MockEnv_GetApiUrl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetApiUrl'
func (*MockEnv_GetApiUrl_Call) Return ¶
func (_c *MockEnv_GetApiUrl_Call) Return(s string) *MockEnv_GetApiUrl_Call
func (*MockEnv_GetApiUrl_Call) Run ¶
func (_c *MockEnv_GetApiUrl_Call) Run(run func()) *MockEnv_GetApiUrl_Call
func (*MockEnv_GetApiUrl_Call) RunAndReturn ¶
func (_c *MockEnv_GetApiUrl_Call) RunAndReturn(run func() string) *MockEnv_GetApiUrl_Call
type MockEnv_GetTeamId_Call ¶
MockEnv_GetTeamId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTeamId'
func (*MockEnv_GetTeamId_Call) Return ¶
func (_c *MockEnv_GetTeamId_Call) Return(n int, err error) *MockEnv_GetTeamId_Call
func (*MockEnv_GetTeamId_Call) Run ¶
func (_c *MockEnv_GetTeamId_Call) Run(run func()) *MockEnv_GetTeamId_Call
func (*MockEnv_GetTeamId_Call) RunAndReturn ¶
func (_c *MockEnv_GetTeamId_Call) RunAndReturn(run func() (int, error)) *MockEnv_GetTeamId_Call
type MockEnv_GetWorkspaceId_Call ¶
MockEnv_GetWorkspaceId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetWorkspaceId'
func (*MockEnv_GetWorkspaceId_Call) Return ¶
func (_c *MockEnv_GetWorkspaceId_Call) Return(n int, err error) *MockEnv_GetWorkspaceId_Call
func (*MockEnv_GetWorkspaceId_Call) Run ¶
func (_c *MockEnv_GetWorkspaceId_Call) Run(run func()) *MockEnv_GetWorkspaceId_Call
func (*MockEnv_GetWorkspaceId_Call) RunAndReturn ¶
func (_c *MockEnv_GetWorkspaceId_Call) RunAndReturn(run func() (int, error)) *MockEnv_GetWorkspaceId_Call
type MockPrompt ¶ added in v0.6.0
MockPrompt is an autogenerated mock type for the Prompt type
func NewMockPrompt ¶ added in v0.6.0
func NewMockPrompt(t interface { mock.TestingT Cleanup(func()) }) *MockPrompt
NewMockPrompt creates a new instance of MockPrompt. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockPrompt) EXPECT ¶ added in v0.6.0
func (_m *MockPrompt) EXPECT() *MockPrompt_Expecter
func (*MockPrompt) InputPrompt ¶ added in v0.6.0
func (_mock *MockPrompt) InputPrompt(prompt string) string
InputPrompt provides a mock function for the type MockPrompt
type MockPrompt_Expecter ¶ added in v0.6.0
type MockPrompt_Expecter struct {
// contains filtered or unexported fields
}
func (*MockPrompt_Expecter) InputPrompt ¶ added in v0.6.0
func (_e *MockPrompt_Expecter) InputPrompt(prompt interface{}) *MockPrompt_InputPrompt_Call
InputPrompt is a helper method to define mock.On call
- prompt
type MockPrompt_InputPrompt_Call ¶ added in v0.6.0
MockPrompt_InputPrompt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InputPrompt'
func (*MockPrompt_InputPrompt_Call) Return ¶ added in v0.6.0
func (_c *MockPrompt_InputPrompt_Call) Return(s string) *MockPrompt_InputPrompt_Call
func (*MockPrompt_InputPrompt_Call) Run ¶ added in v0.6.0
func (_c *MockPrompt_InputPrompt_Call) Run(run func(prompt string)) *MockPrompt_InputPrompt_Call
func (*MockPrompt_InputPrompt_Call) RunAndReturn ¶ added in v0.6.0
func (_c *MockPrompt_InputPrompt_Call) RunAndReturn(run func(prompt string) string) *MockPrompt_InputPrompt_Call
type MonitorCmd ¶ added in v0.9.0
type MonitorCmd struct { Cmd *cobra.Command Opts MonitorOpts Time api.Time Http csio.HttpServer Exec csio.Exec }
func (*MonitorCmd) NewProxy ¶ added in v0.9.0
func (c *MonitorCmd) NewProxy() (*Proxy, error)
NewProxy creates and returns a new Proxy instance.
func (*MonitorCmd) RunCommandWithHealthcheck ¶ added in v0.9.0
func (c *MonitorCmd) RunCommandWithHealthcheck(ctx context.Context, cmdArgs []string) error
RunCommandWithMetrics continuously runs the given command, streams its output, and reports Prometheus metrics. It implements a restart delay of 5 seconds if a non-zero exit code occurs within 1 second of the command starting. The metrics will be served on the specified listenAddr.
type MonitorOpts ¶ added in v0.9.0
type OpenWorkspaceCmd ¶ added in v0.3.0
type OpenWorkspaceCmd struct { Opts GlobalOptions // contains filtered or unexported fields }
func (*OpenWorkspaceCmd) OpenWorkspace ¶ added in v0.3.0
func (cmd *OpenWorkspaceCmd) OpenWorkspace(browser Browser, client Client, wsId int) error
type Proxy ¶ added in v0.9.0
type Proxy struct {
// contains filtered or unexported fields
}
Proxy represents our HTTP proxy server with a fixed target URL.
type SetEnvVarCmd ¶
type SetEnvVarCmd struct { Opts SetEnvVarOptions // contains filtered or unexported fields }
func (*SetEnvVarCmd) RunE ¶
func (l *SetEnvVarCmd) RunE(_ *cobra.Command, args []string) (err error)
func (*SetEnvVarCmd) SetEnvironmentVariables ¶
func (l *SetEnvVarCmd) SetEnvironmentVariables(client Client) (err error)
type SetEnvVarOptions ¶
type SetEnvVarOptions struct { GlobalOptions EnvVar *[]string }
type StartPipelineCmd ¶ added in v0.6.0
type StartPipelineCmd struct { Opts StartPipelineOpts Time api.Time // contains filtered or unexported fields }
func (*StartPipelineCmd) RunE ¶ added in v0.6.0
func (c *StartPipelineCmd) RunE(_ *cobra.Command, args []string) error
func (*StartPipelineCmd) StartPipelineStages ¶ added in v0.6.0
func (c *StartPipelineCmd) StartPipelineStages(client Client, wsId int, stages []string) error
type StartPipelineOpts ¶ added in v0.6.0
type StartPipelineOpts struct { GlobalOptions Profile *string Timeout *time.Duration }
type UpdateCmd ¶ added in v0.9.0
type UpdateCmd struct {
// contains filtered or unexported fields
}
type VersionCmd ¶
type VersionCmd struct {
// contains filtered or unexported fields
}
Source Files
¶
- client.go
- create.go
- create_workspace.go
- delete.go
- delete_workspace.go
- exec.go
- generate.go
- generate_docker.go
- generate_images.go
- generate_kubernetes.go
- git.go
- git_pull.go
- go.go
- licenses.go
- list.go
- list_plans.go
- list_teams.go
- list_workspaces.go
- log.go
- mocks.go
- monitor.go
- open.go
- open_workspace.go
- root.go
- set_env_vars.go
- start.go
- start_pipeline.go
- update.go
- version.go