// Package domain contains core business entities. package domain import "time" // CIRepo represents a repository's CI/CD configuration. type CIRepo struct { // ID is the CI system's internal ID for this repo ID int64 // ForgeRemoteID is the ID from the forge (e.g., Gitea repo ID) ForgeRemoteID int64 // Owner is the repository owner (org or user) Owner string // Name is the repository name Name string // FullName is owner/name FullName string // CloneURL is the URL to clone the repo CloneURL string // Active indicates if CI is enabled for this repo Active bool // AllowPullRequests allows PRs to trigger builds AllowPullRequests bool // Visibility: public, private, internal Visibility string // CreatedAt is when CI was activated CreatedAt time.Time // UpdatedAt is when CI config was last modified UpdatedAt time.Time } // CISecret represents a secret for use in CI pipelines. type CISecret struct { // Name is the secret name (e.g., "DOCKER_PASSWORD") Name string // Value is the secret value (encrypted at rest) Value string // Events controls when the secret is available (e.g., "push", "pull_request") Events []string // Images limits which container images can use this secret Images []string } // CIPipeline represents a CI pipeline execution. type CIPipeline struct { // ID is the pipeline ID ID int64 // Number is the pipeline number (increments per repo) Number int64 // Status: pending, running, success, failure, killed, blocked Status string // Event: push, pull_request, tag, cron, manual Event string // Branch that triggered the pipeline Branch string // Commit SHA Commit string // Message is the commit message Message string // Author who triggered the pipeline Author string // Started timestamp Started time.Time // Finished timestamp (zero if still running) Finished time.Time }