git

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRepositoryNotFound     = errors.New("repository not found")
	ErrEmptyRemoteRepository  = errors.New("remote repository is empty")
	ErrAuthenticationRequired = errors.New("authentication required")
	ErrAuthorizationFailed    = errors.New("authorization failed")
)

Functions

func Pull

func Pull(s *Repo, insecure bool) error

func TagExists

func TagExists(tag string, r *git.Repository) (bool, error)

func Tags

func Tags(repoUrl string, auth transport.AuthMethod, insecure bool) ([]string, error)

Types

type Repo

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

Repo is an in-memory git repository

func Clone

func Clone(repoUrl string, auth transport.AuthMethod, insecure bool) (*Repo, error)

func (*Repo) Branch

func (s *Repo) Branch(name string) error

func (*Repo) Commit

func (s *Repo) Commit(path, msg string) (string, error)

func (*Repo) CreateTag

func (s *Repo) CreateTag(tag string) (bool, error)

func (*Repo) Exists

func (s *Repo) Exists(path string) (bool, error)

func (*Repo) FS

func (s *Repo) FS() billy.Filesystem

func (*Repo) Push

func (s *Repo) Push(downstream, branch string, insecure bool) error

func (*Repo) PushTags

func (s *Repo) PushTags(token string, insecure bool) error

Jump to

Keyboard shortcuts

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