binny

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

README

binny

manage a directory of binaries without a package manager

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Installer

type Installer interface {
	InstallTo(version, destDir string) (string, error)
}

type Store

type Store struct {
	// contains filtered or unexported fields
}

func NewStore

func NewStore(root string) (*Store, error)

func (*Store) AddTool

func (s *Store) AddTool(toolName string, resolvedVersion, pathOutsideRoot string) error

func (Store) Entries

func (s Store) Entries() (entries []StoreEntry)

func (Store) GetByName

func (s Store) GetByName(name string, versions ...string) []StoreEntry

func (Store) Root

func (s Store) Root() string

type StoreEntry

type StoreEntry struct {
	Name             string `json:"name"`
	InstalledVersion string `json:"version"`
	Digest           string `json:"sha256"`
	PathInRoot       string `json:"path"`
	// contains filtered or unexported fields
}

func (StoreEntry) Path

func (s StoreEntry) Path() string

type Tool

type Tool interface {
	Name() string
	Installer
	VersionResolver
}

type VersionIntent

type VersionIntent struct {
	Want       string
	Constraint string
}

type VersionResolver

type VersionResolver interface {
	ResolveVersion(want, constraint string) (string, error)
	UpdateVersion(want, constraint string) (string, error)
}

Directories

Path Synopsis
cmd
binny command
bus
log

Jump to

Keyboard shortcuts

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