StaticSet returns the whole of the static set members of that directory
(ctx context.Context)
| 85 | |
| 86 | // StaticSet returns the whole of the static set members of that directory |
| 87 | func (dr *DirReader) StaticSet(ctx context.Context) ([]blob.Ref, error) { |
| 88 | if dr.staticSet != nil { |
| 89 | return dr.staticSet, nil |
| 90 | } |
| 91 | staticSetBlobref := dr.ss.Entries |
| 92 | if !staticSetBlobref.Valid() { |
| 93 | return nil, errors.New("schema/dirreader: Invalid blobref") |
| 94 | } |
| 95 | members, err := staticSet(ctx, staticSetBlobref, dr.fetcher) |
| 96 | if err != nil { |
| 97 | return nil, err |
| 98 | } |
| 99 | dr.staticSet = members |
| 100 | return dr.staticSet, nil |
| 101 | } |
| 102 | |
| 103 | func staticSet(ctx context.Context, staticSetBlobref blob.Ref, fetcher blob.Fetcher) ([]blob.Ref, error) { |
| 104 | rsc, _, err := fetcher.Fetch(ctx, staticSetBlobref) |