store

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package store provides SQLite-backed persistence for git-ci.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnvironmentAllowsRef

func EnvironmentAllowsRef(environment Environment, ref string) bool

Types

type AcquireEnvironmentLeaseParams

type AcquireEnvironmentLeaseParams struct {
	JobID   string
	OwnerID string
	TTL     time.Duration
	Now     time.Time
}

type AcquireEnvironmentLeaseResult

type AcquireEnvironmentLeaseResult struct {
	Lease    EnvironmentLease `json:"lease"`
	Acquired bool             `json:"acquired"`
}

type AcquireExecutionConcurrencyParams added in v0.6.0

type AcquireExecutionConcurrencyParams struct {
	Scope    ExecutionConcurrencyScope
	Group    string
	RunID    string
	HolderID string
	OwnerID  string
	TTL      time.Duration
	Now      time.Time
}

type AcquireExecutionConcurrencyResult added in v0.6.0

type AcquireExecutionConcurrencyResult struct {
	Lease    ExecutionConcurrencyLease `json:"lease"`
	Acquired bool                      `json:"acquired"`
}

type AppendLogLineParams

type AppendLogLineParams struct {
	StepID  string
	Stream  LogStream
	Message string
}

AppendLogLineParams is the input for one immutable log line. Message must represent a single line, but it may be empty.

type Artifact added in v0.7.0

type Artifact struct {
	ID         string     `json:"id"`
	ProjectID  string     `json:"projectId"`
	RunID      string     `json:"runId"`
	JobID      string     `json:"jobId"`
	StepID     *string    `json:"stepId,omitempty"`
	Name       string     `json:"name"`
	Format     string     `json:"format"`
	StorageKey string     `json:"-"`
	SHA256     string     `json:"sha256"`
	SizeBytes  int64      `json:"sizeBytes"`
	FileCount  int        `json:"fileCount"`
	ExpiresAt  *time.Time `json:"expiresAt,omitempty"`
	CreatedAt  time.Time  `json:"createdAt"`
}

type AuditEvent

type AuditEvent struct {
	ID           string
	ProjectID    string
	Action       string
	Actor        string
	ResourceType string
	ResourceID   string
	Metadata     json.RawMessage
	CreatedAt    time.Time
}

AuditEvent is an immutable record of a meaningful store action. IDs and creation timestamps are assigned by Store when the event is recorded.

type CacheEntry added in v0.7.0

type CacheEntry struct {
	ID         string     `json:"id"`
	ProjectID  string     `json:"projectId"`
	Ref        string     `json:"ref"`
	Key        string     `json:"key"`
	StorageKey string     `json:"-"`
	SHA256     string     `json:"sha256"`
	SizeBytes  int64      `json:"sizeBytes"`
	FileCount  int        `json:"fileCount"`
	CreatedAt  time.Time  `json:"createdAt"`
	AccessedAt time.Time  `json:"accessedAt"`
	ExpiresAt  *time.Time `json:"expiresAt,omitempty"`
}

type CreateArtifactParams added in v0.7.0

type CreateArtifactParams struct {
	ProjectID, RunID, JobID, StepID string
	Name, StorageKey, SHA256        string
	SizeBytes                       int64
	FileCount                       int
	ExpiresAt                       *time.Time
}

type CreateDeploymentParams

type CreateDeploymentParams struct {
	ProjectID, RunID, Environment string
	Status                        Status
	Reason                        *string
}

type CreateProjectParams

type CreateProjectParams struct {
	Slug          string
	Name          string
	SourceType    string
	CanonicalPath *string
	RepositoryURL *string
	DefaultBranch string
	Active        bool
}

CreateProjectParams contains the mutable input needed to create a project. IDs and timestamps are assigned by Store.

type CreateTestReportParams added in v0.7.0

type CreateTestReportParams struct {
	ArtifactID, ProjectID, RunID, JobID, StepID string
	Name                                        string
	Tests, Failures, Errors, Skipped            int
	DurationSeconds                             float64
}

type CreateWebhookEndpointParams

type CreateWebhookEndpointParams struct {
	ProjectID, Name, Provider string
	TokenHash                 []byte
	Metadata                  json.RawMessage
	Enabled                   bool
}

type CreateWorkflowScheduleParams

type CreateWorkflowScheduleParams struct {
	ProjectID, WorkflowID, Cron string
	Ref                         *string
	Timezone                    string
	Enabled                     bool
	NextRunAt                   *time.Time
}

type DecideEnvironmentApprovalParams

type DecideEnvironmentApprovalParams struct {
	RequestID string
	Decision  EnvironmentApprovalStatus
	Actor     string
	Reason    string
}

type Deployment

type Deployment struct {
	ID                 string            `json:"id"`
	ProjectID          string            `json:"projectId"`
	RunID              string            `json:"runId"`
	JobID              *string           `json:"jobId,omitempty"`
	Environment        string            `json:"environment"`
	DeploymentTier     DeploymentTier    `json:"deploymentTier"`
	Status             Status            `json:"status"`
	SourceDeploymentID *string           `json:"sourceDeploymentId,omitempty"`
	TargetDeploymentID *string           `json:"targetDeploymentId,omitempty"`
	CreatedAt          time.Time         `json:"createdAt"`
	UpdatedAt          time.Time         `json:"updatedAt"`
	FinishedAt         *time.Time        `json:"finishedAt,omitempty"`
	History            []DeploymentEvent `json:"history,omitempty"`
}

type DeploymentEvent

type DeploymentEvent struct {
	ID           string    `json:"id"`
	DeploymentID string    `json:"deploymentId"`
	Status       Status    `json:"status"`
	Reason       *string   `json:"reason,omitempty"`
	CreatedAt    time.Time `json:"createdAt"`
}

type DeploymentTarget

type DeploymentTarget struct {
	JobID          string         `json:"jobId"`
	RunID          string         `json:"runId"`
	JobKey         string         `json:"jobKey"`
	Environment    string         `json:"environment"`
	DeploymentTier DeploymentTier `json:"deploymentTier"`
	CreatedAt      time.Time      `json:"createdAt"`
}

type DeploymentTier

type DeploymentTier string
const (
	DeploymentTierProduction  DeploymentTier = "production"
	DeploymentTierStaging     DeploymentTier = "staging"
	DeploymentTierTesting     DeploymentTier = "testing"
	DeploymentTierDevelopment DeploymentTier = "development"
	DeploymentTierOther       DeploymentTier = "other"
)

type EnqueueJob

type EnqueueJob struct {
	Key             string
	Name            string
	Runner          string
	EnvironmentName string
	DeploymentTier  string
	Environment     json.RawMessage
	DependencyKeys  json.RawMessage
	AllowFailure    bool
	TimeoutMinutes  int
	RollbackCommand string
	VerifyCommand   string
	Steps           []EnqueueStep
}

EnqueueJob is an immutable job snapshot. DependencyKeys is a JSON array of job keys, and Environment is a JSON object. The slice order assigns the durable job position.

type EnqueueReplayParams

type EnqueueReplayParams struct {
	Kind                                   RunLineageKind
	SourceRunID, SourceJobID, SourceStepID string
	Actor, IdempotencyKey                  string
	ConfirmSuccessful                      bool
}

type EnqueueRollbackParams

type EnqueueRollbackParams struct {
	SourceDeploymentID, TargetDeploymentID, Actor, IdempotencyKey string
}

type EnqueueRunLineage

type EnqueueRunLineage struct {
	Kind                                   RunLineageKind
	SourceRunID, SourceJobID, SourceStepID string
	SourceDeploymentID, TargetDeploymentID string
	Actor, IdempotencyKey                  string
}

type EnqueueRunParams

type EnqueueRunParams struct {
	ProjectID   string
	WorkflowID  string
	TriggerType string
	Ref         string
	CommitSHA   string
	SourcePath  string
	Environment json.RawMessage
	Jobs        []EnqueueJob
	Lineage     *EnqueueRunLineage
}

EnqueueRunParams contains all immutable execution input. Jobs and steps are copied into the run transaction; later workflow upserts cannot alter them.

type EnqueueStep

type EnqueueStep struct {
	Key              string
	Name             string
	Command          string
	Action           string
	WorkingDirectory string
	TimeoutMinutes   int
	Shell            string
	AllowFailure     bool
	Environment      json.RawMessage
}

EnqueueStep is an immutable step snapshot. Environment is a JSON object. The slice order assigns the durable step index.

type Environment

type Environment struct {
	ID                string                     `json:"id"`
	ProjectID         string                     `json:"projectId"`
	Name              string                     `json:"name"`
	DeploymentTier    DeploymentTier             `json:"deploymentTier"`
	Protected         bool                       `json:"protected"`
	RequiredApprovals int                        `json:"requiredApprovals"`
	WaitTimerSeconds  int                        `json:"waitTimerSeconds"`
	AllowedRefs       []string                   `json:"allowedRefs"`
	ConcurrencyMode   EnvironmentConcurrencyMode `json:"concurrencyMode"`
	CreatedAt         time.Time                  `json:"createdAt"`
	UpdatedAt         time.Time                  `json:"updatedAt"`
}

type EnvironmentAccess

type EnvironmentAccess struct {
	Environment    Environment                `json:"environment"`
	ProjectID      string                     `json:"projectId"`
	RunID          string                     `json:"runId"`
	JobID          string                     `json:"jobId"`
	Ref            string                     `json:"ref"`
	ApprovalStatus *EnvironmentApprovalStatus `json:"approvalStatus,omitempty"`
	WaitUntil      *time.Time                 `json:"waitUntil,omitempty"`
	Ready          bool                       `json:"ready"`
	Reason         string                     `json:"reason,omitempty"`
}

type EnvironmentApprovalDecision

type EnvironmentApprovalDecision struct {
	ID        string                    `json:"id"`
	RequestID string                    `json:"requestId"`
	Decision  EnvironmentApprovalStatus `json:"decision"`
	Actor     string                    `json:"actor"`
	Reason    *string                   `json:"reason,omitempty"`
	CreatedAt time.Time                 `json:"createdAt"`
}

type EnvironmentApprovalRequest

type EnvironmentApprovalRequest struct {
	ID                string                    `json:"id"`
	EnvironmentID     string                    `json:"environmentId"`
	RunID             string                    `json:"runId"`
	JobID             string                    `json:"jobId"`
	Status            EnvironmentApprovalStatus `json:"status"`
	RequiredApprovals int                       `json:"requiredApprovals"`
	RequestedBy       string                    `json:"requestedBy"`
	RequestedAt       time.Time                 `json:"requestedAt"`
	DecidedAt         *time.Time                `json:"decidedAt,omitempty"`
}

type EnvironmentApprovalStatus

type EnvironmentApprovalStatus string
const (
	EnvironmentApprovalPending   EnvironmentApprovalStatus = "pending"
	EnvironmentApprovalApproved  EnvironmentApprovalStatus = "approved"
	EnvironmentApprovalRejected  EnvironmentApprovalStatus = "rejected"
	EnvironmentApprovalCancelled EnvironmentApprovalStatus = "cancelled"
)

type EnvironmentApprovalSummary

type EnvironmentApprovalSummary struct {
	EnvironmentApprovalRequest
	ProjectID       string         `json:"projectId"`
	ProjectName     string         `json:"projectName"`
	EnvironmentName string         `json:"environmentName"`
	DeploymentTier  DeploymentTier `json:"deploymentTier"`
	JobName         string         `json:"jobName"`
	Ref             *string        `json:"ref,omitempty"`
	CommitSHA       *string        `json:"commitSha,omitempty"`
}

type EnvironmentConcurrencyMode

type EnvironmentConcurrencyMode string
const (
	EnvironmentConcurrencyQueue            EnvironmentConcurrencyMode = "queue"
	EnvironmentConcurrencyCancelInProgress EnvironmentConcurrencyMode = "cancel_in_progress"
)

type EnvironmentLease

type EnvironmentLease struct {
	EnvironmentID string    `json:"environmentId"`
	RunID         string    `json:"runId"`
	JobID         string    `json:"jobId"`
	OwnerID       string    `json:"ownerId"`
	AcquiredAt    time.Time `json:"acquiredAt"`
	HeartbeatAt   time.Time `json:"heartbeatAt"`
	ExpiresAt     time.Time `json:"expiresAt"`
}

type EnvironmentSecret

type EnvironmentSecret struct {
	ID                  string    `json:"id"`
	EnvironmentID       string    `json:"environmentId"`
	Name                string    `json:"name"`
	Provider            *string   `json:"provider,omitempty"`
	Version             *string   `json:"version,omitempty"`
	EncryptionAlgorithm string    `json:"encryptionAlgorithm"`
	CreatedAt           time.Time `json:"createdAt"`
	UpdatedAt           time.Time `json:"updatedAt"`
}

type EnvironmentSecretEnvelope

type EnvironmentSecretEnvelope struct {
	EnvironmentSecret
	Nonce      []byte `json:"-"`
	Ciphertext []byte `json:"-"`
}

type ErrConflict

type ErrConflict struct {
	Resource string
	Field    string
	Value    string
}

ErrConflict reports that a unique or otherwise exclusive resource value is already in use. Callers can use errors.As to inspect the conflicting field.

func (*ErrConflict) Error

func (e *ErrConflict) Error() string

func (*ErrConflict) Is

func (e *ErrConflict) Is(target error) bool

Is makes all conflict errors comparable by category with errors.Is.

type ErrInvalidStatusTransition

type ErrInvalidStatusTransition struct {
	Resource string
	ID       string
	From     Status
	To       Status
}

ErrInvalidStatusTransition reports an attempted lifecycle transition that cannot be performed from the resource's current state.

func (*ErrInvalidStatusTransition) Error

func (*ErrInvalidStatusTransition) Is

func (e *ErrInvalidStatusTransition) Is(target error) bool

Is makes status-transition errors comparable by category with errors.Is.

type ErrNotFound

type ErrNotFound struct {
	Resource string
	Key      string
}

ErrNotFound reports that a requested store resource does not exist. Callers can use errors.As to inspect the resource and lookup key.

func (*ErrNotFound) Error

func (e *ErrNotFound) Error() string

func (*ErrNotFound) Is

func (e *ErrNotFound) Is(target error) bool

Is makes all not-found errors comparable by category with errors.Is.

type ErrReplayEligibility

type ErrReplayEligibility struct{ Code, Message string }

func (*ErrReplayEligibility) Error

func (err *ErrReplayEligibility) Error() string

type ErrRollbackEligibility

type ErrRollbackEligibility struct{ Code, Message string }

func (*ErrRollbackEligibility) Error

func (err *ErrRollbackEligibility) Error() string

type ExecutionConcurrencyLease added in v0.6.0

type ExecutionConcurrencyLease struct {
	Scope       ExecutionConcurrencyScope `json:"scope"`
	Group       string                    `json:"group"`
	RunID       string                    `json:"runId"`
	HolderID    string                    `json:"holderId"`
	OwnerID     string                    `json:"ownerId"`
	AcquiredAt  time.Time                 `json:"acquiredAt"`
	HeartbeatAt time.Time                 `json:"heartbeatAt"`
	ExpiresAt   time.Time                 `json:"expiresAt"`
}

type ExecutionConcurrencyScope added in v0.6.0

type ExecutionConcurrencyScope string
const (
	ExecutionConcurrencyWorkflow ExecutionConcurrencyScope = "workflow"
	ExecutionConcurrencyJob      ExecutionConcurrencyScope = "job"
)

type Job

type Job struct {
	ID              string          `json:"id"`
	RunID           string          `json:"runId"`
	Key             *string         `json:"key,omitempty"`
	Name            string          `json:"name"`
	Status          Status          `json:"status"`
	Runner          *string         `json:"runner,omitempty"`
	Position        int             `json:"position"`
	Environment     json.RawMessage `json:"environment"`
	DependencyKeys  json.RawMessage `json:"dependencyKeys"`
	AllowFailure    bool            `json:"allowFailure"`
	TimeoutMinutes  int             `json:"timeoutMinutes"`
	RollbackCommand *string         `json:"-"`
	VerifyCommand   *string         `json:"-"`
	StartedAt       *time.Time      `json:"startedAt,omitempty"`
	FinishedAt      *time.Time      `json:"finishedAt,omitempty"`
	CreatedAt       time.Time       `json:"createdAt"`
	UpdatedAt       time.Time       `json:"updatedAt"`
}

Job is a durable job snapshot and its mutable lifecycle fields.

type JobGraph

type JobGraph struct {
	Job   Job    `json:"job"`
	Steps []Step `json:"steps"`
}

JobGraph is a job and its steps in the order a worker should process them.

type JobWait

type JobWait struct {
	JobID       string        `json:"jobId"`
	RunID       string        `json:"runId"`
	Reason      JobWaitReason `json:"reason"`
	Detail      *string       `json:"detail,omitempty"`
	AvailableAt *time.Time    `json:"availableAt,omitempty"`
	CreatedAt   time.Time     `json:"createdAt"`
	UpdatedAt   time.Time     `json:"updatedAt"`
}

type JobWaitReason

type JobWaitReason string
const (
	JobWaitApproval    JobWaitReason = "approval"
	JobWaitTimer       JobWaitReason = "timer"
	JobWaitConcurrency JobWaitReason = "concurrency"
)

type ListEnvironmentApprovalsParams

type ListEnvironmentApprovalsParams struct {
	ProjectID string
	Status    EnvironmentApprovalStatus
}

type LogLine

type LogLine struct {
	ID        string    `json:"id"`
	RunID     string    `json:"runId"`
	JobID     string    `json:"jobId"`
	StepID    string    `json:"stepId"`
	Sequence  int64     `json:"sequence"`
	Stream    LogStream `json:"stream"`
	Message   string    `json:"message"`
	CreatedAt time.Time `json:"createdAt"`
}

LogLine is one immutable, line-oriented worker output record.

type LogStream

type LogStream string

LogStream identifies the source of a durable log line.

const (
	LogStreamStdout LogStream = "stdout"
	LogStreamStderr LogStream = "stderr"
	LogStreamSystem LogStream = "system"
)

type PauseJobParams

type PauseJobParams struct {
	RunID       string
	JobID       string
	Reason      JobWaitReason
	Detail      string
	AvailableAt *time.Time
}

type Project

type Project struct {
	ID            string    `json:"id"`
	Slug          string    `json:"slug"`
	Name          string    `json:"name"`
	SourceType    string    `json:"sourceType"`
	CanonicalPath *string   `json:"canonicalPath,omitempty"`
	RepositoryURL *string   `json:"repositoryUrl,omitempty"`
	DefaultBranch string    `json:"defaultBranch"`
	Active        bool      `json:"active"`
	CreatedAt     time.Time `json:"createdAt"`
	UpdatedAt     time.Time `json:"updatedAt"`
}

Project is a configured source repository or local checkout.

type ProjectCommitTrigger added in v0.6.0

type ProjectCommitTrigger struct {
	ProjectID       string     `json:"projectId"`
	Ref             string     `json:"ref"`
	Enabled         bool       `json:"enabled"`
	LastCommitSHA   *string    `json:"lastCommitSha,omitempty"`
	LastCheckedAt   *time.Time `json:"lastCheckedAt,omitempty"`
	LastTriggeredAt *time.Time `json:"lastTriggeredAt,omitempty"`
	LastError       *string    `json:"lastError,omitempty"`
	CreatedAt       time.Time  `json:"createdAt"`
	UpdatedAt       time.Time  `json:"updatedAt"`
}

type PutCacheEntryParams added in v0.7.0

type PutCacheEntryParams struct {
	ProjectID, Ref, Key, StorageKey, SHA256 string
	SizeBytes                               int64
	FileCount                               int
	ExpiresAt                               *time.Time
}

type RecordWebhookDeliveryParams

type RecordWebhookDeliveryParams struct {
	EndpointID, ProviderDeliveryID, EventType, PayloadSHA256 string
	Status                                                   WebhookDeliveryStatus
	ErrorMessage                                             *string
	ProcessedAt                                              *time.Time
}

type RecordedWebhookDelivery

type RecordedWebhookDelivery struct {
	Delivery WebhookDelivery `json:"delivery"`
	Created  bool            `json:"created"`
}

type RecoveryResult

type RecoveryResult struct {
	RequeuedRuns int `json:"requeuedRuns"`
	FailedRuns   int `json:"failedRuns"`
}

type ReplayEligibility

type ReplayEligibility struct {
	Kind                 RunLineageKind `json:"kind"`
	SourceRunID          string         `json:"sourceRunId"`
	SourceJobID          string         `json:"sourceJobId"`
	SourceStepID         string         `json:"sourceStepId,omitempty"`
	Eligible             bool           `json:"eligible"`
	Code                 string         `json:"code"`
	Message              string         `json:"message"`
	CommitSHA            string         `json:"commitSha,omitempty"`
	DependencyCount      int            `json:"dependencyCount"`
	RequiresConfirmation bool           `json:"requiresConfirmation"`
	CleanWorkspace       bool           `json:"cleanWorkspace"`
	DeploymentGate       bool           `json:"deploymentGate"`
}

type ReplayJobOptions

type ReplayJobOptions struct {
	Job   ReplayEligibility   `json:"job"`
	Steps []ReplayEligibility `json:"steps"`
}

type RequestEnvironmentApprovalParams

type RequestEnvironmentApprovalParams struct {
	JobID       string
	RequestedBy string
}

type RollbackEligibility

type RollbackEligibility struct {
	SourceDeploymentID string               `json:"sourceDeploymentId"`
	Eligible           bool                 `json:"eligible"`
	Code               string               `json:"code"`
	Message            string               `json:"message"`
	Targets            []RollbackTargetView `json:"targets"`
}

type RollbackTarget

type RollbackTarget struct {
	DeploymentID, RunID, Ref, CommitSHA, JobName, CreatedAt string `json:"-"`
}

type RollbackTargetView

type RollbackTargetView struct {
	DeploymentID string    `json:"deploymentId"`
	RunID        string    `json:"runId"`
	Ref          string    `json:"ref,omitempty"`
	CommitSHA    string    `json:"commitSha"`
	JobName      string    `json:"jobName"`
	CreatedAt    time.Time `json:"createdAt"`
}

type Run

type Run struct {
	ID                      string          `json:"id"`
	ProjectID               string          `json:"projectId"`
	WorkflowID              *string         `json:"workflowId,omitempty"`
	WorkflowKey             *string         `json:"workflowKey,omitempty"`
	WorkflowRevision        *int64          `json:"workflowRevision,omitempty"`
	TriggerType             string          `json:"triggerType"`
	Status                  Status          `json:"status"`
	Ref                     *string         `json:"ref,omitempty"`
	CommitSHA               *string         `json:"commitSha,omitempty"`
	Environment             json.RawMessage `json:"environment"`
	CancellationRequested   bool            `json:"cancellationRequested"`
	CancellationRequestedAt *time.Time      `json:"cancellationRequestedAt,omitempty"`
	WorkerID                *string         `json:"workerId,omitempty"`
	ClaimedAt               *time.Time      `json:"claimedAt,omitempty"`
	FailureReason           *string         `json:"failureReason,omitempty"`
	SourcePath              string          `json:"sourcePath"`
	StartedAt               *time.Time      `json:"startedAt,omitempty"`
	FinishedAt              *time.Time      `json:"finishedAt,omitempty"`
	CreatedAt               time.Time       `json:"createdAt"`
	UpdatedAt               time.Time       `json:"updatedAt"`
}

Run is the durable lifecycle record for one immutable workflow execution.

type RunCancellation

type RunCancellation struct {
	RunID       string     `json:"runId"`
	Requested   bool       `json:"requested"`
	RequestedAt *time.Time `json:"requestedAt,omitempty"`
}

RunCancellation is the durable cancellation signal read by the worker.

type RunGraph

type RunGraph struct {
	Run  Run        `json:"run"`
	Jobs []JobGraph `json:"jobs"`
}

RunGraph is the durable graph view for one run. Dependency edges are the JSON dependency keys attached to each Job.

type RunLineage

type RunLineage struct {
	RunID              string         `json:"runId"`
	Kind               RunLineageKind `json:"kind"`
	SourceRunID        string         `json:"sourceRunId"`
	SourceJobID        *string        `json:"sourceJobId,omitempty"`
	SourceStepID       *string        `json:"sourceStepId,omitempty"`
	SourceDeploymentID *string        `json:"sourceDeploymentId,omitempty"`
	TargetDeploymentID *string        `json:"targetDeploymentId,omitempty"`
	Actor              string         `json:"actor"`
	IdempotencyKey     string         `json:"idempotencyKey"`
	CreatedAt          time.Time      `json:"createdAt"`
}

type RunLineageKind

type RunLineageKind string
const (
	RunLineageRollback   RunLineageKind = "rollback"
	RunLineageJobReplay  RunLineageKind = "job_replay"
	RunLineageStepReplay RunLineageKind = "step_replay"
)

type RunReplayOptions

type RunReplayOptions struct {
	RunID string             `json:"runId"`
	Jobs  []ReplayJobOptions `json:"jobs"`
}

type ScheduleClaim

type ScheduleClaim struct {
	Schedule  WorkflowSchedule `json:"schedule"`
	DueAt     time.Time        `json:"dueAt"`
	ClaimedAt time.Time        `json:"claimedAt"`
}

type Secret

type Secret struct {
	ID                  string    `json:"id"`
	ProjectID           string    `json:"projectId"`
	Name                string    `json:"name"`
	Provider            *string   `json:"provider,omitempty"`
	KeyReference        *string   `json:"keyReference,omitempty"`
	Version             *string   `json:"version,omitempty"`
	EncryptionAlgorithm string    `json:"encryptionAlgorithm"`
	CreatedAt           time.Time `json:"createdAt"`
	UpdatedAt           time.Time `json:"updatedAt"`
}

Secret is non-sensitive secret metadata. It intentionally cannot expose an encrypted envelope through JSON serialization.

type SecretEnvelope

type SecretEnvelope struct {
	Secret
	Nonce      []byte `json:"-"`
	Ciphertext []byte `json:"-"`
}

SecretEnvelope contains opaque encrypted secret bytes. Nonce and Ciphertext have explicit JSON exclusion to prevent accidental API plaintext exposure.

type Status

type Status string

Status is the lifecycle state shared by a run, job, and step.

const (
	StatusQueued    Status = "queued"
	StatusWaiting   Status = "waiting"
	StatusRunning   Status = "running"
	StatusSucceeded Status = "succeeded"
	StatusFailed    Status = "failed"
	StatusCancelled Status = "cancelled"
	StatusSkipped   Status = "skipped"
)

type Step

type Step struct {
	ID               string          `json:"id"`
	JobID            string          `json:"jobId"`
	Key              *string         `json:"key,omitempty"`
	Index            int             `json:"index"`
	Name             string          `json:"name"`
	Command          *string         `json:"command,omitempty"`
	Status           Status          `json:"status"`
	Environment      json.RawMessage `json:"environment"`
	Action           *string         `json:"action,omitempty"`
	WorkingDirectory *string         `json:"workingDirectory,omitempty"`
	TimeoutMinutes   int             `json:"timeoutMinutes"`
	Shell            *string         `json:"shell,omitempty"`
	AllowFailure     bool            `json:"allowFailure"`
	StartedAt        *time.Time      `json:"startedAt,omitempty"`
	FinishedAt       *time.Time      `json:"finishedAt,omitempty"`
	CreatedAt        time.Time       `json:"createdAt"`
	UpdatedAt        time.Time       `json:"updatedAt"`
}

Step is a durable step snapshot and its mutable lifecycle fields.

type Store

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

Store owns a pool of SQLite connections and the schema stored in it.

func Open

func Open(ctx context.Context, databasePath string) (*Store, error)

Open opens a SQLite database at databasePath, configures connection-level safety settings, and applies embedded migrations in filename order.

func (*Store) AcquireEnvironmentLease

func (s *Store) AcquireEnvironmentLease(ctx context.Context, params AcquireEnvironmentLeaseParams) (AcquireEnvironmentLeaseResult, error)

func (*Store) AcquireExecutionConcurrency added in v0.6.0

func (s *Store) AcquireExecutionConcurrency(ctx context.Context, params AcquireExecutionConcurrencyParams) (AcquireExecutionConcurrencyResult, error)

func (*Store) AppendLogLine

func (s *Store) AppendLogLine(ctx context.Context, params AppendLogLineParams) (LogLine, error)

AppendLogLine appends one line with an atomically allocated per-run sequence number. It verifies that the requested step belongs to a durable run first.

func (*Store) ClaimDueWorkflowSchedules

func (s *Store) ClaimDueWorkflowSchedules(ctx context.Context, dueBefore time.Time, limit int) ([]ScheduleClaim, error)

ClaimDueWorkflowSchedules atomically reserves due schedules. A claim remains durable across a restart until UpdateWorkflowSchedule records the next run.

func (*Store) ClaimNextQueuedRun

func (s *Store) ClaimNextQueuedRun(ctx context.Context, workerID string) (*Run, error)

ClaimNextQueuedRun atomically claims the oldest non-cancelled queued run. A nil run and nil error mean that no work is currently available.

func (*Store) Close

func (s *Store) Close() error

Close releases all database connections. It is safe to call more than once.

func (*Store) CommitTriggeredRunExists added in v0.6.0

func (s *Store) CommitTriggeredRunExists(ctx context.Context, workflowID, commitSHA string) (bool, error)

func (*Store) CreateArtifact added in v0.7.0

func (s *Store) CreateArtifact(ctx context.Context, params CreateArtifactParams) (Artifact, error)

func (*Store) CreateDeployment

func (s *Store) CreateDeployment(ctx context.Context, params CreateDeploymentParams) (Deployment, error)

func (*Store) CreateProject

func (s *Store) CreateProject(ctx context.Context, params CreateProjectParams) (Project, error)

CreateProject validates and persists a project. Slugs are unique.

func (*Store) CreateTestReport added in v0.7.0

func (s *Store) CreateTestReport(ctx context.Context, params CreateTestReportParams) (TestReport, error)

func (*Store) CreateWebhookEndpoint

func (s *Store) CreateWebhookEndpoint(ctx context.Context, params CreateWebhookEndpointParams) (WebhookEndpoint, error)

func (*Store) CreateWorkflowSchedule

func (s *Store) CreateWorkflowSchedule(ctx context.Context, params CreateWorkflowScheduleParams) (WorkflowSchedule, error)

func (*Store) DecideEnvironmentApproval

func (s *Store) DecideEnvironmentApproval(ctx context.Context, params DecideEnvironmentApprovalParams) (EnvironmentApprovalRequest, error)

func (*Store) DeleteEnvironmentSecret

func (s *Store) DeleteEnvironmentSecret(ctx context.Context, secretID string) error

func (*Store) DeleteSecret

func (s *Store) DeleteSecret(ctx context.Context, secretID string) error

func (*Store) DeleteWebhookEndpoint

func (s *Store) DeleteWebhookEndpoint(ctx context.Context, endpointID string) error

func (*Store) DeleteWorkflowSchedule

func (s *Store) DeleteWorkflowSchedule(ctx context.Context, scheduleID string) error

func (*Store) EnqueueDeploymentRollback

func (s *Store) EnqueueDeploymentRollback(ctx context.Context, params EnqueueRollbackParams) (Run, error)

func (*Store) EnqueueRun

func (s *Store) EnqueueRun(ctx context.Context, params EnqueueRunParams) (Run, error)

EnqueueRun atomically stores a queued run and immutable snapshots of every job, step, environment, and dependency edge the worker will need.

func (*Store) EnqueueRunReplay

func (s *Store) EnqueueRunReplay(ctx context.Context, params EnqueueReplayParams) (Run, error)

func (*Store) EnsureDeploymentForJob

func (s *Store) EnsureDeploymentForJob(ctx context.Context, jobID string) (Deployment, error)

func (*Store) EnsureEnvironmentForJob

func (s *Store) EnsureEnvironmentForJob(ctx context.Context, jobID string) (Environment, error)

func (*Store) EvaluateDeploymentRollback

func (s *Store) EvaluateDeploymentRollback(ctx context.Context, sourceDeploymentID string) (RollbackEligibility, error)

func (*Store) EvaluateEnvironmentAccess

func (s *Store) EvaluateEnvironmentAccess(ctx context.Context, jobID string, now time.Time) (EnvironmentAccess, error)

func (*Store) EvaluateJobReplay

func (s *Store) EvaluateJobReplay(ctx context.Context, sourceJobID string) (ReplayEligibility, error)

func (*Store) EvaluateRunReplays

func (s *Store) EvaluateRunReplays(ctx context.Context, sourceRunID string) (RunReplayOptions, error)

func (*Store) EvaluateStepReplay

func (s *Store) EvaluateStepReplay(ctx context.Context, sourceStepID string) (ReplayEligibility, error)

func (*Store) FindCacheEntry added in v0.7.0

func (s *Store) FindCacheEntry(ctx context.Context, projectID string, refs []string, key string, prefixes []string) (CacheEntry, bool, error)

func (*Store) GetArtifact added in v0.7.0

func (s *Store) GetArtifact(ctx context.Context, artifactID string) (Artifact, error)

func (*Store) GetDeployment

func (s *Store) GetDeployment(ctx context.Context, deploymentID string) (Deployment, error)

func (*Store) GetDeploymentTargetForJob

func (s *Store) GetDeploymentTargetForJob(ctx context.Context, jobID string) (DeploymentTarget, error)

func (*Store) GetEnvironment

func (s *Store) GetEnvironment(ctx context.Context, projectID, name string) (Environment, error)

func (*Store) GetEnvironmentApprovalRequest

func (s *Store) GetEnvironmentApprovalRequest(ctx context.Context, requestID string) (EnvironmentApprovalRequest, error)

func (*Store) GetEnvironmentByID

func (s *Store) GetEnvironmentByID(ctx context.Context, environmentID string) (Environment, error)

func (*Store) GetEnvironmentSecretEnvelope

func (s *Store) GetEnvironmentSecretEnvelope(ctx context.Context, secretID string) (EnvironmentSecretEnvelope, error)

func (*Store) GetExecutionConcurrency added in v0.6.0

func (s *Store) GetExecutionConcurrency(ctx context.Context, scope ExecutionConcurrencyScope, group string) (*ExecutionConcurrencyLease, error)

func (*Store) GetProject

func (s *Store) GetProject(ctx context.Context, key string) (Project, error)

GetProject returns a project by either its opaque ID or its slug.

func (*Store) GetProjectCommitTrigger added in v0.6.0

func (s *Store) GetProjectCommitTrigger(ctx context.Context, projectID string) (ProjectCommitTrigger, error)

func (*Store) GetReplaySourceRun

func (s *Store) GetReplaySourceRun(ctx context.Context, params EnqueueReplayParams) (Run, error)

func (*Store) GetRunArtifactByName added in v0.7.0

func (s *Store) GetRunArtifactByName(ctx context.Context, runID, name string) (Artifact, error)

func (*Store) GetRunCancellation

func (s *Store) GetRunCancellation(ctx context.Context, runID string) (RunCancellation, error)

GetRunCancellation reads the durable cancellation signal for a run.

func (*Store) GetRunGraph

func (s *Store) GetRunGraph(ctx context.Context, runID string) (RunGraph, error)

GetRunGraph returns the run together with jobs and ordered steps. The job dependency graph is represented by each Job's immutable DependencyKeys.

func (*Store) GetRunLineage

func (s *Store) GetRunLineage(ctx context.Context, runID string) (RunLineage, error)

func (*Store) GetRunLineageByIdempotency

func (s *Store) GetRunLineageByIdempotency(ctx context.Context, actor, key string) (RunLineage, error)

func (*Store) GetSecret

func (s *Store) GetSecret(ctx context.Context, secretID string) (Secret, error)

GetSecret returns metadata only. Use GetSecretEnvelope only in trusted code that is responsible for decrypting the value.

func (*Store) GetSecretEnvelope

func (s *Store) GetSecretEnvelope(ctx context.Context, secretID string) (SecretEnvelope, error)

func (*Store) GetWebhookEndpoint

func (s *Store) GetWebhookEndpoint(ctx context.Context, endpointID string) (WebhookEndpoint, error)

func (*Store) GetWorkflow

func (s *Store) GetWorkflow(ctx context.Context, workflowID string) (Workflow, error)

GetWorkflow returns a workflow by its opaque ID.

func (*Store) GetWorkflowSchedule

func (s *Store) GetWorkflowSchedule(ctx context.Context, scheduleID string) (WorkflowSchedule, error)

func (*Store) HeartbeatRunWorker

func (s *Store) HeartbeatRunWorker(ctx context.Context, runID, workerID string, now time.Time, ttl time.Duration) error

func (*Store) ListDeploymentTargets

func (s *Store) ListDeploymentTargets(ctx context.Context, runID string) ([]DeploymentTarget, error)

func (*Store) ListDeployments

func (s *Store) ListDeployments(ctx context.Context, projectID string) ([]Deployment, error)

func (*Store) ListEnabledProjectCommitTriggers added in v0.6.0

func (s *Store) ListEnabledProjectCommitTriggers(ctx context.Context) ([]ProjectCommitTrigger, error)

func (*Store) ListEnvironmentApprovalDecisions

func (s *Store) ListEnvironmentApprovalDecisions(ctx context.Context, requestID string) ([]EnvironmentApprovalDecision, error)

func (*Store) ListEnvironmentApprovalRequests

func (s *Store) ListEnvironmentApprovalRequests(ctx context.Context, params ListEnvironmentApprovalsParams) ([]EnvironmentApprovalSummary, error)

func (*Store) ListEnvironmentSecrets

func (s *Store) ListEnvironmentSecrets(ctx context.Context, environmentID string) ([]EnvironmentSecret, error)

func (*Store) ListEnvironments

func (s *Store) ListEnvironments(ctx context.Context, projectID string) ([]Environment, error)

func (*Store) ListJobWaits

func (s *Store) ListJobWaits(ctx context.Context) ([]JobWait, error)

func (*Store) ListLogLines

func (s *Store) ListLogLines(ctx context.Context, stepID string) ([]LogLine, error)

ListLogLines returns every line for a step in its durable append order.

func (*Store) ListProjectCaches added in v0.7.0

func (s *Store) ListProjectCaches(ctx context.Context, projectID string) ([]CacheEntry, error)

func (*Store) ListProjects

func (s *Store) ListProjects(ctx context.Context) ([]Project, error)

ListProjects returns every project in stable ascending slug order.

func (*Store) ListRunArtifacts added in v0.7.0

func (s *Store) ListRunArtifacts(ctx context.Context, runID string) ([]Artifact, error)

func (*Store) ListRunTestReports added in v0.7.0

func (s *Store) ListRunTestReports(ctx context.Context, runID string) ([]TestReport, error)

func (*Store) ListRuns

func (s *Store) ListRuns(ctx context.Context, projectID string) ([]Run, error)

ListRuns returns every run for a project, newest first.

func (*Store) ListSecrets

func (s *Store) ListSecrets(ctx context.Context, projectID string) ([]Secret, error)

ListSecrets returns metadata only, ordered by name then opaque ID.

func (*Store) ListWebhookDeliveries

func (s *Store) ListWebhookDeliveries(ctx context.Context, endpointID string) ([]WebhookDelivery, error)

func (*Store) ListWebhookEndpoints

func (s *Store) ListWebhookEndpoints(ctx context.Context, projectID string) ([]WebhookEndpoint, error)

func (*Store) ListWorkflowSchedules

func (s *Store) ListWorkflowSchedules(ctx context.Context, projectID string) ([]WorkflowSchedule, error)

func (*Store) ListWorkflows

func (s *Store) ListWorkflows(ctx context.Context, projectID string) ([]Workflow, error)

ListWorkflows returns all workflows for a project in stable key order.

func (*Store) MarkInterruptedRunningRunsFailed

func (s *Store) MarkInterruptedRunningRunsFailed(ctx context.Context) (int, error)

MarkInterruptedRunningRunsFailed finalizes work left running by an abrupt service stop. Running jobs and steps fail; queued descendants are skipped. It returns the number of interrupted runs finalized by this startup action.

func (*Store) PauseJob

func (s *Store) PauseJob(ctx context.Context, params PauseJobParams) (JobWait, error)

func (*Store) PutCacheEntry added in v0.7.0

func (s *Store) PutCacheEntry(ctx context.Context, params PutCacheEntryParams) (CacheEntry, error)

func (*Store) RecordAudit

func (s *Store) RecordAudit(ctx context.Context, event AuditEvent) (AuditEvent, error)

RecordAudit validates and appends an audit event. ProjectID is optional; if provided, it must identify an existing project.

func (*Store) RecordProjectCommitTriggerCheck added in v0.6.0

func (s *Store) RecordProjectCommitTriggerCheck(ctx context.Context, projectID string, observedSHA *string, triggered bool, message *string) error

func (*Store) RecordWebhookDelivery

func (s *Store) RecordWebhookDelivery(ctx context.Context, params RecordWebhookDeliveryParams) (RecordedWebhookDelivery, error)

func (*Store) RecoverExpiredRunWorkers

func (s *Store) RecoverExpiredRunWorkers(ctx context.Context, now, orphanBefore time.Time) (RecoveryResult, error)

func (*Store) ReleaseEnvironmentLease

func (s *Store) ReleaseEnvironmentLease(ctx context.Context, environmentID, jobID, ownerID string) (bool, error)

func (*Store) ReleaseExecutionConcurrency added in v0.6.0

func (s *Store) ReleaseExecutionConcurrency(ctx context.Context, scope ExecutionConcurrencyScope, group, holderID, ownerID string) (bool, error)

func (*Store) ReleaseRunWorker

func (s *Store) ReleaseRunWorker(ctx context.Context, runID, workerID string) error

func (*Store) RequestEnvironmentApproval

func (s *Store) RequestEnvironmentApproval(ctx context.Context, params RequestEnvironmentApprovalParams) (EnvironmentApprovalRequest, error)

func (*Store) RequestRunCancellation

func (s *Store) RequestRunCancellation(ctx context.Context, runID string) (RunCancellation, error)

RequestRunCancellation records a durable cancellation signal. Queued and waiting runs are cancelled transactionally, including their pending graph, waits, and deployment audit trail. Running workers read the signal and perform their own orderly cancellation.

func (*Store) ResumeJob

func (s *Store) ResumeJob(ctx context.Context, runID, jobID string) error

func (*Store) SetProjectWorkflowSet

func (s *Store) SetProjectWorkflowSet(ctx context.Context, projectID string, keys []string) error

SetProjectWorkflowSet marks exactly the supplied workflow keys active for a project. Historical workflow rows remain addressable by ID for immutable run history after their source files are removed.

func (*Store) TransitionDeployment

func (s *Store) TransitionDeployment(ctx context.Context, deploymentID string, next Status, reason *string) (Deployment, error)

func (*Store) TransitionJob

func (s *Store) TransitionJob(ctx context.Context, jobID string, next Status) (Job, error)

TransitionJob changes one job status only when the lifecycle transition is valid. It maintains started, finished, and updated timestamps atomically.

func (*Store) TransitionRun

func (s *Store) TransitionRun(ctx context.Context, runID string, next Status) (Run, error)

TransitionRun changes one run status only when the lifecycle transition is valid. It maintains started, finished, and updated timestamps atomically.

func (*Store) TransitionStep

func (s *Store) TransitionStep(ctx context.Context, stepID string, next Status) (Step, error)

TransitionStep changes one step status only when the lifecycle transition is valid. It maintains started, finished, and updated timestamps atomically.

func (*Store) TransitionWebhookDelivery

func (s *Store) TransitionWebhookDelivery(ctx context.Context, deliveryID string, next WebhookDeliveryStatus, message *string) (WebhookDelivery, error)

TransitionWebhookDelivery records the final processing result for a previously reserved delivery. Only received deliveries can transition.

func (*Store) UpdateWebhookEndpoint

func (s *Store) UpdateWebhookEndpoint(ctx context.Context, endpointID string, params UpdateWebhookEndpointParams) (WebhookEndpoint, error)

func (*Store) UpdateWorkflowSchedule

func (s *Store) UpdateWorkflowSchedule(ctx context.Context, scheduleID string, params UpdateWorkflowScheduleParams) (WorkflowSchedule, error)

func (*Store) UpsertEnvironment

func (s *Store) UpsertEnvironment(ctx context.Context, params UpsertEnvironmentParams) (Environment, error)

func (*Store) UpsertEnvironmentSecret

func (s *Store) UpsertEnvironmentSecret(ctx context.Context, params UpsertEnvironmentSecretParams) (EnvironmentSecret, error)

func (*Store) UpsertProjectCommitTrigger added in v0.6.0

func (s *Store) UpsertProjectCommitTrigger(ctx context.Context, params UpsertProjectCommitTriggerParams) (ProjectCommitTrigger, error)

func (*Store) UpsertSecret

func (s *Store) UpsertSecret(ctx context.Context, params UpsertSecretParams) (Secret, error)

func (*Store) UpsertWorkflow

func (s *Store) UpsertWorkflow(ctx context.Context, params UpsertWorkflowParams) (Workflow, error)

UpsertWorkflow creates a workflow or replaces its current definition. An existing workflow keeps its ID and receives a monotonically increasing revision number.

type TestReport added in v0.7.0

type TestReport struct {
	ID              string    `json:"id"`
	ArtifactID      *string   `json:"artifactId,omitempty"`
	ProjectID       string    `json:"projectId"`
	RunID           string    `json:"runId"`
	JobID           string    `json:"jobId"`
	StepID          *string   `json:"stepId,omitempty"`
	Format          string    `json:"format"`
	Name            string    `json:"name"`
	Tests           int       `json:"tests"`
	Failures        int       `json:"failures"`
	Errors          int       `json:"errors"`
	Skipped         int       `json:"skipped"`
	DurationSeconds float64   `json:"durationSeconds"`
	CreatedAt       time.Time `json:"createdAt"`
}

type UpdateWebhookEndpointParams

type UpdateWebhookEndpointParams struct {
	Provider  string
	TokenHash []byte
	Metadata  json.RawMessage
	Enabled   bool
}

type UpdateWorkflowScheduleParams

type UpdateWorkflowScheduleParams struct {
	Cron      string
	Ref       *string
	Timezone  string
	Enabled   bool
	NextRunAt *time.Time
	LastRunAt *time.Time
}

type UpsertEnvironmentParams

type UpsertEnvironmentParams struct {
	ProjectID         string
	Name              string
	DeploymentTier    DeploymentTier
	Protected         bool
	RequiredApprovals int
	WaitTimerSeconds  int
	AllowedRefs       []string
	ConcurrencyMode   EnvironmentConcurrencyMode
}

type UpsertEnvironmentSecretParams

type UpsertEnvironmentSecretParams struct {
	EnvironmentID       string
	Name                string
	Provider            *string
	Version             *string
	EncryptionAlgorithm string
	Nonce               []byte
	Ciphertext          []byte
}

type UpsertProjectCommitTriggerParams added in v0.6.0

type UpsertProjectCommitTriggerParams struct {
	ProjectID     string
	Ref           string
	Enabled       bool
	LastCommitSHA *string
}

type UpsertSecretParams

type UpsertSecretParams struct {
	ProjectID           string
	Name                string
	Provider            *string
	KeyReference        *string
	Version             *string
	EncryptionAlgorithm string
	Nonce               []byte
	Ciphertext          []byte
}

type UpsertWorkflowParams

type UpsertWorkflowParams struct {
	ProjectID   string
	Key         string
	Name        string
	Definition  json.RawMessage
	Environment json.RawMessage
}

UpsertWorkflowParams contains the complete current definition for a workflow. Definition and Environment must be JSON objects.

type WebhookDelivery

type WebhookDelivery struct {
	ID                 string                `json:"id"`
	EndpointID         string                `json:"endpointId"`
	ProviderDeliveryID string                `json:"providerDeliveryId"`
	EventType          string                `json:"eventType"`
	PayloadSHA256      string                `json:"payloadSha256"`
	Status             WebhookDeliveryStatus `json:"status"`
	ErrorMessage       *string               `json:"errorMessage,omitempty"`
	ReceivedAt         time.Time             `json:"receivedAt"`
	ProcessedAt        *time.Time            `json:"processedAt,omitempty"`
	CreatedAt          time.Time             `json:"createdAt"`
	UpdatedAt          time.Time             `json:"updatedAt"`
}

type WebhookDeliveryStatus

type WebhookDeliveryStatus string
const (
	WebhookDeliveryReceived WebhookDeliveryStatus = "received"
	WebhookDeliveryAccepted WebhookDeliveryStatus = "accepted"
	WebhookDeliveryRejected WebhookDeliveryStatus = "rejected"
	WebhookDeliveryFailed   WebhookDeliveryStatus = "failed"
)

type WebhookEndpoint

type WebhookEndpoint struct {
	ID        string          `json:"id"`
	ProjectID string          `json:"projectId"`
	Name      string          `json:"name"`
	Provider  string          `json:"provider"`
	TokenHash []byte          `json:"-"`
	Metadata  json.RawMessage `json:"metadata"`
	Enabled   bool            `json:"enabled"`
	CreatedAt time.Time       `json:"createdAt"`
	UpdatedAt time.Time       `json:"updatedAt"`
}

type Workflow

type Workflow struct {
	ID          string          `json:"id"`
	ProjectID   string          `json:"projectId"`
	Key         string          `json:"key"`
	Name        string          `json:"name"`
	Definition  json.RawMessage `json:"definition"`
	Environment json.RawMessage `json:"environment"`
	Revision    int64           `json:"revision"`
	Active      bool            `json:"active"`
	CreatedAt   time.Time       `json:"createdAt"`
	UpdatedAt   time.Time       `json:"updatedAt"`
}

Workflow is a mutable workflow definition. Runs record the workflow's key and revision at enqueue time, while their job and step snapshots stay fixed.

type WorkflowSchedule

type WorkflowSchedule struct {
	ID         string     `json:"id"`
	ProjectID  string     `json:"projectId"`
	WorkflowID string     `json:"workflowId"`
	Cron       string     `json:"cron"`
	Ref        *string    `json:"ref,omitempty"`
	Timezone   string     `json:"timezone"`
	Enabled    bool       `json:"enabled"`
	NextRunAt  *time.Time `json:"nextRunAt,omitempty"`
	LastRunAt  *time.Time `json:"lastRunAt,omitempty"`
	CreatedAt  time.Time  `json:"createdAt"`
	UpdatedAt  time.Time  `json:"updatedAt"`
}

Jump to

Keyboard shortcuts

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