cache

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2018 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultStorePath is the name
	// of the default directory where
	// binaries and bundles are stored.
	DefaultStorePath = ".binrc"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

Cache stores and retrieves projects from the system's cache and GitHub releases

func New

func New(storePath string) (*Cache, error)

New initializes the cache with a given store path.

func (*Cache) GetOrSet

func (c *Cache) GetOrSet(name, version string) (*Project, error)

GetOrSet fetches a project from the cache. If the project is not in the cache, it tries to donwload it from GitHub releases.

type Project

type Project struct {
	FullName string
	Version  string
	Owner    string
	Name     string
	FullPath string
	// contains filtered or unexported fields
}

Project represents a project managed with Binrc. It holds information about its version, cache and binary paths.

func (*Project) BinaryName

func (p *Project) BinaryName() string

BinaryName returns the name of the binary to look for after the tarball is extracted.

func (*Project) URL

func (p *Project) URL() string

URL returns the URL to download the tarball from.

Jump to

Keyboard shortcuts

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