Documentation ¶
Index ¶
- Variables
- type GitRepoStub
- type GitService
- type GitStub
- func (self *GitStub) AddSubmodule(repoDir, remoteURI, targetPath string) error
- func (self *GitStub) CheckoutCommit(repoDir, commitHash string) error
- func (self *GitStub) Clone(targetPath, remoteURI string) error
- func (self *GitStub) GetCurrentCommitHash(repoDir string) (string, error)
- func (self *GitStub) GetRemoteURI(repoDir string) (string, error)
- func (self *GitStub) GetRootDir(dir string) (string, error)
- func (self *GitStub) InitRepo(repoDir string) error
- func (self *GitStub) InitSubmodules(repoDir string) error
- func (self *GitStub) RemoveSubmodule(repoDir, targetPath string) error
- func (self *GitStub) UpdateSubmodules(repoDir string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoRemote = errors.New("No remote found")
View Source
var ErrNotAGitRepository = errors.New("Not a git repository")
Functions ¶
This section is empty.
Types ¶
type GitRepoStub ¶
type GitRepoStub struct { RemoteURI string CurrentCommitHash string Submodules map[string]*GitRepoStub }
func NewGitRepoStub ¶
func NewGitRepoStub() *GitRepoStub
type GitService ¶
type GitService interface { Clone(targetPath, remoteURI string) error AddSubmodule(repoDir, remoteURI, targetPath string) error RemoveSubmodule(repoDir, targetPath string) error CheckoutCommit(repoDir, commitHash string) error GetRemoteURI(repoDir string) (string, error) GetCurrentCommitHash(repoDir string) (string, error) GetRootDir(dir string) (string, error) InitRepo(repoDir string) error InitSubmodules(repoDir string) error UpdateSubmodules(repoDir string) error }
var Service GitService = NewGitService()
func NewGitService ¶
func NewGitService() GitService
type GitStub ¶
type GitStub struct {
Repos map[string]*GitRepoStub
}
func NewGitStub ¶
func NewGitStub() *GitStub
func (*GitStub) AddSubmodule ¶
func (*GitStub) CheckoutCommit ¶
func (*GitStub) GetCurrentCommitHash ¶
func (*GitStub) InitSubmodules ¶
func (*GitStub) RemoveSubmodule ¶
func (*GitStub) UpdateSubmodules ¶
Click to show internal directories.
Click to hide internal directories.