Documentation ¶
Overview ¶
FLUX V1 DEPRECATION NOTICE. https://github.com/weaveworks/eksctl/issues/2963
Index ¶
- func IsGitURL(rawURL string) bool
- func RepoName(repoURL string) (string, error)
- func ValidatePrivateSSHKeyPath(privateSSHKeyPath string) error
- func ValidateURL(url string) error
- type Client
- func (git Client) Add(files ...string) error
- func (git *Client) CloneRepoInPath(clonePath string, options CloneOptions) error
- func (git *Client) CloneRepoInTmpDir(tmpDirPrefix string, options CloneOptions) (string, error)
- func (git Client) Commit(message, user, email string) error
- func (git Client) DeleteLocalRepo() error
- func (git Client) DeleteRemoteBranch(branch string) error
- func (git Client) Push() error
- func (git *Client) WithDir(dir string)
- type ClientParams
- type CloneOptions
- type TmpCloner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidatePrivateSSHKeyPath ¶
ValidatePrivateSSHKeyPath validates the path to the (optional) private SSH key used to interact with the Git repository configured in this object.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client can perform git operations on the given directory
func NewGitClient ¶
func NewGitClient(params ClientParams) *Client
NewGitClient returns a client that can perform git operations
func NewGitClientFromExecutor ¶
NewGitClientFromExecutor returns a client that can have an executor injected. Useful for testing
func (*Client) CloneRepoInPath ¶
func (git *Client) CloneRepoInPath(clonePath string, options CloneOptions) error
CloneRepoInPath behaves like CloneRepoInTmpDir but clones the repository in a specific directory which creates if needed
func (*Client) CloneRepoInTmpDir ¶
func (git *Client) CloneRepoInTmpDir(tmpDirPrefix string, options CloneOptions) (string, error)
CloneRepoInTmpDir clones a repo specified in the gitURL in a temporary directory and checks out the specified branch
func (Client) DeleteLocalRepo ¶
DeleteLocalRepo deletes the local copy of a repository, including the directory
func (Client) DeleteRemoteBranch ¶
type ClientParams ¶
type ClientParams struct {
PrivateSSHKeyPath string
}
ClientParams groups the arguments to provide to create a new Git client.
type CloneOptions ¶
type CloneOptions struct { URL string Branch string Bootstrap bool // create the branch if the repository is empty }
CloneOptions are the options for cloning a Git repository