depslib

package
v0.0.1-a04 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: MIT Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BackupDeps

func BackupDeps(depsPath string) error

func CalculateTotalDependencies

func CalculateTotalDependencies(rootPath string, depsPath string, conf *Config, mode Mode, useDevelopmentDependencies bool) (*Cache, *DependencyNode, error)

func CleanDirectory

func CleanDirectory(directory string) error

func CleanDirectoryWithBackup

func CleanDirectoryWithBackup(directory string, tempSuffix string) (string, error)

func CleanTempDirectory

func CleanTempDirectory(tempSuffix string) (string, error)

func CleanTempDirectoryEx

func CleanTempDirectoryEx(directory string, tempSuffix string) (string, error)

func CreateDirectoryIfNeeded

func CreateDirectoryIfNeeded(directory string) error

func FindClosestConfigurationFiles

func FindClosestConfigurationFiles(startPath string) ([]string, error)

func HTTPGet

func HTTPGet(downloadURL *url.URL, targetFile string) (err error)
func MakeSymlink(existingDirectory string, targetDirectory string) 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 {
	Nodes map[string]*DependencyNode
}

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
	LibraryName  string
	ArtifactType string
	Dependencies []Package
	Development  []Package
}

func ReadConfigFromDirectory

func ReadConfigFromDirectory(directory string) (*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, mode Mode, forceClean bool, useDevelopmentDependencies bool, localPackageRoot string, depsTargetPathOverride string) (*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) LibraryName

func (n *DependencyNode) LibraryName() string

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 Mode

type Mode uint8
const (
	Wget Mode = iota
	Clone
	Symlink
	ReadLocal
)

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