archive

package
v0.0.0-...-9022b49 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotMatchAnyService = errors.New("cannot match any service")
)
View Source
var (
	HttpClient = &http.Client{Transport: httpTransport}
)

Functions

func GetExtension

func GetExtension(importPath string) string

GetExtension returns extension by import path.

func GetRootPath

func GetRootPath(name string) string

GetRootPath returns project root path.

Types

type Node

type Node struct {
	ImportPath  string // Package root import path.
	DownloadURL string // Actual download URL can be different from import path.
	Value       string
	Revision    string
	ArchivePath string
}

A Node represents a node object to be fetched from remote.

func NewNode

func NewNode(importPath string, val string) *Node

NewNode initializes and returns a new Node representation.

func (*Node) Download

func (n *Node) Download() error

Download downloads remote package without version control.

func (*Node) GetRevision

func (n *Node) GetRevision() error

GetRevision fetches revision of node from service.

Jump to

Keyboard shortcuts

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