config

package
v0.7.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2018 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TryBool added in v0.6.1

func TryBool(c *cli.Context, flag string) bool

func WriteConfigFile

func WriteConfigFile(conf *CLIConfig) error

WriteConfigFile writes a config state to yaml

Types

type AnalyzeConfig

type AnalyzeConfig struct {
	Output          bool
	AllowUnresolved bool
}

AnalyzeConfig specifies the config for the analyze command

type BuildConfig

type BuildConfig struct {
	Force bool
}

BuildConfig specifies the config for the build command

type CLIConfig

type CLIConfig struct {
	APIKey   string
	Fetcher  string
	Project  string
	Revision string
	Branch   string
	Endpoint string
	Modules  []module.Config

	Debug       bool
	Interactive bool

	DefaultCmd DefaultConfig
	AnalyzeCmd AnalyzeConfig
	BuildCmd   BuildConfig
	TestCmd    TestConfig
	UploadCmd  UploadConfig
	ReportCmd  ReportConfig

	ConfigFilePath string
	Version        string
}

CLIConfig specifies the config available to the cli

func MustNew added in v0.6.1

func MustNew(c *cli.Context) CLIConfig

MustNew calls New but fails on an error instead of returning the error

func New

func New(c *cli.Context) (CLIConfig, error)

New creates a CLIConfig from a *cli.Context

type DefaultConfig

type DefaultConfig struct {
	Build bool
}

DefaultConfig specifies the config for the default command

type ReportConfig added in v0.4.3

type ReportConfig struct {
	Type string // Either "dependencies" or "licenses"
}

ReportConfig specifies the config for the report command

type TestConfig

type TestConfig struct {
	Timeout time.Duration
}

TestConfig specifies the config for the test command

type UploadConfig

type UploadConfig struct {
	UseLocators bool
	Data        string
}

UploadConfig specifies the config for the upload command

Jump to

Keyboard shortcuts

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