Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
ErrNotFound is returned when a requested key does not exist.
Functions ¶
Types ¶
type Driver ¶
type Driver interface {
Close() error
Set(ctx context.Context, prefix string, payload any) error
Get(ctx context.Context, prefix string) (Payload, error)
GetAll(ctx context.Context, prefix string, fields []string) (Results, error)
// Pipeline CRUD operations
SavePipeline(ctx context.Context, name, content, driverDSN string) (*Pipeline, error)
GetPipeline(ctx context.Context, id string) (*Pipeline, error)
ListPipelines(ctx context.Context) ([]Pipeline, error)
DeletePipeline(ctx context.Context, id string) error
// Pipeline run operations
SaveRun(ctx context.Context, pipelineID string) (*PipelineRun, error)
GetRun(ctx context.Context, runID string) (*PipelineRun, error)
ListRunsByPipeline(ctx context.Context, pipelineID string) ([]PipelineRun, error)
UpdateRunStatus(ctx context.Context, runID string, status RunStatus, errorMessage string) error
// Resource version operations
SaveResourceVersion(ctx context.Context, resourceName string, version map[string]string, jobName string) (*ResourceVersion, error)
GetLatestResourceVersion(ctx context.Context, resourceName string) (*ResourceVersion, error)
ListResourceVersions(ctx context.Context, resourceName string, limit int) ([]ResourceVersion, error)
GetVersionsAfter(ctx context.Context, resourceName string, afterVersion map[string]string) ([]ResourceVersion, error)
}
type InitFunc ¶
func GetFromDSN ¶
type Pipeline ¶
type Pipeline struct {
ID string `json:"id"`
Name string `json:"name"`
Content string `json:"content"`
DriverDSN string `json:"driver_dsn"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
Pipeline represents a stored pipeline definition.
type PipelineRun ¶
type PipelineRun struct {
ID string `json:"id"`
PipelineID string `json:"pipeline_id"`
Status RunStatus `json:"status"`
StartedAt *time.Time `json:"started_at,omitempty"`
CompletedAt *time.Time `json:"completed_at,omitempty"`
ErrorMessage string `json:"error_message,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
PipelineRun represents an execution of a pipeline.
type ResourceVersion ¶
type ResourceVersion struct {
ID int64 `json:"id"`
ResourceName string `json:"resource_name"`
Version map[string]string `json:"version"`
FetchedAt time.Time `json:"fetched_at"`
JobName string `json:"job_name,omitempty"` // For passed constraints
}
ResourceVersion represents a stored resource version.
type Tree ¶
type Tree[T any] struct { Name string `json:"name"` Children []*Tree[T] `json:"children,omitempty"` Value T `json:"value,omitempty"` FullPath string `json:"full_path,omitempty"` }
func (*Tree[T]) HasSingleChild ¶
HasSingleChild checks if this path has exactly one child.
Click to show internal directories.
Click to hide internal directories.