(tx *bolt.Tx, dgst digest.Digest)
| 755 | } |
| 756 | |
| 757 | func isSharedContent(tx *bolt.Tx, dgst digest.Digest) bool { |
| 758 | v1bkt := tx.Bucket(bucketKeyVersion) |
| 759 | if v1bkt == nil { |
| 760 | return false |
| 761 | } |
| 762 | // iterate through each namespace |
| 763 | v1c := v1bkt.Cursor() |
| 764 | for nk, _ := v1c.First(); nk != nil; nk, _ = v1c.Next() { |
| 765 | ns := string(nk) |
| 766 | lbkt := getNamespaceLabelsBucket(tx, ns) |
| 767 | if lbkt == nil { |
| 768 | continue |
| 769 | } |
| 770 | if sharedNS := lbkt.Get([]byte(labels.LabelSharedNamespace)); sharedNS != nil && string(sharedNS) == "true" && getBlobBucket(tx, ns, dgst) != nil { |
| 771 | return true |
| 772 | } |
| 773 | } |
| 774 | return false |
| 775 | } |
| 776 | |
| 777 | func validateInfo(info *content.Info) error { |
| 778 | for k, v := range info.Labels { |
no test coverage detected
searching dependent graphs…