config

package
v0.0.0-...-f573d82 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupLogger

func SetupLogger(level zap.AtomicLevel, fs afero.Fs) *zap.SugaredLogger

Types

type Config

type Config struct {
	DebugLog bool           `mapstructure:"debug_log"`
	Modules  ModulesConfig  `mapstructure:"modules"`
	SS13     SS13Config     `mapstructure:"ss13"`
	Discord  DiscordConfig  `mapstructure:"discord"`
	Database DatabaseConfig `mapstructure:"database"`
}

func GetConfig

func GetConfig(fs afero.Fs) (Config, error)

type DatabaseConfig

type DatabaseConfig struct {
	Username     string `mapstructure:"username"`
	Password     string `mapstructure:"password"`
	Address      string `mapstructure:"address"`
	Port         string `mapstructure:"port"`
	DatabaseName string `mapstructure:"database_name"`
}

type DiscordConfig

type DiscordConfig struct {
	BotToken                   string   `mapstructure:"bot_token"`
	OOCChannelID               string   `mapstructure:"ooc_channel_id"`
	EmoteChannelID             string   `mapstructure:"emote_channel_id"`
	StatusChannelIDs           []string `mapstructure:"status_channel_ids"`
	BYONDVerificationChannelID string   `mapstructure:"byond_verification_channel_id"`
	AhelpChannelID             string   `mapstructure:"ahelp_channel_id"`
}

type ModulesConfig

type ModulesConfig struct {
	StatusUpdatesEnabled     bool           `mapstructure:"status_updates_enabled"`
	DOOCEnabled              bool           `mapstructure:"dooc_enabled"`
	BYONDVerificationEnabled bool           `mapstructure:"byond_verification_enabled"`
	AhelpEnabled             bool           `mapstructure:"ahelp_enabled"`
	MetricsEnabled           bool           `mapstructure:"metrics_enabled"`
	Webhooks                 WebhooksConfig `mapstructure:"webhooks"`
}

type SS13Config

type SS13Config struct {
	ServerAddress            string `mapstructure:"server_address"`
	AlternativeServerAddress string `mapstructure:"alternative_server_address"`
	AccessKey                string `mapstructure:"access_key"`
}

type WebhooksConfig

type WebhooksConfig struct {
	Enabled              bool `mapstructure:"enabled"`
	Port                 int  `mapstructure:"port"`
	OOCMessagesEnabled   bool `mapstructure:"ooc_messages_enabled"`
	EmoteMessagesEnabled bool `mapstructure:"emote_messages_enabled"`
	AhelpMessagesEnabled bool `mapstructure:"ahelp_messages_enabled"`
}

Jump to

Keyboard shortcuts

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