config

package
v0.0.0-...-d091464 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Store      StoreConfig      `mapstructure:"store"`
	Server     ServerConfig     `mapstructure:"server"`
	Metrics    MetricsConfig    `mapstructure:"metrics"`
	Interfaces InterfacesConfig `mapstructure:"interfaces"`
}

Config is the top-level configuration for the server and world.

func Load

func Load(path string) (*Config, error)

Load reads the game server configuration file from the given path.

type EquipmentTabInterfaceConfig

type EquipmentTabInterfaceConfig struct {
	Slots int `mapstructure:"slots"`
}

EquipmentTabInterfaceConfig contains interface data for the equipment tab interface.

type InterfacesConfig

type InterfacesConfig struct {
	CharacterDesigner SimpleInterfaceConfig       `mapstructure:"characterDesigner"`
	Equipment         EquipmentTabInterfaceConfig `mapstructure:"equipment"`
	Inventory         InventoryTabInterfaceConfig `mapstructure:"inventory"`
}

InterfacesConfig contains data for client-side interface.

type InventoryTabInterfaceConfig

type InventoryTabInterfaceConfig struct {
	ID    int `mapstructure:"id"`
	Slots int `mapstructure:"slots"`
}

InventoryTabInterfaceConfig contains interface data for the inventory tab interface.

type MetricsConfig

type MetricsConfig struct {
	Enabled bool `mapstructure:"enabled"`
	Port    int  `mapstructure:"port"`
}

MetricsConfig contains metrics and telemetry configuration options.

type SQLite3DatabaseConfig

type SQLite3DatabaseConfig struct {
	URI string `mapstructure:"uri"`
}

SQLite3DatabaseConfig contains parameters for a SQLIte3 database.

type ServerConfig

type ServerConfig struct {
	Host                     string `mapstructure:"host"`
	Port                     int    `mapstructure:"port"`
	WorldID                  int    `mapstructure:"worldId"`
	AssetDir                 string `mapstructure:"assetDir"`
	ScriptsDir               string `mapstructure:"scriptsDir"`
	LogLevel                 string `mapstructure:"logLevel"`
	WelcomeMessage           string `mapstructure:"welcomeMessage"`
	PlayerMaxIdleTimeSeconds int    `mapstructure:"playerMaxIdleTimeSeconds"`
}

ServerConfig contains parameters for the game server.

type SimpleInterfaceConfig

type SimpleInterfaceConfig struct {
	ID int `mapstructure:"id"`
}

SimpleInterfaceConfig contains data for a simple tab interface.

type StoreConfig

type StoreConfig struct {
	Driver        string                 `mapstructure:"driver"`
	MigrationsDir string                 `mapstructure:"migrationsDir"`
	SQLite3       *SQLite3DatabaseConfig `mapstructure:"sqlite3"`
}

StoreConfig contains parameters for the backend database.

Jump to

Keyboard shortcuts

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