Documentation
¶
Index ¶
- Constants
- Variables
- func NewCmdCodespace(f *cmdutil.Factory) *cobra.Command
- type App
- func (a *App) Copy(ctx context.Context, args []string, opts cpOptions) error
- func (a *App) Create(ctx context.Context, opts createOptions) error
- func (a *App) Delete(ctx context.Context, opts deleteOptions) (err error)
- func (a *App) Edit(ctx context.Context, opts editOptions) error
- func (a *App) ForwardPorts(ctx context.Context, selector *CodespaceSelector, ports []string) (err error)
- func (a *App) Jupyter(ctx context.Context, selector *CodespaceSelector) (err error)
- func (a *App) List(ctx context.Context, opts *listOptions, exporter cmdutil.Exporter) error
- func (a *App) ListPorts(ctx context.Context, selector *CodespaceSelector, exporter cmdutil.Exporter) (err error)
- func (a *App) Logs(ctx context.Context, selector *CodespaceSelector, follow bool) (err error)
- func (a *App) Rebuild(ctx context.Context, selector *CodespaceSelector, full bool) (err error)
- func (a *App) RunWithProgress(label string, run func() error) error
- func (a *App) SSH(ctx context.Context, sshArgs []string, opts sshOptions) (err error)
- func (a *App) Select(ctx context.Context, opts selectOptions) (err error)
- func (a *App) StartProgressIndicatorWithLabel(s string)
- func (a *App) StopCodespace(ctx context.Context, opts *stopOptions) error
- func (a *App) StopProgressIndicator()
- func (a *App) UpdatePortVisibility(ctx context.Context, selector *CodespaceSelector, args []string) (err error)
- func (a *App) VSCode(ctx context.Context, selector *CodespaceSelector, useInsiders bool, ...) error
- func (a *App) ViewCodespace(ctx context.Context, opts *viewOptions) error
- type CodespaceSelector
- type NullableDuration
- type Prompter
- type SurveyPrompter
Constants ¶
const (
DEVCONTAINER_PROMPT_DEFAULT = "Default Codespaces configuration"
)
Variables ¶
var (
DEFAULT_DEVCONTAINER_DEFINITIONS = []string{".devcontainer.json", ".devcontainer/devcontainer.json"}
)
var ErrTooManyArgs = errors.New("the command accepts no arguments")
Functions ¶
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func (*App) Copy ¶ added in v2.2.0
Copy copies files between the local and remote file systems. The mechanics are similar to 'ssh' but using 'scp'.
func (*App) ForwardPorts ¶
func (*App) Jupyter ¶ added in v2.10.0
func (a *App) Jupyter(ctx context.Context, selector *CodespaceSelector) (err error)
func (*App) ListPorts ¶
func (a *App) ListPorts(ctx context.Context, selector *CodespaceSelector, exporter cmdutil.Exporter) (err error)
ListPorts lists known ports in a codespace.
func (*App) RunWithProgress ¶ added in v2.24.1
func (*App) Select ¶ added in v2.8.0
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 ¶ added in v2.2.0
StartProgressIndicatorWithLabel starts a progress indicator with a message.
func (*App) StopCodespace ¶
func (*App) StopProgressIndicator ¶ added in v2.2.0
func (a *App) StopProgressIndicator()
StopProgressIndicator stops the progress indicator.
func (*App) UpdatePortVisibility ¶ added in v2.2.0
type CodespaceSelector ¶ added in v2.24.0
type CodespaceSelector struct {
// contains filtered or unexported fields
}
func AddCodespaceSelector ¶ added in v2.24.0
func AddCodespaceSelector(cmd *cobra.Command, api apiClient) *CodespaceSelector
AddCodespaceSelector adds persistent flags for selecting a codespace to the given command and returns a CodespaceSelector which applies them
func (*CodespaceSelector) SelectName ¶ added in v2.24.0
func (cs *CodespaceSelector) SelectName(ctx context.Context) (string, error)
type NullableDuration ¶ added in v2.11.3
func (*NullableDuration) Minutes ¶ added in v2.11.3
func (d *NullableDuration) Minutes() *int
func (*NullableDuration) Set ¶ added in v2.11.3
func (d *NullableDuration) Set(str string) error
func (*NullableDuration) String ¶ added in v2.11.3
func (d *NullableDuration) String() string
func (*NullableDuration) Type ¶ added in v2.11.3
func (d *NullableDuration) Type() string
type SurveyPrompter ¶ added in v2.42.1
type SurveyPrompter interface {
Ask(qs []*survey.Question, response interface{}) error
}