Documentation
¶
Overview ¶
Package model defines the core data types for CI workflow analysis.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Job ¶
type Job struct {
ID int64
RunID int64
Name string
Status string
Conclusion string
StartedAt time.Time
CompletedAt time.Time
RunnerName string
RunnerGroupName string
Labels []string
Steps []Step
}
Job represents a single job within a workflow run.
type RunDetail ¶
type RunDetail struct {
Run WorkflowRun
Jobs []Job
}
RunDetail is a fully hydrated workflow run with its jobs and steps.
type Step ¶
type Step struct {
Name string
Number int
Status string
Conclusion string
StartedAt time.Time
CompletedAt time.Time
}
Step represents a single step within a job.
type TimePoint ¶
type TimePoint struct {
Time time.Time
Value float64
Label string // e.g. commit SHA or run ID for context
}
TimePoint is a single observation in a time series.
type TimeSeries ¶
TimeSeries is a named sequence of time-value observations.
type WorkflowRun ¶
type WorkflowRun struct {
ID int64
NodeID string // GraphQL global node ID (e.g. "WFR_kwLO...")
WorkflowID int64
WorkflowName string
Name string
Event string // trigger type: push, pull_request, schedule, workflow_dispatch, etc.
Status string
Conclusion string
HeadBranch string
HeadSHA string
RunAttempt int
CreatedAt time.Time
StartedAt time.Time
UpdatedAt time.Time
}
WorkflowRun represents a single execution of a workflow.
func (*WorkflowRun) Duration ¶
func (r *WorkflowRun) Duration() time.Duration
Duration returns the wall-clock duration of the run. Returns zero if timestamps are missing or invalid.
func (*WorkflowRun) IsCompleted ¶
func (r *WorkflowRun) IsCompleted() bool
IsCompleted reports whether the run has finished.
Click to show internal directories.
Click to hide internal directories.