apifeedsearch

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FeedsearchFilterToFeedIDs

func FeedsearchFilterToFeedIDs(m *apptypes.MobsqlRuntime, filter *FeedsearchFilter) ([]int, error)

FeedsearchFilterToFeedIDs translates the input search filter into an array of feed ids by querying the internal view _vfeedsmetadata which is based on _mdb (which represents an import of the Mobility Database catalog).

Types

type FeedsearchFilter

type FeedsearchFilter struct {
	FeedID       []int       `json:"feed_id,omitempty"`      // Any of mdbid match
	Country      string      `json:"country,omitempty"`      // Country match
	Municipality string      `json:"municipality,omitempty"` // Municipality match
	Subdivision  string      `json:"subdivision,omitempty"`  // Subdivision match
	Provider     string      `json:"provider,omitempty"`     // Provider match
	Name         string      `json:"name,omitempty"`         // Name match
	Status       string      `json:"status,omitempty"`       // Status match
	Glob         string      `json:"glob,omitempty"`         // Glob match (Country, Municipality, Subdivision, Provider, Name, FeedID)
	Coords       [][]float64 `json:"coords,omitempty"`       // Coordinate match (expected at [lat,lon]) within bounding box
	MaxKM        float64     `json:"maxkm,omitempty"`        // Max kilometers match (e.g. bounding box must be smaller then)
	Loaded       *bool       `json:"loaded,omitempty"`       // Loaded match (e.g. true/false or nil for both loaded & not loaded)
	Computed     *bool       `json:"computed,omitempty"`     // Computed match (e.g. true/false or nil for both computed & not computed)
}

FeedsearchFilter represents a 'filter' that ultimately acts as a search mechanism to determine feed IDs to use. This is a flexibly way of querying the MobilityDatabase's catalog for potential feed ids (MDBIDs) to use.

Jump to

Keyboard shortcuts

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