discover

package
v0.0.0-...-17add77 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2018 License: MIT Imports: 9 Imported by: 4

Documentation

Overview

Package discover hosts all the discoverers which can explore Go projects and identify package managers in user, so that repositories hosting packages can be discovered.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dep

type Dep struct{}

Dep is a discoverer for dep Go package manager.

func (Dep) InUse

func (d Dep) InUse(projectPath string) (bool, error)

InUse checks whether project is using dep as a package manager.

func (Dep) Name

func (d Dep) Name() string

Name returns name of Dep discoverer.

func (Dep) Repositories

func (d Dep) Repositories(projectPath string) (RepoMap, error)

Repositories discovers repositories belonging to packages imported inside a project managed by Dep.

type Discoverer

type Discoverer interface {
	Name() string
	InUse(path string) (bool, error)
	Repositories(path string) (RepoMap, error)
}

Discoverer can explore the workspace and discover Go packages that are used in project by specific package manager.

type Glide

type Glide struct{}

Glide is a discoverer for glide Go package manager.

func (Glide) InUse

func (g Glide) InUse(projectPath string) (bool, error)

InUse checks whether project is using glide as a package manager.

func (Glide) Name

func (g Glide) Name() string

Name returns name of Glide discoverer.

func (Glide) Repositories

func (g Glide) Repositories(projectPath string) (RepoMap, error)

Repositories discovers repositories belonging to packages imported inside a project managed by Glide.

type Govendor

type Govendor struct{}

Govendor is a discoverer for govendor Go package manager.

func (Govendor) InUse

func (g Govendor) InUse(projectPath string) (bool, error)

InUse checks whether project is using govendor as a package manager.

func (Govendor) Name

func (g Govendor) Name() string

Name returns name of Govendor discoverer.

func (Govendor) Repositories

func (g Govendor) Repositories(projectPath string) (RepoMap, error)

Repositories discovers repositories belonging to packages imported inside a project managed by Govendor.

type Gvt

type Gvt struct{}

Gvt is a discoverer for gvt Go package manager.

func (Gvt) InUse

func (g Gvt) InUse(projectPath string) (bool, error)

InUse checks whether project is using gvt as a package manager.

func (Gvt) Name

func (g Gvt) Name() string

Name returns name of Gvt discoverer.

func (Gvt) Repositories

func (g Gvt) Repositories(projectPath string) (RepoMap, error)

Repositories discovers repositories belonging to packages imported inside a project managed by Gvt.

type RepoMap

type RepoMap map[string]Repository

RepoMap is a lookup structure holding repoURL:repo as key value pairs.

type Repository

type Repository struct {
	Name  string
	Owner string
	URL   string
}

Repository represents a VCS repository hosted on a remote site, containing one or more Go packages.

func Repositories

func Repositories(path string) ([]Repository, error)

Repositories produces a slice of repositories extracted from the passed in discoverers within one's Go project.

Jump to

Keyboard shortcuts

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