providers

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2025 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CacheModeAlways         = "always"          // Always cache as normal regardless of fallback status
	CacheModeUnlessError    = "unless-error"    // Cache unless the primary provider returns an error
	CacheModeUnlessFallback = "unless-fallback" // Never cache if a fallback occurs (whether due to error, bounds, or zoom)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Blend added in v0.2.0

type Blend struct {
	BlendConfig
	// contains filtered or unexported fields
}

func (Blend) GenerateTile added in v0.2.0

func (t Blend) GenerateTile(ctx context.Context, providerContext layer.ProviderContext, tileRequest pkg.TileRequest) (*pkg.Image, error)

func (Blend) PreAuth added in v0.2.0

func (t Blend) PreAuth(ctx context.Context, providerContext layer.ProviderContext) (layer.ProviderContext, error)

type BlendConfig added in v0.2.0

type BlendConfig struct {
	Opacity   float64
	Mode      string
	Providers []map[string]interface{}
	Layer     *BlendLayerConfig
}

type BlendLayerConfig added in v0.5.0

type BlendLayerConfig struct {
	Pattern string
	Values  []map[string]string
}

Allow you to directly reference another layer that uses a pattern with multiple concrete values for the pattern

type BlendRegistration added in v0.5.0

type BlendRegistration struct {
}

func (BlendRegistration) Initialize added in v0.5.0

func (s BlendRegistration) Initialize(cfgAny any, clientConfig config.ClientConfig, errorMessages config.ErrorMessages, layerGroup *layer.LayerGroup, datastores *datastore.DatastoreRegistry) (layer.Provider, error)

func (BlendRegistration) InitializeConfig added in v0.5.0

func (s BlendRegistration) InitializeConfig() any

func (BlendRegistration) Name added in v0.5.0

func (s BlendRegistration) Name() string

type CGI added in v0.5.0

type CGI struct {
	CGIConfig
	// contains filtered or unexported fields
}

func (CGI) GenerateTile added in v0.5.0

func (t CGI) GenerateTile(ctx context.Context, _ layer.ProviderContext, tileRequest pkg.TileRequest) (*pkg.Image, error)

func (CGI) PreAuth added in v0.5.0

type CGIConfig added in v0.5.0

type CGIConfig struct {
	Exec           string              // The path to the CGI executable
	Args           []string            // Arguments to pass into the executable in standard "split on spaces" format
	URI            string              // The URI (path + query) to pass into the CGI for the fake request - think mod_rewrite style invocation of the CGI
	Domain         string              // The host to pass into the CGI for the fake request. Defaults to localhost
	Headers        map[string][]string // Extra headers to pass into the CGI for the fake request
	Env            map[string]string   // Environment variables to supply to the CGI invocations. If the value is an empty string it passes along the value from the main tilegroxy invocation
	WorkingDir     string              // Working directory for the CGI invocation
	InvalidAsError bool                // If true, if the CGI response includes a content type that isn't in the Client's list of acceptable content types then it treats the response body as an error message
}

type CGIRegistration added in v0.5.0

type CGIRegistration struct {
}

func (CGIRegistration) Initialize added in v0.5.0

func (s CGIRegistration) Initialize(cfgAny any, clientConfig config.ClientConfig, errorMessages config.ErrorMessages, _ *layer.LayerGroup, _ *datastore.DatastoreRegistry) (layer.Provider, error)

func (CGIRegistration) InitializeConfig added in v0.5.0

func (s CGIRegistration) InitializeConfig() any

func (CGIRegistration) Name added in v0.5.0

func (s CGIRegistration) Name() string

type CacheMode added in v0.5.0

type CacheMode string

type CompositeMVT added in v0.9.0

type CompositeMVT struct {
	// contains filtered or unexported fields
}

func (CompositeMVT) GenerateTile added in v0.9.0

func (t CompositeMVT) GenerateTile(ctx context.Context, providerContext layer.ProviderContext, tileRequest pkg.TileRequest) (*pkg.Image, error)

func (CompositeMVT) PreAuth added in v0.9.0

func (t CompositeMVT) PreAuth(_ context.Context, providerContext layer.ProviderContext) (layer.ProviderContext, error)

type CompositeMVTConfig added in v0.9.0

type CompositeMVTConfig struct {
	Providers []map[string]interface{}
}

type CompositeMVTRegistration added in v0.9.0

type CompositeMVTRegistration struct {
}

func (CompositeMVTRegistration) Initialize added in v0.9.0

func (s CompositeMVTRegistration) Initialize(cfgAny any, clientConfig config.ClientConfig, errorMessages config.ErrorMessages, layerGroup *layer.LayerGroup, datastores *datastore.DatastoreRegistry) (layer.Provider, error)

func (CompositeMVTRegistration) InitializeConfig added in v0.9.0

func (s CompositeMVTRegistration) InitializeConfig() any

func (CompositeMVTRegistration) Name added in v0.9.0

type Custom added in v0.1.0

type Custom struct {
	CustomConfig
	// contains filtered or unexported fields
}

func (Custom) GenerateTile added in v0.1.0

func (t Custom) GenerateTile(ctx context.Context, providerContext layer.ProviderContext, tileRequest pkg.TileRequest) (*pkg.Image, error)

func (Custom) PreAuth added in v0.1.0

func (t Custom) PreAuth(ctx context.Context, providerContext layer.ProviderContext) (layer.ProviderContext, error)

type CustomConfig added in v0.1.0

type CustomConfig struct {
	File   string
	Script string                 // Contains the go code of the provider inline.
	Params map[string]interface{} `mapstructure:",remain"`
}

type CustomRegistration added in v0.5.0

type CustomRegistration struct {
}

func (CustomRegistration) Initialize added in v0.5.0

func (s CustomRegistration) Initialize(cfgAny any, clientConfig config.ClientConfig, errorMessages config.ErrorMessages, _ *layer.LayerGroup, _ *datastore.DatastoreRegistry) (layer.Provider, error)

func (CustomRegistration) InitializeConfig added in v0.5.0

func (s CustomRegistration) InitializeConfig() any

func (CustomRegistration) Name added in v0.5.0

func (s CustomRegistration) Name() string

type Effect added in v0.2.0

type Effect struct {
	EffectConfig
	// contains filtered or unexported fields
}

func (Effect) GenerateTile added in v0.2.0

func (t Effect) GenerateTile(ctx context.Context, providerContext layer.ProviderContext, tileRequest pkg.TileRequest) (*pkg.Image, error)

func (Effect) PreAuth added in v0.2.0

func (t Effect) PreAuth(ctx context.Context, providerContext layer.ProviderContext) (layer.ProviderContext, error)

type EffectConfig added in v0.2.0

type EffectConfig struct {
	Mode      string
	Intensity float64
	Provider  map[string]interface{}
}

type EffectRegistration added in v0.5.0

type EffectRegistration struct {
}

func (EffectRegistration) Initialize added in v0.5.0

func (s EffectRegistration) Initialize(cfgAny any, clientConfig config.ClientConfig, errorMessages config.ErrorMessages, layerGroup *layer.LayerGroup, datastores *datastore.DatastoreRegistry) (layer.Provider, error)

func (EffectRegistration) InitializeConfig added in v0.5.0

func (s EffectRegistration) InitializeConfig() any

func (EffectRegistration) Name added in v0.5.0

func (s EffectRegistration) Name() string

type Fail added in v0.8.0

type Fail struct {
	FailConfig
}

func (Fail) GenerateTile added in v0.8.0

func (t Fail) GenerateTile(_ context.Context, _ layer.ProviderContext, _ pkg.TileRequest) (*pkg.Image, error)

func (Fail) PreAuth added in v0.8.0

func (t Fail) PreAuth(_ context.Context, providerContext layer.ProviderContext) (layer.ProviderContext, error)

type FailConfig added in v0.8.0

type FailConfig struct {
	OnAuth  bool
	Message string
}

type FailRegistration added in v0.8.0

type FailRegistration struct {
}

func (FailRegistration) Initialize added in v0.8.0

func (FailRegistration) InitializeConfig added in v0.8.0

func (s FailRegistration) InitializeConfig() any

func (FailRegistration) Name added in v0.8.0

func (s FailRegistration) Name() string

type Fallback added in v0.2.0

type Fallback struct {
	FallbackConfig

	Primary   layer.Provider
	Secondary layer.Provider
	// contains filtered or unexported fields
}

func (Fallback) GenerateTile added in v0.2.0

func (t Fallback) GenerateTile(ctx context.Context, providerContext layer.ProviderContext, tileRequest pkg.TileRequest) (*pkg.Image, error)

func (Fallback) PreAuth added in v0.2.0

func (t Fallback) PreAuth(ctx context.Context, providerContext layer.ProviderContext) (layer.ProviderContext, error)

type FallbackConfig added in v0.2.0

type FallbackConfig struct {
	Primary   map[string]interface{}
	Secondary map[string]interface{}
	Zoom      string     // Only use Primary for requests in the given range of zoom levels
	Bounds    pkg.Bounds // Allows any tile that intersects these bounds
	Cache     CacheMode  // When to skip cache-ing (in fallback scenarios)
}

type FallbackRegistration added in v0.5.0

type FallbackRegistration struct {
}

func (FallbackRegistration) Initialize added in v0.5.0

func (s FallbackRegistration) Initialize(cfgAny any, clientConfig config.ClientConfig, errorMessages config.ErrorMessages, layerGroup *layer.LayerGroup, datastores *datastore.DatastoreRegistry) (layer.Provider, error)

func (FallbackRegistration) InitializeConfig added in v0.5.0

func (s FallbackRegistration) InitializeConfig() any

func (FallbackRegistration) Name added in v0.5.0

func (s FallbackRegistration) Name() string

type PostgisMvt added in v0.8.0

type PostgisMvt struct {
	PostgisMvtConfig
	// contains filtered or unexported fields
}

func (PostgisMvt) GenerateTile added in v0.8.0

func (t PostgisMvt) GenerateTile(ctx context.Context, _ layer.ProviderContext, req pkg.TileRequest) (*pkg.Image, error)

func (PostgisMvt) PreAuth added in v0.8.0

type PostgisMvtConfig added in v0.8.0

type PostgisMvtConfig struct {
	Layer      string
	Datastore  string
	Table      string
	Extent     uint16
	Buffer     float64
	GID        string
	Geometry   string
	Attributes []string
	Filter     string
	SourceSRID uint
	Limit      uint16
}

type PostgisMvtRegistration added in v0.8.0

type PostgisMvtRegistration struct {
}

func (PostgisMvtRegistration) Initialize added in v0.8.0

func (PostgisMvtRegistration) InitializeConfig added in v0.8.0

func (s PostgisMvtRegistration) InitializeConfig() any

func (PostgisMvtRegistration) Name added in v0.8.0

func (s PostgisMvtRegistration) Name() string

type Proxy

type Proxy struct {
	ProxyConfig
	// contains filtered or unexported fields
}

func (Proxy) GenerateTile

func (t Proxy) GenerateTile(ctx context.Context, _ layer.ProviderContext, tileRequest pkg.TileRequest) (*pkg.Image, error)

func (Proxy) PreAuth

type ProxyConfig added in v0.1.0

type ProxyConfig struct {
	URL     string
	InvertY bool // Used for TMS
	Srid    uint
}

type ProxyRegistration added in v0.5.0

type ProxyRegistration struct {
}

func (ProxyRegistration) Initialize added in v0.5.0

func (s ProxyRegistration) Initialize(cfgAny any, clientConfig config.ClientConfig, errorMessages config.ErrorMessages, _ *layer.LayerGroup, _ *datastore.DatastoreRegistry) (layer.Provider, error)

func (ProxyRegistration) InitializeConfig added in v0.5.0

func (s ProxyRegistration) InitializeConfig() any

func (ProxyRegistration) Name added in v0.5.0

func (s ProxyRegistration) Name() string

type Ref added in v0.5.0

type Ref struct {
	RefConfig
	// contains filtered or unexported fields
}

func (Ref) GenerateTile added in v0.5.0

func (t Ref) GenerateTile(ctx context.Context, _ layer.ProviderContext, tileRequest pkg.TileRequest) (*pkg.Image, error)

func (Ref) PreAuth added in v0.5.0

type RefConfig added in v0.5.0

type RefConfig struct {
	Layer string
}

type RefRegistration added in v0.5.0

type RefRegistration struct {
}

func (RefRegistration) Initialize added in v0.5.0

func (RefRegistration) InitializeConfig added in v0.5.0

func (s RefRegistration) InitializeConfig() any

func (RefRegistration) Name added in v0.5.0

func (s RefRegistration) Name() string

type SLogWriter added in v0.5.0

type SLogWriter struct {
	// contains filtered or unexported fields
}

func (SLogWriter) Write added in v0.5.0

func (w SLogWriter) Write(p []byte) (int, error)

TODO: look into some ways to buffer and decrease num of calls to slog

type Static added in v0.2.0

type Static struct {
	StaticConfig
	// contains filtered or unexported fields
}

func (Static) GenerateTile added in v0.2.0

func (t Static) GenerateTile(_ context.Context, _ layer.ProviderContext, _ pkg.TileRequest) (*pkg.Image, error)

func (Static) PreAuth added in v0.2.0

type StaticConfig added in v0.2.0

type StaticConfig struct {
	Image string
	Color string
}

type StaticRegistration added in v0.5.0

type StaticRegistration struct {
}

func (StaticRegistration) Initialize added in v0.5.0

func (StaticRegistration) InitializeConfig added in v0.5.0

func (s StaticRegistration) InitializeConfig() any

func (StaticRegistration) Name added in v0.5.0

func (s StaticRegistration) Name() string

type Transform added in v0.2.0

type Transform struct {
	TransformConfig
	// contains filtered or unexported fields
}

func (Transform) GenerateTile added in v0.2.0

func (t Transform) GenerateTile(ctx context.Context, providerContext layer.ProviderContext, tileRequest pkg.TileRequest) (*pkg.Image, error)

func (Transform) PreAuth added in v0.2.0

func (t Transform) PreAuth(ctx context.Context, providerContext layer.ProviderContext) (layer.ProviderContext, error)

type TransformConfig added in v0.2.0

type TransformConfig struct {
	Threads  int
	File     string
	Formula  string
	Provider map[string]interface{}
}

type TransformRegistration added in v0.5.0

type TransformRegistration struct {
}

func (TransformRegistration) Initialize added in v0.5.0

func (s TransformRegistration) Initialize(cfgAny any, clientConfig config.ClientConfig, errorMessages config.ErrorMessages, layerGroup *layer.LayerGroup, datastores *datastore.DatastoreRegistry) (layer.Provider, error)

func (TransformRegistration) InitializeConfig added in v0.5.0

func (s TransformRegistration) InitializeConfig() any

func (TransformRegistration) Name added in v0.5.0

func (s TransformRegistration) Name() string

type URLTemplate added in v0.5.0

type URLTemplate struct {
	URLTemplateConfig
	// contains filtered or unexported fields
}

func (URLTemplate) GenerateTile added in v0.5.0

func (t URLTemplate) GenerateTile(ctx context.Context, _ layer.ProviderContext, tileRequest pkg.TileRequest) (*pkg.Image, error)

func (URLTemplate) PreAuth added in v0.5.0

type URLTemplateConfig added in v0.5.0

type URLTemplateConfig struct {
	Template string
	Width    uint16
	Height   uint16
	Srid     uint
}

type URLTemplateRegistration added in v0.5.0

type URLTemplateRegistration struct {
}

func (URLTemplateRegistration) Initialize added in v0.5.0

func (s URLTemplateRegistration) Initialize(cfgAny any, clientConfig config.ClientConfig, errorMessages config.ErrorMessages, _ *layer.LayerGroup, _ *datastore.DatastoreRegistry) (layer.Provider, error)

func (URLTemplateRegistration) InitializeConfig added in v0.5.0

func (s URLTemplateRegistration) InitializeConfig() any

func (URLTemplateRegistration) Name added in v0.5.0

Jump to

Keyboard shortcuts

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