register

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCacheTypeMissing = errors.New("register: cache 'type' parameter missing")
	ErrCacheTypeInvalid = errors.New("register: cache 'type' value must be a string")
)
View Source
var (
	ErrProviderNameMissing = errors.New("register: provider 'name' parameter missing")
	ErrProviderNameInvalid = errors.New("register: provider 'name' value must be a string")
)

Functions

func Cache

func Cache(config dict.Dicter) (cache.Interface, error)

Cache registers cache backends

func Maps

func Maps(a *atlas.Atlas, maps []provider.Map, providers map[string]provider.TilerUnion) error

Maps registers maps with with atlas

func Observer added in v0.13.0

func Observer(config dict.Dicter) (observability.Interface, error)

func Providers

func Providers(providers []dict.Dicter, maps []provider.Map) (map[string]provider.TilerUnion, error)

Providers registers data provider backends

func SanitizeAttribution added in v0.14.0

func SanitizeAttribution(attribution string) string

Escapes HTML special characters except allow tags

Types

type ErrFetchingLayerInfo

type ErrFetchingLayerInfo struct {
	Provider string
	Err      error
}

ErrFetchingLayerInfo wraps an error when attempting to obtain layer information for a provider

func (ErrFetchingLayerInfo) Error

func (e ErrFetchingLayerInfo) Error() string

func (ErrFetchingLayerInfo) Unwrap added in v0.12.0

func (e ErrFetchingLayerInfo) Unwrap() error

type ErrProviderAlreadyRegistered

type ErrProviderAlreadyRegistered string

func (ErrProviderAlreadyRegistered) Error

type ErrProviderLayerInvalid

type ErrProviderLayerInvalid struct {
	ProviderLayer string
	Map           string
}

ErrProviderLayerInvalid should be returned when an invalid Provider layer for a map is given

func (ErrProviderLayerInvalid) Error

func (e ErrProviderLayerInvalid) Error() string

type ErrProviderLayerNotRegistered

type ErrProviderLayerNotRegistered struct {
	MapName       string
	ProviderLayer string
	Provider      string
}

ErrProviderLayerNotRegistered should be returned when the requested provider was not registered into the system.

func (ErrProviderLayerNotRegistered) Error

type ErrProviderNotFound

type ErrProviderNotFound struct {
	Provider string
}

ErrProviderNotFound when the requested provider is not a known provider

func (ErrProviderNotFound) Error

func (e ErrProviderNotFound) Error() string

type ErrProviderTypeInvalid

type ErrProviderTypeInvalid string

func (ErrProviderTypeInvalid) Error

func (e ErrProviderTypeInvalid) Error() string

type ErrProviderTypeMissing

type ErrProviderTypeMissing string

func (ErrProviderTypeMissing) Error

func (e ErrProviderTypeMissing) Error() string

Jump to

Keyboard shortcuts

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