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 IsGitURL ¶
func IsGitURL(rawURL string) bool
IsGitURL returns true if the argument matches the git url format
func RepoName ¶
func RepoName(repoURL string) (string, error)
RepoName returns the name of the repository given its URL
func ValidatePrivateSSHKeyPath ¶
func ValidatePrivateSSHKeyPath(privateSSHKeyPath string) error
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 ¶
func NewGitClientFromExecutor(executor executor.Executor) *Client
NewGitClientFromExecutor returns a client that can have an executor injected. Useful for testing
func (Client) Add ¶
func (git Client) Add(files ...string) error
Add performs can perform a `git add` operation on the given file paths
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) Commit ¶
func (git Client) Commit(message, user, email string) error
Commit makes a commit if there are staged changes
func (Client) DeleteLocalRepo ¶
func (git Client) DeleteLocalRepo() error
DeleteLocalRepo deletes the local copy of a repository, including the directory
func (Client) DeleteRemoteBranch ¶
func (git Client) DeleteRemoteBranch(branch string) error
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