gocommand

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBadPath = errors.New("bad path")
View Source
var ErrParse = errors.New("parse error")

Functions

This section is empty.

Types

type BinaryVersion

type BinaryVersion struct {
	File         string
	GoVersion    *semver.Version
	Path         string
	Module       *Module
	Dependencies []*Module
	Builds       []string
}

type Command

type Command interface {
	Install(directory string, packages []string, env []string, logDownloading func(string)) error
	Versions(pkg string) (*Versions, error)
	BinaryVersion(name string) (*BinaryVersion, error)
}

func NewEntity

func NewEntity() Command

func NewMock

func NewMock(fs afero.Fs) Command

type Entity

type Entity struct{}

func (Entity) BinaryVersion

func (Entity) BinaryVersion(name string) (*BinaryVersion, error)

func (Entity) Install

func (Entity) Install(
	directory string,
	pkgs []string,
	env []string,
	logDownloading func(string),
) error

func (Entity) Versions

func (Entity) Versions(pkg string) (*Versions, error)

type Memorized

type Memorized struct {
	Command
	// contains filtered or unexported fields
}

func NewMemorized

func NewMemorized(command Command) *Memorized

func (Memorized) MemorizedVersions

func (command Memorized) MemorizedVersions(pkg string) (*Versions, error)

type Mock

type Mock struct {
	Fs afero.Fs
}

func (Mock) BinaryVersion

func (Mock) BinaryVersion(name string) (*BinaryVersion, error)

func (Mock) Install

func (mock Mock) Install(directory string, packages []string, env []string, logDownloading func(string)) error

func (Mock) Versions

func (mock Mock) Versions(pkg string) (*Versions, error)

type Module

type Module struct {
	Name    string
	Version *semver.Version
	Hash    string
}

type Versions

type Versions struct {
	Path     string
	Versions []*semver.Version
}

Jump to

Keyboard shortcuts

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