conf

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2022 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version     = "develop"
	BuildTime   string
	BuildCommit string
)

Build time and commit information. It should only be set by "-ldflags".

View Source
var (
	// App is the application settings.
	App struct {
		Name             string
		Version          string `toml:"-"` // Version should only be set by the main package.
		Language         string
		HTTPAddr         string
		SeparateFrontend bool
		EnableSentry     bool
		SecuritySalt     string
	}

	// Database is the database settings.
	Database struct {
		Type         string
		Host         string
		Port         uint
		Name         string
		User         string
		Password     string
		SSLMode      string
		MaxOpenConns int
		MaxIdleConns int
	}

	// Game is the game settings.
	Game struct {
		StartAt       toml.LocalDateTime
		EndAt         toml.LocalDateTime
		PauseTime     []Period
		RoundDuration uint

		FlagPrefix string
		FlagSuffix string

		AttackScore    int
		CheckDownScore int
	}
)

Functions

func Init

func Init(customConf string) error

func Save

func Save(customConf string) error

func TestInit

func TestInit() error

Types

type Period

type Period struct {
	StartAt toml.LocalDateTime
	EndAt   toml.LocalDateTime
}

Jump to

Keyboard shortcuts

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