Documentation
¶
Index ¶
- func GetAllBlacklistedPubkeys(w http.ResponseWriter, r *http.Request)
- func GetAllBlacklistedPubkeysLive(w http.ResponseWriter, r *http.Request)
- func GetAllWhitelistedPubkeys(w http.ResponseWriter, r *http.Request)
- func GetAllWhitelistedPubkeysLive(w http.ResponseWriter, r *http.Request)
- func GetAuthConfig(w http.ResponseWriter, r *http.Request)
- func GetBackupRelayConfig(w http.ResponseWriter, r *http.Request)
- func GetBlacklistConfig(w http.ResponseWriter, r *http.Request)
- func GetEventPurgeConfig(w http.ResponseWriter, r *http.Request)
- func GetEventTimeConstraintsConfig(w http.ResponseWriter, r *http.Request)
- func GetLoggingConfig(w http.ResponseWriter, r *http.Request)
- func GetMongoDBConfig(w http.ResponseWriter, r *http.Request)
- func GetRateLimitConfig(w http.ResponseWriter, r *http.Request)
- func GetResourceLimitsConfig(w http.ResponseWriter, r *http.Request)
- func GetServerConfig(w http.ResponseWriter, r *http.Request)
- func GetUserSyncConfig(w http.ResponseWriter, r *http.Request)
- func GetWhitelistConfig(w http.ResponseWriter, r *http.Request)
- type AuthConfigResponse
- type BackupRelayConfigResponse
- type BlacklistConfigResponse
- type BlacklistKeysResponse
- type EventPurgeConfigResponse
- type EventTimeConstraintsConfigResponse
- type LoggingConfigResponse
- type MongoDBConfigResponse
- type RateLimitConfigResponse
- type ResourceLimitsConfigResponse
- type ServerConfigResponse
- type UserSyncConfigResponse
- type WhitelistConfigResponse
- type WhitelistDomainInfo
- type WhitelistKeysResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAllBlacklistedPubkeys ¶
func GetAllBlacklistedPubkeys(w http.ResponseWriter, r *http.Request)
GetAllBlacklistedPubkeys handles the request to return all blacklisted pubkeys organized by source
func GetAllBlacklistedPubkeysLive ¶
func GetAllBlacklistedPubkeysLive(w http.ResponseWriter, r *http.Request)
GetAllBlacklistedPubkeysLive handles the request to return all blacklisted pubkeys with live mutelist fetching
func GetAllWhitelistedPubkeys ¶
func GetAllWhitelistedPubkeys(w http.ResponseWriter, r *http.Request)
GetAllWhitelistedPubkeys handles the cached request to return all whitelisted pubkeys organized by source
func GetAllWhitelistedPubkeysLive ¶
func GetAllWhitelistedPubkeysLive(w http.ResponseWriter, r *http.Request)
GetAllWhitelistedPubkeysLive handles the request to return all whitelisted pubkeys with live domain fetching This endpoint fetches fresh data from domains and is suitable for verification after configuration changes
func GetAuthConfig ¶
func GetAuthConfig(w http.ResponseWriter, r *http.Request)
GetAuthConfig handles the request to return authentication configuration
func GetBackupRelayConfig ¶
func GetBackupRelayConfig(w http.ResponseWriter, r *http.Request)
GetBackupRelayConfig handles the request to return backup relay configuration
func GetBlacklistConfig ¶
func GetBlacklistConfig(w http.ResponseWriter, r *http.Request)
GetBlacklistConfig handles the request to return blacklist configuration
func GetEventPurgeConfig ¶
func GetEventPurgeConfig(w http.ResponseWriter, r *http.Request)
GetEventPurgeConfig handles the request to return event purging configuration
func GetEventTimeConstraintsConfig ¶
func GetEventTimeConstraintsConfig(w http.ResponseWriter, r *http.Request)
GetEventTimeConstraintsConfig handles the request to return event time constraints configuration
func GetLoggingConfig ¶
func GetLoggingConfig(w http.ResponseWriter, r *http.Request)
GetLoggingConfig handles the request to return logging configuration
func GetMongoDBConfig ¶
func GetMongoDBConfig(w http.ResponseWriter, r *http.Request)
GetMongoDBConfig handles the request to return MongoDB configuration
func GetRateLimitConfig ¶
func GetRateLimitConfig(w http.ResponseWriter, r *http.Request)
GetRateLimitConfig handles the request to return rate limiting configuration
func GetResourceLimitsConfig ¶
func GetResourceLimitsConfig(w http.ResponseWriter, r *http.Request)
GetResourceLimitsConfig handles the request to return resource limits configuration
func GetServerConfig ¶
func GetServerConfig(w http.ResponseWriter, r *http.Request)
GetServerConfig handles the request to return server configuration
func GetUserSyncConfig ¶
func GetUserSyncConfig(w http.ResponseWriter, r *http.Request)
GetUserSyncConfig handles the request to return user sync configuration
func GetWhitelistConfig ¶
func GetWhitelistConfig(w http.ResponseWriter, r *http.Request)
GetWhitelistConfig handles the request to return whitelist configuration
Types ¶
type AuthConfigResponse ¶
AuthConfigResponse represents the authentication configuration response
type BackupRelayConfigResponse ¶
BackupRelayConfigResponse represents the backup relay configuration response
type BlacklistConfigResponse ¶
type BlacklistConfigResponse struct {
Enabled bool `json:"enabled"`
PermanentBanWords []string `json:"permanent_ban_words"`
TempBanWords []string `json:"temp_ban_words"`
MaxTempBans int `json:"max_temp_bans"`
TempBanDuration int `json:"temp_ban_duration"`
PermanentBlacklistPubkeys []string `json:"permanent_blacklist_pubkeys"`
PermanentBlacklistNpubs []string `json:"permanent_blacklist_npubs"`
MuteListAuthors []string `json:"mutelist_authors"`
MutelistCacheRefreshMinutes int `json:"mutelist_cache_refresh_minutes"`
}
BlacklistConfigResponse represents the blacklist configuration response
type BlacklistKeysResponse ¶
type BlacklistKeysResponse struct {
Permanent []string `json:"permanent"`
Temporary []map[string]interface{} `json:"temporary"`
Mutelist map[string][]string `json:"mutelist"`
}
BlacklistKeysResponse represents the blacklist keys response
type EventPurgeConfigResponse ¶
type EventPurgeConfigResponse struct {
Enabled bool `json:"enabled"`
DisableAtStartup bool `json:"disable_at_startup"`
KeepIntervalHours int `json:"keep_interval_hours"`
PurgeIntervalMinutes int `json:"purge_interval_minutes"`
PurgeByCategory map[string]bool `json:"purge_by_category"`
PurgeByKindEnabled bool `json:"purge_by_kind_enabled"`
KindsToPurge []int `json:"kinds_to_purge"`
ExcludeWhitelisted bool `json:"exclude_whitelisted"`
}
EventPurgeConfigResponse represents the event purging configuration response
type EventTimeConstraintsConfigResponse ¶
type EventTimeConstraintsConfigResponse struct {
MinCreatedAt int64 `json:"min_created_at"`
MinCreatedAtString string `json:"min_created_at_string"`
MaxCreatedAt int64 `json:"max_created_at"`
MaxCreatedAtString string `json:"max_created_at_string"`
}
EventTimeConstraintsConfigResponse represents the event time constraints configuration response
type LoggingConfigResponse ¶
type LoggingConfigResponse struct {
Level string `json:"level"`
File string `json:"file"`
MaxSizeMB int `json:"max_log_size_mb"`
Structure bool `json:"structure"`
CheckIntervalMin int `json:"check_interval_min"`
BackupCount int `json:"backup_count"`
SuppressComponents []string `json:"suppress_components"`
}
LoggingConfigResponse represents the logging configuration response
type MongoDBConfigResponse ¶
MongoDBConfigResponse represents the MongoDB configuration response
type RateLimitConfigResponse ¶
type RateLimitConfigResponse struct {
WsLimit float64 `json:"ws_limit"`
WsBurst int `json:"ws_burst"`
EventLimit float64 `json:"event_limit"`
EventBurst int `json:"event_burst"`
ReqLimit float64 `json:"req_limit"`
ReqBurst int `json:"req_burst"`
MaxEventSize int `json:"max_event_size"`
KindSizeLimits []cfgType.KindSizeLimitConfig `json:"kind_size_limits"`
CategoryLimits map[string]cfgType.KindLimitConfig `json:"category_limits"`
KindLimits []cfgType.KindLimitConfig `json:"kind_limits"`
}
RateLimitConfigResponse represents the rate limiting configuration response
type ResourceLimitsConfigResponse ¶
type ResourceLimitsConfigResponse struct {
CPUCores int `json:"cpu_cores"`
MemoryMB int `json:"memory_mb"`
HeapSizeMB int `json:"heap_size_mb"`
}
ResourceLimitsConfigResponse represents the resource limits configuration response
type ServerConfigResponse ¶
type ServerConfigResponse struct {
ReadTimeout int `json:"read_timeout"`
WriteTimeout int `json:"write_timeout"`
IdleTimeout int `json:"idle_timeout"`
MaxSubscriptionsPerClient int `json:"max_subscriptions_per_client"`
ImplicitReqLimit int `json:"implicit_req_limit"`
}
ServerConfigResponse represents the server configuration response
type UserSyncConfigResponse ¶
type UserSyncConfigResponse struct {
UserSync bool `json:"user_sync"`
DisableAtStartup bool `json:"disable_at_startup"`
InitialSyncRelays []string `json:"initial_sync_relays"`
Kinds []int `json:"kinds"`
Categories string `json:"categories"`
Limit *int `json:"limit"`
ExcludeNonWhitelisted bool `json:"exclude_non_whitelisted"`
Interval int `json:"interval"`
}
UserSyncConfigResponse represents the user sync configuration response
type WhitelistConfigResponse ¶
type WhitelistConfigResponse struct {
PubkeyWhitelist struct {
Enabled bool `json:"enabled"`
Pubkeys []string `json:"pubkeys"`
Npubs []string `json:"npubs"`
CacheRefreshMinutes int `json:"cache_refresh_minutes"`
} `json:"pubkey_whitelist"`
KindWhitelist struct {
Enabled bool `json:"enabled"`
Kinds []string `json:"kinds"`
} `json:"kind_whitelist"`
DomainWhitelist struct {
Enabled bool `json:"enabled"`
Domains []string `json:"domains"`
CacheRefreshMinutes int `json:"cache_refresh_minutes"`
} `json:"domain_whitelist"`
}
WhitelistConfigResponse represents the whitelist configuration response
type WhitelistDomainInfo ¶
WhitelistDomainInfo represents domain information with its pubkeys
type WhitelistKeysResponse ¶
type WhitelistKeysResponse struct {
List []string `json:"list"`
Domains []WhitelistDomainInfo `json:"domains"`
}
WhitelistKeysResponse represents the whitelist keys response