service

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2018 License: MIT Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImposmRepository

type ImposmRepository interface {
	FindNearbyTransportPoints(location Location, radius uint, distinct bool, transportTypes []string) ([]NearbyPoint, error)
	FindNearbyStreets(location Location, radius uint, distinct bool) ([]NearbyPoint, error)
}

type ImposmService

type ImposmService interface {
	FindNearbyTransportPoints(r *NearbyPointsSearchRequest) ([]NearbyPoint, error)
	FindNearbyStreets(r *NearbyPointsSearchRequest) ([]NearbyPoint, error)
}

type ImposmServiceImpl

type ImposmServiceImpl struct {
	Repository ImposmRepository
}

func NewImposmService

func NewImposmService(repository ImposmRepository) *ImposmServiceImpl

func (*ImposmServiceImpl) FindNearbyStreets

func (c *ImposmServiceImpl) FindNearbyStreets(r *NearbyPointsSearchRequest) ([]NearbyPoint, error)

func (*ImposmServiceImpl) FindNearbyTransportPoints

func (c *ImposmServiceImpl) FindNearbyTransportPoints(r *NearbyPointsSearchRequest) ([]NearbyPoint, error)

type Location

type Location struct {
	Lat float32 `json:"lat"`
	Lon float32 `json:"lon"`
}

type NearbyPoint

type NearbyPoint struct {
	OSMId     int     `json:"osmId"`
	Name      string  `json:"name"`
	PointType string  `json:"pointType,omitempty"`
	Distance  float32 `json:"distance"`
}

type NearbyPointsSearchRequest

type NearbyPointsSearchRequest struct {
	Location       Location `json:"location"`
	Radius         int      `json:"radius"`
	TransportTypes []string `json:"transportTypes"`
	Distinct       bool     `json:"distinct"`
}

type PostGISImposmRepository

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

func NewImposmRepository

func NewImposmRepository(db *sql.DB) *PostGISImposmRepository

func (*PostGISImposmRepository) FindNearbyStreets

func (r *PostGISImposmRepository) FindNearbyStreets(location Location, radius uint, distinct bool) ([]NearbyPoint, error)

func (*PostGISImposmRepository) FindNearbyTransportPoints

func (r *PostGISImposmRepository) FindNearbyTransportPoints(location Location, radius uint, distinct bool, transportTypes []string) ([]NearbyPoint, error)

Jump to

Keyboard shortcuts

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