config

package
v1.5.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Version         = "1.5.1"
	GamesDbFilename = "games.db"
	TapToDbFilename = "tapto.db"
	DefaultApiPort  = "7497"
	LogFilename     = "tapto.log"
)
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"` // DEPRECATED
	Reader            []string `ini:"reader,omitempty,allowshadow"`
	AllowCommands     bool     `ini:"allow_commands"` // TODO: rename to allow_shell
	DisableSounds     bool     `ini:"disable_sounds"`
	ProbeDevice       bool     `ini:"probe_device"`
	ExitGame          bool     `ini:"exit_game"` // TODO: rename to insert_mode
	ExitGameBlocklist []string `ini:"exit_game_blocklist"`
	ExitGameDelay     int8     `ini:"exit_game_delay"`
	Debug             bool     `ini:"debug"`
	ApiPort           string   `ini:"api_port"`
	ApiBasicAuth      string   `ini:"api_basic_auth"`
}

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) GetReader

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

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)

func (*UserConfig) SetReader

func (c *UserConfig) SetReader(reader []string)

Jump to

Keyboard shortcuts

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