func (l *Location) toPair() kvl.Pair { var p kvl.Pair p.Key = tuple.MustAppend(nil, "location", l.UUID) p.Value = tuple.MustAppend(nil, 0, l.URL, l.Name, l.Dead, l.LastSeen) for _, split := range l.AllocSplit { p.Value = tuple.MustAppend(p.Value, split) } return p }
func (f *File) toPair() kvl.Pair { var p kvl.Pair p.Key = fileKey(f.Path) p.Value = tuple.MustAppend(nil, 0, f.Size, f.SHA256, f.WriteTime, f.PrefixID, f.DataChunks, f.MappingValue) for _, loc := range f.Locations { p.Value = tuple.MustAppend(p.Value, loc) } return p }