Documentation
¶
Overview ¶
Package reports provides enhanced content reporting services with trust integration and moderation workflow.
Index ¶
- type EnhancedReportService
- func (s *EnhancedReportService) CalculateReporterReliability(ctx context.Context, username string) (*ReporterReliability, error)
- func (s *EnhancedReportService) CreateEnhancedModerationEvent(ctx context.Context, report *storage.Report, reporterActorID string) (*moderation.ModerationEvent, error)
- func (s *EnhancedReportService) GetReportModerationStatus(ctx context.Context, reportID string) (*ReportModerationStatus, error)
- func (s *EnhancedReportService) UpdateReporterTrustOnDecision(ctx context.Context, reportID string, decision *moderation.ModerationDecision, ...) error
- type ReportModerationStatus
- type ReporterReliability
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EnhancedReportService ¶
type EnhancedReportService struct {
// contains filtered or unexported fields
}
EnhancedReportService provides advanced report handling with trust integration
func NewEnhancedReportService ¶
func NewEnhancedReportService(store core.RepositoryStorage, logger *zap.Logger) *EnhancedReportService
NewEnhancedReportService creates a new enhanced report service
func (*EnhancedReportService) CalculateReporterReliability ¶
func (s *EnhancedReportService) CalculateReporterReliability(ctx context.Context, username string) (*ReporterReliability, error)
CalculateReporterReliability calculates the reliability score for a reporter
func (*EnhancedReportService) CreateEnhancedModerationEvent ¶
func (s *EnhancedReportService) CreateEnhancedModerationEvent(ctx context.Context, report *storage.Report, reporterActorID string) (*moderation.ModerationEvent, error)
CreateEnhancedModerationEvent creates a moderation event with reporter trust weighting
func (*EnhancedReportService) GetReportModerationStatus ¶
func (s *EnhancedReportService) GetReportModerationStatus(ctx context.Context, reportID string) (*ReportModerationStatus, error)
GetReportModerationStatus gets the moderation status of a report
func (*EnhancedReportService) UpdateReporterTrustOnDecision ¶
func (s *EnhancedReportService) UpdateReporterTrustOnDecision(ctx context.Context, reportID string, decision *moderation.ModerationDecision, reporterActorID string) error
UpdateReporterTrustOnDecision updates reporter's trust score based on moderation decision
type ReportModerationStatus ¶
type ReportModerationStatus struct {
ReportID string `json:"report_id"`
ModerationEventID string `json:"moderation_event_id,omitempty"`
Status string `json:"status"`
ModerationStatus string `json:"moderation_status,omitempty"`
ConsensusReached bool `json:"consensus_reached"`
ConsensusScore float64 `json:"consensus_score,omitempty"`
Decision string `json:"decision,omitempty"`
}
ReportModerationStatus represents the current moderation status of a report
type ReporterReliability ¶
type ReporterReliability struct {
Username string `json:"username"`
TotalReports int `json:"total_reports"`
ValidReports int `json:"valid_reports"`
FalseReports int `json:"false_reports"`
PendingReports int `json:"pending_reports"`
ReliabilityScore float64 `json:"reliability_score"`
TrustModifier float64 `json:"trust_modifier"`
LastCalculated time.Time `json:"last_calculated"`
}
ReporterReliability represents a reporter's reliability metrics