Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultPath = defaultConfigFile DefaultSchema = defaultConfigSchema )
Variables ¶
View Source
var DefaultDiscoveryOrder = []string{
defaultConfigFile,
"moltnet.yaml",
"moltnet.yml",
"moltnet.json",
}
Functions ¶
Types ¶
type Config ¶
type Config struct {
AllowHumanIngress bool
Auth authn.Config
ListenAddr string
NetworkID string
NetworkName string
Pairings []protocol.Pairing
Rooms []RoomConfig
Storage StorageConfig
Version string
}
func ConfigFromEnv ¶
func LoadConfig ¶
type JSONStorageConfig ¶
type JSONStorageConfig struct {
Path string `json:"path,omitempty" yaml:"path,omitempty"`
}
type PostgresStorageConfig ¶
type PostgresStorageConfig struct {
DSN string `json:"dsn,omitempty" yaml:"dsn,omitempty"`
}
type RoomConfig ¶
type SQLiteStorageConfig ¶
type SQLiteStorageConfig struct {
Path string `json:"path,omitempty" yaml:"path,omitempty"`
}
type StorageConfig ¶
type StorageConfig struct {
Kind string `json:"kind" yaml:"kind"`
JSON JSONStorageConfig `json:"json,omitempty" yaml:"json,omitempty"`
SQLite SQLiteStorageConfig `json:"sqlite,omitempty" yaml:"sqlite,omitempty"`
Postgres PostgresStorageConfig `json:"postgres,omitempty" yaml:"postgres,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.