Documentation ¶
Index ¶
- type GoGit
- func (g *GoGit) Add(filename string) error
- func (g *GoGit) Branch(name string) error
- func (g *GoGit) Clone(ctx context.Context, repourl string) error
- func (g *GoGit) Commit(message string) error
- func (g *GoGit) Init(url string) error
- func (g *GoGit) Pull(ctx context.Context, branch string) error
- func (g *GoGit) Push(ctx context.Context) error
- func (g *GoGit) Remove(filename string) error
- func (g *GoGit) SetTokenAuth(token string, username string)
- type GoGitClient
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoGit ¶
type GoGit struct { Opts Options Client GoGitClient Retrier *retrier.Retrier }
func (*GoGit) SetTokenAuth ¶
type GoGitClient ¶
type GoGitClient interface { AddGlob(f string, w *gogit.Worktree) error Checkout(w *gogit.Worktree, opts *gogit.CheckoutOptions) error Clone(ctx context.Context, dir string, repoUrl string, auth transport.AuthMethod) (*gogit.Repository, error) Commit(m string, sig *object.Signature, w *gogit.Worktree) (plumbing.Hash, error) CommitObject(r *gogit.Repository, h plumbing.Hash) (*object.Commit, error) Create(r *gogit.Repository, url string) (*gogit.Remote, error) CreateBranch(r *gogit.Repository, config *config.Branch) error Head(r *gogit.Repository) (*plumbing.Reference, error) Init(dir string) (*gogit.Repository, error) OpenDir(dir string) (*gogit.Repository, error) OpenWorktree(r *gogit.Repository) (*gogit.Worktree, error) PushWithContext(ctx context.Context, r *gogit.Repository, auth transport.AuthMethod) error PullWithContext(ctx context.Context, w *gogit.Worktree, auth transport.AuthMethod, ref plumbing.ReferenceName) error ListRemotes(r *gogit.Repository, auth transport.AuthMethod) ([]*plumbing.Reference, error) Remove(f string, w *gogit.Worktree) (plumbing.Hash, error) SetRepositoryReference(r *gogit.Repository, p *plumbing.Reference) error }
type Options ¶
type Options struct { RepositoryDirectory string Auth transport.AuthMethod GoGitClient GoGitClient }
Click to show internal directories.
Click to hide internal directories.