provider

package
v0.0.0-...-964918b Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2016 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fake

type Fake struct {
	// contains filtered or unexported fields
}

Fake is the type for fake(local file system) vcs provider.

func NewFake

func NewFake(fakeRepoPath string) (*Fake, error)

NewFake returns a fake implementation of vcs.

func (*Fake) CheckOutByCommitID

func (f *Fake) CheckOutByCommitID(commitID string, repoPath string, event *api.Event) error

CheckOutByCommitID check out code in repo by special commit id.

func (*Fake) CheckoutTag

func (f *Fake) CheckoutTag(repoPath string, tag string) error

CheckoutTag checkout to given tag.

func (*Fake) CloneRepo

func (f *Fake) CloneRepo(url, destPath string, event *api.Event) error

CloneRepo clones the repo to local file system.

func (*Fake) GetTagCommit

func (f *Fake) GetTagCommit(repoPath string, tag string) (string, error)

GetTagCommit finds commit/revision hash of a given tag.

func (*Fake) NewTagFromLatest

func (f *Fake) NewTagFromLatest(repoPath string, event *api.Event) error

NewTagFromLatest creates a new tag from latest source for a service.

type Git

type Git struct{}

Git is the type for git provider.

func NewGit

func NewGit() *Git

NewGit returns a new Git worker.

func (*Git) CheckOutByCommitID

func (g *Git) CheckOutByCommitID(commitID string, repoPath string, event *api.Event) error

CheckOutByCommitID checks out code in repo by special commit id.

func (*Git) CheckoutTag

func (g *Git) CheckoutTag(repoPath string, tag string) error

CheckoutTag implements VCS interface.

func (*Git) CloneRepo

func (g *Git) CloneRepo(url, destPath string, event *api.Event) error

CloneRepo implements VCS interface.

func (*Git) GetTagCommit

func (g *Git) GetTagCommit(repoPath string, tag string) (string, error)

GetTagCommit implements VCS interface.

func (*Git) NewTagFromLatest

func (g *Git) NewTagFromLatest(repoPath string, event *api.Event) error

NewTagFromLatest implements VCS interface.

type Svn

type Svn struct{}

Svn is the type for svn provider.

func NewSvn

func NewSvn() *Svn

NewSvn returns a new Svn worker.

func (*Svn) CheckOutByCommitID

func (s *Svn) CheckOutByCommitID(commitID string, repoPath string, event *api.Event) error

CheckOutByCommitID check out code in repo by special commit id.

func (*Svn) CheckoutTag

func (s *Svn) CheckoutTag(repoPath string, tag string) error

CheckoutTag implements VCS interface.

func (*Svn) CloneRepo

func (s *Svn) CloneRepo(url, destPath string, event *api.Event) error

CloneRepo implements VCS interface.

func (*Svn) GetTagCommit

func (s *Svn) GetTagCommit(repoPath string, tag string) (string, error)

GetTagCommit implements VCS interface.

func (*Svn) IsCommitToSpecialURL

func (s *Svn) IsCommitToSpecialURL(commitID string, service *api.Service) (bool, string, error)

IsCommitToSpecialURL gets if the commit is to a specific url.

func (*Svn) NewTagFromLatest

func (s *Svn) NewTagFromLatest(repoPath string, event *api.Event) error

NewTagFromLatest implements VCS interface.

Jump to

Keyboard shortcuts

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