provider

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: BSD-3-Clause Imports: 26 Imported by: 4

Documentation

Index

Constants

View Source
const JavaScriptAtEOFFlag string = "javascript-at-eof"

The names of the commandline flag or query parameter used to assign the `javascript_at_eof` variable.

View Source
const LEAFLET_SCHEME string = "leaflet"
View Source
const LeafletEnableDrawFlag string = "leaflet-enable-draw"

The name of the commandline flag or query parameter used to assign the `leaflet_enable_draw` variable.

View Source
const LeafletEnableFullscreenFlag string = "leaflet-enable-fullscreen"

The name of the commandline flag or query parameter used to assign the `leaflet_enable_fullscreen` variable.

View Source
const LeafletEnableHashFlag string = "leaflet-enable-hash"

The name of the commandline flag or query parameter used to assign the `leaflet_enable_hash` variable.

View Source
const LeafletTileURLFlag string = "leaflet-tile-url"

The name of the commandline flag or query parameter used to assign the `leaflet_tile_url` variable.

View Source
const MapPrefixFlag string = "map-prefix"
View Source
const MapProviderFlag string = "map-provider"

The name of the commandline flag or query parameter used to assign the `map_provider` variable.

View Source
const NULL_SCHEME string = "null"
View Source
const NextzenAPIKeyFlag string = "nextzen-apikey"

The name of the commandline flag or query parameter used to assign the `nextzen_apikey` variable.

View Source
const NextzenStyleURLFlag string = "nextzen-style-url"

The name of the commandline flag or query parameter used to assign the `nextzen_style_url` variable.

View Source
const NextzenTileURLFlag string = "nextzen-tile-url"

The name of the commandline flag or query parameter used to assign the `nextzen_tile_url` variable.

View Source
const PROTOMAPS_SCHEME string = "protomaps"
View Source
const ProtomapsBucketURIFlag string = "protomaps-bucket-uri"

The name of the commandline flag or query parameter used to assign the `protomaps_bucket_uri` variable.

View Source
const ProtomapsCacheSizeFlag string = "protomaps-caches-size"

The name of the commandline flag or query parameter used to assign the `protomaps_cache_size` variable.

View Source
const ProtomapsDatabaseFlag string = "protomaps-database"

The name of the commandline flag or query parameter used to assign the `protomaps_database` variable.

View Source
const ProtomapsLabelRulesURIFlag string = "protomaps-label-rules-uri"

The names of the commandline flag or query parameter used to assign the `protomaps_paint_rules_uri` variable.

View Source
const ProtomapsPaintRulesURIFlag string = "protomaps-paint-rules-uri"

The names of the commandline flag or query parameter used to assign the `protomaps_paint_rules_uri` variable.

View Source
const ProtomapsServeTilesFlag string = "protomaps-serve-tiles"

The name of the commandline flag or query parameter used to assign the `protomaps_serve_tiles` variable.

View Source
const ProtomapsTileURLFlag string = "protomaps-tile-url"

The name of the commandline flag or query parameter used to assign the `protomaps_tile_url` variable.

View Source
const RollupAssetsFlag string = "rollup-assets"

The names of the commandline flag or query parameter used to assign the `rollup_assets` variable.

View Source
const TANGRAM_SCHEME string = "tangram"
View Source
const TilezenEnableTilepack string = "tilezen-enable-tilepack"

The name of the commandline flag or query parameter used to assign the `tilezen_enable_tilepack` variable.

View Source
const TilezenTilepackPath string = "tilezen-tilepack-path"

The name of the commandline flag or query parameter used to assign the `tilezen_tilepack_path` variable.

Variables

This section is empty.

Functions

func AppendLeafletFlags added in v0.0.3

func AppendLeafletFlags(fs *flag.FlagSet) error

func AppendProtomapsProviderFlags added in v0.0.3

func AppendProtomapsProviderFlags(fs *flag.FlagSet) error

func AppendProviderFlags

func AppendProviderFlags(fs *flag.FlagSet) error

func AppendTangramProviderFlags added in v0.0.3

func AppendTangramProviderFlags(fs *flag.FlagSet) error

func LeafletOptionsFromURL added in v0.0.3

func LeafletOptionsFromURL(u *url.URL) (*leaflet.LeafletOptions, error)

func ProtomapsOptionsFromURL added in v0.0.3

func ProtomapsOptionsFromURL(u *url.URL) (*protomaps.ProtomapsOptions, error)

func ProviderURIFromFlagSet added in v0.0.3

func ProviderURIFromFlagSet(fs *flag.FlagSet) (string, error)

func RegisterProvider added in v0.0.3

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

RegisterProvider registers 'scheme' as a key pointing to 'init_func' in an internal lookup table used to create new `Provider` instances by the `NewProvider` method.

func Schemes added in v0.0.3

func Schemes() []string

Schemes returns the list of schemes that have been registered.

func TangramJSOptionsFromURL added in v0.0.3

func TangramJSOptionsFromURL(u *url.URL) (*tangramjs.TangramJSOptions, error)

Types

type LeafletProvider added in v0.0.6

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

func (*LeafletProvider) AppendAssetHandlers added in v0.0.6

func (p *LeafletProvider) AppendAssetHandlers(mux *http.ServeMux) error

func (*LeafletProvider) AppendResourcesHandler added in v0.0.6

func (p *LeafletProvider) AppendResourcesHandler(handler http.Handler) http.Handler

func (*LeafletProvider) Scheme added in v0.0.6

func (p *LeafletProvider) Scheme() string

func (*LeafletProvider) SetLogger added in v0.0.6

func (p *LeafletProvider) SetLogger(logger *log.Logger) error

type NullProvider added in v0.3.2

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

func (*NullProvider) AppendAssetHandlers added in v0.3.2

func (p *NullProvider) AppendAssetHandlers(mux *http.ServeMux) error

func (*NullProvider) AppendResourcesHandler added in v0.3.2

func (p *NullProvider) AppendResourcesHandler(handler http.Handler) http.Handler

func (*NullProvider) Scheme added in v0.3.2

func (p *NullProvider) Scheme() string

func (*NullProvider) SetLogger added in v0.3.2

func (p *NullProvider) SetLogger(logger *log.Logger) error

type ProtomapsProvider

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

func (*ProtomapsProvider) AppendAssetHandlers added in v0.0.3

func (p *ProtomapsProvider) AppendAssetHandlers(mux *http.ServeMux) error

func (*ProtomapsProvider) AppendResourcesHandler added in v0.0.3

func (p *ProtomapsProvider) AppendResourcesHandler(handler http.Handler) http.Handler

func (*ProtomapsProvider) Scheme added in v0.0.3

func (p *ProtomapsProvider) Scheme() string

func (*ProtomapsProvider) SetLogger added in v0.0.3

func (p *ProtomapsProvider) SetLogger(logger *log.Logger) error

type Provider

type Provider interface {
	Scheme() string
	AppendResourcesHandler(handler http.Handler) http.Handler
	AppendAssetHandlers(mux *http.ServeMux) error
	SetLogger(*log.Logger) error
}

func NewLeafletProvider added in v0.0.6

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

func NewNullProvider added in v0.3.2

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

func NewProtomapsProvider added in v0.0.3

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

func NewProvider added in v0.0.3

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

NewProvider returns a new `Provider` instance configured by 'uri'. The value of 'uri' is parsed as a `url.URL` and its scheme is used as the key for a corresponding `ProviderInitializationFunc` function used to instantiate the new `Provider`. It is assumed that the scheme (and initialization function) have been registered by the `RegisterProvider` method.

func NewTangramProvider added in v0.0.3

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

type ProviderInitializationFunc added in v0.0.3

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

ProviderInitializationFunc is a function defined by individual provider package and used to create an instance of that provider

type TangramProvider added in v0.0.3

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

func (*TangramProvider) AppendAssetHandlers added in v0.0.3

func (p *TangramProvider) AppendAssetHandlers(mux *http.ServeMux) error

func (*TangramProvider) AppendResourcesHandler added in v0.0.3

func (p *TangramProvider) AppendResourcesHandler(handler http.Handler) http.Handler

func (*TangramProvider) Scheme added in v0.0.3

func (p *TangramProvider) Scheme() string

func (*TangramProvider) SetLogger added in v0.0.3

func (p *TangramProvider) SetLogger(logger *log.Logger) error

type TilezenOptions added in v0.0.3

type TilezenOptions struct {
	EnableTilepack bool
	TilepackPath   string
	TilepackURL    string
}

func TilezenOptionsFromURL added in v0.0.3

func TilezenOptionsFromURL(u *url.URL) (*TilezenOptions, error)

Jump to

Keyboard shortcuts

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