Documentation ¶
Index ¶
- Constants
- type DependencyResolver
- type GlobalContext
- type InstallUpdate
- type Installation
- func (i *Installation) GetGameVersion(ctx *GlobalContext) (int, error)
- func (i *Installation) GetPlatform(ctx *GlobalContext) (*Platform, error)
- func (i *Installation) Install(ctx *GlobalContext, updates chan InstallUpdate) error
- func (i *Installation) LockFile(ctx *GlobalContext) (*LockFile, error)
- func (i *Installation) LockFilePath(ctx *GlobalContext) (string, error)
- func (i *Installation) SetProfile(ctx *GlobalContext, profile string) error
- func (i *Installation) Validate(ctx *GlobalContext) error
- func (i *Installation) WriteLockFile(ctx *GlobalContext, lockfile LockFile) error
- type Installations
- type InstallationsVersion
- type LockFile
- type LockedMod
- type ModVersion
- type Platform
- type Profile
- func (p *Profile) AddMod(reference string, version string) error
- func (p *Profile) HasMod(reference string) bool
- func (p *Profile) IsModEnabled(reference string) bool
- func (p *Profile) RemoveMod(reference string)
- func (p *Profile) Resolve(resolver DependencyResolver, lockFile *LockFile, gameVersion int) (LockFile, error)
- func (p *Profile) SetModEnabled(reference string, enabled bool)
- type ProfileMod
- type Profiles
- type ProfilesVersion
- type VersionDependency
Constants ¶
View Source
const DefaultProfileName = "Default"
View Source
const (
InitialInstallationsVersion = InstallationsVersion(iota)
)
View Source
const (
InitialProfilesVersion = ProfilesVersion(iota)
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DependencyResolver ¶ added in v0.0.9
type DependencyResolver struct {
// contains filtered or unexported fields
}
func NewDependencyResolver ¶ added in v0.0.9
func NewDependencyResolver(apiClient graphql.Client) DependencyResolver
func (DependencyResolver) ResolveModDependencies ¶ added in v0.0.9
type GlobalContext ¶
type GlobalContext struct { Installations *Installations Profiles *Profiles APIClient graphql.Client }
func InitCLI ¶
func InitCLI() (*GlobalContext, error)
func (*GlobalContext) Save ¶
func (g *GlobalContext) Save() error
type InstallUpdate ¶ added in v0.0.9
type Installation ¶
func (*Installation) GetGameVersion ¶ added in v0.0.9
func (i *Installation) GetGameVersion(ctx *GlobalContext) (int, error)
func (*Installation) GetPlatform ¶ added in v0.0.9
func (i *Installation) GetPlatform(ctx *GlobalContext) (*Platform, error)
func (*Installation) Install ¶
func (i *Installation) Install(ctx *GlobalContext, updates chan InstallUpdate) error
func (*Installation) LockFile ¶ added in v0.0.9
func (i *Installation) LockFile(ctx *GlobalContext) (*LockFile, error)
func (*Installation) LockFilePath ¶ added in v0.0.9
func (i *Installation) LockFilePath(ctx *GlobalContext) (string, error)
func (*Installation) SetProfile ¶ added in v0.0.9
func (i *Installation) SetProfile(ctx *GlobalContext, profile string) error
func (*Installation) Validate ¶
func (i *Installation) Validate(ctx *GlobalContext) error
func (*Installation) WriteLockFile ¶ added in v0.0.9
func (i *Installation) WriteLockFile(ctx *GlobalContext, lockfile LockFile) error
type Installations ¶
type Installations struct { Version InstallationsVersion `json:"version"` Installations []*Installation `json:"installations"` SelectedInstallation string `json:"selected_installation"` }
func InitInstallations ¶
func InitInstallations() (*Installations, error)
func (*Installations) AddInstallation ¶
func (i *Installations) AddInstallation(ctx *GlobalContext, installPath string, profile string) (*Installation, error)
func (*Installations) DeleteInstallation ¶ added in v0.0.9
func (i *Installations) DeleteInstallation(installPath string) error
func (*Installations) GetInstallation ¶
func (i *Installations) GetInstallation(installPath string) *Installation
func (*Installations) Save ¶
func (i *Installations) Save() error
type InstallationsVersion ¶
type InstallationsVersion int
type ModVersion ¶ added in v0.0.9
type ModVersion struct { ID string Version string Link string Hash string Dependencies []VersionDependency }
type Profile ¶
type Profile struct { Name string `json:"name"` Mods map[string]ProfileMod `json:"mods"` }
func (*Profile) IsModEnabled ¶ added in v0.0.23
func (*Profile) Resolve ¶ added in v0.0.9
func (p *Profile) Resolve(resolver DependencyResolver, lockFile *LockFile, gameVersion int) (LockFile, error)
Resolve resolves all mods and their dependencies.
An optional lockfile can be passed if one exists.
Returns an error if resolution is impossible.
func (*Profile) SetModEnabled ¶ added in v0.0.23
type ProfileMod ¶
type Profiles ¶
type Profiles struct { Version ProfilesVersion `json:"version"` Profiles map[string]*Profile `json:"profiles"` SelectedProfile string `json:"selected_profile"` }
func InitProfiles ¶
func (*Profiles) AddProfile ¶
AddProfile adds a new profile with the given name to the profiles list.
func (*Profiles) DeleteProfile ¶
DeleteProfile deletes the profile with the given name.
func (*Profiles) GetProfile ¶
GetProfile returns the profile with the given name or nil if it doesn't exist.
func (*Profiles) RenameProfile ¶ added in v0.0.7
func (p *Profiles) RenameProfile(ctx *GlobalContext, oldName string, newName string) error
type ProfilesVersion ¶
type ProfilesVersion int
type VersionDependency ¶ added in v0.0.9
Click to show internal directories.
Click to hide internal directories.