rdev/internal/port/citadel.go
jordan a8c8a0a14d
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
feat: add GCS-based persistent media storage, AI generation pipeline, and composable skeleton packages
Adds complete media storage pipeline with GCS presigned uploads, AI image/video/text generation
via queue-based workers, realtime SSE event streaming, and comprehensive skeleton packages
(storage, mediagen, textgen, generation, realtime, persona, routing, ai-client). Includes
security fixes for media delete authorization, nil pointer guards in handlers, video persistence
via download-then-upload, consistent signed URLs, and Image→ImageIcon rename to avoid DOM collision.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 21:29:09 -07:00

36 lines
1.3 KiB
Go

// Package port defines interfaces (ports) for external dependencies.
package port
import "context"
// CitadelEnvironment represents a Citadel log environment.
type CitadelEnvironment struct {
// TenantID is the unique identifier for this environment in Citadel.
TenantID string `json:"tenant_id"`
// Name is the human-readable environment name.
Name string `json:"name"`
}
// CitadelClient manages Citadel environments and log shipping.
type CitadelClient interface {
// CreateEnvironment creates a new Citadel environment for a project.
// Returns the tenant ID for the new environment.
CreateEnvironment(ctx context.Context, name string) (*CitadelEnvironment, error)
// DeleteEnvironment removes a Citadel environment.
DeleteEnvironment(ctx context.Context, tenantID string) error
// GetEnvironment returns an environment by name.
// Returns nil, nil if not found.
GetEnvironment(ctx context.Context, name string) (*CitadelEnvironment, error)
// IngestEvent sends a single log event to Citadel.
IngestEvent(ctx context.Context, tenantID string, event map[string]any) error
// IngestBatch sends a batch of log events to Citadel.
IngestBatch(ctx context.Context, tenantID string, events []map[string]any) error
// Healthy returns true if the Citadel instance is reachable.
Healthy(ctx context.Context) bool
}