deps

package
v0.8.15 Latest Latest
Warning

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

Go to latest
Published: May 20, 2023 License: MIT Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BinDep

func BinDep(name string) func(...string) error

BinDep returns a command for running a binary dependency. Its output is sent to stdout.

func BinDepOut

func BinDepOut(name string) func(...string) (string, error)

BinDepOut returns a command for running a binary dependency. Its output is returned.

func BinDepOutWithEnv added in v0.4.13

func BinDepOutWithEnv(env map[string]string, name string) func(...string) (string, error)

BinDepOutWithEnv returns a command for running a binary dependency. It accepts an env map for the new process. Its output is returned.

func BinDepWithEnv

func BinDepWithEnv(env map[string]string, name string) func(...string) error

BinDepWithEnv returns a command for running a binary dependency. It accepts an env map for the new process. Its output is sent to stdout.

func BinDir

func BinDir() string

BinDir returns the absolute path to the bin directory of tools that are not go.

func BinExec added in v0.4.11

func BinExec(name string, stdout, stderr io.Writer) func(...string) error

BinExec returns a command for running a binary dependency. Its stdout and stderr are pipeped to the given writers.

func BinPath

func BinPath(name string) string

func DefBinDep

func DefBinDep(name, url, version, sha, entrypoint string, options ...Option)

DefBinDep makes sure a dependency is downloaded and makes it available as a runnable command.

func DefGoDep

func DefGoDep(name, importPath, version, entrypoint string)

DefGoDep defines a go dependency that can be installed using a command like `go install github.com/aserto-dev/foo@v1.2.3`

func DefLibDep

func DefLibDep(name, url, sha, outputDir string, options ...Option)

DefLibDep makes sure a lib dependency is downloaded and unpacks it

func ExtTmpDir

func ExtTmpDir() string

LibDir returns the absolute path to the ext tmp dir

func GetAllDeps

func GetAllDeps()

GetAllDeps explicitly goes through all dependencies and downloads them, even if they might not be used.

func GoBinDir added in v0.4.15

func GoBinDir() string

GoBinDir returns the absolute path to the bin directory of tools

func GoBinPath added in v0.4.16

func GoBinPath(name string) string

func GoDep

func GoDep(name string) func(...string) error

GoDep returns a command for running a go dependency. Its output is sent to stdout.

func GoDepOutput

func GoDepOutput(name string) func(...string) (string, error)

GoDepOutput returns a command for running a go dependency. Its output is returned.

func GoDepOutputWith

func GoDepOutputWith(name string) func(map[string]string, ...string) (string, error)

GoDepOutputWith returns a command for running a go dependency with env vars. Its output is returned.

func GoDepWithEnv added in v0.8.5

func GoDepWithEnv(env map[string]string, name string) func(...string) error

GoDepWithEnv returns a command for running a go dependency. It accepts an env map for the new process. Its output is sent to stdout.

func LibDir

func LibDir() string

LibDir returns the absolute path to the lib dir

Types

type Option

type Option func(*depOptions)

Option is a setting that changes the behavior of downloading and configuring a binary or a library

func WithLibPrefix

func WithLibPrefix(prefix string) Option

WithLibPrefix tells us we should remove the specified prefix from the lib paths. This option can use the {{.Version}} template.

func WithTGzPaths

func WithTGzPaths(paths ...string) Option

WithTGzPaths tells us the binary or lib lives inside a tarred and gzipped archive

func WithTXzPaths added in v0.4.8

func WithTXzPaths(paths ...string) Option

WithTXzPaths tells us the binary or lib lives inside a tarred and xz utility compressed archive

func WithZipPaths

func WithZipPaths(paths ...string) Option

WithZipPaths tells us the binary or lib lives inside a zip archive

Jump to

Keyboard shortcuts

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