repo

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2015 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repo

type Repo struct {
	// The name of the Repository. This should be the
	// canonical name, for example, github.com/drone/drone.
	Name string

	// The path of the Repoisotry. This could be
	// the remote path of a Git repository or the path of
	// of the repository on the local file system.
	//
	// A remote path must start with http://, https://,
	// git://, ssh:// or git@. Otherwise we'll assume
	// the repository is located on the local filesystem.
	Path string

	// (optional) Specific Branch that we should checkout
	// when the Repository is cloned. If no value is
	// provided we'll assume the default, master branch.
	Branch string

	// (optional) Specific Commit Hash that we should
	// checkout when the Repository is cloned. If no
	// value is provided we'll assume HEAD.
	Commit string

	// (optional) Pull Request number that we should
	// checkout when the Repository is cloned.
	PR string

	// Private specifies if a git repo is private or not
	Private bool

	// (optional) The filesystem path that the repository
	// will be cloned into (or copied to) inside the
	// host system (Docker Container).
	Dir string

	// (optional) The depth of the `git clone` command.
	Depth int
}

func (*Repo) Commands

func (r *Repo) Commands() []string

returns commands that can be used in a Dockerfile to clone the repository.

TODO we should also enable Mercurial projects and SVN projects

func (*Repo) IsGit

func (r *Repo) IsGit() bool

IsGit returns true if the Repository is a Git repoisitory.

func (*Repo) IsLocal

func (r *Repo) IsLocal() bool

IsLocal returns true if the Repository is located on the local filesystem.

func (*Repo) IsRemote

func (r *Repo) IsRemote() bool

IsRemote returns true if the Repository is located on a remote server (ie Github, Bitbucket)

func (*Repo) IsTrusted

func (r *Repo) IsTrusted() bool

IsTrusted returns if a repo is trusted to run under privileged mode

Jump to

Keyboard shortcuts

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