Documentation ¶
Overview ¶
Package traveller defines task-specific traveler methods.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BelongsToTravelFunc ¶
type BelongsToTravelFunc defines custom callback function to be invoked for records matching a "wof:belongs_to" condition.
func NewDefaultBelongsToTravelFunc ¶
func NewDefaultBelongsToTravelFunc() (BelongsToTravelFunc, error)
NewDefaultBelongsToTravelFunc() returns a `BelongsToTravelFunc` instance that prints metadata about records matching a "wof:belongs_to" condition to STDOUT.
type BelongsToTraveler ¶
type BelongsToTraveler struct { // Callback is a `BelongsToTravelFunc` function to be invoked for records matching a "wof:belongs_to" condition. Callback BelongsToTravelFunc // IteratorURI is a valid `whosonfirst/go-whosonfirst-iterate/v2` URI used to crawl (iterate) records. IteratorURI string // BelongsTo list of WOF IDs that matching records should belong to. BelongsTo []int64 }
type BelongsToTraveler defines a struct
func NewDefaultBelongsToTraveler ¶
func NewDefaultBelongsToTraveler() (*BelongsToTraveler, error)
NewDefaultBelongsToTraveler() returns a a `BelongsToTraveler` with default values. Specifically one that expects to iterate documents in `repo://` mode, using a default callback function (defined by `NewDefaultBelongsToTravelFunc` and an empty list of the IDs that matching records should belong to.