cfg

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const AppID = "slotopol.balance"

Variables

View Source
var (
	// Executable path.
	ExePath string
	// Configuration path.
	CfgPath string
)
View Source
var (
	// Admin credentials.
	Credentials = &struct {
		Addr   string `json:"hostaddr" yaml:"hostaddr" mapstructure:"hostaddr"`
		Email  string `json:"email" yaml:"email" mapstructure:"email"`
		Secret string `json:"secret" yaml:"secret" mapstructure:"secret"`
	}{
		Addr:   "http://localhost:8080",
		Email:  "admin@example.org",
		Secret: "0YBoaT",
	}

	// List of registered users emails.
	UserList = []string{
		"admin@example.org",
		"dealer@example.org",
		"player@example.org",
	}

	// Config is common application settings.
	Cfg = &struct {
		PropUpdateTick time.Duration `json:"prop-update-tick" yaml:"prop-update-tick" mapstructure:"prop-update-tick"`
	}{
		PropUpdateTick: time.Millisecond * 4000,
	}
)
View Source
var (
	ErrNoCfgPath = errors.New("configuration path does not obtained")
)

Functions

func ReadCredentials

func ReadCredentials() (err error)

func ReadUserList

func ReadUserList() (err error)

func SaveCredentials

func SaveCredentials() (err error)

func SaveUserList

func SaveUserList() (err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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