resolver

package
v0.36.3 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: MIT Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	DefaultSource = "railpack default"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PackageRef

type PackageRef struct {
	Name string
}

type RequestedPackage

type RequestedPackage struct {
	Name    string
	Version string
	Source  string

	// If set, the resolver will use this function to determine if a version is available
	IsVersionAvailable func(version string) bool

	// If true, the package will not be installed with mise
	// but the version will still be resolved and displayed in the output
	SkipMiseInstall bool
}

func NewRequestedPackage

func NewRequestedPackage(name, defaultVersion string) *RequestedPackage

func (*RequestedPackage) SetVersion

func (p *RequestedPackage) SetVersion(version, source string) *RequestedPackage

type ResolvedPackage

type ResolvedPackage struct {
	Name             string  `json:"name"`
	RequestedVersion *string `json:"requestedVersion,omitempty"`
	ResolvedVersion  *string `json:"resolvedVersion,omitempty"`
	Source           string  `json:"source"`
}

type Resolver

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

func NewResolver

func NewResolver(miseDir string) (*Resolver, error)

func (*Resolver) Default

func (r *Resolver) Default(name, defaultVersion string) PackageRef

func (*Resolver) Get

func (r *Resolver) Get(name string) *RequestedPackage

func (*Resolver) ResolvePackages

func (r *Resolver) ResolvePackages() (map[string]*ResolvedPackage, error)

func (*Resolver) SetPreviousVersion

func (r *Resolver) SetPreviousVersion(name, version string)

func (*Resolver) SetSkipMiseInstall added in v0.0.69

func (r *Resolver) SetSkipMiseInstall(ref PackageRef, skipMiseInstall bool)

func (*Resolver) SetVersionAvailable added in v0.0.31

func (r *Resolver) SetVersionAvailable(ref PackageRef, isVersionAvailable func(version string) bool)

func (*Resolver) Version

func (r *Resolver) Version(ref PackageRef, version, source string) PackageRef

Jump to

Keyboard shortcuts

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