config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Platforms is a matrix of OS and Arch for the binaries which
	// the project would like to save checksums on.
	// i.e. map["linux"][]{"amd64", "arm64"}
	Platforms map[string][]string `json:"platforms"`

	// Programs is a list of program specification
	Programs []*program.Config `json:"programs"`
}

Config is a configuration which is used to declare a project's dependencies. By default, this is the content of bindl.yaml

type Lock

type Lock struct {
	Updated  time.Time       `json:"updated"`
	Programs []*program.Lock `json:"programs"`
}

Lock is a configuration which was generated from Config. By default, this is the content of .bindl-lock.yaml

func ParseLock

func ParseLock(path string) (*Lock, error)

ParseLock reads a file from path and returns *Lock

type Runtime

type Runtime struct {
	Path         string `envconfig:"CONFIG"`
	LockfilePath string `envconfig:"LOCK"`
	BinDir       string `envconfig:"BIN"`
	ProgDir      string `envconfig:"PROG"`

	OS   string `envconfig:"OS"`
	Arch string `envconfig:"ARCH"`

	Debug  bool `envconfig:"DEBUG"`
	Silent bool `envconfig:"SILENT"`
}

Runtime is a configuration which is primarily used by command/cli. All variables which users can change at runtime with global effect can be found here.

Jump to

Keyboard shortcuts

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