Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cloner ¶
Cloner is the interface that wraps the Clone method.
Clone clones a remote git repository into a destination path.
type Git ¶
type Git struct {
// contains filtered or unexported fields
}
Git represents the components reponsible for cloning and opening git repositories. It is supposed to hide the authentication mechanisms used to clone repositories. Git implements OpenCloner interface.
func New ¶
New instanciate a new Git struct. It take a list of Option objects to configure the remote and/or the authentication method.
type OpenCloner ¶
OpenCloner is the interface that wraps the Open and Clone methods.
type Opener ¶
Open is the interface that wraps the Open method.
Open opens a git repository from the given path.
type Option ¶
type Option func(*Git)
func WithGithubCredentials ¶
WithGithubCredentials sets the Github username and password used to clone repositories with HTTPS protocol.
func WithRemote ¶
WithRemote sets the remote attached to cloning URL.
func WithSSHSigner ¶
WithSSHSigner sets the ssh.Signer used to clone repositories with ssh protocol.