Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GbeDir = ".local/share/gbe_fork" SteamlessDir = ".local/share/steamless" SteamStoreAPI = "https://store.steampowered.com/api" SteamWebAPI = "https://api.steampowered.com" GithubAPIURL = "https://api.github.com/repos/Detanup01/gbe_fork/releases/latest" SteamlessGithubAPI = "https://api.github.com/repos/staernid/steamless-rs/releases/latest" LutrisDir = ".config/lutris/games" SteamUserdata = ".local/share/Steam/userdata" )
Global Configuration fallback defaults
View Source
var PlatformConfig = map[string]struct { Subdir, Target, Additional, Generator, Arch string }{ "linux": { Subdir: "linux_release", Target: "libsteam_api.so", Additional: "steamclient.so", Generator: "generate_interfaces_x64", Arch: "64", }, "win64": { Subdir: "win_release", Target: "steam_api64.dll", Additional: "steamclient64.dll", Generator: "generate_interfaces_x64.exe", Arch: "64", }, "win32": { Subdir: "win_release", Target: "steam_api.dll", Additional: "steamclient.dll", Generator: "generate_interfaces_x32.exe", Arch: "32", }, }
PlatformConfig maps platform names to their configuration.
Functions ¶
func InitConfig ¶
InitConfig initializes the configuration or loads it from a file.
func SaveConfig ¶ added in v1.0.107
SaveConfig writes a Config struct cleanly to a JSON file on disk.
Types ¶
type Config ¶ added in v0.4.0
type Config struct {
GbeDir string `json:"gbe_dir"`
SteamlessDir string `json:"steamless_dir"`
LutrisDir string `json:"lutris_dir"`
SteamUserdata string `json:"steam_userdata"`
SteamStoreAPI string `json:"steam_store_api"`
GithubAPIURL string `json:"github_api_url"`
SteamlessGithubAPI string `json:"steamless_github_api"`
SteamWebAPIKey string `json:"steam_web_api_key"`
HubcapAPIKey string `json:"hubcap_api_key"`
}
Config holds user-configurable paths and settings for gamux.
func DefaultConfig ¶ added in v0.4.0
func DefaultConfig() *Config
DefaultConfig resolves default paths respecting XDG environment variables.
func LoadConfig ¶ added in v0.4.0
LoadConfig loads configuration from a JSON file or returns defaults.
Click to show internal directories.
Click to hide internal directories.