Documentation ¶
Index ¶
- Constants
- Variables
- func AddAuthFromNetrc(rawurl string, req *http.Request) *http.Request
- func Create(repositoryURL string) error
- func FileHash(path string) (string, error)
- func HTTPDownload(url, path string) error
- func LinksDir() string
- func TapeHome() string
- type Dependencies
- type Dependency
- type Repository
- type Type
Constants ¶
View Source
const ( Dir = ".tape" Version = "1.0" Config = "config" )
Variables ¶
View Source
var ( ErrMissingParameter = errors.New("missing parameter") ErrTapeAlreadyInitialized = errors.New("tape is already initialized") ErrTapeNotInitialized = errors.New("tape is not initialized") ErrDependencyAlreadyExists = errors.New("dependency already exists try update instead") ErrDependencyNotFound = errors.New("dependency not found add instead") ErrFileMismatch = errors.New("file mismatch") )
Functions ¶
func AddAuthFromNetrc ¶
addAuthFromNetrc uses basic authentication on go-get requests for private repositories.
func HTTPDownload ¶
Types ¶
type Dependencies ¶
type Dependencies []Dependency
type Dependency ¶
type Dependency struct { Name string `json:"name"` URL string `json:"url"` Hash string `json:"hash"` Type Type `json:"type"` Version string `json:"version,omitempty"` }
func (*Dependency) Link ¶
func (d *Dependency) Link() error
func (*Dependency) Unlink ¶
func (d *Dependency) Unlink() error
type Repository ¶
type Repository struct { Version string `json:"version"` URL string `json:"url"` Dependencies Dependencies `json:"dependencies,omitempty"` }
func Load ¶
func Load() (*Repository, error)
func (*Repository) Add ¶
func (r *Repository) Add(name, url string) error
func (*Repository) Link ¶
func (r *Repository) Link() error
func (*Repository) Remove ¶
func (r *Repository) Remove(name string) error
func (*Repository) Save ¶
func (r *Repository) Save() error
func (*Repository) Update ¶
func (r *Repository) Update(name, url string) error
Click to show internal directories.
Click to hide internal directories.