Documentation ¶
Index ¶
- func ConfigExists(basePath string) bool
- func WriteGlobalConfig(cfg *GlobalConfig) error
- func WriteWorkspaceConfig(basePath string, cfg *WorkspaceConfig) error
- type DeploymentConfig
- type FullConfig
- type GlobalConfig
- type GlobalSessionConfig
- type ModuleBuildConfig
- type ModuleConfig
- type ServerAppConfig
- type ServerConfig
- type ServerDiscordConfig
- type ServerEngineConfig
- type ServerEngineLimitConfig
- type ServerLogConfig
- type ServerPostgresConfig
- type WorkspaceConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigExists ¶
func WriteGlobalConfig ¶
func WriteGlobalConfig(cfg *GlobalConfig) error
func WriteWorkspaceConfig ¶
func WriteWorkspaceConfig(basePath string, cfg *WorkspaceConfig) error
Types ¶
type DeploymentConfig ¶
type FullConfig ¶
type FullConfig struct { Global *GlobalConfig `toml:"global,omitempty"` Server *ServerConfig `toml:"server,omitempty"` Deployment *DeploymentConfig `toml:"deployment,omitempty"` Module *ModuleConfig `toml:"module,omitempty"` }
func LoadFullConfig ¶
func LoadFullConfig(basePath string) (*FullConfig, error)
func (*FullConfig) Validate ¶
func (cfg *FullConfig) Validate() error
type GlobalConfig ¶
type GlobalConfig struct {
Sessions []*GlobalSessionConfig `toml:"sessions" validate:"dive"`
}
func LoadGlobalConfig ¶
func LoadGlobalConfig() (*GlobalConfig, error)
func (*GlobalConfig) GetSessionForServer ¶
func (cfg *GlobalConfig) GetSessionForServer(server string) *GlobalSessionConfig
func (*GlobalConfig) Validate ¶
func (cfg *GlobalConfig) Validate() error
type GlobalSessionConfig ¶
type ModuleBuildConfig ¶
type ModuleConfig ¶
type ModuleConfig struct { Type string `toml:"type" validate:"required,oneof=go rust js"` Build *ModuleBuildConfig `toml:"build" validate:"required"` }
type ServerAppConfig ¶
type ServerAppConfig struct {
PublicURL string `toml:"public_url" validate:"required"`
}
func (*ServerAppConfig) AuthCallbackURL ¶
func (cfg *ServerAppConfig) AuthCallbackURL() string
type ServerConfig ¶
type ServerConfig struct { Host string `toml:"host" validate:"required"` Port int `toml:"port" validate:"required"` Log ServerLogConfig `toml:"log"` PublicURL string `toml:"public_url" validate:"required"` App ServerAppConfig `toml:"app" validate:"required"` Postgres ServerPostgresConfig `toml:"postgres" validate:"required"` Discord ServerDiscordConfig `toml:"discord" validate:"required"` Engine ServerEngineConfig `toml:"engine" validate:"required"` }
func LoadServerConfig ¶
func LoadServerConfig(basePath string) (*ServerConfig, error)
func (*ServerConfig) AuthCLICallbackURL ¶
func (cfg *ServerConfig) AuthCLICallbackURL() string
func (*ServerConfig) AuthCallbackURL ¶
func (cfg *ServerConfig) AuthCallbackURL() string
func (*ServerConfig) Validate ¶
func (cfg *ServerConfig) Validate() error
type ServerDiscordConfig ¶
type ServerEngineConfig ¶
type ServerEngineConfig struct {
Limits ServerEngineLimitConfig `toml:"limits" validate:"required"`
}
type ServerEngineLimitConfig ¶
type ServerEngineLimitConfig struct { MaxTotalTime int `toml:"max_total_time" validate:"required"` MaxExecutionTime int `toml:"max_execution_time" validate:"required"` MaxMemoryPages int `toml:"max_memory_pages" validate:"required"` MaxHostCalls int `toml:"max_host_calls" validate:"required"` DeploymentPoolMaxTotal int `toml:"deployment_pool_max_total" validate:"required"` DeploymentPoolMaxIdle int `toml:"deployment_pool_max_idle" validate:"required"` DeploymentPoolMinIdle int `toml:"deployment_pool_min_idle"` }
type ServerLogConfig ¶
type ServerPostgresConfig ¶
type WorkspaceConfig ¶
type WorkspaceConfig struct { Deployment *DeploymentConfig `toml:"deployment" validate:"required"` Module *ModuleConfig `toml:"module" validate:"required"` }
func DefaultWorkspaceConifg ¶
func DefaultWorkspaceConifg() (*WorkspaceConfig, error)
func LoadworkspaceConfig ¶
func LoadworkspaceConfig(basePath string) (*WorkspaceConfig, error)
func (*WorkspaceConfig) Validate ¶
func (cfg *WorkspaceConfig) Validate() error
Click to show internal directories.
Click to hide internal directories.