gogit

package
v0.0.0-...-274850b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommitOptions

type CommitOptions struct {
	GpgKeyPath       string
	GpgKeyPassphrase string
	KeyID            string
}

type GoGit

type GoGit struct {
	// contains filtered or unexported fields
}

func New

func New(path string, auth transport.AuthMethod) *GoGit

func (*GoGit) CheckoutToCommit

func (g *GoGit) CheckoutToCommit(sha string) error

func (*GoGit) Clone

func (g *GoGit) Clone(ctx context.Context, url, branch string, caBundle []byte) (bool, error)

func (*GoGit) Commit

func (g *GoGit) Commit(message git.Commit, opts ...git.Option) (string, error)

func (*GoGit) CreateRemote

func (g *GoGit) CreateRemote(url, name string) (string, error)

func (*GoGit) Head

func (g *GoGit) Head() (string, error)

func (*GoGit) Init

func (g *GoGit) Init(url, branch string) (bool, error)

func (*GoGit) Path

func (g *GoGit) Path() string

func (*GoGit) Push

func (g *GoGit) Push(ctx context.Context, remoteName string, refSpecs []config.RefSpec, caBundle []byte) error

func (*GoGit) Repository

func (g *GoGit) Repository() *gogit.Repository

func (*GoGit) SetAuth

func (g *GoGit) SetAuth(username string, password string)

func (*GoGit) Status

func (g *GoGit) Status() (bool, error)

func (*GoGit) Write

func (g *GoGit) Write(path string, reader io.Reader) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL