Documentation
¶
Index ¶
- func IsLoggedIn(c *gin.Context) bool
- func NewRouter(server *Server) *gin.Engine
- func RateLimitMiddleware(r rate.Limit, burst int) gin.HandlerFunc
- type ActionCount
- type ActiveBan
- type AltAccountGroup
- type AltAccountPlayer
- type AuditLogEntry
- type AuthLoginRequest
- type BulkDeleteRequest
- type ChatMessage
- type ClickHouseStatsResponse
- type ClickHouseTableStats
- type CombatHistoryEntry
- type ConnectionMetricValue
- type CreateRoleFromTemplateRequest
- type DatabaseTableStats
- type Dependencies
- type FeedEvent
- type GlobalAuditLogEntry
- type GlobalAuditStatsResponse
- type KickPlayerRequest
- type LayerChangeRequest
- type MetricPoint
- type MetricsOverviewResponse
- type MetricsSummary
- type MetricsTimelinePoint
- type MetricsTimelineResponse
- type MovePlayerRequest
- type NameHistoryEntry
- type PaginatedChatHistory
- type PlayerActionRequest
- type PlayerActivity
- type PlayerBanRequest
- type PlayerIdentifier
- type PlayerKickRequest
- type PlayerProfile
- type PlayerSearchResult
- type PlayerStatistics
- type PlayerStatsSummary
- type PlayerWarnRequest
- type PostgreSQLStatsResponse
- type RecentJoin
- type RecentServerInfo
- type RelatedPlayer
- type RiskIndicator
- type RuleEscalationSuggestion
- type RuleViolation
- type Server
- func (s *Server) AuthHasAnyServerPermission(perms ...string) gin.HandlerFunc
- func (s *Server) AuthHasServerPermission(permission string) gin.HandlerFunc
- func (s *Server) AuthInitial(c *gin.Context)
- func (s *Server) AuthIsSuperAdmin() func(c *gin.Context)
- func (s *Server) AuthLogin(c *gin.Context)
- func (s *Server) AuthLogout(c *gin.Context)
- func (s *Server) AuthSession(c *gin.Context)
- func (s *Server) BanListCfg(c *gin.Context)
- func (s *Server) BanListsCreate(c *gin.Context)
- func (s *Server) BanListsDelete(c *gin.Context)
- func (s *Server) BanListsGet(c *gin.Context)
- func (s *Server) BanListsList(c *gin.Context)
- func (s *Server) BanListsUpdate(c *gin.Context)
- func (s *Server) BulkDeleteStorageFiles(c *gin.Context)
- func (s *Server) CleanupExpiredSessions(c *gin.Context)
- func (s *Server) ConnectorCreate(c *gin.Context)
- func (s *Server) ConnectorDelete(c *gin.Context)
- func (s *Server) ConnectorList(c *gin.Context)
- func (s *Server) ConnectorListAvailable(c *gin.Context)
- func (s *Server) ConnectorPackageInstalledDelete(c *gin.Context)
- func (s *Server) ConnectorPackageListInstalled(c *gin.Context)
- func (s *Server) ConnectorPackageUpload(c *gin.Context)
- func (s *Server) ConnectorUpdate(c *gin.Context)
- func (s *Server) CreateAuditLog(ctx context.Context, serverID *uuid.UUID, userID *uuid.UUID, action string, ...)
- func (s *Server) DeleteSession(c *gin.Context)
- func (s *Server) DeleteStorageFile(c *gin.Context)
- func (s *Server) DeleteUserSessions(c *gin.Context)
- func (s *Server) DownloadStorageFile(c *gin.Context)
- func (s *Server) ExportGlobalAuditLogs(c *gin.Context)
- func (s *Server) GetAllSessions(c *gin.Context)
- func (s *Server) GetAvatar(c *gin.Context)
- func (s *Server) GetClickHouseStats(c *gin.Context)
- func (s *Server) GetDatabaseOverview(c *gin.Context)
- func (s *Server) GetGlobalAuditLogs(c *gin.Context)
- func (s *Server) GetGlobalAuditStats(c *gin.Context)
- func (s *Server) GetMetricsOverview(c *gin.Context)
- func (s *Server) GetMetricsTimeline(c *gin.Context)
- func (s *Server) GetPostgreSQLStats(c *gin.Context)
- func (s *Server) GetServerActivities(c *gin.Context)
- func (s *Server) GetSessionStats(c *gin.Context)
- func (s *Server) GetStorageFiles(c *gin.Context)
- func (s *Server) GetStorageSummary(c *gin.Context)
- func (s *Server) GetSystemConfig(c *gin.Context)
- func (s *Server) GetSystemHealth(c *gin.Context)
- func (s *Server) GetTopServers(c *gin.Context)
- func (s *Server) GetUserServerPermissions(c *gin.Context, userId, serverId uuid.UUID) ([]string, error)
- func (s *Server) HasAnyServerPermission(c *gin.Context, user *models.User, serverId uuid.UUID, permissions ...string) bool
- func (s *Server) HasServerPermission(c *gin.Context, user *models.User, serverId uuid.UUID, permission string) bool
- func (s *Server) IgnoredSteamIDsCheck(c *gin.Context)
- func (s *Server) IgnoredSteamIDsCreate(c *gin.Context)
- func (s *Server) IgnoredSteamIDsDelete(c *gin.Context)
- func (s *Server) IgnoredSteamIDsList(c *gin.Context)
- func (s *Server) IgnoredSteamIDsUpdate(c *gin.Context)
- func (s *Server) OptimizeDatabase(c *gin.Context)
- func (s *Server) OptionalAuthSession(c *gin.Context)
- func (s *Server) PermissionsList(c *gin.Context)
- func (s *Server) PlayerBanHistory(c *gin.Context)
- func (s *Server) PlayerChatHistoryPaginated(c *gin.Context)
- func (s *Server) PlayerCombatHistory(c *gin.Context)
- func (s *Server) PlayerGet(c *gin.Context)
- func (s *Server) PlayerRelatedPlayers(c *gin.Context)
- func (s *Server) PlayerSessionHistory(c *gin.Context)
- func (s *Server) PlayerTeamkillsAnalysis(c *gin.Context)
- func (s *Server) PlayersAltGroups(c *gin.Context)
- func (s *Server) PlayersList(c *gin.Context)
- func (s *Server) PlayersStats(c *gin.Context)
- func (s *Server) PluginInstalledDelete(c *gin.Context)
- func (s *Server) PluginListAvailable(c *gin.Context)
- func (s *Server) PluginListInstalled(c *gin.Context)
- func (s *Server) PluginUpload(c *gin.Context)
- func (s *Server) RconCommandAutocomplete(c *gin.Context)
- func (s *Server) RconCommandList(c *gin.Context)
- func (s *Server) RemoteBanSourcesCreate(c *gin.Context)
- func (s *Server) RemoteBanSourcesDelete(c *gin.Context)
- func (s *Server) RemoteBanSourcesList(c *gin.Context)
- func (s *Server) RemoteBanSourcesUpdate(c *gin.Context)
- func (s *Server) RequireAllPermissions(perms ...permissions.Permission) gin.HandlerFunc
- func (s *Server) RequireAnyPermission(perms ...permissions.Permission) gin.HandlerFunc
- func (s *Server) RequirePermission(perm permissions.Permission) gin.HandlerFunc
- func (s *Server) RoleTemplatesList(c *gin.Context)
- func (s *Server) ServerAdminsAdd(c *gin.Context)
- func (s *Server) ServerAdminsCfg(c *gin.Context)
- func (s *Server) ServerAdminsCleanupExpired(c *gin.Context)
- func (s *Server) ServerAdminsList(c *gin.Context)
- func (s *Server) ServerAdminsRemove(c *gin.Context)
- func (s *Server) ServerAdminsUpdate(c *gin.Context)
- func (s *Server) ServerAuditLogs(c *gin.Context)
- func (s *Server) ServerBanImportExecute(c *gin.Context)
- func (s *Server) ServerBanImportPreview(c *gin.Context)
- func (s *Server) ServerBanListSubscriptionCreate(c *gin.Context)
- func (s *Server) ServerBanListSubscriptionDelete(c *gin.Context)
- func (s *Server) ServerBanListSubscriptions(c *gin.Context)
- func (s *Server) ServerBansAdd(c *gin.Context)
- func (s *Server) ServerBansCfg(c *gin.Context)
- func (s *Server) ServerBansCfgEnhanced(c *gin.Context)
- func (s *Server) ServerBansList(c *gin.Context)
- func (s *Server) ServerBansRemove(c *gin.Context)
- func (s *Server) ServerBansUpdate(c *gin.Context)
- func (s *Server) ServerDelete(c *gin.Context)
- func (s *Server) ServerEventsSearch(c *gin.Context)
- func (s *Server) ServerEvidenceFileDownload(c *gin.Context)
- func (s *Server) ServerEvidenceFileUpload(c *gin.Context)
- func (s *Server) ServerFeeds(c *gin.Context)
- func (s *Server) ServerFeedsHistory(c *gin.Context)
- func (s *Server) ServerGet(c *gin.Context)
- func (s *Server) ServerLogwatcherRestart(c *gin.Context)
- func (s *Server) ServerMetrics(c *gin.Context)
- func (s *Server) ServerMetricsHistory(c *gin.Context)
- func (s *Server) ServerPluginCommandExecute(c *gin.Context)
- func (s *Server) ServerPluginCommandStatus(c *gin.Context)
- func (s *Server) ServerPluginCommandsList(c *gin.Context)
- func (s *Server) ServerPluginCreate(c *gin.Context)
- func (s *Server) ServerPluginDataClear(c *gin.Context)
- func (s *Server) ServerPluginDataDelete(c *gin.Context)
- func (s *Server) ServerPluginDataGet(c *gin.Context)
- func (s *Server) ServerPluginDataSet(c *gin.Context)
- func (s *Server) ServerPluginDelete(c *gin.Context)
- func (s *Server) ServerPluginDisable(c *gin.Context)
- func (s *Server) ServerPluginEnable(c *gin.Context)
- func (s *Server) ServerPluginGet(c *gin.Context)
- func (s *Server) ServerPluginList(c *gin.Context)
- func (s *Server) ServerPluginLogs(c *gin.Context)
- func (s *Server) ServerPluginLogsAll(c *gin.Context)
- func (s *Server) ServerPluginLogsAllWebSocket(c *gin.Context)
- func (s *Server) ServerPluginLogsWebSocket(c *gin.Context)
- func (s *Server) ServerPluginMetrics(c *gin.Context)
- func (s *Server) ServerPluginUpdate(c *gin.Context)
- func (s *Server) ServerRconAvailableLayers(c *gin.Context)
- func (s *Server) ServerRconChangeLayer(c *gin.Context)
- func (s *Server) ServerRconEvents(c *gin.Context)
- func (s *Server) ServerRconExecute(c *gin.Context)
- func (s *Server) ServerRconForceRestart(c *gin.Context)
- func (s *Server) ServerRconKickPlayer(c *gin.Context)
- func (s *Server) ServerRconMovePlayer(c *gin.Context)
- func (s *Server) ServerRconPlayerBan(c *gin.Context)
- func (s *Server) ServerRconPlayerEscalationSuggestion(c *gin.Context)
- func (s *Server) ServerRconPlayerKick(c *gin.Context)
- func (s *Server) ServerRconPlayerWarn(c *gin.Context)
- func (s *Server) ServerRconServerInfo(c *gin.Context)
- func (s *Server) ServerRconServerPopulation(c *gin.Context)
- func (s *Server) ServerRconSetNextLayer(c *gin.Context)
- func (s *Server) ServerRconWarnPlayer(c *gin.Context)
- func (s *Server) ServerRecentJoins(c *gin.Context)
- func (s *Server) ServerRoleCreateFromTemplate(c *gin.Context)
- func (s *Server) ServerRolePermissionsGet(c *gin.Context)
- func (s *Server) ServerRolePermissionsUpdate(c *gin.Context)
- func (s *Server) ServerRolesAdd(c *gin.Context)
- func (s *Server) ServerRolesList(c *gin.Context)
- func (s *Server) ServerRolesRemove(c *gin.Context)
- func (s *Server) ServerRolesUpdate(c *gin.Context)
- func (s *Server) ServerStatus(c *gin.Context)
- func (s *Server) ServerUpdate(c *gin.Context)
- func (s *Server) ServerUserRoles(c *gin.Context)
- func (s *Server) ServerWorkflowCreate(c *gin.Context)
- func (s *Server) ServerWorkflowDelete(c *gin.Context)
- func (s *Server) ServerWorkflowExecutionGet(c *gin.Context)
- func (s *Server) ServerWorkflowExecutionLogs(c *gin.Context)
- func (s *Server) ServerWorkflowExecutionMessages(c *gin.Context)
- func (s *Server) ServerWorkflowExecutionStats(c *gin.Context)
- func (s *Server) ServerWorkflowExecutions(c *gin.Context)
- func (s *Server) ServerWorkflowGet(c *gin.Context)
- func (s *Server) ServerWorkflowKVClear(c *gin.Context)
- func (s *Server) ServerWorkflowKVDelete(c *gin.Context)
- func (s *Server) ServerWorkflowKVGet(c *gin.Context)
- func (s *Server) ServerWorkflowKVList(c *gin.Context)
- func (s *Server) ServerWorkflowKVSet(c *gin.Context)
- func (s *Server) ServerWorkflowUpdate(c *gin.Context)
- func (s *Server) ServerWorkflowVariableCreate(c *gin.Context)
- func (s *Server) ServerWorkflowVariableDelete(c *gin.Context)
- func (s *Server) ServerWorkflowVariableUpdate(c *gin.Context)
- func (s *Server) ServerWorkflowVariablesList(c *gin.Context)
- func (s *Server) ServerWorkflowsList(c *gin.Context)
- func (s *Server) ServersCreate(c *gin.Context)
- func (s *Server) ServersList(c *gin.Context)
- func (s *Server) SyncBansCfgByID(ctx context.Context, serverID uuid.UUID) error
- func (s *Server) TriggerMOTDUploadIfEnabled(ctx context.Context, serverID uuid.UUID) bool
- func (s *Server) UpdateUserPassword(c *gin.Context)
- func (s *Server) UpdateUserProfile(c *gin.Context)
- func (s *Server) UserCreate(c *gin.Context)
- func (s *Server) UserDelete(c *gin.Context)
- func (s *Server) UserUpdate(c *gin.Context)
- func (s *Server) UsersList(c *gin.Context)
- type ServerActivityResponse
- type ServerMetricsData
- type SessionHistoryEntry
- type SessionInfo
- type SessionStatsResponse
- type StorageFileResponse
- type StorageSummaryResponse
- type SystemConfigResponse
- type SystemHealthResponse
- type SystemServiceHealth
- type TeamkillMetrics
- type TeamkillVictim
- type TopPlayerStats
- type TopServersResponse
- type UpdatePasswordRequest
- type UpdateProfileRequest
- type UpdateRolePermissionsRequest
- type UserActionCount
- type UserCreateRequest
- type UserSessionCount
- type UserUpdateRequest
- type ViolationSummary
- type WarnPlayerRequest
- type WeaponStat
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsLoggedIn ¶
func RateLimitMiddleware ¶
func RateLimitMiddleware(r rate.Limit, burst int) gin.HandlerFunc
RateLimitMiddleware returns a Gin middleware that enforces per-IP rate limiting. r is the allowed requests per second and burst is the maximum burst size.
Types ¶
type ActionCount ¶
ActionCount represents count of actions by type
type ActiveBan ¶
type ActiveBan struct {
BanID string `json:"ban_id"`
ServerID string `json:"server_id"`
ServerName string `json:"server_name"`
Reason string `json:"reason"`
Permanent bool `json:"permanent"`
ExpiresAt *time.Time `json:"expires_at,omitempty"`
CreatedAt time.Time `json:"created_at"`
AdminName string `json:"admin_name"`
}
ActiveBan represents a currently active ban on the player
type AltAccountGroup ¶
type AltAccountGroup struct {
GroupID string `json:"group_id"`
Players []AltAccountPlayer `json:"players"`
LastActivity *time.Time `json:"last_activity"`
}
AltAccountGroup represents a group of players sharing IPs (potential alts)
type AltAccountPlayer ¶
type AltAccountPlayer struct {
SteamID string `json:"steam_id"`
EOSID string `json:"eos_id"`
PlayerName string `json:"player_name"`
IsBanned bool `json:"is_banned"`
LastSeen *time.Time `json:"last_seen"`
}
AltAccountPlayer represents a player in an alt account group
type AuditLogEntry ¶
type AuditLogEntry struct {
ID uuid.UUID `json:"id"`
UserID *uuid.UUID `json:"user_id,omitempty"`
Username string `json:"username,omitempty"`
Action string `json:"action"`
Changes json.RawMessage `json:"changes,omitempty"`
Timestamp time.Time `json:"timestamp"`
}
AuditLogEntry represents an audit log entry
type AuthLoginRequest ¶
type BulkDeleteRequest ¶
type BulkDeleteRequest struct {
Paths []string `json:"paths" binding:"required"`
}
BulkDeleteRequest represents a bulk delete operation
type ChatMessage ¶
type ChatMessage struct {
SentAt time.Time `json:"sent_at"`
Message string `json:"message"`
ChatType string `json:"chat_type"`
ServerID string `json:"server_id"`
ServerName string `json:"server_name,omitempty"`
}
ChatMessage represents a chat message from the player
type ClickHouseStatsResponse ¶
type ClickHouseStatsResponse struct {
DatabaseName string `json:"database_name"`
TableCount int `json:"table_count"`
TotalRows uint64 `json:"total_rows"`
TotalBytes string `json:"total_bytes"`
Tables []ClickHouseTableStats `json:"tables"`
}
ClickHouseStatsResponse represents ClickHouse database statistics
type ClickHouseTableStats ¶
type ClickHouseTableStats struct {
TableName string `json:"table_name"`
TotalRows uint64 `json:"total_rows"`
TotalBytes string `json:"total_bytes"`
CompressedBytes string `json:"compressed_bytes"`
CompressionRatio float64 `json:"compression_ratio"`
PartitionCount int `json:"partition_count"`
}
ClickHouseTableStats represents statistics for a ClickHouse table
type CombatHistoryEntry ¶
type CombatHistoryEntry struct {
EventID string `json:"event_id,omitempty"`
ChainID string `json:"chain_id,omitempty"`
EventTime time.Time `json:"event_time"`
EventType string `json:"event_type"` // "kill", "death", "wounded", "damaged", "wounded_by", "damaged_by"
ServerID string `json:"server_id"`
ServerName string `json:"server_name,omitempty"`
Weapon string `json:"weapon"`
Damage float32 `json:"damage"`
Teamkill bool `json:"teamkill"`
OtherName string `json:"other_name"`
OtherSteamID string `json:"other_steam_id,omitempty"`
OtherEOSID string `json:"other_eos_id,omitempty"`
OtherTeam string `json:"other_team"`
OtherSquad string `json:"other_squad"`
PlayerTeam string `json:"player_team"`
PlayerSquad string `json:"player_squad"`
}
CombatHistoryEntry represents a kill or death event
type ConnectionMetricValue ¶
type CreateRoleFromTemplateRequest ¶
type CreateRoleFromTemplateRequest struct {
TemplateId uuid.UUID `json:"template_id" binding:"required"`
Name string `json:"name" binding:"required"`
}
ServerRoleCreateFromTemplate creates a new server role from a template
type DatabaseTableStats ¶
type DatabaseTableStats struct {
TableName string `json:"table_name"`
RowCount int64 `json:"row_count"`
TotalSize string `json:"total_size"`
DataSize string `json:"data_size"`
IndexSize string `json:"index_size"`
LastAnalyzed string `json:"last_analyzed,omitempty"`
}
DatabaseTableStats represents statistics for a database table
type Dependencies ¶
type Dependencies struct {
DB *sql.DB
Clickhouse *clickhouse.Client
Valkey *valkey.Client
RconManager *rcon_manager.RconManager
EventManager *event_manager.EventManager
LogwatcherManager *logwatcher_manager.LogwatcherManager
PluginManager *plugin_manager.PluginManager
WorkflowManager *workflow_manager.WorkflowManager
RemoteBanSyncService *core.RemoteBanSyncService
Storage storage.Storage
PermissionService *permissions.Service
PermissionRepo *permissions.Repository
}
type FeedEvent ¶
type FeedEvent struct {
ID string `json:"id"`
Type string `json:"type"`
Timestamp time.Time `json:"timestamp"`
Data map[string]interface{} `json:"data"`
}
FeedEvent represents a formatted event for the feeds
type GlobalAuditLogEntry ¶
type GlobalAuditLogEntry struct {
ID uuid.UUID `json:"id"`
ServerID *uuid.UUID `json:"server_id,omitempty"`
ServerName string `json:"server_name,omitempty"`
UserID *uuid.UUID `json:"user_id,omitempty"`
Username string `json:"username,omitempty"`
Action string `json:"action"`
Changes json.RawMessage `json:"changes,omitempty"`
Timestamp time.Time `json:"timestamp"`
}
GlobalAuditLogEntry represents an audit log entry with server information
type GlobalAuditStatsResponse ¶
type GlobalAuditStatsResponse struct {
TotalLogs int64 `json:"total_logs"`
LogsToday int64 `json:"logs_today"`
LogsThisWeek int64 `json:"logs_this_week"`
LogsThisMonth int64 `json:"logs_this_month"`
TopActions []ActionCount `json:"top_actions"`
TopUsers []UserActionCount `json:"top_users"`
RecentActivity []GlobalAuditLogEntry `json:"recent_activity"`
}
GlobalAuditStatsResponse represents audit log statistics
type KickPlayerRequest ¶
type KickPlayerRequest struct {
SteamId string `json:"steam_id"`
EosId string `json:"eos_id"`
Reason string `json:"reason"`
}
Request structs for player actions
type LayerChangeRequest ¶
type LayerChangeRequest struct {
Layer string `json:"layer" binding:"required"`
}
type MetricPoint ¶
MetricPoint represents a time-series data point
type MetricsOverviewResponse ¶
type MetricsOverviewResponse struct {
TotalServers int `json:"total_servers"`
ActiveServers int `json:"active_servers"`
TotalPlayers int64 `json:"total_players"`
TotalEvents int64 `json:"total_events"`
EventsThisWeek int64 `json:"events_this_week"`
EventsThisMonth int64 `json:"events_this_month"`
TotalChatMessages int64 `json:"total_chat_messages"`
TotalWorkflowRuns int64 `json:"total_workflow_runs"`
StorageUsed int64 `json:"storage_used"`
StorageUsedReadable string `json:"storage_used_readable"`
}
MetricsOverviewResponse represents high-level instance metrics
type MetricsSummary ¶
type MetricsSummary struct {
TotalPlayers int `json:"total_players"`
AvgTickRate float64 `json:"avg_tick_rate"`
TotalRounds int `json:"total_rounds"`
UniquePlayersCount int `json:"unique_players_count"`
TotalChatMessages int `json:"total_chat_messages"`
TotalConnections int `json:"total_connections"` // Total connection activity (connects + disconnects)
TotalTeamkills int `json:"total_teamkills"`
TotalPlayerWounded int `json:"total_player_wounded"`
TotalPlayerRevived int `json:"total_player_revived"`
TotalPlayerPossess int `json:"total_player_possess"`
TotalPlayerDied int `json:"total_player_died"`
TotalPlayerDamaged int `json:"total_player_damaged"`
TotalDeployableDamaged int `json:"total_deployable_damaged"`
TotalAdminBroadcasts int `json:"total_admin_broadcasts"`
TotalPluginLogs int `json:"total_plugin_logs"`
MostPlayedMap string `json:"most_played_map"`
PeakPlayerCount int `json:"peak_player_count"`
}
MetricsSummary provides aggregate statistics
type MetricsTimelinePoint ¶
MetricsTimelinePoint represents a data point in a time series
type MetricsTimelineResponse ¶
type MetricsTimelineResponse struct {
EventsOverTime []MetricsTimelinePoint `json:"events_over_time"`
ChatOverTime []MetricsTimelinePoint `json:"chat_over_time"`
PlayersOverTime []MetricsTimelinePoint `json:"players_over_time"`
}
MetricsTimelineResponse represents time-series metrics data
type MovePlayerRequest ¶
type NameHistoryEntry ¶
type NameHistoryEntry struct {
Name string `json:"name"`
FirstUsed time.Time `json:"first_used"`
LastUsed time.Time `json:"last_used"`
SessionCount int64 `json:"session_count"`
}
NameHistoryEntry represents a name used by the player
type PaginatedChatHistory ¶
type PaginatedChatHistory struct {
Messages []ChatMessage `json:"messages"`
Total int64 `json:"total"`
Page int `json:"page"`
Limit int `json:"limit"`
TotalPages int `json:"total_pages"`
}
PaginatedChatHistory represents paginated chat messages
type PlayerActionRequest ¶
type PlayerActionRequest struct {
SteamId string `json:"steam_id"`
EosId string `json:"eos_id"`
RuleId *string `json:"rule_id"`
}
Request structs for player actions with rule support
type PlayerActivity ¶
type PlayerActivity struct {
EventTime time.Time `json:"event_time"`
EventType string `json:"event_type"`
Description string `json:"description"`
ServerID string `json:"server_id"`
ServerName string `json:"server_name,omitempty"`
}
PlayerActivity represents a player action or event
type PlayerBanRequest ¶
type PlayerBanRequest struct {
PlayerActionRequest
Reason string `json:"reason" binding:"required"`
Duration string `json:"duration"` // "0"/"permanent" for permanent, "7d", "2h", "30m", or bare number (days)
}
type PlayerIdentifier ¶
PlayerIdentifier represents a player identifier for batch lookups
type PlayerKickRequest ¶
type PlayerKickRequest struct {
PlayerActionRequest
Reason string `json:"reason"`
}
type PlayerProfile ¶
type PlayerProfile struct {
SteamID string `json:"steam_id"`
EOSID string `json:"eos_id"`
EpicID string `json:"epic_id,omitempty"`
PlayerName string `json:"player_name"`
LastSeen *time.Time `json:"last_seen"`
FirstSeen *time.Time `json:"first_seen"`
TotalPlayTime int64 `json:"total_play_time"` // in seconds
TotalSessions int64 `json:"total_sessions"`
Statistics PlayerStatistics `json:"statistics"`
RecentActivity []PlayerActivity `json:"recent_activity"`
ChatHistory []ChatMessage `json:"chat_history,omitempty"`
Violations []RuleViolation `json:"violations,omitempty"`
RecentServers []RecentServerInfo `json:"recent_servers"`
// Admin-focused fields
ActiveBans []ActiveBan `json:"active_bans"`
ViolationSummary ViolationSummary `json:"violation_summary"`
TeamkillMetrics TeamkillMetrics `json:"teamkill_metrics"`
RiskIndicators []RiskIndicator `json:"risk_indicators"`
NameHistory []NameHistoryEntry `json:"name_history"`
WeaponStats []WeaponStat `json:"weapon_stats"`
// Consolidated identity fields
CanonicalID string `json:"canonical_id,omitempty"`
AllSteamIDs []string `json:"all_steam_ids,omitempty"`
AllEOSIDs []string `json:"all_eos_ids,omitempty"`
AllEpicIDs []string `json:"all_epic_ids,omitempty"`
AllNames []string `json:"all_names,omitempty"`
IdentityStatus string `json:"identity_status,omitempty"` // "resolved", "pending"
}
PlayerProfile represents a player's comprehensive profile
type PlayerSearchResult ¶
type PlayerSearchResult struct {
SteamID string `json:"steam_id"`
EOSID string `json:"eos_id"`
EpicID string `json:"epic_id,omitempty"`
PlayerName string `json:"player_name"`
LastSeen *time.Time `json:"last_seen"`
FirstSeen *time.Time `json:"first_seen"`
}
PlayerSearchResult represents a simplified player profile for search results
type PlayerStatistics ¶
type PlayerStatistics struct {
Kills int64 `json:"kills"`
Deaths int64 `json:"deaths"`
Teamkills int64 `json:"teamkills"`
Revives int64 `json:"revives"`
TimesRevived int64 `json:"times_revived"`
DamageDealt float64 `json:"damage_dealt"`
DamageTaken float64 `json:"damage_taken"`
KDRatio float64 `json:"kd_ratio"`
}
PlayerStatistics holds combat and gameplay statistics
type PlayerStatsSummary ¶
type PlayerStatsSummary struct {
TopPlayers []TopPlayerStats `json:"top_players"`
TopTeamkillers []TopPlayerStats `json:"top_teamkillers"`
TopMedics []TopPlayerStats `json:"top_medics"`
MostRecentPlayers []PlayerSearchResult `json:"most_recent_players"`
TotalPlayers int64 `json:"total_players"`
TotalKills int64 `json:"total_kills"`
TotalDeaths int64 `json:"total_deaths"`
TotalTeamkills int64 `json:"total_teamkills"`
}
PlayerStatsSummary represents overall player statistics
type PlayerWarnRequest ¶
type PlayerWarnRequest struct {
PlayerActionRequest
Message string `json:"message" binding:"required"`
}
type PostgreSQLStatsResponse ¶
type PostgreSQLStatsResponse struct {
DatabaseName string `json:"database_name"`
DatabaseSize string `json:"database_size"`
TableCount int `json:"table_count"`
TotalConnections int `json:"total_connections"`
ActiveQueries int `json:"active_queries"`
CacheHitRatio float64 `json:"cache_hit_ratio"`
Tables []DatabaseTableStats `json:"tables"`
}
PostgreSQLStatsResponse represents PostgreSQL database statistics
type RecentJoin ¶
type RecentJoin struct {
ID string `json:"id"`
PlayerName string `json:"player_name"`
SteamID string `json:"steam_id,omitempty"`
EOSID string `json:"eos_id,omitempty"`
JoinedAt time.Time `json:"joined_at"`
}
RecentJoin represents a recent player join event
type RecentServerInfo ¶
type RecentServerInfo struct {
ServerID string `json:"server_id"`
ServerName string `json:"server_name"`
LastSeen time.Time `json:"last_seen"`
Sessions int64 `json:"sessions"`
}
RecentServerInfo represents a server the player has recently played on
type RelatedPlayer ¶
type RelatedPlayer struct {
SteamID string `json:"steam_id"`
EOSID string `json:"eos_id"`
PlayerName string `json:"player_name"`
RelationType string `json:"relation_type"` // "same_ip"
IsBanned bool `json:"is_banned"`
}
RelatedPlayer represents a player potentially related (same IP)
type RiskIndicator ¶
type RiskIndicator struct {
Type string `json:"type"` // "high_tk_rate", "recent_ban", "multiple_names", "cbl_flagged", "ip_shared"
Severity string `json:"severity"` // "critical", "high", "medium", "low"
Description string `json:"description"`
}
RiskIndicator represents a risk flag for admin attention
type RuleEscalationSuggestion ¶
type RuleEscalationSuggestion struct {
SuggestedAction string `json:"suggested_action"` // WARN, KICK, BAN
SuggestedDuration *int `json:"suggested_duration"` // Duration in days for bans
SuggestedMessage string `json:"suggested_message"`
ViolationCount int `json:"violation_count"`
RuleTitle string `json:"rule_title"`
RuleDescription string `json:"rule_description"`
RuleId *string `json:"rule_id"` // Rule ID for generating reason in UI
}
RuleEscalationSuggestion represents a suggested escalation action
type RuleViolation ¶
type RuleViolation struct {
ViolationID string `json:"violation_id"`
ServerID string `json:"server_id"`
ServerName string `json:"server_name,omitempty"`
RuleID *string `json:"rule_id"`
RuleName *string `json:"rule_name,omitempty"`
ActionType string `json:"action_type"`
AdminUserID *string `json:"admin_user_id"`
AdminName *string `json:"admin_name,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
RuleViolation represents a rule violation by the player
type Server ¶
type Server struct {
Dependencies *Dependencies
// contains filtered or unexported fields
}
func New ¶
func New(serverDependencies *Dependencies) *Server
func (*Server) AuthHasAnyServerPermission ¶
func (s *Server) AuthHasAnyServerPermission(perms ...string) gin.HandlerFunc
AuthHasAnyServerPermission checks if the user has any of the specified permissions for a server DEPRECATED: Use RequireAnyPermission instead for new code
func (*Server) AuthHasServerPermission ¶
func (s *Server) AuthHasServerPermission(permission string) gin.HandlerFunc
AuthHasServerPermission checks if the user has a specific permission for a server This middleware expects the serverId to be in the URL parameters
func (*Server) AuthInitial ¶
func (*Server) AuthIsSuperAdmin ¶
AuthIsSuperAdmin checks if the user is a super admin, if not it returns a 403 Forbidden response
func (*Server) AuthLogout ¶
func (*Server) AuthSession ¶
AuthSession checks if the user is authenticated, if not it returns a 401 Unauthorized response
func (*Server) BanListCfg ¶
BanListCfg handles generating a ban config for a specific ban list
func (*Server) BanListsCreate ¶
BanListsCreate handles creating a new ban list
func (*Server) BanListsDelete ¶
BanListsDelete handles deleting a ban list
func (*Server) BanListsGet ¶
BanListsGet handles getting a specific ban list
func (*Server) BanListsList ¶
BanListsList handles listing all ban lists
func (*Server) BanListsUpdate ¶
BanListsUpdate handles updating a ban list
func (*Server) BulkDeleteStorageFiles ¶
BulkDeleteStorageFiles deletes multiple files from storage
func (*Server) CleanupExpiredSessions ¶
CleanupExpiredSessions removes all expired sessions from the database
func (*Server) ConnectorCreate ¶
ConnectorCreate creates a new connector instance
func (*Server) ConnectorDelete ¶
ConnectorDelete deletes a connector instance
func (*Server) ConnectorList ¶
ConnectorList returns all configured connectors
func (*Server) ConnectorListAvailable ¶
ConnectorListAvailable returns all available connector definitions
func (*Server) ConnectorPackageInstalledDelete ¶
ConnectorPackageInstalledDelete removes an installed sideloaded connector package.
func (*Server) ConnectorPackageListInstalled ¶
ConnectorPackageListInstalled lists globally installed sideloaded connector packages (native executable bundle).
func (*Server) ConnectorPackageUpload ¶
ConnectorPackageUpload installs a sideloaded connector package (zip: manifest + native executable bundle) uploaded by a super admin.
func (*Server) ConnectorUpdate ¶
ConnectorUpdate updates a connector's configuration
func (*Server) CreateAuditLog ¶
func (s *Server) CreateAuditLog(ctx context.Context, serverID *uuid.UUID, userID *uuid.UUID, action string, changes interface{})
CreateAuditLog creates a new audit log entry
func (*Server) DeleteSession ¶
DeleteSession force logs out a specific session
func (*Server) DeleteStorageFile ¶
DeleteStorageFile deletes a specific file from storage
func (*Server) DeleteUserSessions ¶
DeleteUserSessions force logs out all sessions for a specific user
func (*Server) DownloadStorageFile ¶
DownloadStorageFile downloads a specific file from storage
func (*Server) ExportGlobalAuditLogs ¶
ExportGlobalAuditLogs exports audit logs to CSV format
func (*Server) GetAllSessions ¶
GetAllSessions returns all active sessions
func (*Server) GetClickHouseStats ¶
GetClickHouseStats returns ClickHouse database statistics
func (*Server) GetDatabaseOverview ¶
GetDatabaseOverview returns a combined overview of all databases
func (*Server) GetGlobalAuditLogs ¶
GetGlobalAuditLogs returns audit logs across all servers
func (*Server) GetGlobalAuditStats ¶
GetGlobalAuditStats returns statistics about audit logs
func (*Server) GetMetricsOverview ¶
GetMetricsOverview returns high-level instance metrics
func (*Server) GetMetricsTimeline ¶
GetMetricsTimeline returns time-series metrics data
func (*Server) GetPostgreSQLStats ¶
GetPostgreSQLStats returns PostgreSQL database statistics
func (*Server) GetServerActivities ¶
GetServerActivities returns per-server activity breakdown
func (*Server) GetSessionStats ¶
GetSessionStats returns session statistics
func (*Server) GetStorageFiles ¶
GetStorageFiles returns a paginated list of files in storage
func (*Server) GetStorageSummary ¶
GetStorageSummary returns storage usage statistics
func (*Server) GetSystemConfig ¶
GetSystemConfig returns sanitized system configuration
func (*Server) GetSystemHealth ¶
GetSystemHealth returns overall system health status
func (*Server) GetTopServers ¶
GetTopServers returns the most active servers by various metrics
func (*Server) GetUserServerPermissions ¶
func (s *Server) GetUserServerPermissions(c *gin.Context, userId, serverId uuid.UUID) ([]string, error)
GetUserServerPermissions retrieves the permissions a user has for a specific server Uses the new PBAC system (server_role_permissions table)
func (*Server) HasAnyServerPermission ¶
func (s *Server) HasAnyServerPermission(c *gin.Context, user *models.User, serverId uuid.UUID, permissions ...string) bool
HasAnyServerPermission checks if a user has any of the specified permissions for a server
func (*Server) HasServerPermission ¶
func (s *Server) HasServerPermission(c *gin.Context, user *models.User, serverId uuid.UUID, permission string) bool
HasServerPermission checks if a user has a specific permission for a server
func (*Server) IgnoredSteamIDsCheck ¶
IgnoredSteamIDsCheck checks if a Steam ID is in the ignore list
func (*Server) IgnoredSteamIDsCreate ¶
IgnoredSteamIDsCreate creates a new ignored Steam ID entry
func (*Server) IgnoredSteamIDsDelete ¶
IgnoredSteamIDsDelete deletes an ignored Steam ID entry
func (*Server) IgnoredSteamIDsList ¶
IgnoredSteamIDsList returns all ignored Steam IDs
func (*Server) IgnoredSteamIDsUpdate ¶
IgnoredSteamIDsUpdate updates an existing ignored Steam ID entry
func (*Server) OptimizeDatabase ¶
OptimizeDatabase performs optimization tasks on databases
func (*Server) OptionalAuthSession ¶
OptionalAuthSession checks if the user is authenticated, but does not require it
func (*Server) PermissionsList ¶
PermissionsList returns all available permissions grouped by category
func (*Server) PlayerBanHistory ¶
PlayerBanHistory handles GET /api/players/:playerId/ban-history - historical bans for a player by Steam or EOS identifier.
func (*Server) PlayerChatHistoryPaginated ¶
PlayerChatHistoryPaginated handles GET /api/players/:playerId/chat - paginated chat history
func (*Server) PlayerCombatHistory ¶
PlayerCombatHistory handles GET /api/players/:playerId/combat - combat history (kills and deaths)
func (*Server) PlayerGet ¶
PlayerGet handles GET /api/players/:playerId - get player profile by steam or eos id
func (*Server) PlayerRelatedPlayers ¶
PlayerRelatedPlayers handles GET /api/players/:playerId/related - related players (same IP)
func (*Server) PlayerSessionHistory ¶
PlayerSessionHistory handles GET /api/players/:playerId/sessions - session history
func (*Server) PlayerTeamkillsAnalysis ¶
PlayerTeamkillsAnalysis handles GET /api/players/:playerId/teamkills - teamkill analysis
func (*Server) PlayersAltGroups ¶
PlayersAltGroups handles GET /api/players/alt-groups - list all suspected alt account groups
func (*Server) PlayersList ¶
PlayersList handles GET /api/players - search and list players
func (*Server) PlayersStats ¶
PlayersStats handles GET /api/players/stats - get player statistics summary
func (*Server) PluginInstalledDelete ¶
PluginInstalledDelete removes an installed native plugin package.
func (*Server) PluginListAvailable ¶
PluginListAvailable returns all available plugin definitions
func (*Server) PluginListInstalled ¶
PluginListInstalled returns all globally installed plugin packages.
func (*Server) PluginUpload ¶
PluginUpload installs a plugin package uploaded by a super admin.
func (*Server) RconCommandAutocomplete ¶
RconCommandAutocomplete handles the auto-complete functionality for commands
func (*Server) RconCommandList ¶
RconCommandList handles the listing of all commands that can be executed by the server
func (*Server) RemoteBanSourcesCreate ¶
RemoteBanSourcesCreate handles creating a new remote ban source
func (*Server) RemoteBanSourcesDelete ¶
RemoteBanSourcesDelete handles deleting a remote ban source
func (*Server) RemoteBanSourcesList ¶
RemoteBanSourcesList handles listing all remote ban sources
func (*Server) RemoteBanSourcesUpdate ¶
RemoteBanSourcesUpdate handles updating a remote ban source
func (*Server) RequireAllPermissions ¶
func (s *Server) RequireAllPermissions(perms ...permissions.Permission) gin.HandlerFunc
RequireAllPermissions checks if the user has all of the specified permissions
func (*Server) RequireAnyPermission ¶
func (s *Server) RequireAnyPermission(perms ...permissions.Permission) gin.HandlerFunc
RequireAnyPermission checks if the user has any of the specified permissions
func (*Server) RequirePermission ¶
func (s *Server) RequirePermission(perm permissions.Permission) gin.HandlerFunc
RequirePermission checks if the user has a specific permission for a server This is the new PBAC middleware that uses the permissions package
func (*Server) RoleTemplatesList ¶
RoleTemplatesList returns all available role templates with their permissions
func (*Server) ServerAdminsAdd ¶
ServerAdminsAdd handles adding a new admin
func (*Server) ServerAdminsCfg ¶
ServerAdminsCfg handles generating the admin config file This exports roles and admins in Squad's admin.cfg format
func (*Server) ServerAdminsCleanupExpired ¶
ServerAdminsCleanupExpired handles manual cleanup of expired admin roles
func (*Server) ServerAdminsList ¶
ServerAdminsList handles listing all admins for a server
func (*Server) ServerAdminsRemove ¶
ServerAdminsRemove handles removing an admin
func (*Server) ServerAdminsUpdate ¶
ServerAdminsUpdate handles updating an admin's notes
func (*Server) ServerAuditLogs ¶
ServerAuditLogs handles listing audit logs for a server
func (*Server) ServerBanImportExecute ¶
ServerBanImportExecute imports bans from the server's Bans.cfg into the Aegis database.
func (*Server) ServerBanImportPreview ¶
ServerBanImportPreview returns a preview of what would be imported from the server's Bans.cfg.
func (*Server) ServerBanListSubscriptionCreate ¶
ServerBanListSubscriptionCreate handles subscribing a server to a ban list
func (*Server) ServerBanListSubscriptionDelete ¶
ServerBanListSubscriptionDelete handles unsubscribing a server from a ban list
func (*Server) ServerBanListSubscriptions ¶
ServerBanListSubscriptions handles listing ban list subscriptions for a server
func (*Server) ServerBansAdd ¶
ServerBansAdd handles adding a new ban
func (*Server) ServerBansCfg ¶
ServerBansCfg handles generating the ban config file for the server
func (*Server) ServerBansCfgEnhanced ¶
ServerBansCfgEnhanced handles generating the enhanced ban config file for the server This supports both local bans and remote ban list integration
func (*Server) ServerBansList ¶
ServerBansList handles listing all bans for a server
func (*Server) ServerBansRemove ¶
ServerBansRemove handles removing a ban
func (*Server) ServerBansUpdate ¶
ServerBansUpdate handles updating an existing ban
func (*Server) ServerDelete ¶
ServerDelete handles deleting a server
func (*Server) ServerEventsSearch ¶
ServerEventsSearch handles searching for events in ClickHouse for evidence
func (*Server) ServerEvidenceFileDownload ¶
ServerEvidenceFileDownload handles downloading evidence files
func (*Server) ServerEvidenceFileUpload ¶
ServerEvidenceFileUpload handles file uploads for ban evidence
func (*Server) ServerFeeds ¶
ServerFeeds handles subscribing to live server events for feeds (chat, connections, teamkills) via WebSocket
func (*Server) ServerFeedsHistory ¶
ServerFeedsHistory returns historical feed data
func (*Server) ServerLogwatcherRestart ¶
ServerLogwatcherRestart handles restarting the log watcher connection for a server
func (*Server) ServerMetrics ¶
ServerMetrics handles getting the metrics of a server
func (*Server) ServerMetricsHistory ¶
ServerMetricsHistory provides detailed metrics history from ClickHouse
func (*Server) ServerPluginCommandExecute ¶
ServerPluginCommandExecute executes a command on a plugin instance
func (*Server) ServerPluginCommandStatus ¶
ServerPluginCommandStatus gets async command execution status
func (*Server) ServerPluginCommandsList ¶
ServerPluginCommandsList returns available commands for a plugin instance
func (*Server) ServerPluginCreate ¶
ServerPluginCreate creates a new plugin instance for a server
func (*Server) ServerPluginDataClear ¶
ServerPluginDataClear clears all plugin data for a plugin instance
func (*Server) ServerPluginDataDelete ¶
ServerPluginDataDelete deletes a specific plugin data item
func (*Server) ServerPluginDataGet ¶
ServerPluginDataGet returns all plugin data for a plugin instance
func (*Server) ServerPluginDataSet ¶
ServerPluginDataSet sets or updates a plugin data item
func (*Server) ServerPluginDelete ¶
ServerPluginDelete deletes a plugin instance
func (*Server) ServerPluginDisable ¶
ServerPluginDisable disables a plugin instance
func (*Server) ServerPluginEnable ¶
ServerPluginEnable enables a plugin instance
func (*Server) ServerPluginGet ¶
ServerPluginGet returns a specific plugin instance
func (*Server) ServerPluginList ¶
ServerPluginList returns all plugin instances for a server
func (*Server) ServerPluginLogs ¶
ServerPluginLogs returns recent logs for a plugin instance
func (*Server) ServerPluginLogsAll ¶
ServerPluginLogsAll returns aggregated logs for all plugin instances for a server
func (*Server) ServerPluginLogsAllWebSocket ¶
ServerPluginLogsAllWebSocket handles WebSocket connections for real-time logs from all plugin instances on a server
func (*Server) ServerPluginLogsWebSocket ¶
ServerPluginLogsWebSocket handles WebSocket connections for real-time plugin logs for a specific plugin instance
func (*Server) ServerPluginMetrics ¶
ServerPluginMetrics returns metrics for a plugin instance. The body is currently empty; the route is kept for client compatibility while plugin metrics are reworked. Use the logs endpoints for per-plugin runtime data.
func (*Server) ServerPluginUpdate ¶
ServerPluginUpdate updates a plugin instance's configuration and settings
func (*Server) ServerRconAvailableLayers ¶
func (*Server) ServerRconChangeLayer ¶
func (*Server) ServerRconEvents ¶
ServerRconEvents handles subscribing to RCON events using Server-Sent Events (SSE)
func (*Server) ServerRconExecute ¶
func (*Server) ServerRconForceRestart ¶
ServerRconForceRestart forces a restart of the RCON connection for a server
func (*Server) ServerRconKickPlayer ¶
ServerRconKickPlayer handles kicking a player from the server
func (*Server) ServerRconMovePlayer ¶
ServerRconMovePlayer handles moving a player to another team
func (*Server) ServerRconPlayerBan ¶
ServerRconPlayerBan handles banning a player via RCON with optional rule violation logging
func (*Server) ServerRconPlayerEscalationSuggestion ¶
ServerRconPlayerEscalationSuggestion checks what action should be taken for a player based on rule violations
func (*Server) ServerRconPlayerKick ¶
ServerRconPlayerKick handles kicking a player via RCON with optional rule violation logging
func (*Server) ServerRconPlayerWarn ¶
ServerRconPlayerWarn handles warning a player via RCON with optional rule violation logging
func (*Server) ServerRconServerInfo ¶
ServerRconServerInfo gets the server info from the server
func (*Server) ServerRconServerPopulation ¶
func (*Server) ServerRconSetNextLayer ¶
func (*Server) ServerRconWarnPlayer ¶
ServerRconWarnPlayer handles sending a warning message to a player
func (*Server) ServerRecentJoins ¶
ServerRecentJoins returns the most recent player joins for a server
func (*Server) ServerRoleCreateFromTemplate ¶
func (*Server) ServerRolePermissionsGet ¶
ServerRolePermissionsGet retrieves permissions for a specific server role
func (*Server) ServerRolePermissionsUpdate ¶
func (*Server) ServerRolesAdd ¶
ServerRolesAdd handles adding a new role
func (*Server) ServerRolesList ¶
ServerRolesList handles listing all roles for a server
func (*Server) ServerRolesRemove ¶
ServerRolesRemove handles removing a role
func (*Server) ServerRolesUpdate ¶
ServerRolesUpdate handles updating a role
func (*Server) ServerStatus ¶
ServerStatus handles getting the status of a server
func (*Server) ServerUpdate ¶
ServerUpdate handles updating a server
func (*Server) ServerUserRoles ¶
ServerUserRoles handles retrieving the user's permissions for all servers they have access to
func (*Server) ServerWorkflowCreate ¶
ServerWorkflowCreate creates a new workflow
func (*Server) ServerWorkflowDelete ¶
ServerWorkflowDelete deletes a workflow
func (*Server) ServerWorkflowExecutionGet ¶
ServerWorkflowExecutionGet returns details for a specific execution
func (*Server) ServerWorkflowExecutionLogs ¶
ServerWorkflowExecutionLogs returns detailed logs for a specific execution
func (*Server) ServerWorkflowExecutionMessages ¶
ServerWorkflowExecutionMessages returns workflow log messages for a specific execution
func (*Server) ServerWorkflowExecutionStats ¶
ServerWorkflowExecutionStats returns computed statistics for a workflow
func (*Server) ServerWorkflowExecutions ¶
ServerWorkflowExecutions returns execution history for a workflow
func (*Server) ServerWorkflowGet ¶
ServerWorkflowGet returns a specific workflow
func (*Server) ServerWorkflowKVClear ¶
ServerWorkflowKVClear clears all KV pairs for a workflow
func (*Server) ServerWorkflowKVDelete ¶
ServerWorkflowKVDelete deletes a KV pair
func (*Server) ServerWorkflowKVGet ¶
ServerWorkflowKVGet gets a specific KV pair
func (*Server) ServerWorkflowKVList ¶
ServerWorkflowKVList lists all KV pairs for a workflow
func (*Server) ServerWorkflowKVSet ¶
ServerWorkflowKVSet sets a KV pair
func (*Server) ServerWorkflowUpdate ¶
ServerWorkflowUpdate updates a workflow
func (*Server) ServerWorkflowVariableCreate ¶
ServerWorkflowVariableCreate creates a new workflow variable
func (*Server) ServerWorkflowVariableDelete ¶
ServerWorkflowVariableDelete deletes a workflow variable
func (*Server) ServerWorkflowVariableUpdate ¶
ServerWorkflowVariableUpdate updates a workflow variable
func (*Server) ServerWorkflowVariablesList ¶
ServerWorkflowVariablesList returns variables for a workflow
func (*Server) ServerWorkflowsList ¶
ServerWorkflowsList returns all workflows for a server
func (*Server) ServersCreate ¶
func (*Server) ServersList ¶
func (*Server) SyncBansCfgByID ¶
SyncBansCfgByID looks up a server by ID and regenerates its Bans.cfg. Intended for use as a callback from plugin/workflow ban paths.
func (*Server) TriggerMOTDUploadIfEnabled ¶
TriggerMOTDUploadIfEnabled is exported for use by rules bulk update. Returns true if upload was triggered, false otherwise.
func (*Server) UpdateUserPassword ¶
func (*Server) UpdateUserProfile ¶
func (*Server) UserCreate ¶
func (*Server) UserDelete ¶
func (*Server) UserUpdate ¶
type ServerActivityResponse ¶
type ServerActivityResponse struct {
ServerID string `json:"server_id"`
ServerName string `json:"server_name"`
TotalEvents int64 `json:"total_events"`
ChatMessages int64 `json:"chat_messages"`
UniquePlayers int64 `json:"unique_players"`
WorkflowRuns int64 `json:"workflow_runs"`
AvgPlayerCount float64 `json:"avg_player_count"`
LastActivity string `json:"last_activity"`
}
ServerActivityResponse represents per-server activity metrics
type ServerMetricsData ¶
type ServerMetricsData struct {
PlayerCount []MetricPoint `json:"player_count"`
QueueCount []MetricPoint `json:"queue_count"`
TickRate []MetricPoint `json:"tick_rate"`
Rounds []MetricPoint `json:"rounds"`
Maps []MetricPoint `json:"maps"`
ChatActivity []MetricPoint `json:"chat_activity"`
ConnectionStats []MetricPoint `json:"connection_stats"` // Connection activity (connects + disconnects)
TeamkillStats []MetricPoint `json:"teamkill_stats"`
PlayerWoundedStats []MetricPoint `json:"player_wounded_stats"`
PlayerRevivedStats []MetricPoint `json:"player_revived_stats"`
PlayerPossessStats []MetricPoint `json:"player_possess_stats"`
PlayerDiedStats []MetricPoint `json:"player_died_stats"`
PlayerDamagedStats []MetricPoint `json:"player_damaged_stats"`
DeployableDamagedStats []MetricPoint `json:"deployable_damaged_stats"`
AdminBroadcastStats []MetricPoint `json:"admin_broadcast_stats"`
Period string `json:"period"`
Summary MetricsSummary `json:"summary"`
}
ServerMetricsData represents the metrics response
type SessionHistoryEntry ¶
type SessionHistoryEntry struct {
ConnectTime time.Time `json:"connect_time"`
DisconnectTime *time.Time `json:"disconnect_time,omitempty"`
DurationSeconds *int64 `json:"duration_seconds,omitempty"`
ServerID string `json:"server_id"`
ServerName string `json:"server_name,omitempty"`
IP string `json:"ip,omitempty"` // Only visible with permission
MissingDisconnect bool `json:"missing_disconnect"`
Ongoing bool `json:"ongoing"`
}
SessionHistoryEntry represents a paired connection session
type SessionInfo ¶
type SessionInfo struct {
ID uuid.UUID `json:"id"`
UserID uuid.UUID `json:"user_id"`
Username string `json:"username"`
Token string `json:"token"` // Masked for security
CreatedAt time.Time `json:"created_at"`
ExpiresAt *time.Time `json:"expires_at,omitempty"`
LastSeen time.Time `json:"last_seen"`
LastSeenIP string `json:"last_seen_ip"`
IsExpired bool `json:"is_expired"`
TimeRemaining string `json:"time_remaining"`
}
SessionInfo represents session information for display
type SessionStatsResponse ¶
type SessionStatsResponse struct {
TotalSessions int `json:"total_sessions"`
ActiveSessions int `json:"active_sessions"`
ExpiredSessions int `json:"expired_sessions"`
SessionsByUser []UserSessionCount `json:"sessions_by_user"`
}
SessionStatsResponse represents session statistics
type StorageFileResponse ¶
type StorageFileResponse struct {
Path string `json:"path"`
Size int64 `json:"size"`
SizeReadable string `json:"size_readable"`
ModifiedTime string `json:"modified_time"`
IsDir bool `json:"is_dir"`
Extension string `json:"extension"`
}
StorageFileResponse represents a file in storage
type StorageSummaryResponse ¶
type StorageSummaryResponse struct {
TotalSize int64 `json:"total_size"`
TotalSizeReadable string `json:"total_size_readable"`
TotalFiles int64 `json:"total_files"`
FilesByType map[string]int `json:"files_by_type"`
SizeByType map[string]int64 `json:"size_by_type"`
StorageType string `json:"storage_type"`
RecentFiles []StorageFileResponse `json:"recent_files"`
}
StorageSummaryResponse represents storage usage statistics
type SystemConfigResponse ¶
type SystemConfigResponse struct {
App gin.H `json:"app"`
Database gin.H `json:"database"`
ClickHouse gin.H `json:"clickhouse"`
Valkey gin.H `json:"valkey"`
Storage gin.H `json:"storage"`
Plugins gin.H `json:"plugins"`
Log gin.H `json:"log"`
}
SystemConfigResponse represents sanitized configuration
type SystemHealthResponse ¶
type SystemHealthResponse struct {
PostgreSQL SystemServiceHealth `json:"postgresql"`
ClickHouse SystemServiceHealth `json:"clickhouse"`
Valkey SystemServiceHealth `json:"valkey"`
Storage SystemServiceHealth `json:"storage"`
Overall string `json:"overall"`
}
SystemHealthResponse represents overall system health status
type SystemServiceHealth ¶
type SystemServiceHealth struct {
Status string `json:"status"` // healthy, degraded, unhealthy
Latency int64 `json:"latency"` // in milliseconds
Message string `json:"message"`
Details gin.H `json:"details,omitempty"`
}
SystemServiceHealth represents health status of a system service
type TeamkillMetrics ¶
type TeamkillMetrics struct {
TotalTeamkills int64 `json:"total_teamkills"`
TeamkillsPerSession float64 `json:"teamkills_per_session"`
TeamkillRatio float64 `json:"teamkill_ratio"` // TKs / total kills
RecentTeamkills int64 `json:"recent_teamkills"` // Last 7 days
TotalTeamWounds int64 `json:"total_team_wounds"` // Times downed a teammate
TotalTeamDamage int64 `json:"total_team_damage"` // Times damaged a teammate
RecentTeamWounds int64 `json:"recent_team_wounds"` // Team wounds in last 7 days
RecentTeamDamage int64 `json:"recent_team_damage"` // Team damage in last 7 days
}
TeamkillMetrics represents detailed teamkill statistics
type TeamkillVictim ¶
type TeamkillVictim struct {
VictimName string `json:"victim_name"`
VictimSteam string `json:"victim_steam"`
VictimEOS string `json:"victim_eos"`
TKCount int64 `json:"tk_count"`
WeaponsUsed []string `json:"weapons_used"`
FirstTK time.Time `json:"first_tk"`
LastTK time.Time `json:"last_tk"`
}
TeamkillVictim represents a player who was teamkilled
type TopPlayerStats ¶
type TopPlayerStats struct {
SteamID string `json:"steam_id"`
EOSID string `json:"eos_id"`
PlayerName string `json:"player_name"`
Kills int64 `json:"kills"`
Deaths int64 `json:"deaths"`
KDRatio float64 `json:"kd_ratio"`
Teamkills int64 `json:"teamkills"`
Revives int64 `json:"revives"`
}
TopPlayerStats represents a player in top statistics
type TopServersResponse ¶
type TopServersResponse struct {
ByEvents []ServerActivityResponse `json:"by_events"`
ByPlayers []ServerActivityResponse `json:"by_players"`
ByMessages []ServerActivityResponse `json:"by_messages"`
}
TopServersResponse represents the most active servers
type UpdatePasswordRequest ¶
type UpdateProfileRequest ¶
type UpdateRolePermissionsRequest ¶
type UpdateRolePermissionsRequest struct {
Permissions []string `json:"permissions" binding:"required"`
}
ServerRolePermissionsUpdate updates permissions for a specific server role
type UserActionCount ¶
type UserActionCount struct {
UserID uuid.UUID `json:"user_id"`
Username string `json:"username"`
Count int64 `json:"count"`
}
UserActionCount represents count of actions by user
type UserCreateRequest ¶
type UserSessionCount ¶
type UserSessionCount struct {
UserID uuid.UUID `json:"user_id"`
Username string `json:"username"`
SessionCount int `json:"session_count"`
}
UserSessionCount represents session count per user
type UserUpdateRequest ¶
type ViolationSummary ¶
type ViolationSummary struct {
TotalWarns int64 `json:"total_warns"`
TotalKicks int64 `json:"total_kicks"`
TotalBans int64 `json:"total_bans"`
LastAction *time.Time `json:"last_action,omitempty"`
}
ViolationSummary represents a summary of player violations
type WarnPlayerRequest ¶
type WeaponStat ¶
type WeaponStat struct {
Weapon string `json:"weapon"`
Kills int64 `json:"kills"`
Teamkills int64 `json:"teamkills"`
}
WeaponStat represents weapon usage statistics
Source Files
¶
- auth.go
- auth_middleware.go
- ban_lists.go
- connectors.go
- enhanced_ban_cfg.go
- handlers.go
- ignored_steam_ids.go
- images.go
- permissions.go
- player_identifiers.go
- player_lookup_validation.go
- players.go
- plugins.go
- plugins_logs_ws.go
- proxy.go
- rate_limit.go
- server.go
- server_plugin_commands.go
- server_plugin_data.go
- servers.go
- servers_admins.go
- servers_audit_logs.go
- servers_ban_import.go
- servers_bans.go
- servers_events.go
- servers_evidence_files.go
- servers_feeds.go
- servers_metrics.go
- servers_motd.go
- servers_rcon.go
- servers_rcon_events.go
- servers_roles.go
- servers_rules.go
- servers_workflows.go
- squad_paths.go
- sudo_audit.go
- sudo_database.go
- sudo_metrics.go
- sudo_sessions.go
- sudo_storage.go
- sudo_system.go
- users.go