Documentation
¶
Index ¶
- Constants
- Variables
- func DiscoverPath(explicit string) (string, bool, error)
- func LoadApplyFile(path string) (protocol.ApplyConfigRequest, string, error)
- type App
- type Config
- type ConsoleAnalyticsConfig
- type ConsoleConfig
- type JSONStorageConfig
- type PostgresStorageConfig
- type RoomConfig
- type RoomCredentialConfig
- type SQLiteStorageConfig
- type StorageConfig
Constants ¶
View Source
const ( DefaultPath = defaultConfigFile DefaultSchema = defaultConfigSchema )
Variables ¶
View Source
var DefaultDiscoveryOrder = []string{
defaultConfigFile,
"moltnet.yaml",
"moltnet.yml",
"moltnet.json",
}
Functions ¶
func LoadApplyFile ¶ added in v0.1.12
func LoadApplyFile(path string) (protocol.ApplyConfigRequest, string, error)
Types ¶
type Config ¶
type Config struct {
AllowHumanIngress bool
CausalEventsPath string
Console ConsoleConfig
DebugEvents bool
DisableDirectMessages bool
Auth authn.Config
ListenAddr string
NetworkID string
NetworkName string
Pairings []protocol.Pairing
Rooms []RoomConfig
Storage StorageConfig
Version string
// contains filtered or unexported fields
}
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"`
Federation *protocol.RoomFederation `json:"federation,omitempty" yaml:"federation,omitempty"`
Credential *RoomCredentialConfig `json:"credential,omitempty" yaml:"credential,omitempty"`
}
type RoomCredentialConfig ¶ added in v0.1.14
type RoomCredentialConfig struct {
Token protocol.SecretString `json:"token,omitempty" yaml:"token,omitempty"`
TokenEnv string `json:"token_env,omitempty" yaml:"token_env,omitempty"`
TokenPath string `json:"token_path,omitempty" yaml:"token_path,omitempty"`
}
func (RoomCredentialConfig) HasTokenSource ¶ added in v0.1.14
func (c RoomCredentialConfig) HasTokenSource() bool
func (RoomCredentialConfig) ResolveToken ¶ added in v0.1.14
func (c RoomCredentialConfig) ResolveToken() (string, bool, error)
func (RoomCredentialConfig) ResolveTokenPath ¶ added in v0.1.14
func (c RoomCredentialConfig) ResolveTokenPath(baseDir string) RoomCredentialConfig
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.