git

package
v0.13.3 Latest Latest
Warning

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

Go to latest
Published: May 6, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoGitRepository = errors.New("no git repository")
	ErrNoStagedFiles   = errors.New("no staged files")
)

Functions

This section is empty.

Types

type Author

type Author struct {
	Name  string
	Email string
}

type Commit

type Commit struct {
	Author
	Hash    string
	Message string
}

type Git

type Git interface {
	Init(url, branch string) (bool, error)
	Clone(ctx context.Context, url, branch string) (bool, error)
	Write(path string, reader io.Reader) error
	Commit(message Commit) (string, error)
	Push(ctx context.Context) error
	Status() (bool, error)
	Head() (string, error)
	Path() string
}

Git is an interface for basic Git operations on a single branch of a remote repository.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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