/dports/misc/perkeep/perkeep-0.11/pkg/client/ |
H A D | upload.go | 469 var wholeRef []blob.Ref 471 wholeRef = append(wholeRef, opts.WholeRef) 475 wholeRef, err = c.wholeRef(io.TeeReader(contents, &buf)) 482 fileRef, err := c.fileMapFromDuplicate(ctx, fileMap, wholeRef) 499 func (c *Client) wholeRef(contents io.Reader) ([]blob.Ref, error) { func 522 func (c *Client) fileMapFromDuplicate(ctx context.Context, fileMap *schema.Builder, wholeRef []blob… 523 dupFileRef, err := c.SearchExistingFileSchema(ctx, wholeRef...) 533 …return blob.Ref{}, fmt.Errorf("could not find existing file blob for wholeRef %q: %v", wholeRef, e… 538 return blob.Ref{}, fmt.Errorf("could not write file map for wholeRef %q: %v", wholeRef, err)
|
H A D | client.go | 832 func (c *Client) SearchExistingFileSchema(ctx context.Context, wholeRef ...blob.Ref) (blob.Ref, err… 837 if len(wholeRef) == 0 { 841 for i, ref := range wholeRef { 872 for wholeRef, files := range ress.Files { 874 if c.FileHasContents(ctx, f, blob.MustParse(wholeRef)) { 932 func (c *Client) FileHasContents(ctx context.Context, f, wholeRef blob.Ref) bool { 939 req := c.newRequest(ctx, "HEAD", c.downloadHelper+f.String()+"/?verifycontents="+wholeRef.String()) 946 return res.Header.Get("X-Camli-Contents") == wholeRef.String()
|
/dports/misc/perkeep/perkeep-0.11/pkg/blobserver/blobpacked/ |
H A D | blobpacked_test.go | 168 wholeRef := blob.RefFromHash(hash) 179 pt.testOpenWholeRef(t, wholeRef, fileSize) 207 wholeRef := blob.RefFromHash(hash) 234 keyBase := "w:" + wholeRef.String() 276 pt.testOpenWholeRef(t, wholeRef, fileSize) 293 wholeRef blob.Ref 301 wholeRef: blob.MustParse("sha224-d003d3cf9784df4efe617ba319c5028fe93e5e9188cc448bf6d655b4"), 525 func (pt *packTest) testOpenWholeRef(t *testing.T, wholeRef blob.Ref, wantSize int64) { 526 rc, gotSize, err := pt.sto.OpenWholeRef(wholeRef, 0) 547 if gotRef != wholeRef { [all …]
|
H A D | blobpacked.go | 466 wholeRef blob.Ref // ref of the contents of the whole file member 615 for wholeRef, zipMetas := range zipMetaByWholeRef { 652 fileName, wholeRef, wholeBytesWritten, zipMetas[0].wholeSize) 662 bm.Set(fmt.Sprintf("%s%s", wholeMetaPrefix, wholeRef), 919 wholeRef, ok := blob.ParseBytes(v[:sp]) 923 m.wholeRef = wholeRef 1177 wholeRef blob.Ref member 1223 pk.wholeRef = blob.RefFromHash(h) 1224 wholeKey := wholeMetaPrefix + pk.wholeRef.String() 1321 WholeRef: pk.wholeRef, [all …]
|
H A D | wholefetch.go | 53 func (s *storage) OpenWholeRef(wholeRef blob.Ref, offset int64) (rc io.ReadCloser, wholeSize int64,… 57 startKey := wholeMetaPrefix + wholeRef.String() 105 log.Printf("blobpacked: discontigous or overlapping index for wholeref %v", wholeRef)
|
/dports/misc/perkeep/perkeep-0.11/pkg/index/ |
H A D | corpus.go | 762 var wholeRef blob.Ref 774 fi.WholeRef = wholeRef 865 c.fileWholeRef[fileRef] = wholeRef 880 wholeRef, ok := blob.Parse(f[1]) 884 tm, ok := c.mediaTags[wholeRef] 887 c.mediaTags[wholeRef] = tm 910 c.gps[wholeRef] = latLong{lat, long} 1462 wholeRef, ok := c.fileWholeRef[fileRef] 1466 tags, ok := c.mediaTags[wholeRef] 1474 wholeRef, ok = c.fileWholeRef[fileRef] [all …]
|
H A D | receive.go | 499 wholeRef := blob.RefFromHash(h) 535 return indexEXIF(wholeRef, r, mm) 567 mm.Set(keyWholeToFileRef.Key(wholeRef, blobRef), "1") 568 mm.Set(keyFileInfo.Key(blobRef), keyFileInfo.Val(size, b.FileName(), mimeType, wholeRef)) 572 indexMusic(io.NewSectionReader(fr, 0, fr.Size()), wholeRef, mm) 598 func indexEXIF(wholeRef blob.Ref, r io.Reader, mm *mutationMap) (err error) { 626 key := keyEXIFTag.Key(wholeRef, fmt.Sprintf("%04x", tag.Id)) 699 …mm.Set(keyEXIFGPS.Key(wholeRef), keyEXIFGPS.Val(fmt.Sprintf("%.7f", lat), fmt.Sprintf("%.7f", long… 707 func indexMusic(r readerutil.SizeReaderAt, wholeRef blob.Ref, mm *mutationMap) { 770 mm.Set(keyMediaTag.Key(wholeRef, tag), keyMediaTag.Val(value))
|
H A D | index.go | 267 wholeRef, ok1 := blob.Parse(keyPart[1]) 272 fileRefToWholeRef[fileRef] = wholeRef 299 wholeRef, ok := fileRefToWholeRef[br] 325 mutations[keyFileInfo.Key(br)] = keyFileInfo.Val(size, filename, mimetype, wholeRef) 1321 func (x *Index) existingFileSchemas(wholeRef blob.Ref) (schemaRefs []blob.Ref, err error) { 1322 it := x.queryPrefix(keyWholeToFileRef, wholeRef) 1341 func (x *Index) ExistingFileSchemas(wholeRef ...blob.Ref) (WholeRefToFile, error) { 1343 for _, v := range wholeRef { 1384 var wholeRef blob.Ref 1386 wholeRef, _ = blob.Parse(valPart[3]) [all …]
|
H A D | index_test.go | 208 func testMergeFileInfoRow(t *testing.T, wholeRef string) { 216 if wholeRef != "" { 217 value += "|" + wholeRef 218 want.WholeRef = blob.MustParse(wholeRef)
|
/dports/misc/perkeep/perkeep-0.11/cmd/pk-put/ |
H A D | files.go | 511 …x context.Context, bs blobserver.StatReceiver, fileMap *schema.Builder, wholeRef []blob.Ref) (pr *… 519 dupFileRef, err := up.Client.SearchExistingFileSchema(ctx, wholeRef...) 521 log.Printf("Warning: error searching for already-uploaded copy of %v: %v", wholeRef, err) 527 cmdmain.Logf("Found dup of contents %s in file schema %s", wholeRef, dupFileRef) 552 log.Printf("Warning: error uploading file map after finding server dup of %v: %v", wholeRef, err) 593 wholeRef []blob.Ref // wholeRef[1], if any, is the legacy sha1 version of the contents. 606 wholeRef, err = up.wholeFileDigest(n.fullPath) 609 pr, ok = up.fileMapFromDuplicate(ctx, up.statReceiver(n), filebb, wholeRef) 651 if wholeRef == nil && up.fileOpts.wantFilePermanode() { 666 wholeRef = []blob.Ref{blob.RefFromHash(td.Hash())} [all …]
|
/dports/misc/perkeep/perkeep-0.11/pkg/index/indextest/ |
H A D | tests.go | 195 …eps) UploadFile(fileName string, contents string, modTime time.Time) (fileRef, wholeRef blob.Ref) { 196 wholeRef = id.UploadString(contents) 202 BlobRef: wholeRef, 352 uploadFile := func(file string, modTime time.Time) (fileRef, wholeRef blob.Ref) { 358 fileRef, wholeRef = id.UploadFile(file, string(contents), modTime) 929 fileRef, wholeRef := id.UploadFile("foo.html", "<html>I am an html file.</html>", fileTime) 930 t.Logf("uploaded fileref %q, wholeRef %q", fileRef, wholeRef) 935 key := fmt.Sprintf("wholetofile|%s|%s", wholeRef, fileRef) 940 refs, err := id.Index.ExistingFileSchemas(wholeRef) 944 want := index.WholeRefToFile{wholeRef.String(): []blob.Ref{fileRef}}
|
/dports/misc/perkeep/perkeep-0.11/pkg/importer/gphotos/ |
H A D | gphotos.go | 450 wholeRef := blob.RefFromHash(h) 451 pn, attrs, err := findExistingPermanode(r.Context(), r.Host.Searcher(), wholeRef) 601 func findExistingPermanode(ctx context.Context, qs search.QueryDescriber, wholeRef blob.Ref) (pn bl… 608 WholeRef: wholeRef,
|
/dports/misc/perkeep/perkeep-0.11/pkg/importer/picasa/ |
H A D | picasa.go | 438 wholeRef := blob.RefFromHash(h) 439 if pn, err := findExistingPermanode(r.Context(), r.Host.Searcher(), wholeRef); err == nil { 550 func findExistingPermanode(ctx context.Context, qs search.QueryDescriber, wholeRef blob.Ref) (pn bl… 557 WholeRef: wholeRef,
|
/dports/misc/perkeep/perkeep-0.11/pkg/blobserver/ |
H A D | interface.go | 205 OpenWholeRef(wholeRef blob.Ref, offset int64) (rc io.ReadCloser, wholeSize int64, err error)
|
/dports/misc/perkeep/perkeep-0.11/pkg/blobserver/replica/ |
H A D | replica.go | 316 func (sto *replicaStorage) OpenWholeRef(wholeRef blob.Ref, offset int64) (rc io.ReadCloser, wholeSi… 320 rc, wholeSize, err = v.OpenWholeRef(wholeRef, offset)
|
/dports/misc/perkeep/perkeep-0.11/pkg/search/ |
H A D | query_test.go | 185 fileRef, wholeRef := qt.id.UploadFile("file.txt", "the content", time.Unix(1382073153, 0)) 194 qt.wantRes(sq, fileRef, wholeRef) 1090 fileRef, wholeRef := id.UploadFile("file.gif", "GIF87afoo", time.Unix(456, 0)) 1111 if db.File.WholeRef != wholeRef { 1112 qt.t.Errorf("DescribedBlob.WholeRef: got %v, wanted %v", wholeRef, db.File.WholeRef)
|
H A D | query.go | 1953 wholeRef, ok := corpus.GetWholeRef(ctx, br) 1954 if !ok || wholeRef != c.WholeRef {
|