context

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultLogLevel = "info"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Debug    string            `hcl:"debug,optional"`
	Use      map[string]string `hcl:"use,optional"`
	LinkDir  string            `hcl:"linkdir,optional"`
	Packages []PackageBlock    `hcl:"package,block,optional"`
}

Config is the result of unmarshalling a config.hcl file

type Context

type Context struct {
	Debug   *log.Level
	Use     map[string]string
	LinkDir string

	Repositories []string
	Packages     map[string]*manifest.PackageManifestOptions
}

func NewContext

func NewContext(logLevel string) (*Context, error)

func (*Context) Merge

func (ctx *Context) Merge(config *Config) error

func (*Context) SetLogLevel

func (ctx *Context) SetLogLevel(level string) (log.Level, error)

func (*Context) Synthesize

func (ctx *Context) Synthesize() error

func (*Context) UseVersion added in v0.4.0

func (ctx *Context) UseVersion(name string, version string)

type PackageBlock

type PackageBlock struct {
	Name string `hcl:"name,label"`
	manifest.PackageManifestOptions
}

func (*PackageBlock) GetPackage

func (b *PackageBlock) GetPackage() *manifest.PackageManifestOptions

Jump to

Keyboard shortcuts

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