(_ context.Context, id db.GraphID)
| 179 | } |
| 180 | |
| 181 | func (d *DB) AllFileMeta(_ context.Context, id db.GraphID) ([]*db.FileMeta, error) { |
| 182 | g, ok := d.graphs[id] |
| 183 | if !ok { |
| 184 | return nil, db.NotExists("graph", id) |
| 185 | } |
| 186 | |
| 187 | var out []*db.FileMeta |
| 188 | for _, metas := range g.metas { |
| 189 | if len(metas) == 0 { |
| 190 | continue |
| 191 | } |
| 192 | // Get the latest |
| 193 | out = append(out, metas[len(metas)-1]) |
| 194 | } |
| 195 | return out, nil |
| 196 | } |