config

package
v0.0.0-...-49af19c Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MODULE = "config"

	FILESYSTEM_BASE   = ".."
	FILESYSTEM_SERVER = FILESYSTEM_BASE + "/server"

	ADMIN_ADDRESS           = "127.0.0.1"
	ADMIN_PORT              = "8080"
	ADMIN_PASSWORD          = ""
	ADMIN_SSL_USE           = "false"
	ADMIN_SSL_VERIFY        = "false"
	ADMIN_SSL_CERT          = ""
	ADMIN_SSL_KEY           = ""
	ADMIN_AUTOMATIC_UPDATES = "true"
	ADMIN_DIR               = "."
	ADMIN_ENV               = "./.env"
	ADMIN_LOGS              = ADMIN_DIR + "/logs"
	ADMIN_CONFIG_DIR        = ADMIN_DIR + "/config"

	STEAM_INSTALLER         = FILESYSTEM_SERVER + "/steam/installer"
	STEAM_DIR               = FILESYSTEM_SERVER + "/steam"
	STEAM_AUTOMATIC_UPDATES = false

	SANDSTORM_DIR               = FILESYSTEM_SERVER + "/sandstorm"
	SANDSTORM_AUTOMATIC_UPDATES = false
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Directories Filesystem `json:"directories"`
	WebAdmin    WebAdmin   `json:"webAdmin"`
	Steam       Steam      `json:"steam"`
	Sandstorm   Sandstorm  `json:"sandstorm"`
	// contains filtered or unexported fields
}

func New

func New(log *admin_log.Log) *Configuration

func (*Configuration) Read

func (c *Configuration) Read() error

func (*Configuration) SetFile

func (c *Configuration) SetFile(path string)

func (*Configuration) Write

func (c *Configuration) Write() error

type Filesystem

type Filesystem struct {
	Base   string `json:"base"`
	Server string `json:"server"`
}

type Sandstorm

type Sandstorm struct {
	Dir              string `json:"dir"`
	AutomaticUpdates bool   `json:"automaticUpdates"`
}

type Steam

type Steam struct {
	Installer        string            `json:"installer"`
	Dir              string            `json:"dir"`
	AutomaticUpdates bool              `json:"automaticUpdates"`
	DownloadUrls     map[string]string `json:"downloadUrls"`
}

type WebAdmin

type WebAdmin struct {
	Address          string `json:"address"`
	Port             int    `json:"port"`
	Password         string `json:"password"`
	SslUse           bool   `json:"sslUse"`
	SslVerify        bool   `json:"sslVerify"`
	SslCert          string `json:"sslCert"`
	SslKey           string `json:"sslKey"`
	AutomaticUpdates bool   `json:"automaticUpdates"`
	Dir              string `json:"dir"`
	ConfigDir        string `json:"configDir"`
	Env              string `json:"env"`
	Logs             string `json:"logs"`
}

Jump to

Keyboard shortcuts

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