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 = &harvesterCLI{
	logger: logrus.New(),
}

Functions

func Execute added in v0.2.0

func Execute() int

func LoadConfig

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

func NewHarvesterConfig

func NewHarvesterConfig(c *Config) (*harvester.Config, error)

NewHarvesterConfig creates a harvester.Config object from a cli.Config.

func NewRootCmd

func NewRootCmd() *cobra.Command

func NewRunCmd

func NewRunCmd() *cobra.Command

func Run

func Run() int

Types

type Config

type Config struct {
	Harvester *harvesterConfig `hcl:"harvester,block"`
	Providers *providersBlock  `hcl:"providers,block"`
}

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