digest

package
v0.16.0-rc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2026 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEmailTemplateRendererProvider added in v0.16.0

func NewEmailTemplateRendererProvider(emailService *email.Service) emailprovider.ContentRendererProvider

func NewNotificationService added in v0.16.0

func NewNotificationService(
	db *gorm.DB,
	cfg *config.Config,
	notificationRuntime notification.RuntimeProvider,
) *notification.Service

func NewRuntimeProvider added in v0.16.0

func NewRuntimeProvider(
	emailService *email.Service,
	workerEnqueuerProvider notification.WorkerEnqueuerProvider,
	slackSender slackprovider.Sender,
) notification.RuntimeProvider

NewRuntimeProvider builds the digest notification runtime provider using the shared notification runtime registration path.

Types

type DigestRecipient added in v0.15.0

type DigestRecipient struct {
	User     relational.User
	Channels []string
}

type EvidenceItem

type EvidenceItem struct {
	ID          string
	UUID        string
	Title       string
	Description string
	Status      string
	ExpiresAt   string // Formatted expiration date string (empty if no expiration)
	Labels      []string
}

EvidenceItem represents a single evidence entry for display

type EvidenceSummary

type EvidenceSummary struct {
	TotalCount        int64
	SatisfiedCount    int64
	NotSatisfiedCount int64
	ExpiredCount      int64
	OtherCount        int64

	// Top items for the digest email
	TopExpired      []EvidenceItem
	TopNotSatisfied []EvidenceItem
}

EvidenceSummary contains aggregated evidence statistics

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service handles digest generation and delivery

func NewService

func NewService(db *gorm.DB, notifier *notification.Service, cfg *config.Config, logger *zap.SugaredLogger) *Service

NewService creates a new digest service.

func (*Service) GetDigestRecipients added in v0.15.0

func (s *Service) GetDigestRecipients(ctx context.Context) ([]DigestRecipient, error)

GetDigestRecipients returns active users and their evidence-digest channels.

func (*Service) GetGlobalEvidenceSummary

func (s *Service) GetGlobalEvidenceSummary(ctx context.Context) (*EvidenceSummary, error)

GetGlobalEvidenceSummary retrieves evidence summary across all evidence (Phase 0)

func (*Service) SendGlobalDigest

func (s *Service) SendGlobalDigest(ctx context.Context) error

SendGlobalDigest sends or enqueues the global digest to all active users.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL