context

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2026 License: MPL-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrContextCleanupIndeterminate = errors.New("context cleanup rollback incomplete")
)

Functions

func NewContextCmd

func NewContextCmd(flags *flags.GlobalFlags) *cobra.Command

NewContextCmd returns a new command.

func NewCreateCmd

func NewCreateCmd(flags *flags.GlobalFlags) *cobra.Command

NewCreateCmd creates a new command.

func NewDeleteCmd

func NewDeleteCmd(flags *flags.GlobalFlags) *cobra.Command

NewDeleteCmd creates a new command.

func NewListCmd

func NewListCmd(flags *flags.GlobalFlags) *cobra.Command

NewListCmd creates a new command.

func NewOptionsCmd

func NewOptionsCmd(flags *flags.GlobalFlags) *cobra.Command

NewOptionsCmd creates a new command.

func NewSetOptionsCmd

func NewSetOptionsCmd(flags *flags.GlobalFlags) *cobra.Command

NewSetOptionsCmd creates a new command.

func NewUseCmd

func NewUseCmd(flags *flags.GlobalFlags) *cobra.Command

NewUseCmd creates a new command.

Types

type ContextCleanupError added in v1.20.0

type ContextCleanupError struct {
	Context         string
	Phase           string
	Cause           error
	Rollback        error
	RecoveryPending bool
}

ContextCleanupError reports safe action metadata without backend/parser text, which may include a value. Causes remain available for errors.Is/errors.As.

func (*ContextCleanupError) Error added in v1.20.0

func (e *ContextCleanupError) Error() string

func (*ContextCleanupError) Unwrap added in v1.20.0

func (e *ContextCleanupError) Unwrap() []error

type ContextWithDefault

type ContextWithDefault struct {
	Name string `json:"name,omitempty"`

	Default bool `json:"default,omitempty"`
}

type CreateCmd

type CreateCmd struct {
	*flags.GlobalFlags

	Options []string
}

CreateCmd holds the create cmd flags.

func (*CreateCmd) Run

func (cmd *CreateCmd) Run(ctx context.Context, context string) error

Run runs the command logic.

type DeleteCmd

type DeleteCmd struct {
	*flags.GlobalFlags
}

DeleteCmd holds the delete cmd flags.

func (*DeleteCmd) Run

func (cmd *DeleteCmd) Run(_ context.Context, contextName string) error

Run runs the command logic.

type ListCmd

type ListCmd struct {
	*flags.GlobalFlags
}

ListCmd holds the list cmd flags.

func (*ListCmd) Run

func (cmd *ListCmd) Run(ctx context.Context) error

Run runs the command logic.

type OptionsCmd

type OptionsCmd struct {
	*flags.GlobalFlags
}

OptionsCmd holds the options cmd flags.

func (*OptionsCmd) Run

func (cmd *OptionsCmd) Run(ctx context.Context, args []string) error

Run runs the command logic.

type SetOptionsCmd

type SetOptionsCmd struct {
	*flags.GlobalFlags

	Options []string
}

SetOptionsCmd holds the setOptions cmd flags.

func (*SetOptionsCmd) Run

func (cmd *SetOptionsCmd) Run(ctx context.Context, context string) error

Run runs the command logic.

type UseCmd

type UseCmd struct {
	*flags.GlobalFlags

	Options []string
}

UseCmd holds the use cmd flags.

func (*UseCmd) Run

func (cmd *UseCmd) Run(ctx context.Context, context string) error

Run runs the command logic.

Jump to

Keyboard shortcuts

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