config

package
v1.0.108 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2026 License: LGPL-3.0 Imports: 4 Imported by: 0

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

func InitConfig(customPath string) error

InitConfig initializes the configuration or loads it from a file.

func SaveConfig added in v1.0.107

func SaveConfig(cfg *Config, path string) error

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

func LoadConfig(customPath string) (*Config, error)

LoadConfig loads configuration from a JSON file or returns defaults.

type Release

type Release struct {
	Assets []struct {
		Name               string `json:"name"`
		BrowserDownloadURL string `json:"browser_download_url"`
	} `json:"assets"`
	UpdatedAt time.Time `json:"updated_at"`
	Body      string    `json:"body"`
}

Release represents a GitHub release.

Jump to

Keyboard shortcuts

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