Documentation
¶
Index ¶
Constants ¶
View Source
const ArtifactsFileName = "artifacts.json"
Variables ¶
This section is empty.
Functions ¶
func SaveArtifacts ¶ added in v0.1.2
func SaveArtifacts(filePath string, doc ArtifactsDocument) error
SaveArtifacts writes an artifacts.json document to disk.
Types ¶
type ArtifactRecord ¶
type ArtifactRecord struct {
Name string `json:"name"`
RelPath string `json:"rel_path"`
MediaType string `json:"media_type"`
Role core.ArtifactRole `json:"role"`
SizeBytes int64 `json:"size_bytes"`
Checksum core.Checksum `json:"checksum"`
CreatedAt time.Time `json:"created_at"`
UploadedAt *time.Time `json:"uploaded_at,omitempty"` // set after a successful upload/confirm
RemoteArtifactID string `json:"remote_artifact_id,omitempty"` // backend-assigned ULID
}
ArtifactRecord is the persisted form of a single artifact entry.
type ArtifactsDocument ¶
type ArtifactsDocument struct {
SchemaVersion string `json:"schema_version"`
Artifacts []ArtifactRecord `json:"artifacts"`
}
ArtifactsDocument caches artifact metadata for a run.
func LoadArtifacts ¶
func LoadArtifacts(filePath string) (ArtifactsDocument, error)
LoadArtifacts reads an artifacts.json file from disk.
func NewArtifactsDocument ¶ added in v0.1.2
func NewArtifactsDocument(runDir string, artifacts []core.Artifact) (ArtifactsDocument, error)
NewArtifactsDocument builds an ArtifactsDocument from in-memory artifacts, normalizing each artifact's absolute Path into a runDir-relative slash path.
type FS ¶
type FS struct {
// contains filtered or unexported fields
}
FS persists capture runs to the local filesystem.
func (*FS) Finalize ¶
Finalize closes open handles, computes checksums, and emits artifact metadata.
type ManifestDocument ¶
type ManifestDocument struct {
RunID string `json:"run_id"`
Schema string `json:"schema_version"`
Source core.SourceMeta `json:"source"`
Manifest core.Manifest `json:"manifest"`
Capture core.CaptureSettings `json:"capture"`
Started time.Time `json:"started"`
Completed *time.Time `json:"completed,omitempty"`
RecordsCount uint64 `json:"records_count"`
PrimaryData string `json:"primary_data_uri"`
}
ManifestDocument represents the serialized metadata persisted alongside capture artifacts.
func LoadManifest ¶
func LoadManifest(path string) (ManifestDocument, error)
LoadManifest reads a manifest.json file from disk.
Click to show internal directories.
Click to hide internal directories.