codespace

package
v2.0.0-...-98537dd Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: MIT Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEVCONTAINER_PROMPT_DEFAULT = "Default Codespaces configuration"
)

Variables

View Source
var (
	DEFAULT_DEVCONTAINER_DEFINITIONS = []string{".devcontainer.json", ".devcontainer/devcontainer.json"}
)
View Source
var ErrTooManyArgs = errors.New("the command accepts no arguments")

Functions

func NewRootCmd

func NewRootCmd(app *App) *cobra.Command

Types

type App

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

func NewApp

func NewApp(io *iostreams.IOStreams, exe executable, apiClient apiClient, browser browser.Browser) *App

func (*App) Copy

func (a *App) Copy(ctx context.Context, args []string, opts cpOptions) error

Copy copies files between the local and remote file systems. The mechanics are similar to 'ssh' but using 'scp'.

func (*App) Create

func (a *App) Create(ctx context.Context, opts createOptions) error

Create creates a new Codespace

func (*App) Delete

func (a *App) Delete(ctx context.Context, opts deleteOptions) (err error)

func (*App) Edit

func (a *App) Edit(ctx context.Context, opts editOptions) error

Edits a codespace

func (*App) ForwardPorts

func (a *App) ForwardPorts(ctx context.Context, codespaceName string, ports []string) (err error)

func (*App) Jupyter

func (a *App) Jupyter(ctx context.Context, codespaceName string) (err error)

func (*App) List

func (a *App) List(ctx context.Context, opts *listOptions, exporter cmdutil.Exporter) error

func (*App) ListPorts

func (a *App) ListPorts(ctx context.Context, codespaceName string, exporter cmdutil.Exporter) (err error)

ListPorts lists known ports in a codespace.

func (*App) Logs

func (a *App) Logs(ctx context.Context, codespaceName string, follow bool) (err error)

func (*App) Rebuild

func (a *App) Rebuild(ctx context.Context, codespaceName string, full bool) (err error)

func (*App) SSH

func (a *App) SSH(ctx context.Context, sshArgs []string, opts sshOptions) (err error)

SSH opens an ssh session or runs an ssh command in a codespace.

func (*App) Select

func (a *App) Select(ctx context.Context, name string, opts selectOptions) (err error)

Hidden codespace `select` command allows to reuse existing codespace selection dialog by external GH CLI extensions. By default output selected codespace name into `stdout`. Pass `--file`(`-f`) flag along with a file path to output selected codespace name into a file instead.

## Examples

With `stdout` output:

```shell

gh codespace select

```

With `into-a-file` output:

```shell

gh codespace select --file /tmp/selected_codespace.txt

```

func (*App) StartProgressIndicatorWithLabel

func (a *App) StartProgressIndicatorWithLabel(s string)

StartProgressIndicatorWithLabel starts a progress indicator with a message.

func (*App) StopCodespace

func (a *App) StopCodespace(ctx context.Context, opts *stopOptions) error

func (*App) StopProgressIndicator

func (a *App) StopProgressIndicator()

StopProgressIndicator stops the progress indicator.

func (*App) UpdatePortVisibility

func (a *App) UpdatePortVisibility(ctx context.Context, codespaceName string, args []string) (err error)

func (*App) VSCode

func (a *App) VSCode(ctx context.Context, codespaceName string, useInsiders bool, useWeb bool) error

VSCode opens a codespace in the local VS VSCode application.

type ErrUpdatingPortVisibility

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

func (*ErrUpdatingPortVisibility) Error

func (e *ErrUpdatingPortVisibility) Error() string

func (*ErrUpdatingPortVisibility) Unwrap

func (e *ErrUpdatingPortVisibility) Unwrap() error

type NullableDuration

type NullableDuration struct {
	*time.Duration
}

func (*NullableDuration) Minutes

func (d *NullableDuration) Minutes() *int

func (*NullableDuration) Set

func (d *NullableDuration) Set(str string) error

func (*NullableDuration) String

func (d *NullableDuration) String() string

func (*NullableDuration) Type

func (d *NullableDuration) Type() string

Jump to

Keyboard shortcuts

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