Replaced the dynamic table type ArtifactLocation with struct keys

The original is present in comment form for reference
This commit is contained in:
Michael Hohn
2024-07-10 13:08:40 -07:00
committed by =Michael Hohn
parent 2df48b9f98
commit 8965725e42
4 changed files with 44 additions and 21 deletions

View File

@@ -7,7 +7,7 @@ import (
// XX: static types: split by type?
// Restrict the keys / values for ArtifactLocation and centralize the common ones
// here
// here
const (
AF_VAL_BUCKET_RESULTS = "results"
AF_VAL_BUCKET_PACKS = "packs"
@@ -20,7 +20,9 @@ type ArtifactLocation struct {
// For example, a simple key-value pair could be "path" -> "/path/to/artifact.tgz".
// Alternatively, a more complex example could be "bucket" -> "example", "key" -> "UNIQUE_ARTIFACT_IDENTIFIER".
// XX: static types
Data map[string]string `json:"data"`
// Data map[string]string `json:"data"`
Key string // location in bucket
Bucket string // which bucket: packs or results
}
// deriveKeyFromSessionId generates a key for a query pack based on the job ID