Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ModInstaller ¶
type ModInstaller struct { ModsDir string InstalledDependencies []*ResolvedModRef }
func NewModInstaller ¶
func NewModInstaller(workspacePath string) *ModInstaller
func (*ModInstaller) GetModRefForVersion ¶
func (i *ModInstaller) GetModRefForVersion(modVersion *modconfig.ModVersion) (*ResolvedModRef, error)
func (*ModInstaller) InstallModDependencies ¶
func (i *ModInstaller) InstallModDependencies(mod *modconfig.Mod) error
InstallModDependencies installs all dependencies of the mod
func (*ModInstaller) InstallReport ¶
func (i *ModInstaller) InstallReport() string
type ModRef ¶
type ModRef struct { // the Git URL of the mod repo Name string // contains filtered or unexported fields }
ModRef is a struct to represent an unresolved mod reference
type ResolvedModRef ¶
type ResolvedModRef struct { // the FQN of the mod - also the Git URL of the mod repo Name string // the Git branch/tag GitReference plumbing.ReferenceName // the monotonic version - may be unknown for local or branch // although version will be monotonic, we can still use semver Version *goVersion.Version // the file path for local mods FilePath string }
ResolvedModRef is a struct to represent a resolved mod reference
func NewResolvedModRef ¶
func NewResolvedModRef(modVersion *modconfig.ModVersion) (*ResolvedModRef, error)
func (*ResolvedModRef) FullName ¶
func (r *ResolvedModRef) FullName() string
FullName returns name in the format <dependency name>@v<dependencyVersion>
func (*ResolvedModRef) SatisfiesVersionConstraint ¶
func (r *ResolvedModRef) SatisfiesVersionConstraint(versionConstraint *goVersion.Version) bool
SatisfiesVersionConstraint return whether this resolved ref satisfies a version constraint
func (*ResolvedModRef) SetGitReference ¶
func (r *ResolvedModRef) SetGitReference(modVersion *modconfig.ModVersion)
Click to show internal directories.
Click to hide internal directories.