cli

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{}
View Source
var ServerCLI = &serverCLI{
	logger: logrus.New(),
}

Functions

func Execute

func Execute() int

func LoadConfig

func LoadConfig(cmd *cobra.Command) (*server.Config, error)

func NewRootCmd

func NewRootCmd() *cobra.Command

func NewRunCmd

func NewRunCmd() *cobra.Command

func NewServerConfig

func NewServerConfig(c *Config) (*server.Config, error)

NewServerConfig creates a server.Config object from a cli.Config.

func Run

func Run() int

Types

type Config

type Config struct {
	Server *serverConfig `hcl:"server"`
}

func ParseConfig

func ParseConfig(config io.Reader) (*Config, error)

ParseConfig reads a configuration from the Reader and parses it to a cli.Config object setting the defaults for the missing values.

Jump to

Keyboard shortcuts

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