repository

package
v0.6.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder interface {
	SetPath(string) Builder
	SetCloneOptions(git.CloneOptions) Builder
	SetGitRepo(*git.Repository) Builder
	SetTagName(string) Builder
	Build() Repository
}

Builder repository builder interface

func New

func New() Builder

New Creates an instance of repository builder

type Repository

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

Repository data structure to represent a repository information

func (*Repository) Build

func (repo *Repository) Build() Repository

Build build a Repository instance

func (*Repository) CheckOutTag

func (repo *Repository) CheckOutTag() error

CheckOutTag check out a repo based on the given tag name

func (*Repository) Clone

func (repo *Repository) Clone() error

Clone clones a repo based on a given url and a path

func (*Repository) CloneInMemory

func (repo *Repository) CloneInMemory() error

CloneInMemory clones a repo in a memory storage

func (*Repository) GetTag

func (repo *Repository) GetTag() (*plumbing.Reference, error)

GetTag get a repo tag reference based on a given tag name

func (*Repository) GetTreeEntries

func (repo *Repository) GetTreeEntries() []object.TreeEntry

GetTreeEntries get repo top level tree entries

func (*Repository) SetCloneOptions

func (repo *Repository) SetCloneOptions(cloneOptions git.CloneOptions) Builder

SetCloneOptions set git clone options

func (*Repository) SetGitRepo

func (repo *Repository) SetGitRepo(gitRepo *git.Repository) Builder

SetGitRepo set git repo

func (*Repository) SetPath

func (repo *Repository) SetPath(path string) Builder

SetPath set repo path

func (*Repository) SetTagName

func (repo *Repository) SetTagName(tagName string) Builder

SetTagName set the git repo tag name

Jump to

Keyboard shortcuts

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