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
Console ConsoleConfig
DebugEvents bool
DisableDirectMessages bool
Auth authn.Config
ListenAddr string
NetworkID string
NetworkName string
Pairings []protocol.Pairing
Rooms []RoomConfig
Storage StorageConfig
Version string
}
func ConfigFromEnv ¶
func LoadConfig ¶
type ConsoleAnalyticsConfig ¶ added in v0.1.11
type ConsoleConfig ¶ added in v0.1.11
type ConsoleConfig struct {
Analytics ConsoleAnalyticsConfig
}
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 RoomConfig struct {
ID string `json:"id" yaml:"id"`
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Members []string `json:"members,omitempty" yaml:"members,omitempty"`
Visibility string `json:"visibility,omitempty" yaml:"visibility,omitempty"`
WritePolicy string `json:"write_policy,omitempty" yaml:"write_policy,omitempty"`
}
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.