Documentation
¶
Index ¶
Constants ¶
View Source
const (
InitialInstallationsVersion = InstallationsVersion(iota)
)
View Source
const (
InitialProfilesVersion = ProfilesVersion(iota)
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GlobalContext ¶
type GlobalContext struct {
Installations *Installations
Profiles *Profiles
}
func InitCLI ¶
func InitCLI() (*GlobalContext, error)
func (*GlobalContext) Save ¶
func (g *GlobalContext) Save() error
type Installation ¶
func (*Installation) Install ¶
func (i *Installation) Install(ctx *GlobalContext) error
func (*Installation) Validate ¶
func (i *Installation) Validate(ctx *GlobalContext) 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) GetInstallation ¶
func (i *Installations) GetInstallation(installPath string) *Installation
func (*Installations) Save ¶
func (i *Installations) Save() error
type InstallationsVersion ¶
type InstallationsVersion int
type Profile ¶
type Profile struct {
Name string `json:"name"`
Mods map[string]ProfileMod `json:"mods"`
}
type ProfileMod ¶
type Profiles ¶
type Profiles struct {
Version ProfilesVersion `json:"version"`
Profiles []*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.
type ProfilesVersion ¶
type ProfilesVersion int
Click to show internal directories.
Click to hide internal directories.