cli

package module
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: MIT Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFlags

func AddFlags(cmd HasFlags, cfg any, def any, scope string) error

func FillSecrets

func FillSecrets(ctx context.Context, client SecretClient, out any) error

func GetConfig

func GetConfig(cmd HasFlags, out any) error

func MustFillSecrets

func MustFillSecrets(ctx context.Context, c SecretClient, out any)

func MustGetConfig

func MustGetConfig(cmd HasFlags, out any)

Types

type HasFlags

type HasFlags interface {
	Flags() *pflag.FlagSet
	PersistentFlags() *pflag.FlagSet
}

type SecretClient

type SecretClient interface {
	Secret(context.Context, string, any) (secrets.Handle, error)
}

SecretClient is the pared down subset of a secrets.Client that is used by this package.

Jump to

Keyboard shortcuts

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