Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Defaults = Values{
ConfigPath: "",
LogLevel: "info",
ApplicationName: "durian",
ApplicationWebsite: "https://gitea.pup.haus/feditools/durian",
ExternalHostname: "localhost",
GeminiBind: ":1965",
HTTPBind: ":5000",
ActorKeySize: 2048,
DbAddress: "",
DbPort: 5432,
DbUser: "",
DbPassword: "",
DbDatabase: "relay",
DbTLSMode: "disable",
DbTLSCACert: "",
GeminiCertFile: "server.crt",
GeminiKeyFile: "server.key",
RunnerConcurrency: 5,
RedisAddress: "localhost:6379",
RedisDB: 0,
}
Defaults contains the default values.
View Source
var Keys = KeyNames{
ConfigPath: "config-path",
LogLevel: "log-level",
ApplicationName: "application-name",
ApplicationWebsite: "application-website",
EncryptionKey: "encryption-key",
ExternalHostname: "external-hostname",
HTTPBind: "http-bind",
SoftwareVersion: "software-version",
TokenSalt: "token-salt",
ActorKeySize: "actor-key-size",
Domain: "domain",
DbAddress: "db-address",
DbPort: "db-port",
DbUser: "db-user",
DbPassword: "db-password",
DbDatabase: "db-database",
DbTLSMode: "db-tls-mode",
DbTLSCACert: "db-tls-ca-cert",
GeminiCertFile: "gemini-cert-file",
GeminiKeyFile: "gemini-key-file",
RedisAddress: "redis-address",
RedisDB: "redis-db",
RedisPassword: "redis-password",
RunnerConcurrency: "runner-concurrency",
Account: "account",
AccountAddGroup: "add-group",
}
Keys contains the names of config keys.
Functions ¶
func ReadConfigFile ¶
func ReadConfigFile() error
ReadConfigFile reads the config file from disk if config path is sent.
Types ¶
type KeyNames ¶
type KeyNames struct { LogLevel string ConfigPath string // application ApplicationName string ApplicationWebsite string EncryptionKey string ExternalHostname string GeminiBind string HTTPBind string SoftwareVersion string TokenSalt string // activitypub ActorKeySize string Domain string // database DbAddress string DbPort string DbUser string DbPassword string DbDatabase string DbTLSMode string DbTLSCACert string // gemini GeminiCertFile string GeminiKeyFile string // redis RedisAddress string RedisDB string RedisPassword string // runner RunnerConcurrency string // account Account string AccountAddGroup string }
KeyNames is a struct that contains the names of keys.
type Values ¶
type Values struct { ConfigPath string LogLevel string // application ApplicationName string ApplicationWebsite string EncryptionKey string ExternalHostname string GeminiBind string HTTPBind string SoftwareVersion string TokenSalt string // activitypub ActorKeySize int Domain string // database DbAddress string DbPort int DbUser string DbPassword string DbDatabase string DbTLSMode string DbTLSCACert string // gemini GeminiCertFile string GeminiKeyFile string // redis RedisAddress string RedisDB int RedisPassword string // runner RunnerConcurrency int // account Account string AccountAddGroup []string }
Values contains the type of each value.
Click to show internal directories.
Click to hide internal directories.