Documentation ¶
Index ¶
- func GetBasicAuth(username, password string) (transport.AuthMethod, error)
- func GetSSHKeyAuth(privateSshKey []byte, insecureIgnoreHostKey bool) (transport.AuthMethod, error)
- func GetSSHKeyFileAuth(privateSshKeyFile string, insecureIgnoreHostKey bool) (transport.AuthMethod, error)
- type Config
- type GitConnection
- type GitGateway
- type Reference
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBasicAuth ¶
func GetBasicAuth(username, password string) (transport.AuthMethod, error)
func GetSSHKeyAuth ¶
func GetSSHKeyAuth(privateSshKey []byte, insecureIgnoreHostKey bool) (transport.AuthMethod, error)
func GetSSHKeyFileAuth ¶
func GetSSHKeyFileAuth(privateSshKeyFile string, insecureIgnoreHostKey bool) (transport.AuthMethod, error)
Types ¶
type Config ¶
type Config struct { RepoURL string `json:"RepoURL" yaml:"RepoURL"` Branch string `json:"Branch" yaml:"Branch"` Username string `json:"Username" yaml:"Username"` Password string `json:"Password" yaml:"Password"` Insecure bool `json:"Insecure" yaml:"Insecure"` SSHKey string `json:"SshKey" yaml:"SshKey"` SSHKeyFile string `json:"SshKeyFile" yaml:"SshKeyFile"` }
type GitConnection ¶
type GitConnection struct {
// contains filtered or unexported fields
}
func NewGitConnection ¶
func NewGitConnection(auth transport.AuthMethod, repoURL string, insecureSkipTLS, insecureIgnoreUnkownHost bool, storer *memory.Storage, fs billy.Filesystem, logger logrus.Entry) *GitConnection
NewGitConnection creates and returns a new git connection
func (*GitConnection) GetBranches ¶
func (gc *GitConnection) GetBranches() ([]string, error)
func (*GitConnection) GetFile ¶
func (gc *GitConnection) GetFile(branch, path string) (billy.File, error)
func (*GitConnection) GetFileContent ¶
func (gc *GitConnection) GetFileContent(branch, path string) ([]byte, error)
func (*GitConnection) GetWorktree ¶
func (gc *GitConnection) GetWorktree(branch string) (*git.Worktree, error)
type GitGateway ¶
type GitGateway struct {
// contains filtered or unexported fields
}
func NewGitGateway ¶
func NewGitGateway(cfg *Config) (*GitGateway, error)
Click to show internal directories.
Click to hide internal directories.