Documentation ¶
Index ¶
- Variables
- type App
- func (a *App) Ask(title, msg string) bool
- func (a *App) CheckUpdate() (*Release, error)
- func (a *App) CreateShortcut() (string, error)
- func (a *App) DownloadUpdate() (*UpdateInfo, error)
- func (a *App) ErrorDialog(title, msg string)
- func (a *App) GetConfig() *config.Settings
- func (a *App) Languages() map[string]string
- func (a *App) LaunchInstaller(path string) (string, error)
- func (a *App) OpenFolder(path string) string
- func (a *App) PickFile(path, extname, extensions string) (string, error)
- func (a *App) PickFolder(path string) (string, error)
- func (a *App) Quit()
- func (a *App) RemoveInstance(idx int, starrApp string) (*SavedInstance, error)
- func (a *App) SaveConfigItem(name string, value any, reload bool) (*ConfigSaved, error)
- func (a *App) SaveInstance(idx int, instance starrs.AppConfig, defaultInstance bool) (*SavedInstance, error)
- func (a *App) Startup(ctx context.Context)
- func (a *App) Version() Version
- type Config
- type ConfigSaved
- type Info
- type Release
- type SavedInstance
- type UpdateInfo
- type Version
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidInput = fmt.Errorf("invalid input provided")
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { *Config // contains filtered or unexported fields }
App struct.
func (*App) CheckUpdate ¶ added in v0.0.2
func (*App) CreateShortcut ¶ added in v0.0.2
CreateShortcut makes a shortcut to the exe on Windows desktop.
func (*App) DownloadUpdate ¶ added in v0.0.2
func (a *App) DownloadUpdate() (*UpdateInfo, error)
func (*App) ErrorDialog ¶ added in v0.1.0
ErrorDialog displays an error on screen.
func (*App) LaunchInstaller ¶ added in v0.0.2
func (*App) OpenFolder ¶ added in v0.0.2
func (*App) PickFolder ¶
PickFolder opens the folder selector.
func (*App) RemoveInstance ¶ added in v0.1.0
func (a *App) RemoveInstance(idx int, starrApp string) (*SavedInstance, error)
RemoveInstance deletes an instance from the configuration.
func (*App) SaveConfigItem ¶
SaveConfigItem saves a single item to the running config and writes the config file.
func (*App) SaveInstance ¶ added in v0.1.0
func (a *App) SaveInstance(idx int, instance starrs.AppConfig, defaultInstance bool) (*SavedInstance, error)
SaveInstance saves the configuration for an instance.
type Config ¶ added in v0.1.0
type Config struct { Logger *logs.Logger ConfigFile string // empty unless passed in from cli AppMenu *menu.Menu Starrs *starrs.Starrs }
Config is the input data passed in from main.go.
type ConfigSaved ¶ added in v0.0.3
ConfigSaved sends back the value and a message when a config item changes.
type Info ¶ added in v0.0.3
type Info struct { IsWindows bool IsLinux bool IsMac bool Name string Title string Exe string Home string Username string }
Info provides additional immutable data to the front end.
type SavedInstance ¶ added in v0.1.0
SavedInstance is the response to the frontend after instances changes.
type UpdateInfo ¶ added in v0.0.2
Click to show internal directories.
Click to hide internal directories.