provider

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: MPL-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 NewGetCmd added in v1.3.1

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

NewGetCmd creates a new command.

func NewInitCmd added in v1.3.1

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

NewInitCmd creates the cobra command for `provider init`.

func NewListCmd

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

NewListCmd 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 NewSetCmd added in v1.3.1

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

NewSetCmd creates a new command.

func NewSetSourceCmd added in v1.3.1

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

NewSetSourceCmd creates a new command.

func NewUseCmd

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

NewUseCmd creates the cobra command for `provider use`.

func NewVersionsCmd added in v1.3.1

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

NewVersionsCmd creates the cobra command for `provider versions`.

func UseProvider added in v1.3.1

func UseProvider(devsyConfig *config.Config, name string) error

UseProvider sets the named provider as the default for the active config context.

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 GetCmd added in v1.3.1

type GetCmd struct {
	*flags.GlobalFlags

	Hidden bool
}

GetCmd holds the get cmd flags.

func (*GetCmd) Run added in v1.3.1

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

Run runs the command logic.

type InitCmd added in v1.3.1

type InitCmd struct {
	*flags.GlobalFlags
	Reset         bool
	SingleMachine bool
	Options       []string
	SkipInit      bool
}

InitCmd holds flags for the `provider init` subcommand.

type ListCmd

type ListCmd struct {
	*flags.GlobalFlags
	Available bool
}

ListCmd holds the list cmd flags.

func (*ListCmd) Run

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

Run runs the command logic.

type ProviderOptionsConfig

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

ProviderOptionsConfig parameterizes ConfigureProvider.

DiscardPriorValues controls whether previously user-provided option values are carried forward as defaults for prompts in the new option resolution. When false (default), values the user set previously seed the new prompts; when true, the user is asked from scratch.

Note: this does NOT control stale-data pruning. The downstream resolver (pkg/options/resolver) always prunes keys absent from the new schema and re-resolves values that fail validation, regardless of this flag.

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 SetCmd added in v1.3.1

type SetCmd struct {
	*flags.GlobalFlags

	Dry      bool
	SkipInit bool

	SingleMachine bool
	Options       []string
}

SetCmd holds the set cmd flags.

func (*SetCmd) Run added in v1.3.1

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

type SetSourceCmd added in v1.3.1

type SetSourceCmd struct {
	*flags.GlobalFlags

	Use     bool
	Version string
	Options []string
}

SetSourceCmd holds the cmd flags.

func (*SetSourceCmd) Run added in v1.3.1

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

type UseCmd

type UseCmd struct {
	*flags.GlobalFlags
}

UseCmd holds the cmd flags.

type VersionsCmd added in v1.3.1

type VersionsCmd struct {
	*flags.GlobalFlags
	JSON              bool
	IncludePrerelease bool
	NoCache           bool
}

VersionsCmd holds the cmd flags for `provider versions`.

Jump to

Keyboard shortcuts

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