config

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2026 License: AGPL-3.0, AGPL-3.0-or-later Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddGameSetup

func AddGameSetup(setup GameSetup) error

AddGameSetup adds a game setup to the config

func GetConfigPath

func GetConfigPath() (string, error)

GetConfigPath returns the path to the config file

func GetGameLogDirectory added in v0.6.0

func GetGameLogDirectory() (string, error)

GetGameLogDirectory returns the directory for game log files

func GetImageCacheEnabled

func GetImageCacheEnabled() (bool, error)

GetImageCacheEnabled returns whether image caching is enabled

func GetSteamGridDBAPIKey

func GetSteamGridDBAPIKey() (string, error)

GetSteamGridDBAPIKey returns the SteamGridDB API key

func RemoveGameSetup

func RemoveGameSetup(id string) error

RemoveGameSetup removes a game setup from the config

func Save

func Save(config *AppConfig) error

Save saves the configuration to disk

func SetGameLogDirectory added in v0.6.0

func SetGameLogDirectory(dir string) error

SetGameLogDirectory sets the directory for game log files

func SetImageCacheEnabled

func SetImageCacheEnabled(enabled bool) error

SetImageCacheEnabled enables or disables image caching

func SetSteamGridDBAPIKey

func SetSteamGridDBAPIKey(apiKey string) error

SetSteamGridDBAPIKey saves the SteamGridDB API key

func UpdateGameSetup

func UpdateGameSetup(id string, setup GameSetup) error

UpdateGameSetup updates an existing game setup

Types

type AppConfig

type AppConfig struct {
	GameSetups        []GameSetup `json:"game_setups"`
	SteamGridDBAPIKey string      `json:"steamgriddb_api_key,omitempty"`
	ImageCacheEnabled bool        `json:"image_cache_enabled"`
	GameLogDirectory  string      `json:"game_log_directory,omitempty"`
}

AppConfig represents the application configuration

func Load

func Load() (*AppConfig, error)

Load loads the configuration from disk

type GameSetup

type GameSetup struct {
	ID            string `json:"id"`
	Name          string `json:"name"`
	LocalPath     string `json:"local_path"`
	Executable    string `json:"executable"`
	LaunchOptions string `json:"launch_options,omitempty"`
	Tags          string `json:"tags,omitempty"`
	InstallPath   string `json:"install_path"`
	// SteamGridDB artwork
	GridDBGameID  int    `json:"griddb_game_id,omitempty"`
	GridPortrait  string `json:"grid_portrait,omitempty"`  // 600x900 portrait grid
	GridLandscape string `json:"grid_landscape,omitempty"` // 920x430 landscape grid
	HeroImage     string `json:"hero_image,omitempty"`     // 1920x620 hero banner
	LogoImage     string `json:"logo_image,omitempty"`     // Logo with transparency
	IconImage     string `json:"icon_image,omitempty"`     // Square icon
}

GameSetup represents a saved game installation setup

func GetGameSetups

func GetGameSetups() ([]GameSetup, error)

GetGameSetups returns all saved game setups

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL