git

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMissingRepo = errors.New("missing repo")

ErrMissingRepo indicates that the requested repository could not be found.

Functions

func RepoURL

func RepoURL(host string, port int, name string) string

RepoURL returns the URL of the repository.

Types

type GitRepo

type GitRepo interface {
	Repo() string
	Name() string
	Description() string
	Readme() (string, string)
	HEAD() (*git.Reference, error)
	Commit(string) (*git.Commit, error)
	CommitsByPage(*git.Reference, int, int) (git.Commits, error)
	CountCommits(*git.Reference) (int64, error)
	Diff(*git.Commit) (*git.Diff, error)
	References() ([]*git.Reference, error)
	Tree(*git.Reference, string) (*git.Tree, error)
	IsPrivate() bool
}

GitRepo is an interface for Git repositories.

type GitRepoSource

type GitRepoSource interface {
	GetRepo(string) (GitRepo, error)
	AllRepos() []GitRepo
}

GitRepoSource is an interface for Git repository factory.

Jump to

Keyboard shortcuts

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