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

cli

package
v0.0.0-...-162cc33 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse() *kong.Context

Types

type CLI

type CLI struct {
	// Commands
	Dig    DigCmd    `cmd:"" default:"withargs" help:"Dig up a secret (default)."`
	Exists ExistsCmd `cmd:""                    help:"Check if a secret Exists."`
	Creds  CredsCmd  `cmd:""                    help:"Check all configured credentials."`

	Completion kongcompletion.Completion `cmd:"" help:"Generate shell completion scripts."`

	// Configuration for sources
	Config Configurators `embed:""`
	// contains filtered or unexported fields
}

func (*CLI) AfterApply

func (c *CLI) AfterApply() error

func (*CLI) DigUpSecret

func (c *CLI) DigUpSecret(ctx context.Context, coordStr string) (string, error)

func (*CLI) NewSpelunker

func (c *CLI) NewSpelunker(ctx context.Context) (*spelunk.Spelunker, error)

func (*CLI) SetupDefaultLogger

func (l *CLI) SetupDefaultLogger()

type Configurators

type Configurators struct {
	AWS         configurator.AWSConfigurator         `embed:"" group:"AWS Secrets Manager Configuration (https://aws.amazon.com/secrets-manager/):"`
	Azure       configurator.AzureConfigurator       `embed:"" group:"Azure Key Vault Configuration (https://azure.microsoft.com/en-us/products/key-vault/):"`
	GCP         configurator.GCPConfigurator         `embed:"" group:"GCP Secrets Manager Configuration (https://cloud.google.com/security/products/secret-manager):"`
	Vault       configurator.VaultConfigurator       `embed:"" group:"HashiCorp Vault Configuration (https://www.hashicorp.com/en/products/vault):"`
	Kubernetes  configurator.KubernetesConfigurator  `embed:"" group:"Kubernetes Secrets Configuration (https://kubernetes.io/docs/concepts/configuration/secret/):"`
	OnePassword configurator.OnePasswordConfigurator `embed:"" group:"1Password Configuration (https://developer.1password.com/docs/cli/):"`
	Keeper      configurator.KeeperConfigurator      `embed:"" group:"Keeper Configuration (https://docs.keeper.io/en/enterprise-guide/commander-cli):"`
}

Configurators It aggregates all source configurations embedded into the CLI.

func (*Configurators) All

All returns all registered SecretSourceConfigurator instances.

func (*Configurators) SpelunkerOptions

func (c *Configurators) SpelunkerOptions(ctx context.Context) ([]spelunk.SpelunkerOption, error)

SpelunkerOptions returns all SpelunkerOption for all internal.SecretSourceConfigurator detected.

func (*Configurators) VerifyAll

func (c *Configurators) VerifyAll(ctx context.Context) error

VerifyAll checks all registered internal.SecretSourceConfigurator, logging progress and errors, and returns a joined error if any detected credential failed verification.

type CredsCmd

type CredsCmd struct{}

CredsCmd detects and verifies the provided credentials for each known Secret Source.

func (*CredsCmd) Run

func (c *CredsCmd) Run(cli *CLI) error

type DigCmd

type DigCmd struct {
	// contains filtered or unexported fields
}

DigCmd digs up a secret at the given Coordinate.

func (*DigCmd) Run

func (c *DigCmd) Run(cli *CLI) error

type ExistsCmd

type ExistsCmd struct {
	// contains filtered or unexported fields
}

ExistsCmd confirms existence of a secret at the given Coordinate.

func (*ExistsCmd) Run

func (c *ExistsCmd) Run(cli *CLI) error

Jump to

Keyboard shortcuts

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