forked from security/hakurei
internal/pkg: compute identifier from deps
This provides infrastructure for computing a deterministic identifier based on current artifact kind, opaque parameters data, and optional dependency kind and identifiers. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -53,6 +53,9 @@ func (c *Cache) NewHTTPGet(hc *http.Client, url string, checksum Checksum) (File
|
||||
return c.NewHTTP(hc, req, checksum), nil
|
||||
}
|
||||
|
||||
// Kind returns the hardcoded [Kind] constant.
|
||||
func (a *httpArtifact) Kind() Kind { return KindHTTP }
|
||||
|
||||
// ID returns the caller-supplied hash of the response body.
|
||||
func (a *httpArtifact) ID() ID { return a.id }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user