Documentation
¶
Index ¶
- Constants
- Variables
- type Dependency
- type DependencyResolver
- type DependencyResolverError
- type DependencyResolverErrorStringer
- func (w *DependencyResolverErrorStringer) FormatConstraint(pkg string, constraint semver.Constraint) string
- func (w *DependencyResolverErrorStringer) FormatPackage(pkg string) string
- func (w *DependencyResolverErrorStringer) GetPackageName(pkg string) string
- func (w *DependencyResolverErrorStringer) IncompatibilityString(incompatibility *pubgrub.Incompatibility, ts pubgrub.TermStringer, ...) string
- type LockFile
- type LockedMod
- type LockedModTarget
- type LockfileVersion
- type MockProvider
- type ModName
- type ModVersion
- type PreferredVersions
- type Provider
- type Target
- type TargetName
- type VersionDependency
Constants ¶
View Source
const ( InitialLockfileVersion = LockfileVersion(iota) ModTargetsLockfileVersion CurrentLockfileVersion = nextLockfileVersion - 1 )
View Source
const (
FactoryGamePkg = "FactoryGame"
)
Variables ¶
View Source
var ErrModNotFound = pubgrub.ErrPackageNotFound
Functions ¶
This section is empty.
Types ¶
type Dependency ¶
type DependencyResolver ¶
type DependencyResolver struct {
// contains filtered or unexported fields
}
func NewDependencyResolver ¶
func NewDependencyResolver(provider Provider) DependencyResolver
func (DependencyResolver) ResolveModDependencies ¶
func (d DependencyResolver) ResolveModDependencies(constraints map[string]string, preferredVersions PreferredVersions, gameVersion int, requiredTargets []TargetName) (*LockFile, error)
type DependencyResolverError ¶
type DependencyResolverError struct {
pubgrub.SolvingError
// contains filtered or unexported fields
}
func (DependencyResolverError) Error ¶
func (e DependencyResolverError) Error() string
func (DependencyResolverError) Stringer ¶ added in v0.0.7
func (e DependencyResolverError) Stringer() *DependencyResolverErrorStringer
type DependencyResolverErrorStringer ¶
type DependencyResolverErrorStringer struct {
pubgrub.StandardIncompatibilityStringer
// contains filtered or unexported fields
}
func MakeDependencyResolverErrorStringer ¶
func MakeDependencyResolverErrorStringer(provider Provider, gameVersion int) *DependencyResolverErrorStringer
func (*DependencyResolverErrorStringer) FormatConstraint ¶ added in v0.0.7
func (w *DependencyResolverErrorStringer) FormatConstraint(pkg string, constraint semver.Constraint) string
func (*DependencyResolverErrorStringer) FormatPackage ¶ added in v0.0.7
func (w *DependencyResolverErrorStringer) FormatPackage(pkg string) string
func (*DependencyResolverErrorStringer) GetPackageName ¶ added in v0.0.7
func (w *DependencyResolverErrorStringer) GetPackageName(pkg string) string
func (*DependencyResolverErrorStringer) IncompatibilityString ¶
func (w *DependencyResolverErrorStringer) IncompatibilityString(incompatibility *pubgrub.Incompatibility, ts pubgrub.TermStringer, rootPkg string) string
type LockFile ¶
type LockFile struct {
Mods map[string]LockedMod `json:"mods"`
Version LockfileVersion `json:"version"`
}
func NewLockfile ¶
func NewLockfile() *LockFile
func (*LockFile) PreferredVersions ¶ added in v0.0.7
func (l *LockFile) PreferredVersions(pkg string) (semver.Constraint, bool)
type LockedMod ¶
type LockedMod struct {
Dependencies map[string]string `json:"dependencies"`
Targets map[string]LockedModTarget `json:"targets"`
Version string `json:"version"`
}
type LockedModTarget ¶
type LockfileVersion ¶
type LockfileVersion int
type MockProvider ¶
type MockProvider struct{}
func (MockProvider) GetModName ¶
func (MockProvider) ModVersionsWithDependencies ¶
func (m MockProvider) ModVersionsWithDependencies(_ context.Context, modID string) ([]ModVersion, error)
type ModVersion ¶
type ModVersion struct {
Version string `json:"version"`
GameVersion string `json:"game_version"`
Dependencies []Dependency `json:"dependencies"`
Targets []Target `json:"targets"`
RequiredOnRemote bool `json:"required_on_remote"`
}
type PreferredVersions ¶ added in v0.0.7
type PreferredVersions interface {
PreferredVersions(pkg string) (semver.Constraint, bool)
}
type Target ¶
type Target struct {
TargetName TargetName `json:"target_name"`
Link string `json:"link"`
Hash string `json:"hash"`
Size int64 `json:"size"`
}
type TargetName ¶
type TargetName string
const ( TargetNameLinuxServer TargetName = "LinuxServer" TargetNameWindows TargetName = "Windows" TargetNameWindowsServer TargetName = "WindowsServer" )
type VersionDependency ¶
Click to show internal directories.
Click to hide internal directories.