Documentation
¶
Index ¶
- Variables
- type App
- func (a *App) LoadAdminList(path string) error
- func (a *App) LoadBanList(path string) error
- func (a *App) LoadIPList(path string) error
- func (a *App) LoadMapList(path string) error
- func (a *App) MigrateConfig() error
- func (a *App) SetClient(client *ent.Client)
- func (a *App) SetupClient() error
- func (a *App) SetupLoggers(logcore *auralog.Logger, logapi *auralog.Logger)
- type Config
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Version = "canary" APIPrefix = "/api/v1" )
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
Config *Config
Client *ent.Client
LogCore *auralog.Logger
LogAPI *auralog.Logger
IPList map[string]string
BanList map[string]bool
MapList map[string]uint32
AdminList map[string]bool
}
func (*App) LoadAdminList ¶
func (*App) LoadBanList ¶
func (*App) LoadIPList ¶
func (*App) LoadMapList ¶
func (*App) MigrateConfig ¶
func (*App) SetupClient ¶
type Config ¶
type Config struct {
Core struct {
Address string
Port int
MaxThreads int
Debug bool
}
Database struct {
Conn string
MaxIdleConns int
MaxOpenConns int
ConnMaxLifetime string
}
RateLimit struct {
MaxRequests int
MaxAge string
}
Cert struct {
Enable bool
Domain string
}
ApiAuth struct {
EnforceKey bool
EnforceIP bool
IPListFile string
}
Verify struct {
EnforceBan bool
EnforceMap bool
EnforceSC bool
MapListFile string
BanListFile string
AdminListFile string
SCHash uint32
Useragent string
}
Char struct {
MaxBackups int
BackupTime string
}
Log struct {
Level string
Dir string
ExpireTime string
}
}
func LoadConfig ¶
Click to show internal directories.
Click to hide internal directories.