Documentation
¶
Overview ¶
Package storage provides a persistence layer using SQLite to maintain a history of all deployment attempts and their outcomes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deployment ¶
type Deployment struct {
// ID is the unique auto-incrementing identifier for the record.
ID int
// Hash is the Git commit SHA detected for this deployment.
Hash string
// Status is the result of the operation (success, failed, or rollback).
Status string
// Output is the combined stdout/stderr from the remote execution.
Output string
// CreatedAt is the timestamp when the record was inserted.
CreatedAt time.Time
}
Deployment represents a single record of a deployment attempt in the database.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service manages the connection pool and SQL operations for the metadata store.
func NewService ¶
NewService initializes the SQLite database at the specified path, runs internal migrations, and returns a usable Service instance.
func (*Service) GetHistory ¶
func (s *Service) GetHistory(limit int) ([]Deployment, error)
GetHistory retrieves the last N deployment records from the database, ordered by their IDs in descending order.
func (*Service) RecordDeploy ¶
RecordDeploy inserts a new deployment event into the database history.
Click to show internal directories.
Click to hide internal directories.