pkg

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2017 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

type Module struct {
	Config *config.Module

	RegistryURL string
}

Module pkg manages downloading pkg

func (*Module) CheckForUpdates

func (m *Module) CheckForUpdates(packageName, dir string) (headRef, latestRef string, err error)

CheckForUpdates in the given repo at {data_dir}/{dir}/{packageName}

func (*Module) Clone

func (m *Module) Clone(packageName, packageURL, dir string) error

Clone the given repo to {data_dir}/{dir}/{name}

func (*Module) CloneToTheme

func (m *Module) CloneToTheme(url string) (*models.Theme, error)

CloneToTheme fetches the theme to memory returns the model and theme

func (*Module) FetchPackage

func (m *Module) FetchPackage(p *packages.Package) ([]*packages.Registry, error)

FetchPackage fetches 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

FetchDefaultRegistry fetches the default registry

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)

func (*Registry) Proto

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

func (*Registry) Search

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

func (*Registry) Sync

func (r *Registry) Sync() error

Jump to

Keyboard shortcuts

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