Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeviceSensorProvider ¶
type DeviceSensorProvider struct {
// contains filtered or unexported fields
}
DeviceSensorProvider is responsible for retrieving location data from a GPS device connected via serial port.
func NewDeviceSensorProvider ¶
func NewDeviceSensorProvider(port string, baudRate int) *DeviceSensorProvider
NewDeviceSensorProvider creates a new instance of DeviceSensorProvider with the specified port and baud rate.
func (*DeviceSensorProvider) GetLocation ¶
func (d *DeviceSensorProvider) GetLocation() (Location, error)
GetLocation reads GPS data from the device and returns the device's location.
type GoogleGeolocationProvider ¶
type GoogleGeolocationProvider struct {
// contains filtered or unexported fields
}
GoogleGeolocationProvider uses the Google Maps API to get location data.
func NewGoogleGeolocationProvider ¶
func NewGoogleGeolocationProvider(apiKey string) (*GoogleGeolocationProvider, error)
NewGoogleGeolocationProvider creates a new GoogleGeolocationProvider instance.
func (*GoogleGeolocationProvider) GetLocation ¶
func (g *GoogleGeolocationProvider) GetLocation() (Location, error)
GetLocation retrieves the device's location using Google Maps Geolocation API.
Click to show internal directories.
Click to hide internal directories.