depslib

package
v0.0.1-a01 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2020 License: MIT Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BackupDeps

func BackupDeps(depsPath string, log *clog.Log) error

func CleanDirectory

func CleanDirectory(directory string, log *clog.Log) error

func CleanDirectoryWithBackup

func CleanDirectoryWithBackup(directory string, tempSuffix string, log *clog.Log) (string, error)

func CleanTempDirectory

func CleanTempDirectory(tempSuffix string, log *clog.Log) (string, error)

func CleanTempDirectoryEx

func CleanTempDirectoryEx(directory string, tempSuffix string, log *clog.Log) (string, error)

func CreateDirectoryIfNeeded

func CreateDirectoryIfNeeded(directory string, log *clog.Log) error

func FindClosestConfigurationFiles

func FindClosestConfigurationFiles(startPath string, log *clog.Log) ([]string, error)

func HTTPGet

func HTTPGet(downloadURL *url.URL, log *clog.Log) (content io.Reader, err error)

func HackRemoveCShortName

func HackRemoveCShortName(shortname string) string
func MakeRelativeSymlink(existingFilename string, symlinkFilename string, log *clog.Log) error
func MakeSymlink(existingFilename string, symlinkFilename string, log *clog.Log) error

func RepoNameToShortName

func RepoNameToShortName(repo string) string

func TempDirectory

func TempDirectory(tempSuffix string) (string, error)

Types

type ArtifactType

type ArtifactType uint
const (
	Library ArtifactType = iota
	ConsoleApplication
	Application
	Inherit
)

func ToArtifactType

func ToArtifactType(v string) ArtifactType

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

func NewCache

func NewCache() *Cache

func (*Cache) AddNode

func (c *Cache) AddNode(name string, node *DependencyNode)

func (*Cache) FindNode

func (c *Cache) FindNode(name string) *DependencyNode

type Config

type Config struct {
	DepsVersion  string
	Version      string
	Name         string
	ArtifactType string
	Dependencies []Package
	Development  []Package
}

func ReadConfigFromDirectory

func ReadConfigFromDirectory(directory string, log *clog.Log) (*Config, error)

func ReadConfigFromFilename

func ReadConfigFromFilename(filename string) (*Config, error)

func ReadFromReader

func ReadFromReader(reader io.Reader) (*Config, error)

type DependencyInfo

type DependencyInfo struct {
	RootPath        string
	PackageRootPath string
	RootNodes       []*DependencyNode
	RootNode        *DependencyNode
}

func SetupDependencies

func SetupDependencies(filename string, useSymlink bool, log *clog.Log) (*DependencyInfo, error)

type DependencyNode

type DependencyNode struct {
	// contains filtered or unexported fields
}

func (*DependencyNode) AddDependency

func (n *DependencyNode) AddDependency(node *DependencyNode)

func (*DependencyNode) AddDependingOnThis

func (n *DependencyNode) AddDependingOnThis(node *DependencyNode)

func (*DependencyNode) AddDevelopment

func (n *DependencyNode) AddDevelopment(node *DependencyNode)

func (*DependencyNode) ArtifactType

func (n *DependencyNode) ArtifactType() ArtifactType

func (*DependencyNode) Dependencies

func (n *DependencyNode) Dependencies() []*DependencyNode

func (*DependencyNode) Name

func (n *DependencyNode) Name() string

func (*DependencyNode) Print

func (n *DependencyNode) Print(indent int)

func (*DependencyNode) ShortName

func (n *DependencyNode) ShortName() string

func (*DependencyNode) String

func (n *DependencyNode) String() string

type Package

type Package struct {
	Version string
	Name    string
}

func (Package) String

func (p Package) String() string

Jump to

Keyboard shortcuts

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