aboutsummaryrefslogtreecommitdiffstats
path: root/internal/config/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/config/config.go')
-rw-r--r--internal/config/config.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/internal/config/config.go b/internal/config/config.go
index 7eca750..36d3e1e 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -14,6 +14,7 @@ import (
14) 14)
15 15
16type Config struct { 16type Config struct {
17 Relay RelayConfig `yaml:"relay"`
17 Server ServerConfig `yaml:"server"` 18 Server ServerConfig `yaml:"server"`
18 Database DatabaseConfig `yaml:"database"` 19 Database DatabaseConfig `yaml:"database"`
19 Auth AuthConfig `yaml:"auth"` 20 Auth AuthConfig `yaml:"auth"`
@@ -23,6 +24,14 @@ type Config struct {
23 Storage StorageConfig `yaml:"storage"` 24 Storage StorageConfig `yaml:"storage"`
24} 25}
25 26
27type RelayConfig struct {
28 Name string `yaml:"name"`
29 Description string `yaml:"description"`
30 Pubkey string `yaml:"pubkey"`
31 Contact string `yaml:"contact"`
32 Icon string `yaml:"icon"`
33}
34
26type ServerConfig struct { 35type ServerConfig struct {
27 GrpcAddr string `yaml:"grpc_addr"` 36 GrpcAddr string `yaml:"grpc_addr"`
28 HttpAddr string `yaml:"http_addr"` 37 HttpAddr string `yaml:"http_addr"`
@@ -90,6 +99,10 @@ type StorageConfig struct {
90// Default returns the default configuration. 99// Default returns the default configuration.
91func Default() *Config { 100func Default() *Config {
92 return &Config{ 101 return &Config{
102 Relay: RelayConfig{
103 Name: "muxstr relay",
104 Description: "High-performance Nostr relay with gRPC, Connect, and WebSocket support",
105 },
93 Server: ServerConfig{ 106 Server: ServerConfig{
94 GrpcAddr: ":50051", 107 GrpcAddr: ":50051",
95 HttpAddr: ":8080", 108 HttpAddr: ":8080",