config

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2018 License: AGPL-3.0 Imports: 9 Imported by: 20

Documentation

Index

Constants

View Source
const (

	// Bower is the module type for bower.io
	Bower = ModuleType("bower")
	// Composer is the module type for getcomposer.org
	Composer = ModuleType("composer")
	// Maven is the module type for maven.apache.org
	Maven = ModuleType("maven")
	// SBT is the module type for scala-sbt.org
	SBT = ModuleType("sbt")
	// Gradle is the module type for gradle.org
	Gradle = ModuleType("gradle")

	// Ruby is the module type for Bundler (bundler.io)
	Ruby = ModuleType("ruby")
	// Nodejs is the module type for NPM (npmjs.org) and Yarn (yarnpkg.com)
	Nodejs = ModuleType("nodejs")
	// Golang is the module type for dep, glide, godep, govendor, vndr, and manual
	// gopath vendoring
	Golang = ModuleType("golang")

	// VendoredArchives is a module type for archive formats (.tar, .rpm, .zip, etc...)
	VendoredArchives = ModuleType("vendoredarchives")
)

Variables

ModuleTypes holds the list of all available module types for analysis

Functions

func MakeLocator

func MakeLocator(fetcher string, project string, revision string) string

MakeLocator creates a locator string given a package and revision

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 cmd

type BuildConfig

type BuildConfig struct {
	Force bool
}

BuildConfig specifies the config for the build cmd

type CLIConfig

type CLIConfig struct {
	APIKey   string
	Fetcher  string
	Project  string
	Revision string
	Endpoint string
	Modules  []ModuleConfig
	Debug    bool

	DefaultCmd DefaultConfig
	AnalyzeCmd AnalyzeConfig
	BuildCmd   BuildConfig
	TestCmd    TestConfig
	UploadCmd  UploadConfig

	ConfigFilePath string
}

CLIConfig specifies the config available to the cli

func New

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

New creates a CLIConfig from cli context

type DefaultConfig

type DefaultConfig struct {
	Build bool
}

DefaultConfig specifies the config for the default cmd

type ModuleConfig

type ModuleConfig struct {
	Name string `yaml:"name"`
	Path string `yaml:"path"`
	Type string `yaml:"type"` // this is later transformed to a ModuleType
}

ModuleConfig defines a config for a builder's entry point

type ModuleType

type ModuleType string

ModuleType is an enumeration of supported build system types

func GetModuleType

func GetModuleType(configKey string) ModuleType

GetModuleType returns a ModuleType for a variety of config keys

type TestConfig

type TestConfig struct {
	Timeout time.Duration
}

TestConfig specifies the config for the test cmd

type UploadConfig

type UploadConfig struct {
	Locators bool
	Data     string
}

UploadConfig specifies the config for the upload cmd

Jump to

Keyboard shortcuts

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