browser

package
v7.0.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: BSD-3-Clause Imports: 57 Imported by: 0

Documentation

Index

Constants

View Source
const AuthenticatorURI string = "authenticator-uri"
View Source
const CORSAllowCredentialsDefault bool = false
View Source
const CORSAllowCredentialsFlag string = "cors-allow-credentials"
View Source
const CORSOriginFlag string = "cors-origin"
View Source
const CacheURIFlag string = "cache-uri"
View Source
const ConfigURIDefault string = ""
View Source
const ConfigURIFlag string = "config-uri"
View Source
const CustomChromeURIFlag string = "custom-chrome-uri"
View Source
const CustomEditPropertiesFlag string = "custom-edit-property"
View Source
const CustomEditValidationWasmDirDefault string = ""
View Source
const CustomEditValidationWasmDirFlag string = "custom-edit-validation-wasm-dir"
View Source
const CustomEditValidationWasmPathDefault string = ""
View Source
const CustomEditValidationWasmPathFlag string = "custom-edit-validation-wasm-path"
View Source
const DisableGeoJSONDefault bool = false
View Source
const DisableGeoJSONFlag string = "disable-geojson"
View Source
const DisableGeoJSONLDDefault bool = false
View Source
const DisableGeoJSONLDFlag string = "disable-geojsonld"
View Source
const DisableIdDefault bool = false
View Source
const DisableIdFlag string = "disable-id"
View Source
const DisableIndexDefault bool = false
View Source
const DisableIndexFlag string = "disable-index"
View Source
const DisableNavPlaceDefault bool = false
View Source
const DisableNavPlaceFlag string = "disable-navplace"
View Source
const DisablePNGDefault bool = false
View Source
const DisablePNGFlag string = "disable-png"
View Source
const DisableSPRDefault bool = false
View Source
const DisableSPRFlag string = "disable-spr"
View Source
const DisableSVGDefault bool = false
View Source
const DisableSVGFlag string = "disable-svg"
View Source
const DisableSearchDefault bool = false
View Source
const DisableSearchFlag string = "disable-search"
View Source
const DisableSelectDefault bool = false
View Source
const DisableSelectFlag string = "disable-select"
View Source
const DisableWebFingerDefault bool = false
View Source
const DisableWebFingerFlag string = "disable-webfinger"
View Source
const EnableAllFlag string = "enable-all"
View Source
const EnableCORSDefault bool = true
View Source
const EnableCORSFlag string = "enable-cors"
View Source
const EnableCustomEditValidationWasmDefault bool = false
View Source
const EnableCustomEditValidationWasmFlag string = "enable-custom-edit-validation-wasm"
View Source
const EnableDataFlag string = "enable-data"
View Source
const EnableEditAPIDefault bool = false
View Source
const EnableEditAPIFlag string = "enable-edit-api"
View Source
const EnableEditDefault bool = false
View Source
const EnableEditFlag string = "enable-edit"
View Source
const EnableEditUIDefault bool = false
View Source
const EnableEditUIFlag string = "enable-edit-ui"
View Source
const EnableGeoJSONFlag string = "enable-geojson"
View Source
const EnableGeoJSONLDFlag string = "enable-geojson-ld"
View Source
const EnableGraphicsFlag string = "enable-graphics"
View Source
const EnableHTMLDefault bool = false
View Source
const EnableHTMLFlag string = "enable-html"
View Source
const EnableIdDefault bool = true
View Source
const EnableIdFlag string = "enable-id"
View Source
const EnableIndexDefault bool = true
View Source
const EnableIndexFlag string = "enable-index"
View Source
const EnableNavPlaceFlag string = "enable-navplace"
View Source
const EnablePNGFlag string = "enable-png"
View Source
const EnablePointInPolygonAPIDefault bool = false
View Source
const EnablePointInPolygonAPIFlag string = "enable-point-in-polygon-api"
View Source
const EnablePointInPolygonDefault bool = false
View Source
const EnablePointInPolygonFlag string = "enable-point-in-polygon"
View Source
const EnableSPRFlag string = "enable-spr"
View Source
const EnableSVGFlag string = "enable-svg"
View Source
const EnableSearchAPIFlag string = "enable-search-api"
View Source
const EnableSearchAPIGeoJSONFlag string = "enable-search-api-geojson"
View Source
const EnableSearchFlag string = "enable-search"
View Source
const EnableSearchHTMLFlag string = "enable-search-html"
View Source
const EnableSelect string = "enable-select"
View Source
const EnableWebFingerFlag string = "enable-webfinger"
View Source
const ExporterURIFlag string = "exporter-uri"
View Source
const GitHubAccessTokenURIDefault string = ""
View Source
const GitHubAccessTokenURIFlag string = "github-accesstoken-uri"
View Source
const GitHubReaderAccessTokenURIDefault string = ""
View Source
const GitHubReaderAccessTokenURIFlag string = "github-reader-accesstoken-uri"
View Source
const GitHubWriterAccessTokenURIDefault string = ""
View Source
const GitHubWriterAccessTokenURIFlag string = "github-writer-accesstoken-uri"
View Source
const PathAPICessateFeatureDefault string = "/api/cessate/"
View Source
const PathAPICessateFeatureFlag string = "path-api-cessate-feature"
View Source
const PathAPICreateFeatureDefault string = "/api/create/"
View Source
const PathAPICreateFeatureFlag string = "path-api-create-feature"
View Source
const PathAPIDeprecateFeatureDefault string = "/api/deprecate/"
View Source
const PathAPIDeprecateFeatureFlag string = "path-api-deprecate-feature"
View Source
const PathAPIEditGeometryDefault string = "/api/geometry/"
View Source
const PathAPIEditGeometryFlag string = "path-api-edit-geometry"
View Source
const PathCreateFeatureDefault string = "/create/"
View Source
const PathCreateFeatureFlag string = "path-create-feature"
View Source
const PathEditGeometryDefault string = "/geometry/"
View Source
const PathEditGeometryFlag string = "path-edit-geometry"
View Source
const PathPingDefault string = "/ping"
View Source
const PathPingFlag string = "path-ping"
View Source
const PathPointInPolygonAPIDefault string = "/api/point-in-polygon"
View Source
const PathPointInPolygonAPIFlag string = "path-point-in-polygon-api"
View Source
const PathPointInPolygonDefault string = "/point-in-polygon"
View Source
const PathPointInPolygonFlag string = "path-point-in-polygon"
View Source
const PathSearchAPIDefault string = "/api/search/"
View Source
const PathSearchDefault string = "/search/"
View Source
const PlacetypesDefinitionURIDefault string = "whosonfirst://"
View Source
const PlacetypesDefinitionURIFlag string = "placetypes-definition-uri"
View Source
const PointInPolygonSkipPlacetypeFilterDefault bool = false
View Source
const PointInPolygonSkipPlacetypeFilterFlag string = "point-in-polygon-skip-placetype-filter"
View Source
const ReaderURIFlag string = "reader-uri"
View Source
const SearchDatabaseURIDefault string = "null://"
View Source
const SearchDatabaseURIFlag string = "search-database-uri"
View Source
const SelectPatternFlag string = "select-pattern"
View Source
const ServerURIFlag string = "server-uri"
View Source
const SpatialDatabaseURIFlag string = "spatial-database-uri"
View Source
const StaticPrefixFlag string = "static-prefix"
View Source
const VerboseDefault bool = false
View Source
const VerboseFlag string = "verbose"
View Source
const WebFingerHostname string = "webfinger-hostname"
View Source
const WriterURIFlag string = "writer-uri"

Variables

This section is empty.

Functions

func DefaultFlagSet

func DefaultFlagSet(ctx context.Context) (*flag.FlagSet, error)

DefaultFlagSet returns a `flag.FlagSet` instance with flags and defaults values assigned for use with `app`.

func Run

func Run(ctx context.Context, run_logger *log.Logger) error

func RunWithFlagSet

func RunWithFlagSet(ctx context.Context, fs *flag.FlagSet, logger *log.Logger) error

func RunWithOptions

func RunWithOptions(ctx context.Context, opts *RunOptions) error

Types

type AssetHandlerFunc

type AssetHandlerFunc func(*http.ServeMux, string) error

type Config

type Config struct {
	AuthenticatorURI               string   `json:"authenticator_uri"`
	CacheURI                       string   `json:"cache_uri"`
	CORSOrigins                    []string `json:"cors_origins,omitempty"`
	CORSAllowCredentials           bool     `json:"cors_allow_credentials,omitempty"`
	CustomChromeURI                string   `json:"custom_chrome_uri,omitempty"`
	CustomEditProperties           []string `json:"custom_edit_properties,omitempty"`
	CustomEditValidationWasmDir    string   `json:"custom_edit_validation_wasm_dir"`
	CustomEditValidationWasmPath   string   `json:"custom_edit_validation_wasm_path"`
	DisableGeoJSON                 bool     `json:"disable_geojson,omitempty"`
	DisableGeoJSONLD               bool     `json:"disable_geojsonld,omitempty"`
	DisableId                      bool     `json:"disable_id,omitempty"`
	DisableIndex                   bool     `json:"disable_index,omitempty"`
	DisableNavPlace                bool     `json:"disable_navplace,omitempty"`
	DisablePNG                     bool     `json:"disable_png,omitempty"`
	DisableSearch                  bool     `json:"disable_search,omitempty"`
	DisableSelect                  bool     `json:"disable_select"`
	DisableSPR                     bool     `json:"disable_spr"`
	DisableSVG                     bool     `json:"disable_svg,omitempty"`
	DisableWebFinger               bool     `json:"disable_webfinger"`
	EnableAll                      bool     `json:"enable_all,omitempty"`
	EnableCORS                     bool     `json:"enable_cors,omitempty"`
	EnableCustomEditValidationWasm bool     `json:"enable_custom_edit_validation_wasm"`
	EnableData                     bool     `json:"enable_data,omitempty"`
	EnableEdit                     bool     `json:"enable_edit,omitempty"`
	EnableEditAPI                  bool     `json:"enable_edit_api,omitempty"`
	EnableEditUI                   bool     `json:"enable_edit_ui,omitempty"`
	EnableGeoJSON                  bool     `json:"enable_geojson,omitempty"`
	EnableGeoJSONLD                bool     `json:"enable_geojsonld,omitempty"`
	EnableGraphics                 bool     `json:"enable_graphics"`
	EnableHTML                     bool     `json:"enable_html,omitempty"`
	EnableId                       bool     `json:"enable_id,omitempty"`
	EnableIndex                    bool     `json:"enable_index,omitempty"`
	EnableNavPlace                 bool     `json:"enable_navplace,omitempty"`
	EnablePointInPolygon           bool     `json:"enable_point_in_polygon,omitempty"`
	EnablePointInPolygonAPI        bool     `json:"enable_point_in_polygon_api,omitempty"`
	EnablePNG                      bool     `json:"enable_png,omitempty"`
	EnableSearch                   bool     `json:"enable_search,omitempty"`
	EnableSearchAPI                bool     `json:"enable_search_api,omitempty"`
	EnableSelect                   bool     `json:"enable_select,omitempty"`
	EnableSPR                      bool     `json:"enable_spr,omitempty"`
	EnableSVG                      bool     `json:"enable_svg,omitempty"`
	EnableWebFinger                bool     `json:"enable_webfinger,omitempty"`
	// A valid whosonfirst/go-whosonfirst-export/v2 URI used to export feature records that are updated.
	ExporterURI                string   `json:"exporter_uri,omitempty"`
	JavaScriptAtEOF            bool     `json:"javascript_at_eof"`
	GitHubAccessTokenURI       string   `json:"github_accesstoken_uri,omitempty"`
	GitHubReaderAccessTokenURI string   `json:"github_reader_accesstoken_uri,omitempty"`
	GitHubWriterAccessTokenURI string   `json:"github_writer_accesstoken_uri,omitempty"`
	MapProviderURI             string   `json:"map_provider_uri"`
	NavPlaceMaxFeatures        int      `json:"navplace_max_features,omitempty"`
	PathCreateFeature          string   `json:"path_create_feature,omitempty"`
	PathCreateFeatureAPI       string   `json:"path_create_feature_api,omitempty"`
	PathCessateFeatureAPI      string   `json:"path_cessate_feature_api,omitempty"`
	PathDeprecateFeatureAPI    string   `json:"path_deprecate_feature_api,omitempty"`
	PathEditGeometry           string   `json:"path_edit_geometry,omitempty"`
	PathEditGeometryAPI        string   `json:"path_edit_geometry_api,omitempty"`
	PathGeoJSON                string   `json:"path_geojson,omitempty"`
	PathGeoJSONAlt             []string `json:"path_geojson_alt,omitempty"`
	PathGeoJSONLD              string   `json:"path_geojsonld,omitempty"`
	PathGeoJSONLDAlt           []string `json:"path_geojsonld_alt,omitempty"`
	PathIndex                  string   `json:"path_index,omitempty"`
	PathId                     string   `json:"path_id,omitempty"`
	PathNavPlace               string   `json:"path_navplace,omitempty"`
	PathNavPlaceAlt            []string `json:"path_navplace_alt,omitempty"`
	PathPing                   string   `json:"path_ping,omitempty"`
	PathPNG                    string   `json:"path_png,omitempty"`
	PathPNGAlt                 []string `json:"path_png_alt,omitempty"`
	PathPointInPolygon         string   `json:"path_point_in_polygon,omitempty"`
	PathPointInPolygonAPI      string   `json:"path_point_in_polygon_api,omitempty"`
	PathSearch                 string   `json:"path_search,omitempty"`
	PathSearchAPI              string   `json:"path_search_api,omitempty"`
	PathSelect                 string   `json:"path_select,omitempty"`
	PathSelectAlt              []string `json:"path_select_alt,omitempty"`
	PathSPR                    string   `json:"path_spr,omitempty"`
	PathSPRAlt                 []string `json:"path_spr,omitempty"`
	PathSVG                    string   `json:"path_svg,omitempty"`
	PathSVGAlt                 []string `json:"path_svg_alt,omitempty"`
	PathWebFinger              string   `json:"path_webfinger,omitempty"`
	PathWebFingerAlt           []string `json:"path_webfinger_alt,omitempty"`
	PlacetypesDefinitionURI    string   `json:"placetypes_definition_uri,omitempty"`
	// An optional boolean flag signaling that the point-in-polygon hierarchy resolver should skip placetype filters. If
	// true it is expected that your code will deal with that as needed elsewhere.
	PointInPolygonSkipPlacetypeFilter bool `json:"point_in_polygon_skip_placetype_filter"`
	// One or more valid whosonfirst/go-reader URIs
	ReaderURIs []string `json:"reader_uris"`
	// An optional boolean flag signaling whether JavaScript and CSS assets should be combined and minified.
	RollupAssets      bool   `json:"rollup_assets"`
	SearchDatabaseURI string `json:"search_database_uri,omitempty"`
	SelectPattern     string `json:"select_pattern,omitempty"`
	// A valid aaronland/go-http-server URI
	ServerURI string `json:"server_uri"`
	// A valid whosonfirst/go-whosonfirst-spatial.Database URI
	SpatialDatabaseURI string `json:"spatial_database_uri,omitempty"`
	URIPrefix          string `json:"uri_prefix,omitempty"`
	// Enable verbose logging
	Verbose bool `json:"verbose,omitempty"`
	// The hostname to use for WebFinger output
	WebFingerHostname string `json:"webfinger_hostname,omitempty"`
	// One or more valid whosonfirst/go-writer/v3 URIs
	WriterURIs []string `json:"writer_uris,omitempty"`
	Templates  []fs.FS  `json:"templates,omitempty"`
}

func ConfigFromFlagSet

func ConfigFromFlagSet(ctx context.Context, fs *flag.FlagSet) (*Config, error)

type MiddlewareHandlerFunc

type MiddlewareHandlerFunc func(http.Handler) http.Handler

type PointInPolygonOptions

type PointInPolygonOptions struct {
	ResultsCallback          wof_hierarchy.PointInPolygonHierarchyResolverUpdateCallback
	UpdateCallback           wof_hierarchy.PointInPolygonHierarchyResolverUpdateCallback
	ToCopyFromParentOnUpdate []string
}

type RunOptions

type RunOptions struct {
	Logger    *log.Logger
	Config    *Config
	Templates []fs.FS

	CustomURIs              map[string]string
	CustomChrome            chrome.Chrome
	CustomRouteHandlerFuncs map[string]handler.RouteHandlerFunc
	// CustomMiddlewareHandlers    map[string][]MiddlewareHandlerFunc
	CustomAssetHandlerFunctions []AssetHandlerFunc
	CustomEditProperties        []properties.CustomProperty
	CustomEditValidationFunc    custom.CustomValidationFunc
	CustomEditValidationWasm    *custom.CustomValidationWasm
	PointInPolygonOptions       *PointInPolygonOptions
}

Jump to

Keyboard shortcuts

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