Documentation
¶
Index ¶
- Constants
- Variables
- func NextTag(branchName string, repo *git.Repository) (string, error)
- type Service
- func (g *Service) GetGitBasePath() (string, error)
- func (g *Service) GetGitBasePathWithRepo(repo *git.Repository) (string, error)
- func (g *Service) GetGitBranches() (*storer.ReferenceIter, error)
- func (g *Service) GetGitCurrentBranchName() (string, error)
- func (g *Service) GetGitHead() (*plumbing.Reference, error)
- func (g *Service) GetGitHeadTree() (*object.Tree, error)
- func (g *Service) GetGitRepo() (*git.Repository, error)
- func (g *Service) GetRemoteGitRepo(remoteURL string) (*git.Repository, error)
- func (g *Service) PushTag() error
- func (g *Service) TagSemver() (bool, error)
Constants ¶
View Source
const ( BranchMain = "main" BranchNext = "next" )
Variables ¶
View Source
var ( ErrRemoteURLNotFound = fmt.Errorf("remote URL not found") ErrGitRepoNil = fmt.Errorf("git repository is nil") ErrBranchesNil = fmt.Errorf("branches are nil") ErrCurrBrancheNil = fmt.Errorf("current branch is nil") ErrGitTreeNil = fmt.Errorf("git tree is nil") )
View Source
var ErrBranchNameInvalid = errors.New("branch name not in valid set")
Functions ¶
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewGitService ¶
func NewGitService() *Service
func NewGitServiceWithRepo ¶
func NewGitServiceWithRepo(repo *git.Repository) *Service
func (*Service) GetGitBasePath ¶
func (*Service) GetGitBasePathWithRepo ¶
func (g *Service) GetGitBasePathWithRepo(repo *git.Repository) (string, error)
func (*Service) GetGitBranches ¶
func (g *Service) GetGitBranches() (*storer.ReferenceIter, error)
func (*Service) GetGitCurrentBranchName ¶
func (*Service) GetGitRepo ¶
func (g *Service) GetGitRepo() (*git.Repository, error)
func (*Service) GetRemoteGitRepo ¶
func (g *Service) GetRemoteGitRepo(remoteURL string) (*git.Repository, error)
Click to show internal directories.
Click to hide internal directories.