cmd

package
v0.0.0-...-6378e9d Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

README

Command line tools available for building

Docker Images

All docker images have reasonable defaults and are set up to run the main application for each service.

Check docker-compose.yml in each app for more information.

# Run:
docker-compose -f ./cmd/<app>/docker-compose.yml run --rm <app> --help
# to see available options and additional commands.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRenderConfigCmd

func NewRenderConfigCmd(cfg supervisor.Config, cf *ConfigFlags) *cobra.Command

func NewRootCommand

func NewRootCommand(name, version string, sets ...FlagSetter) *cobra.Command

NewRootCommand returns a Cobra command with the given name and version. It also adds all the provided pflag.FlagSet items to the command's persistent flags.

func NewRunCmd

func NewRunCmd(cfg supervisor.Config, cf *ConfigFlags, lf *LoggerFlags) *cobra.Command

Types

type ConfigFlags

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

ConfigFlags is used to load multiple config files.

func ConfigFlagsForConfig

func ConfigFlagsForConfig(d config.HasDefaults) ConfigFlags

func ConfigFlagsWithEmbeds

func ConfigFlagsWithEmbeds(embeds ...[]byte) ConfigFlags

func (*ConfigFlags) FlagSet

func (cf *ConfigFlags) FlagSet() *pflag.FlagSet

FlagSet binds CLI args [--config or -c] for config files as a pflag.FlagSet.

func (*ConfigFlags) Load

func (cf *ConfigFlags) Load(cfg any) error

Load loads the config files into the given config struct.

type FlagSetter

type FlagSetter interface {
	FlagSet() *pflag.FlagSet
}

type LoggerFlags

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

LoggerFlags is a set of flags for configuring a logger. It glues together the pflag.Value interface with the log.Logger interface.

func (*LoggerFlags) FlagSet

func (lf *LoggerFlags) FlagSet() *pflag.FlagSet

FlagSet binds CLI args [ --log.verbosity | -v ] and [ --log.format | -f ] for config files as a pflag.FlagSet.

func (*LoggerFlags) Formatter

func (f *LoggerFlags) Formatter() logrus.Formatter

Formatter returns the logrus.Formatter for selected type.

func (*LoggerFlags) Logger

func (lf *LoggerFlags) Logger() log.Logger

func (*LoggerFlags) Verbosity

func (f *LoggerFlags) Verbosity() logrus.Level

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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