mirror of
https://github.com/0ceanSlim/grain.git
synced 2024-11-22 08:37:13 +00:00
34 lines
1.6 KiB
Go
34 lines
1.6 KiB
Go
package config
|
|
|
|
type EventTimeConstraints struct {
|
|
MinCreatedAt int64 `yaml:"min_created_at"` // Minimum allowed timestamp
|
|
MinCreatedAtString string `yaml:"min_created_at_string"` // Original string value for parsing (e.g., "now-5m")
|
|
MaxCreatedAt int64 `yaml:"max_created_at"` // Maximum allowed timestamp
|
|
MaxCreatedAtString string `yaml:"max_created_at_string"` // Original string value for parsing (e.g., "now+5m")
|
|
}
|
|
|
|
type ServerConfig struct {
|
|
MongoDB struct {
|
|
URI string `yaml:"uri"`
|
|
Database string `yaml:"database"`
|
|
} `yaml:"mongodb"`
|
|
Server struct {
|
|
Port string `yaml:"port"`
|
|
ReadTimeout int `yaml:"read_timeout"`
|
|
WriteTimeout int `yaml:"write_timeout"`
|
|
IdleTimeout int `yaml:"idle_timeout"`
|
|
MaxConnections int `yaml:"max_connections"`
|
|
MaxSubscriptionsPerClient int `yaml:"max_subscriptions_per_client"`
|
|
} `yaml:"server"`
|
|
RateLimit RateLimitConfig `yaml:"rate_limit"`
|
|
Blacklist BlacklistConfig `yaml:"blacklist"`
|
|
ResourceLimits ResourceLimits `yaml:"resource_limits"`
|
|
Auth AuthConfig `yaml:"auth"`
|
|
EventPurge EventPurgeConfig `yaml:"event_purge"`
|
|
EventTimeConstraints EventTimeConstraints `yaml:"event_time_constraints"` // Added this field
|
|
Blossom struct {
|
|
BlossomPath string `yaml:"blossom_path"` // Path to store blossom files
|
|
MaxFileSize int `yaml:"max_file_size"` // Optional: Max file size for uploads
|
|
} `yaml:"blossom"`
|
|
}
|