config

package
v0.0.0-...-1643010 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const UserAppPathEnv = "TAPTO_APP_PATH"
View Source
const UserConfigEnv = "TAPTO_CONFIG"

Variables

This section is empty.

Functions

This section is empty.

Types

type SystemsConfig

type SystemsConfig struct {
	GamesFolder []string `ini:"games_folder,omitempty,allowshadow"`
	SetCore     []string `ini:"set_core,omitempty,allowshadow"`
}

type TapToConfig

type TapToConfig struct {
	ConnectionString  string   `ini:"connection_string"`
	AllowCommands     bool     `ini:"allow_commands"`
	DisableSounds     bool     `ini:"disable_sounds"`
	ProbeDevice       bool     `ini:"probe_device"`
	ExitGame          bool     `ini:"exit_game"`
	ExitGameBlocklist []string `ini:"exit_game_blocklist"`
	ExitGameDelay     int8     `ini:"exit_game_delay"`
	Debug             bool     `ini:"debug"`
}

type UserConfig

type UserConfig struct {
	AppPath string        `ini:"-"`
	IniPath string        `ini:"-"`
	TapTo   TapToConfig   `ini:"tapto"`
	Systems SystemsConfig `ini:"systems,omitempty"`
	// contains filtered or unexported fields
}

func NewUserConfig

func NewUserConfig(name string, defaultConfig *UserConfig) (*UserConfig, error)

func (*UserConfig) GetAllowCommands

func (c *UserConfig) GetAllowCommands() bool

func (*UserConfig) GetConnectionString

func (c *UserConfig) GetConnectionString() string

func (*UserConfig) GetDebug

func (c *UserConfig) GetDebug() bool

func (*UserConfig) GetDisableSounds

func (c *UserConfig) GetDisableSounds() bool

func (*UserConfig) GetExitGame

func (c *UserConfig) GetExitGame() bool

func (*UserConfig) GetExitGameBlocklist

func (c *UserConfig) GetExitGameBlocklist() []string

func (*UserConfig) GetExitGameDelay

func (c *UserConfig) GetExitGameDelay() int8

func (*UserConfig) GetProbeDevice

func (c *UserConfig) GetProbeDevice() bool

func (*UserConfig) LoadConfig

func (c *UserConfig) LoadConfig() error

func (*UserConfig) SaveConfig

func (c *UserConfig) SaveConfig() error

func (*UserConfig) SetAllowCommands

func (c *UserConfig) SetAllowCommands(allowCommands bool)

func (*UserConfig) SetConnectionString

func (c *UserConfig) SetConnectionString(connectionString string)

func (*UserConfig) SetDebug

func (c *UserConfig) SetDebug(debug bool)

func (*UserConfig) SetDisableSounds

func (c *UserConfig) SetDisableSounds(disableSounds bool)

func (*UserConfig) SetExitGame

func (c *UserConfig) SetExitGame(exitGame bool)

func (*UserConfig) SetExitGameBlocklist

func (c *UserConfig) SetExitGameBlocklist(exitGameBlocklist []string)

func (*UserConfig) SetExitGameDelay

func (c *UserConfig) SetExitGameDelay(exitGameDelay int8)

func (*UserConfig) SetProbeDevice

func (c *UserConfig) SetProbeDevice(probeDevice bool)

Jump to

Keyboard shortcuts

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