git

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	URL     string
	WorkDir string

	Username string
	Token    string

	AuthorName  string
	AuthorEmail string
}

type Repo

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

func NewRepo

func NewRepo(cfg Config) (*Repo, error)

func (*Repo) Add

func (r *Repo) Add(path string) error

func (*Repo) Clone

func (r *Repo) Clone(ctx context.Context) error

func (*Repo) CloneOrOpen

func (r *Repo) CloneOrOpen(ctx context.Context) error

func (*Repo) Commit

func (r *Repo) Commit(msg string) error

func (*Repo) IsClean

func (r *Repo) IsClean() bool

func (*Repo) Objects

func (r *Repo) Objects() (map[string]string, error)

func (*Repo) Open

func (r *Repo) Open(ctx context.Context) error

func (*Repo) Path

func (r *Repo) Path() string

func (*Repo) Pull

func (r *Repo) Pull(ctx context.Context) error

func (*Repo) Push

func (r *Repo) Push(ctx context.Context) error

Jump to

Keyboard shortcuts

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