Documentation ¶
Index ¶
- type Repository
- func (repo *Repository) AddFile(filenamePath string) error
- func (repo *Repository) Commit(filename, caller, message string) error
- func (repo *Repository) GetFile(filenamePath string) (billy.File, error)
- func (repo *Repository) GetHeadHash() (plumbing.Hash, error)
- func (repo *Repository) HardResetToCommit(commit plumbing.Hash) error
- func (repo *Repository) Pull() error
- func (repo *Repository) Push() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func GetK8SConfigsRepository ¶
func GetK8SConfigsRepository(gitConfig config.GitConfig) (k8srepo *Repository, err error)
func (*Repository) AddFile ¶
func (repo *Repository) AddFile(filenamePath string) error
AddFile add the file to the staging area of worktree
func (*Repository) Commit ¶
func (repo *Repository) Commit(filename, caller, message string) error
Commit with username as slack caller name annotated by (Major Tom)
func (*Repository) GetFile ¶
func (repo *Repository) GetFile(filenamePath string) (billy.File, error)
GetFile will return an billy.Filewith read and write permission
func (*Repository) GetHeadHash ¶
func (repo *Repository) GetHeadHash() (plumbing.Hash, error)
GetHeadHash hard reset the worktree to the commit to clear changes
func (*Repository) HardResetToCommit ¶
func (repo *Repository) HardResetToCommit(commit plumbing.Hash) error
HardResetToCommit hard reset the worktree to the commit to clear changes
func (*Repository) Pull ¶
func (repo *Repository) Pull() error
func (*Repository) Push ¶
func (repo *Repository) Push() error
Click to show internal directories.
Click to hide internal directories.