project

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrProjectNotFound = errors.New("project not found")

Functions

This section is empty.

Types

type Project

type Project struct {
	Path string // Local path of this project on disk
	// contains filtered or unexported fields
}

Project represents a project whether it exists locally or not

func FindBestMatch

func FindBestMatch(expr string, conf *config.Config) (found *Project, err error)

func FindCurrent

func FindCurrent() (*Project, error)

func NewFromID

func NewFromID(id string, conf *config.Config) (p *Project, err error)

NewFromID creates an instance of Project from a short id like "org/name"

func NewFromPath added in v0.7.0

func NewFromPath(path string) *Project

NewFromPath creates an instance of Project from the local path

func (*Project) Clone

func (p *Project) Clone() (err error)

Clone runs the Git command needed to clone the project

func (*Project) Create added in v0.0.9

func (p *Project) Create() (err error)

Create creates the project directory locally

func (*Project) Exists

func (p *Project) Exists() bool

Exists checks whether the project exists locally

func (*Project) FullName

func (p *Project) FullName() string

FullName returns a logical id like platform:org/project

func (*Project) GetRemoteURL

func (p *Project) GetRemoteURL() (url string, err error)

GetRemoteURL builds the Git remote url for the project

func (*Project) Name added in v0.7.0

func (p *Project) Name() string

Name returns a logical id like platform:org/project

func (*Project) Slug added in v0.0.4

func (p *Project) Slug() string

Slug returns a short, unique but humanly recognizable id based on the path

Jump to

Keyboard shortcuts

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