getpan

package
v0.0.0-...-1802052 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2015 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MkIndent

func MkIndent(d int) string

Types

type CPANFile

type CPANFile struct {
	DependencyList
}

func ParseCPANFile

func ParseCPANFile(file string) (*CPANFile, error)

func ParseCPANLines

func ParseCPANLines(lines []string) (*CPANFile, error)

type Config

type Config struct {
	Sources     []*Source
	Test        *TestConfig
	NoDepdump   bool
	NoInstall   bool
	CPANFile    string
	LogLevel    string
	CPUs        int
	CacheDir    string
	InstallDir  string
	MetaCPAN    bool
	MetaSources []*Source
}

func Configure

func Configure() *Config

func DefaultConfig

func DefaultConfig() *Config

func (*Config) Dump

func (c *Config) Dump()

type Dependency

type Dependency struct {
	Name       string
	Version    string
	Modifier   string
	Module     *Module
	Additional []*Dependency
}

func DependencyFromString

func DependencyFromString(name string, dependency string) (*Dependency, error)

func ParseCPANLine

func ParseCPANLine(line string) (*Dependency, error)

func (*Dependency) Matches

func (v *Dependency) Matches(module *Module) bool

func (*Dependency) MatchesVersion

func (v *Dependency) MatchesVersion(version string) bool

func (*Dependency) Resolve

func (v *Dependency) Resolve() error

func (*Dependency) String

func (d *Dependency) String() string

type DependencyList

type DependencyList struct {
	Dependencies []*Dependency
	Parent       *Module
}

func (*DependencyList) AddDependency

func (d *DependencyList) AddDependency(dep *Dependency)

func (*DependencyList) Install

func (d *DependencyList) Install() (int, error)

func (*DependencyList) PrintDeps

func (deps *DependencyList) PrintDeps(d int)

func (*DependencyList) Resolve

func (d *DependencyList) Resolve() error

func (*DependencyList) UniqueInstalled

func (d *DependencyList) UniqueInstalled() int

type Module

type Module struct {
	Name      string
	Version   string
	Url       string
	Source    *Source
	Cached    string
	Extracted string
	Dir       string
	Deps      *DependencyList
	Formod    *Module
}

func (*Module) Download

func (m *Module) Download() error

func (*Module) Install

func (m *Module) Install() (int, error)

func (*Module) IsCircular

func (m1 *Module) IsCircular(m2 *Module) bool

func (*Module) Path

func (m *Module) Path() string

func (*Module) PrintDeps

func (m *Module) PrintDeps(d int)

func (*Module) String

func (m *Module) String() string

type Source

type Source struct {
	Type       string
	Index      string
	URL        string
	ModuleList map[string]*Module
	Priority   int
}

func DefaultSources

func DefaultSources(cpan bool, backpan bool) []*Source

func NewMetaSource

func NewMetaSource(Type string, Index string, URL string, ModuleList map[string]*Module) *Source

func NewSource

func NewSource(Type string, Index string, URL string) *Source

func (*Source) Find

func (s *Source) Find(d *Dependency) (*Module, error)

func (*Source) Load

func (s *Source) Load() error

func (*Source) ModuleFromBackPANIndex

func (s *Source) ModuleFromBackPANIndex(module string) *Module

func (*Source) ModuleFromCPANIndex

func (s *Source) ModuleFromCPANIndex(module string) *Module

func (*Source) String

func (s *Source) String() string

type TestConfig

type TestConfig struct {
	Global  bool
	Modules map[string]bool
}

type VersionOutput

type VersionOutput struct {
	Path    string
	URL     string
	Index   string
	Version float64
}

FIXME same structs in both smartpan and getpan

type WhereOutput

type WhereOutput struct {
	Module   string
	Latest   float64
	Versions []*VersionOutput
}

Jump to

Keyboard shortcuts

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