Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoRecordsWithLocaiton = errors.New("no records with location")
)
Functions ¶
This section is empty.
Types ¶
type ActivityBounds ¶
type ActivityBounds struct { LatMin float64 `json:"latMin"` // between -90 (south pole) and +90 (north pole) LatMax float64 `json:"latMax"` // between -90 (south pole) and +90 (north pole) LongMin float64 `json:"longMin"` // between -180 and +180 LongMax float64 `json:"longMax"` // between -180 and +180 }
func ActivityBoundsFromFitActivity ¶
func ActivityBoundsFromFitActivity(activity *fit.ActivityFile) (*ActivityBounds, error)
type FitFile ¶
type FitFile struct { *FitFileSummary `json:"summary"` Records []*Record `json:"records"` *ActivityBounds `json:"activityBounds"` }
func NewFitFile ¶
type FitFileSummary ¶
type FitFileSummary struct { Name string `json:"name"` Hash Hash `json:"hash"` StartTime time.Time `json:"startTime"` EndTime time.Time `json:"endTime"` DeviceManufacturer string `json:"deviceManufacturer"` DeviceProduct string `json:"deviceProduct"` TotalDistance float64 `json:"totalDistance"` ActivityBounds *ActivityBounds `json:"activityBounds"` NearbyObjects []*GeographicMapElement `json:"nearbyObjects"` }
FitFileSummary is a summary of a fit file
func NewFitFileSummary ¶
func NewFitFileSummary(name string, hash Hash, startTime, endTime time.Time, deviceManufacturer, deviceProduct string, totalDistance float64, activityBounds *ActivityBounds, nearbyObjects []*GeographicMapElement) *FitFileSummary
NewFitFileSummary creates a new FitFileSummary
func NewFitFileSummaryFromReader ¶
func NewFitFileSummaryFromReader(name string, hash Hash, reader io.Reader, nearbyObjectsFetcher NearbyObjectsFetcher) (*FitFileSummary, error)
type GeographicMapElement ¶
type Lap ¶
type Lap struct { StartTimestamp time.Time `json:"startTimestamp"` EndTimestamp time.Time `json:"endTimestamp"` DistanceInLapMetres int `json:"distanceInLapMetres"` CumulativeDistanceMetres int `json:"cumulativeDistanceMetres"` StartAltitude int `json:"startAltitude"` EndAltitude int `json:"endAltitude"` }
type NearbyObjectsFetcher ¶
type NearbyObjectsFetcher interface {
Fetch(activity *ActivityBounds) ([]*GeographicMapElement, error)
}
Click to show internal directories.
Click to hide internal directories.