Help us shape the future of Go! Take the 2026 Go Developer Survey

provider

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2026 License: MPL-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFlags

func AddFlags(useCmd *cobra.Command, cmd *UseCmd)

func ConfigureProvider

func ConfigureProvider(ctx context.Context, cfg ProviderOptionsConfig) error

func DeleteProvider

func DeleteProvider(
	ctx context.Context,
	devsyConfig *config.Config,
	provider string,
	ignoreNotFound, force bool,
) error

func DeleteProviderConfig

func DeleteProviderConfig(devsyConfig *config.Config, provider string, ignoreNotFound bool) error

func MergeDynamicOptions

func MergeDynamicOptions(
	options map[string]*types.Option,
	dynamicOptions config.OptionDefinitions,
) map[string]*types.Option

MergeDynamicOptions merges the static provider options and dynamic options.

func NewAddCmd

func NewAddCmd(f *flags.GlobalFlags) *cobra.Command

NewAddCmd creates a new command.

func NewDeleteCmd

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

NewDeleteCmd creates a new command.

func NewListAvailableCmd

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

NewListAvailableCmd 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 NewProviderCmd

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

NewProviderCmd returns a new root command.

func NewRenameCmd

func NewRenameCmd(globalFlags *flags.GlobalFlags) *cobra.Command

NewRenameCmd creates a new command for renaming a provider.

func NewSetOptionsCmd

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

NewSetOptionsCmd creates a new command.

func NewUpdateCmd

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

NewUpdateCmd creates a new command.

func NewUseCmd

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

NewUseCmd creates a new command.

Types

type AddCmd

type AddCmd struct {
	*flags.GlobalFlags

	Use           bool
	SingleMachine bool
	Options       []string

	Name         string
	FromExisting string
}

AddCmd holds the cmd flags.

func (*AddCmd) Run

func (cmd *AddCmd) Run(ctx context.Context, devsyConfig *config.Config, args []string) error

type DeleteCmd

type DeleteCmd struct {
	*flags.GlobalFlags

	IgnoreNotFound bool
	Force          bool
}

DeleteCmd holds the delete cmd flags.

func (*DeleteCmd) Run

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

type ListAvailableCmd

type ListAvailableCmd struct {
	*flags.GlobalFlags
}

ListAvailableCmd holds the list cmd flags.

func (*ListAvailableCmd) Run

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

Run runs the command logic.

type ListCmd

type ListCmd struct {
	*flags.GlobalFlags

	Output string
}

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

	Hidden bool
	Output string
}

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 ProviderOptionsConfig

type ProviderOptionsConfig struct {
	Provider       *provider2.ProviderConfig
	Context        string
	UserOptions    []string
	Reconfigure    bool
	SkipRequired   bool
	SkipInit       bool
	SkipSubOptions bool
	SingleMachine  *bool
}

type ProviderWithDefault

type ProviderWithDefault struct {
	workspace.ProviderWithOptions `json:",inline"`

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

type RenameCmd

type RenameCmd struct {
	*flags.GlobalFlags
}

RenameCmd implements the provider rename command.

func (*RenameCmd) Run

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

Run validates inputs, loads config, and executes the provider rename.

type SetOptionsCmd

type SetOptionsCmd struct {
	*flags.GlobalFlags

	Dry bool

	Reconfigure   bool
	SingleMachine bool
	Options       []string
}

SetOptionsCmd holds the use cmd flags.

func (*SetOptionsCmd) Run

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

type UpdateCmd

type UpdateCmd struct {
	*flags.GlobalFlags

	Use     bool
	Options []string
}

UpdateCmd holds the cmd flags.

func (*UpdateCmd) Run

func (cmd *UpdateCmd) Run(ctx context.Context, devsyConfig *config.Config, args []string) error

type UseCmd

type UseCmd struct {
	*flags.GlobalFlags

	Reconfigure   bool
	SingleMachine bool
	Options       []string

	// only for testing
	SkipInit bool
}

UseCmd holds the use cmd flags.

func (*UseCmd) Run

func (cmd *UseCmd) Run(ctx context.Context, providerName 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