cli

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2025 License: Apache-2.0 Imports: 25 Imported by: 46

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCommand added in v0.2.71

func AddCommand(mainCMD *cobra.Command, v *viper.Viper, schema *field.Configuration, subCMD *cobra.Command) (*cobra.Command, error)

func AdditionalCommands added in v0.2.0

func AdditionalCommands(_ string, _ []field.SchemaField) []*cobra.Command

func MakeCapabilitiesCommand added in v0.2.0

func MakeCapabilitiesCommand[T field.Configurable](
	ctx context.Context,
	name string,
	v *viper.Viper,
	confschema field.Configuration,
	getconnector GetConnectorFunc[T],
) func(*cobra.Command, []string) error

func MakeConfigSchemaCommand added in v0.2.68

func MakeConfigSchemaCommand[T field.Configurable](
	ctx context.Context,
	name string,
	v *viper.Viper,
	confschema field.Configuration,
	getconnector GetConnectorFunc[T],
) func(*cobra.Command, []string) error

func MakeGRPCServerCommand added in v0.2.0

func MakeGRPCServerCommand[T field.Configurable](
	ctx context.Context,
	name string,
	v *viper.Viper,
	confschema field.Configuration,
	getconnector GetConnectorFunc[T],
) func(*cobra.Command, []string) error

func MakeGenericConfiguration added in v0.2.71

func MakeGenericConfiguration[T field.Configurable](v *viper.Viper) (T, error)

func MakeMainCommand added in v0.2.0

func MakeMainCommand[T field.Configurable](
	ctx context.Context,
	name string,
	v *viper.Viper,
	confschema field.Configuration,
	getconnector GetConnectorFunc[T],
	opts ...connectorrunner.Option,
) func(*cobra.Command, []string) error

func OptionallyAddLambdaCommand added in v0.2.71

func OptionallyAddLambdaCommand[T field.Configurable](
	ctx context.Context,
	name string,
	v *viper.Viper,
	getconnector GetConnectorFunc[T],
	connectorSchema field.Configuration,
	mainCmd *cobra.Command,
) error

func SetFlagsAndConstraints added in v0.2.71

func SetFlagsAndConstraints(command *cobra.Command, schema field.Configuration) error

func VisitFlags added in v0.2.71

func VisitFlags(cmd *cobra.Command, v *viper.Viper)

NOTE(shackra): Set all values from Viper to the flags so... that Cobra won't complain that a flag is missing in case we... pass values through environment variables.

Types

type ContrainstSetter added in v0.2.71

type ContrainstSetter func(*cobra.Command, field.Configuration) error

type GetConnectorFunc added in v0.2.0

type GetConnectorFunc[T field.Configurable] func(context.Context, T) (types.ConnectorServer, error)

Jump to

Keyboard shortcuts

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