cli

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: Apache-2.0 Imports: 25 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. It returns a *server.Config and an error if any.

func Run

func Run() int

Types

type Config

type Config struct {
	Server    *serverConfig   `hcl:"server,block"`
	Providers *providersBlock `hcl:"providers,block"`
}

Config holds the configuration for the Galadriel 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