provider

package
v0.0.0-...-1806480 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2017 License: Apache-2.0 Imports: 16 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) Clone

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

Clone 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.

func (*Fake) Ping

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

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) Clone

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

Clone 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.

func (*Git) Ping

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

Ping check whether git repo is valid

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) Clone

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

Clone 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.

func (*Svn) Ping

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

Ping check whether svn repo is valid

Jump to

Keyboard shortcuts

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