From 4fc493e6d8cc20137f920f8647e39fc5051bb245 Mon Sep 17 00:00:00 2001 From: bndw Date: Sat, 14 Feb 2026 12:03:21 -0800 Subject: refactor: remove frivolous comments from auth validation/credentials Also removed internal/nostr package - now using northwest.io/nostr library. --- internal/config/config.go | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'internal/config') diff --git a/internal/config/config.go b/internal/config/config.go index fc392b4..36c8be5 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -6,18 +6,18 @@ import ( "strings" "time" - "northwest.io/muxstr/internal/nostr" "gopkg.in/yaml.v3" + "northwest.io/nostr" ) type Config struct { - Server ServerConfig `yaml:"server"` - Database DatabaseConfig `yaml:"database"` - Auth AuthConfig `yaml:"auth"` - RateLimit RateLimitConfig `yaml:"rate_limit"` - Metrics MetricsConfig `yaml:"metrics"` - Logging LoggingConfig `yaml:"logging"` - Storage StorageConfig `yaml:"storage"` + Server ServerConfig `yaml:"server"` + Database DatabaseConfig `yaml:"database"` + Auth AuthConfig `yaml:"auth"` + RateLimit RateLimitConfig `yaml:"rate_limit"` + Metrics MetricsConfig `yaml:"metrics"` + Logging LoggingConfig `yaml:"logging"` + Storage StorageConfig `yaml:"storage"` } type ServerConfig struct { @@ -48,17 +48,17 @@ type AuthOperationConfig struct { } type RateLimitConfig struct { - Enabled bool `yaml:"enabled"` - DefaultRPS float64 `yaml:"default_rps"` - DefaultBurst int `yaml:"default_burst"` - IPRPS float64 `yaml:"ip_rps"` - IPBurst int `yaml:"ip_burst"` - Methods map[string]MethodLimit `yaml:"methods"` - Users map[string]UserLimit `yaml:"users"` - SkipMethods []string `yaml:"skip_methods"` - SkipUsers []string `yaml:"skip_users"` - CleanupInterval time.Duration `yaml:"cleanup_interval"` - MaxIdleTime time.Duration `yaml:"max_idle_time"` + Enabled bool `yaml:"enabled"` + DefaultRPS float64 `yaml:"default_rps"` + DefaultBurst int `yaml:"default_burst"` + IPRPS float64 `yaml:"ip_rps"` + IPBurst int `yaml:"ip_burst"` + Methods map[string]MethodLimit `yaml:"methods"` + Users map[string]UserLimit `yaml:"users"` + SkipMethods []string `yaml:"skip_methods"` + SkipUsers []string `yaml:"skip_users"` + CleanupInterval time.Duration `yaml:"cleanup_interval"` + MaxIdleTime time.Duration `yaml:"max_idle_time"` } type MethodLimit struct { @@ -343,7 +343,7 @@ func (c *Config) Save(filename string) error { return fmt.Errorf("failed to marshal config: %w", err) } - if err := os.WriteFile(filename, data, 0644); err != nil { + if err := os.WriteFile(filename, data, 0o644); err != nil { return fmt.Errorf("failed to write config file: %w", err) } -- cgit v1.2.3