Versions in this module Expand all Collapse all v0 v0.0.4 Aug 15, 2023 Changes in this version + var ErrCannotWriteToReadOnly = errors.New("the gitDirectory is read-only, cannot write") + var ErrNotStarted = errors.New("the gitDirectory hasn't been started (and hence, cloned) yet") + type AuthMethod interface + TransportType func() gitprovider.TransportType + func NewHTTPSAuthMethod(username, password string) (AuthMethod, error) + func NewSSHAuthMethod(identityFile, knownHostsFile []byte) (AuthMethod, error) + type GitDirectory interface + CheckoutMainBranch func() error + CheckoutNewBranch func(branchName string) error + Cleanup func() error + Commit func(ctx context.Context, authorName, authorEmail, msg string) error + CommitChannel func() chan string + Dir func() string + MainBranch func() string + Pull func(ctx context.Context) error + RepositoryRef func() gitprovider.RepositoryRef + Resume func() + StartCheckoutLoop func() error + Suspend func() + func NewGitDirectory(repoRef gitprovider.RepositoryRef, opts GitDirectoryOptions) (GitDirectory, error) + type GitDirectoryOptions struct + AuthMethod AuthMethod + Branch string + Interval time.Duration + Timeout time.Duration + func (o *GitDirectoryOptions) Default()