Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DownloadOpts ¶
DownloadOpts denotes options for downloading a repo
type Host ¶
type Host string
Host denotes supported git hosts
const ( // HostGitHub is https://github.com HostGitHub Host = "github.com" // HostGitLab is https://gitlab.com HostGitLab Host = "gitlab.com" )
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles repo management
func NewManager ¶
func NewManager(l *zap.SugaredLogger, opts ManagerOpts) *Manager
NewManager instantiates a new manager
func (*Manager) Download ¶
func (m *Manager) Download(ctx context.Context, remote string, opts DownloadOpts) (*Repository, error)
Download downloads the given repository
type ManagerOpts ¶
type ManagerOpts struct {
Workdir string
}
ManagerOpts denotes options for the manager
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
Repository represents a managed repository, cloned for analysis
func (*Repository) GitRepo ¶
func (r *Repository) GitRepo() *gogit.Repository
GitRepo returns the underlying go-git repository
func (*Repository) Host ¶
func (r *Repository) Host() (Host, error)
Host gets the code host of this repository
Click to show internal directories.
Click to hide internal directories.