cmd

package
v0.0.0-...-29c3169 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIConfig

type APIConfig struct {
	Database struct {
		DSN  string `default:"" flag:"dsn" usage:"Database DSN"`
		User string `default:"" flag:"user"`
		Pass string `default:"" flag:"pass"`
	}

	DeploymentMode string `default:"" usage:"prod, test or devel" flag:"deployment-mode"`
	// contains filtered or unexported fields
}

func (*APIConfig) Flags

func (cfg *APIConfig) Flags() *flag.FlagSet

func (*APIConfig) Load

func (cfg *APIConfig) Load(args []string) error

type CLI

type CLI struct {
	Config *APIConfig
}

func NewCLI

func NewCLI() *CLI

func (*CLI) RootCmd

func (cli *CLI) RootCmd() *cobra.Command

func (*CLI) Run

func (cli *CLI) Run(fn func(cmd *cobra.Command, args []string) error) func(*cobra.Command, []string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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