MCPcopy Index your code
hub / github.com/perkeep/perkeep / PermanodeLocation

Method PermanodeLocation

pkg/index/location.go:56–59  ·  view source on GitHub ↗

PermanodeLocation returns the location info for a permanode, from one of the following sources: 1. Permanode attributes "latitude" and "longitude" 2. Referenced permanode attributes (eg. for "foursquare.com:checkin" its "foursquareVenuePermanode") 3. Location in permanode camliContent file metadata

(ctx context.Context, permaNode blob.Ref,
	at time.Time, owner *Owner)

Source from the content-addressed store, hash-verified

54// The sources are checked in this order, the location from
55// the first source yielding a valid result is returned.
56func (lh *LocationHelper) PermanodeLocation(ctx context.Context, permaNode blob.Ref,
57 at time.Time, owner *Owner) (camtypes.Location, error) {
58 return lh.permanodeLocation(ctx, permaNode, at, owner, true)
59}
60
61func (lh *LocationHelper) permanodeLocation(ctx context.Context,
62 pn blob.Ref, at time.Time, owner *Owner,

Callers 3

blobMatchesMethod · 0.80
doDescribeMethod · 0.80

Calls 1

permanodeLocationMethod · 0.95

Tested by 1