Documentation ¶
Index ¶
- type CommitHash
- type Configuration
- type DefaultGitClient
- func (d *DefaultGitClient) BaseBranch() string
- func (d *DefaultGitClient) Commit(message string, path []string) (CommitHash, error)
- func (d *DefaultGitClient) Push(ctx context.Context, branch string) error
- func (d *DefaultGitClient) Switch(branch string, create bool) error
- func (d *DefaultGitClient) SwitchBack() error
- type Git
- type Repository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultGitClient ¶
type DefaultGitClient struct {
// contains filtered or unexported fields
}
DefaultGitClient .
func (*DefaultGitClient) BaseBranch ¶
func (d *DefaultGitClient) BaseBranch() string
BaseBranch of git
func (*DefaultGitClient) Commit ¶
func (d *DefaultGitClient) Commit(message string, path []string) (CommitHash, error)
Commit .
func (*DefaultGitClient) Push ¶
func (d *DefaultGitClient) Push(ctx context.Context, branch string) error
Push to origin
func (*DefaultGitClient) Switch ¶
func (d *DefaultGitClient) Switch(branch string, create bool) error
Switch to branch
func (*DefaultGitClient) SwitchBack ¶
func (d *DefaultGitClient) SwitchBack() error
SwitchBack tp origin branch
type Git ¶
type Git interface { BaseBranch() string Switch(branch string, create bool) error SwitchBack() error Commit(message string, path []string) (CommitHash, error) Push(ctx context.Context, branch string) error }
Git .
func Clone ¶
func Clone(c Configuration, owner, name string) (Git, filesystem.Filesystem, error)
Clone repository to memory
func OpenCurrentDirectoryRepository ¶
func OpenCurrentDirectoryRepository(c Configuration) (Git, filesystem.Filesystem, error)
OpenCurrentDirectoryRepository opens current directory's repository
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
Repository of VCS
func ParseRepository ¶
func ParseRepository(repo string) (*Repository, error)
ParseRepository from owner/name format
Click to show internal directories.
Click to hide internal directories.