( ctx context.Context, w io.Writer, cacheURI string, )
| 163 | } |
| 164 | |
| 165 | func (p *Package) AreAllOutputsInCache( |
| 166 | ctx context.Context, w io.Writer, cacheURI string, |
| 167 | ) (bool, error) { |
| 168 | storePaths, err := p.GetStorePaths(ctx, w) |
| 169 | if err != nil { |
| 170 | return false, err |
| 171 | } |
| 172 | |
| 173 | for _, storePath := range storePaths { |
| 174 | pathParts := nix.NewStorePathParts(storePath) |
| 175 | hash := pathParts.Hash |
| 176 | if strings.HasPrefix(cacheURI, "s3") { |
| 177 | inCache, err := fetchNarInfoStatusFromS3(ctx, cacheURI, hash) |
| 178 | if err != nil || !inCache { |
| 179 | return false, err |
| 180 | } |
| 181 | } else { |
| 182 | inCache, err := fetchNarInfoStatusFromHTTP(ctx, cacheURI, hash) |
| 183 | if err != nil || !inCache { |
| 184 | return false, err |
| 185 | } |
| 186 | } |
| 187 | } |
| 188 | return true, nil |
| 189 | } |
| 190 | |
| 191 | func (p *Package) outputsForOutputName(output string) ([]lock.Output, error) { |
| 192 | sysInfo, err := p.sysInfoIfExists() |
no test coverage detected