Documentation ¶
Index ¶
- Constants
- type Dependency
- type DependencyResolver
- type DependencyResolverError
- type DependencyResolverErrorStringer
- type LockFile
- type LockedMod
- type LockedModTarget
- type LockfileVersion
- type MockProvider
- type ModName
- type ModVersion
- type Provider
- type SMLVersion
- type SMLVersionTarget
- type Target
- type TargetName
- type VersionDependency
Constants ¶
View Source
const ( InitialLockfileVersion = LockfileVersion(iota) ModTargetsLockfileVersion CurrentLockfileVersion = nextLockfileVersion - 1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dependency ¶
type DependencyResolver ¶
type DependencyResolver struct {
// contains filtered or unexported fields
}
func NewDependencyResolver ¶
func NewDependencyResolver(provider Provider, apiBase string) DependencyResolver
func (DependencyResolver) ResolveModDependencies ¶
func (d DependencyResolver) ResolveModDependencies(ctx context.Context, constraints map[string]string, lockFile *LockFile, 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
type DependencyResolverErrorStringer ¶
type DependencyResolverErrorStringer struct { pubgrub.StandardIncompatibilityStringer // contains filtered or unexported fields }
func MakeDependencyResolverErrorStringer ¶
func MakeDependencyResolverErrorStringer(provider Provider, smlVersions []SMLVersion, gameVersion int) *DependencyResolverErrorStringer
func (*DependencyResolverErrorStringer) IncompatibilityString ¶
func (w *DependencyResolverErrorStringer) IncompatibilityString(incompatibility *pubgrub.Incompatibility, rootPkg string) string
type LockFile ¶
type LockFile struct { Mods map[string]LockedMod `json:"mods"` Version LockfileVersion `json:"version"` }
func NewLockfile ¶
func NewLockfile() *LockFile
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)
func (MockProvider) SMLVersions ¶
func (m MockProvider) SMLVersions(_ context.Context) ([]SMLVersion, error)
type ModVersion ¶
type ModVersion struct { ID string `json:"id"` Version string `json:"version"` Dependencies []Dependency `json:"dependencies"` Targets []Target `json:"targets"` }
type SMLVersion ¶
type SMLVersion struct { ID string `json:"id"` Version string `json:"version"` Targets []SMLVersionTarget `json:"targets"` SatisfactoryVersion int `json:"satisfactory_version"` }
type SMLVersionTarget ¶
type SMLVersionTarget struct { TargetName TargetName `json:"targetName"` Link string `json:"link"` }
type Target ¶
type Target struct { VersionID string `json:"version_id"` TargetName TargetName `json:"target_name"` 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.