Documentation
¶
Index ¶
- func New(db *gorm.DB) provider.Provider
- type Action
- type ActionProductAssoc
- type ActivityPathPoint
- type ActivitySegment
- type ActivityTypeCandidate
- type CandidateLocation
- type Detail
- type LocationActivity
- type LocationActivityType
- type LocationActivityTypeCandidate
- type LocationHistoryItem
- type LocationInfo
- type PlacePathPoint
- type PlaceVisit
- type Product
- type Subtitle
- type TransitStop
- type Waypoint
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Action ¶
type Action struct {
gorm.Model
Header string `json:"header" gorm:"uniqueIndex:google_activity_key"`
Title string `json:"title" gorm:"uniqueIndex:google_activity_key"`
TitleURL string `json:"titleUrl"`
Type string // Directory of the activity file. Such as "Google Analytics" and "Search".
Time types.DateTime `json:"time" gorm:"uniqueIndex:google_activity_key"`
Products []Product `json:"products" gorm:"many2many:google_activity_products_assoc"`
LocationInfos []LocationInfo `json:"locationInfos"`
Subtitles []Subtitle `json:"subtitles"`
Details []Detail `json:"details"`
}
type ActionProductAssoc ¶
type ActionProductAssoc struct {
ActionID int `gorm:"primaryKey;not null"`
ProductID int `gorm:"primaryKey;not null"`
}
func (ActionProductAssoc) TableName ¶
func (ActionProductAssoc) TableName() string
type ActivityPathPoint ¶
type ActivityPathPoint struct {
gorm.Model
ActivitySegment ActivitySegment
ActivitySegmentID int
AccuracyMeters int `json:"accuracyMeters"`
LatE7 int `json:"latE7"`
LngE7 int `json:"lngE7"`
Time types.DateTime `json:"timestampMs"`
}
func (ActivityPathPoint) TableName ¶
func (ActivityPathPoint) TableName() string
type ActivitySegment ¶
type ActivitySegment struct {
gorm.Model
Activities []ActivityTypeCandidate `json:"activities"`
ActivityType string `json:"activityType"`
Confidence string `json:"confidence"`
Distance int `json:"distance"`
DurationEndTimestampMs types.DateTime `gorm:"uniqueIndex:google_activity_segments_key"`
DurationStartTimestampMs types.DateTime `gorm:"uniqueIndex:google_activity_segments_key"`
EndLocationLatitudeE7 int
EndLocationLongitudeE7 int
ParkingEventLocationAccuracyMetres int
ParkingEventLocationLatitudeE7 int
ParkingEventLocationLongitudeE7 int
ParkingEventTimestampMs types.DateTime
SimplifiedRawPathPoints []ActivityPathPoint
StartLocationLatitudeE7 int
StartLocationLongitudeE7 int
TransitPathHexRgbColor string
TransitPathName string
TransitStops []TransitStop
Waypoints []Waypoint
}
func (ActivitySegment) Conditions ¶
func (s ActivitySegment) Conditions() map[string]interface{}
func (ActivitySegment) TableName ¶
func (ActivitySegment) TableName() string
func (*ActivitySegment) UnmarshalJSON ¶
func (s *ActivitySegment) UnmarshalJSON(b []byte) error
type ActivityTypeCandidate ¶
type ActivityTypeCandidate struct {
gorm.Model
ActivitySegment ActivitySegment
ActivitySegmentID int
ActivityType string `json:"activityType"`
Probability float64 `json:"probability"`
}
func (ActivityTypeCandidate) TableName ¶
func (ActivityTypeCandidate) TableName() string
type CandidateLocation ¶
type CandidateLocation struct {
gorm.Model
PlaceVisit PlaceVisit
PlaceVisitID int
LatitudeE7 int `json:"latitudeE7"`
LocationConfidence float64 `json:"locationConfidence"`
LongitudeE7 int `json:"longitudeE7"`
PlaceID string `json:"placeId"`
}
func (CandidateLocation) TableName ¶
func (CandidateLocation) TableName() string
type LocationActivity ¶
type LocationActivity struct {
gorm.Model
LocationHistoryItemID int
LocationHistoryItem LocationHistoryItem
TypeCandidates []LocationActivityTypeCandidate `json:"activity"`
Time types.DateTime `json:"timestampMs"`
}
func (LocationActivity) TableName ¶
func (LocationActivity) TableName() string
type LocationActivityType ¶
type LocationActivityType string
const ( LocationActivityExitingVehicle LocationActivityType = "EXITING_VEHICLE" LocationActivityInRailVehicle LocationActivityType = "IN_RAIL_VEHICLE" LocationActivityInRoadVehicle LocationActivityType = "IN_ROAD_VEHICLE" LocationActivityInVehicle LocationActivityType = "IN_VEHICLE" LocationActivityOnBicycle LocationActivityType = "ON_BICYCLE" LocationActivityOnFoot LocationActivityType = "ON_FOOT" LocationActivityRunning LocationActivityType = "RUNNING" LocationActivityStill LocationActivityType = "STILL" LocationActivityTilting LocationActivityType = "TILTING" LocationActivityUnknown LocationActivityType = "UNKNOWN" LocationActivityWalking LocationActivityType = "WALKING" )
type LocationActivityTypeCandidate ¶
type LocationActivityTypeCandidate struct {
gorm.Model
LocationActivityID int
LocationActivity LocationActivity
Confidence int `json:"confidence"`
Type LocationActivityType `json:"type"`
}
func (LocationActivityTypeCandidate) TableName ¶
func (LocationActivityTypeCandidate) TableName() string
type LocationHistoryItem ¶
type LocationHistoryItem struct {
gorm.Model
Accuracy int `json:"accuracy"`
Activities []LocationActivity `json:"activity"`
Altitude int `json:"altitude"`
Heading int `json:"heading"`
LatitudeE7 int `json:"latitudeE7" gorm:"uniqueIndex:google_location_history_key"`
LongitudeE7 int `json:"longitudeE7" gorm:"uniqueIndex:google_location_history_key"`
Time types.DateTime `json:"timestampMs" gorm:"uniqueIndex:google_location_history_key"`
Velocity int `json:"velocity"`
VerticalAccuracy int `json:"verticalAccuracy"`
}
func (LocationHistoryItem) TableName ¶
func (LocationHistoryItem) TableName() string
type LocationInfo ¶
type LocationInfo struct {
gorm.Model
ActionID int
Action Action
Name string `json:"name"`
URL string `json:"url" `
Source string `json:"source"`
SourceURL string `json:"sourceUrl"`
}
func (LocationInfo) TableName ¶
func (LocationInfo) TableName() string
type PlacePathPoint ¶
type PlacePathPoint struct {
gorm.Model
PlaceVisit PlaceVisit
PlaceVisitID int
AccuracyMeters int `json:"accuracyMeters"`
LatE7 int `json:"latE7"`
LngE7 int `json:"lngE7"`
Time types.DateTime `json:"timestampMs"`
}
func (PlacePathPoint) TableName ¶
func (PlacePathPoint) TableName() string
type PlaceVisit ¶
type PlaceVisit struct {
gorm.Model
CenterLatE7 int `json:"centerLatE7" gorm:"uniqueIndex:google_place_visits_key"`
CenterLngE7 int `json:"centerLngE7" gorm:"uniqueIndex:google_place_visits_key"`
DurationEndTimestampMs types.DateTime `gorm:"uniqueIndex:google_place_visits_key"`
DurationStartTimestampMs types.DateTime `gorm:"uniqueIndex:google_place_visits_key"`
EditConfirmationStatus string
LocationAddress string
LocationLatitudeE7 int
LocationLocationConfidence float64
LocationLongitudeE7 int
LocationName string
LocationPlaceID string `gorm:"uniqueIndex:google_place_visits_key"`
LocationSourceInfoDeviceTag int
OtherCandidateLocations []CandidateLocation
PlaceConfidence string `json:"placeConfidence"`
VisitConfidence int `json:"visitConfidence"`
SimplifiedRawPathPoints []PlacePathPoint // only for top level (no parent_id)
ChildVisits []*PlaceVisit `json:"childVisits"`
PlaceVisit *PlaceVisit
PlaceVisitID int
}
func (PlaceVisit) Conditions ¶
func (p PlaceVisit) Conditions() map[string]interface{}
func (PlaceVisit) TableName ¶
func (PlaceVisit) TableName() string
func (*PlaceVisit) UnmarshalJSON ¶
func (p *PlaceVisit) UnmarshalJSON(b []byte) error
type Product ¶
func (*Product) UnmarshalJSON ¶
type Subtitle ¶
type TransitStop ¶
type TransitStop struct {
gorm.Model
ActivitySegment ActivitySegment
ActivitySegmentID int
LatitudeE7 int `json:"latitudeE7"`
LongitudeE7 int `json:"longitudeE7"`
Name string `json:"name"`
PlaceID string `json:"placeId"`
}
func (TransitStop) TableName ¶
func (TransitStop) TableName() string
Click to show internal directories.
Click to hide internal directories.