Documentation
¶
Overview ¶
Package reader implements the `go-whosonfirst-iterate/emitter` interfaces using `whosonfirst/go-reader.Reader` instances.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewReaderEmitter ¶
NewGitEmitter() returns a new `GitEmitter` instance configured by 'uri' in the form of:
reader://?{PARAMETERS}
Where {PATH} is an optional path on disk where a repository will be clone to (default is to clone repository in memory) and {PARAMETERS} may be: * `?include=` Zero or more `aaronland/go-json-query` query strings containing rules that must match for a document to be considered for further processing. * `?exclude=` Zero or more `aaronland/go-json-query` query strings containing rules that if matched will prevent a document from being considered for further processing. * `?include_mode=` A valid `aaronland/go-json-query` query mode string for testing inclusion rules. * `?exclude_mode=` A valid `aaronland/go-json-query` query mode string for testing exclusion rules. * `?reader=` A valid `whosonfirst/go-reader` URI used to create the underlying reader instance.
Types ¶
type ReaderEmitter ¶
GitEmitter implements the `Emitter` interface for crawling records with a `whosonfirst/go-reader.Reader` instance.
func (*ReaderEmitter) WalkURI ¶
func (idx *ReaderEmitter) WalkURI(ctx context.Context, index_cb emitter.EmitterCallbackFunc, path string) error
WalkURI() reads 'path' using the underlying reader (if not excluded by any filters specified when `idx` was created) and invokes 'index_cb'.