provider

package
v2.8.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 14, 2025 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

package provider interfaces used to generate a list of iterator `whosonfirst/go-whosonfirst-iterate/v2` URIs for crawling by a `producer.Producer` instance.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterProvider

func RegisterProvider(ctx context.Context, scheme string, init_func ProviderInitializationFunc) error

Types

type GitHubProvider

type GitHubProvider struct {
	Provider
	// contains filtered or unexported fields
}

func (*GitHubProvider) IteratorSources

func (p *GitHubProvider) IteratorSources(ctx context.Context) ([]string, error)

func (*GitHubProvider) IteratorSourcesWithURITemplate

func (p *GitHubProvider) IteratorSourcesWithURITemplate(ctx context.Context, str_template string) ([]string, error)

type Provider

type Provider interface {
	IteratorSources(context.Context) ([]string, error)
	IteratorSourcesWithURITemplate(context.Context, string) ([]string, error)
}

func NewGitHubProvider

func NewGitHubProvider(ctx context.Context, uri string) (Provider, error)

func NewProvider

func NewProvider(ctx context.Context, uri string) (Provider, error)

type ProviderInitializationFunc

type ProviderInitializationFunc func(ctx context.Context, uri string) (Provider, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL