param

package
v1.8.5 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package param provides CLI commands for Azure App Configuration, exposed as the "suve azure param <op>" command group.

Azure App Configuration is UNVERSIONED — the abstraction's acid test. #, ~, and : are valid key characters (the whole argument is the literal key name, not a version specifier), so nothing is rejected at parse time; "log" reports that version history is unsupported instead of crashing. The group otherwise reuses the generic command scaffolding (show, list, diff, create, update, delete, tag, untag) via App Configuration presenters and the shared internal/usecase/azure use cases.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command() *cli.Command

Command returns the "azure param" subcommand group.

func CreateCommand

func CreateCommand() *cli.Command

CreateCommand returns the Azure App Configuration create command.

func DeleteCommand

func DeleteCommand() *cli.Command

DeleteCommand returns the Azure App Configuration delete command.

func DiffCommand

func DiffCommand() *cli.Command

DiffCommand returns the Azure App Configuration diff command.

func ListCommand

func ListCommand() *cli.Command

ListCommand returns the Azure App Configuration list command.

Unlike the other providers it does NOT use the generic list scaffold: App Configuration keys live in namespaces (the label axis), so by default the listing prepends a NAMESPACE column (#430). The default scope is the null namespace — matching the GUI's default filter — so every row reads "(NULL)" until `--namespace "*"` (or a specific/OR filter) widens it. `--hide-namespace` drops the column and falls back to the neutral key-only listing.

func LogCommand

func LogCommand() *cli.Command

LogCommand returns the Azure App Configuration log command. Because App Configuration is unversioned, running it produces a clear error (it never crashes).

func NewDiffPresenter

func NewDiffPresenter(reader provider.Reader, spec1, spec2 *azureappconfigversion.Spec) genericdiff.Presenter

NewDiffPresenter builds an Azure App Configuration diff presenter over the given reader and specs.

func NewLogPresenter

func NewLogPresenter(reader provider.Reader, req genericlog.Request) genericlog.Presenter

NewLogPresenter builds an Azure App Configuration log presenter over the given reader and request.

func NewShowPresenter

func NewShowPresenter(reader provider.Reader, spec *azureappconfigversion.Spec) genericshow.Presenter

NewShowPresenter builds an Azure App Configuration show presenter over the given reader and spec.

func ShowCommand

func ShowCommand() *cli.Command

ShowCommand returns the Azure App Configuration show command.

func TagCommand

func TagCommand() *cli.Command

TagCommand returns the Azure App Configuration tag command.

func UntagCommand

func UntagCommand() *cli.Command

UntagCommand returns the Azure App Configuration untag command.

func UpdateCommand

func UpdateCommand() *cli.Command

UpdateCommand returns the Azure App Configuration update command.

Types

type CreateOptions

type CreateOptions struct {
	Name  string
	Value string
}

CreateOptions holds the options for the create command.

type CreateRunner

type CreateRunner struct {
	UseCase *azure.CreateUseCase
	Stdout  io.Writer
	Stderr  io.Writer
}

CreateRunner executes the create command.

func (*CreateRunner) Run

func (r *CreateRunner) Run(ctx context.Context, opts CreateOptions) error

Run executes the create command.

type DeleteOptions

type DeleteOptions struct {
	Name string
}

DeleteOptions holds the options for the delete command.

type DeleteRunner

type DeleteRunner struct {
	UseCase *azure.DeleteUseCase
	Stdout  io.Writer
	Stderr  io.Writer
}

DeleteRunner executes the delete command.

func (*DeleteRunner) Run

func (r *DeleteRunner) Run(ctx context.Context, opts DeleteOptions) error

Run executes the delete command.

type ListOptions added in v1.5.2

type ListOptions struct {
	Prefix string
	Filter string
	Show   bool
	HideNS bool
	Output output.Format
	// Namespace is the raw --namespace value (the label axis). It is needed only
	// to tell a single literal namespace (per-key Get can fetch values) from a
	// wildcard/OR/prefix one (it cannot — see runKeyOnly).
	Namespace string
}

ListOptions holds the parsed flags for the App Configuration list command.

type ListRunner added in v1.5.2

type ListRunner struct {
	// Namespace produces per-(key, namespace) rows for the NAMESPACE column. Nil
	// when the resolved store is not Azure App Configuration.
	Namespace *azure.ListNamespacesUseCase
	// KeyOnly produces the neutral, deduped key-only listing (the --hide-namespace
	// fallback), honoring the store's namespace filter via Reader.List.
	KeyOnly *azure.ListUseCase
	Stdout  io.Writer
	Stderr  io.Writer
}

ListRunner renders the Azure App Configuration listing. When Namespace is set (the App Configuration default) it prepends a NAMESPACE column; --hide-namespace — or the absence of the App-Config extension — falls through to KeyOnly, the neutral key-only listing shared with every other provider.

func (*ListRunner) Run added in v1.5.2

func (r *ListRunner) Run(ctx context.Context, opts ListOptions) error

Run executes the listing in the mode selected by opts.

type UpdateOptions

type UpdateOptions struct {
	Name  string
	Value string
}

UpdateOptions holds the options for the update command.

type UpdateRunner

type UpdateRunner struct {
	UseCase *azure.UpdateUseCase
	Stdout  io.Writer
	Stderr  io.Writer
}

UpdateRunner executes the update command.

func (*UpdateRunner) Run

func (r *UpdateRunner) Run(ctx context.Context, opts UpdateOptions) error

Run executes the update command.

Jump to

Keyboard shortcuts

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