tag

package
v1.4.2 Latest Latest
Warning

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

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

Documentation

Overview

Package tag provides the generic tag/untag commands shared by every provider (AWS SSM Parameter Store, AWS Secrets Manager, and future providers).

The command scaffolding (argument validation, tag parsing, provider wiring) lives here and is identical across providers; only the small per-provider Config (help text, resource noun, and provider.Tagger construction) varies.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TagCommand

func TagCommand(cfg Config) *cli.Command

TagCommand returns the generic tag command wired with the provider Config.

func UntagCommand

func UntagCommand(cfg Config) *cli.Command

UntagCommand returns the generic untag command wired with the provider Config.

Types

type Config

type Config struct {
	// Usage is the one-line command usage string.
	Usage string
	// ArgsUsage is the positional-arguments usage string.
	ArgsUsage string
	// Description is the long help text.
	Description string
	// Noun is the resource word used in success messages ("parameter"/"secret").
	Noun string
	// UsageError is the error returned when required arguments are missing.
	UsageError string
	// NewTagger builds the provider's Tagger from the CLI context.
	NewTagger func(ctx context.Context) (provider.Tagger, error)
}

Config holds the provider-specific configuration for the tag/untag commands.

type Runner

type Runner struct {
	Tagger provider.Tagger
	Noun   string
	Stdout io.Writer
}

Runner executes the tag/untag commands over a provider.Tagger.

func (*Runner) RunTag

func (r *Runner) RunTag(ctx context.Context, name string, tags map[string]string) error

RunTag adds or updates the given tags on the named resource.

func (*Runner) RunUntag

func (r *Runner) RunUntag(ctx context.Context, name string, keys []string) error

RunUntag removes the tags with the given keys from the named resource.

Jump to

Keyboard shortcuts

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