govend: github.com/govend/govend/deps/repos Index | Files

package repos

import "github.com/govend/govend/deps/repos"

Package repos provides methods for repositories.

Index

Package Files

clean.go download.go ping.go repos.go vcs.go

func Clean Uses

func Clean(dir string) error

Clean cleans a repository codebase.

func Download Uses

func Download(r *Repo, dir, vendorRev string) (string, error)

Download writes the source contents of a Repo to disk. The revision version of the repository is returned and the directory is created.

type Repo Uses

type Repo struct {
    VCS *VCS

    // URL is the repository URL, including scheme
    URL string

    // ImportPath is the import path corresponding to the root of the repository
    ImportPath string
}

Repo RepoRoot

func ImportDynamic Uses

func ImportDynamic(importpath string, verbose bool) (*Repo, error)

ImportDynamic returns a new Repo.

func ImportPath Uses

func ImportPath(importpath string, verbose bool) (*Repo, error)

ImportPath returns a new Repo.

func New Uses

func New(v *VCS, url, importpath string) *Repo

New returns a new Repo.

func Ping Uses

func Ping(pkg string) (*Repo, error)

Ping checks the host server to determine the package Repo.

type VCS Uses

type VCS struct {
    *vcs.Cmd

    IdentifyCmd string
    DescribeCmd string
    DiffCmd     string

    // run in sandbox repos
    ExistsCmd string
}

VCS represents a version control system for a repository.

func Dir Uses

func Dir(dir, srcRoot string) (*VCS, string, error)

Dir inspects dir and its parents to determine the version control system and code repository to use. On return, root is the import path corresponding to the root of the repository (thus root is a prefix of importPath).

func NewVCS Uses

func NewVCS(v *vcs.Cmd) (*VCS, error)

NewVCS creates a new VCS object.

func (*VCS) Describe Uses

func (v *VCS) Describe(dir, rev string) string

Describe describes a package via directory path and revision string.

func (*VCS) Dirty Uses

func (v *VCS) Dirty(dir, rev string) bool

Dirty determines if a local repo on disk is not clean.

func (*VCS) Exists Uses

func (v *VCS) Exists(dir, rev string) bool

Exists tests if a revision exists on local disk in a repo.

func (*VCS) Identify Uses

func (v *VCS) Identify(dir string) (string, error)

Identify takes a directory path and returns a revision string.

func (*VCS) RevSync Uses

func (v *VCS) RevSync(dir, rev string) error

RevSync checks out the revision given by rev in dir. The dir must exist and rev must be a valid revision.

Package repos imports 8 packages (graph) and is imported by 11 packages. Updated 2016-08-02. Refresh now. Tools for package owners.