repo

package
v0.0.0-...-fc13009 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotAGitDir = errors.New("No git structure found in directory")
)

Functions

This section is empty.

Types

type DeleteMethod

type DeleteMethod int
const (
	DeleteAll DeleteMethod = iota
	DeleteAsk
)

type Register

type Register struct {
	Repos map[string]directoryContent
}

Register stores a map of all registered repositories

func CurrentRegister

func CurrentRegister(storageFile string) *Register

func (*Register) Add

func (r *Register) Add(gitDir string) error

TODO error

func (*Register) Clone

func (r *Register) Clone(url string, destDir string) error

func (*Register) Fetch

func (r *Register) Fetch(options string) error

func (*Register) List

func (r *Register) List()

List prints all the entries from the storage file

func (*Register) LoadRemotes

func (r *Register) LoadRemotes()

LoadRemotes looks up the currently available remotes of a repository (directory) and adds them to the Register

func (*Register) RemoveInvalidEntries

func (r *Register) RemoveInvalidEntries(m DeleteMethod) bool

RemoveInvalidEntries remove entries which are not marked valid from the storage

func (*Register) Status

func (r *Register) Status(key string, sorted string, reverse bool)

Status gathers the state for each entry and prints the status in a list sorted by the specified argument

func (*Register) Store

func (r *Register) Store()

Store writes the current entries of r.Repo to the storage file

Jump to

Keyboard shortcuts

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