git

package
v0.0.0-...-b425644 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Commit

type Commit struct {
	Checksum   string
	AuthorDate time.Time
	Message    string
}

type CommitOptions

type CommitOptions struct {
	Limit   int
	Pattern string
}

type Logger

type Logger interface {
	Printf(string, ...interface{})
}

type Repository

type Repository struct {
	Origin    string
	LocalPath string

	Logger Logger
}

func (*Repository) Archive

func (repo *Repository) Archive(revision string, w io.Writer, files ...string) (int64, error)

write tar.gz archive to writer

func (*Repository) Commits

func (repo *Repository) Commits(options *CommitOptions) (commits []*Commit, e error)

func (*Repository) DateOf

func (repo *Repository) DateOf(revision, file string) (time.Time, error)

func (*Repository) Fetch

func (repo *Repository) Fetch() error

func (*Repository) Init

func (repo *Repository) Init() error

func (*Repository) MostRecentCommitFor

func (repo *Repository) MostRecentCommitFor(pattern string) (commit string, e error)

func (*Repository) Name

func (repo *Repository) Name() string

func (*Repository) Printf

func (r *Repository) Printf(m string, args ...interface{})

func (*Repository) Show

func (repo *Repository) Show(rev string) (*Commit, error)

func (*Repository) WriteArchiveToTar

func (repo *Repository) WriteArchiveToTar(revision string, w *tar.Writer) (e error)

Writes tgz archive to the given tar writer.

func (*Repository) WriteFilesToTar

func (repo *Repository) WriteFilesToTar(revision string, w *tar.Writer, files ...string) (e error)

Jump to

Keyboard shortcuts

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