pkg

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2018 License: Apache-2.0 Imports: 19 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneToDir added in v0.2.0

func CloneToDir(dest, url string) error

Clone the given url to the given dest folder

func FetchDir added in v0.2.0

func FetchDir(dir, ref string) error

Fetch does a git fetch to the given ref

func GetLatestRef added in v0.2.0

func GetLatestRef(vcsURL string) (string, error)

Types

type Module

type Module struct {
	Config *config.Module

	RegistryURL string
	// contains filtered or unexported fields
}

Module pkg manages downloading pkg

func (*Module) Clone

func (m *Module) Clone(p *packages.Package, dataSubdir string) error

Clone the given package to {data_dir}/{dataSubdir}/{package name}

func (*Module) FetchTags added in v0.3.0

func (m *Module) FetchTags(p *packages.Package) ([]RemoteTag, error)

FetchTags fetches tag information about the given package from upstream vcs repo

func (*Module) Init

func (m *Module) Init(c *service.Config)

func (*Module) Registry

func (m *Module) Registry(registryURL string) *Registry

Registry creates and returns a new registry for the given url

type Registry

type Registry struct {
	URL      string
	Registry *packages.Registry
	// contains filtered or unexported fields
}

func (*Registry) Match

func (r *Registry) Match(re *regexp.Regexp) ([]*packages.Package, error)

Match searches the registry for all packages with name matching the given regex.

func (*Registry) Proto

func (r *Registry) Proto() *packages.Registry

Proto returns a clone of the underlying registry proto

func (*Registry) Search

func (r *Registry) Search(name string) (*packages.Package, error)

Search the repo for a package with the given name

func (*Registry) Sync

func (r *Registry) Sync() error

Sync the repo data from the source

type RemoteTag added in v0.3.0

type RemoteTag struct {
	Name string
	SHA  string
	URL  string
}

Jump to

Keyboard shortcuts

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