locationhistory

package
v0.0.0-...-5eac7db Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Activity

type Activity struct {
	ActivityType ActivityType `json:"activityType"`
	Probability  float64      `json:"probability"`
}

type ActivityLocation

type ActivityLocation struct {
	LatitudeE7  LL_E7      `json:"latitudeE7"`
	LongitudeE7 LL_E7      `json:"longitudeE7"`
	SourceInfo  SourceInfo `json:"sourceInfo"`
}

type ActivitySegment

type ActivitySegment struct {
	StartLocation ActivityLocation `json:"startLocation"`
	EndLocation   ActivityLocation `json:"endLocation"`
	Duration      Duration         `json:"duration"`
	Distance      int32            `json:"distance"`
	ActivityType  ActivityType     `json:"activityType"`
	Confidence    ConfidenceType   `json:"confidence"`
	Activities    []Activity       `json:"activities"`
	WaypointPath  Waypoints        `json:"waypointPath"`
}

type ActivityType

type ActivityType string
const (
	ActivityType_WALKING              ActivityType = "WALKING"
	ActivityType_STILL                ActivityType = "STILL"
	ActivityType_IN_PASSENGER_VEHICLE ActivityType = "IN_PASSENGER_VEHICLE"
	ActivityType_CYCLING              ActivityType = "CYCLING"
	ActivityType_RUNNING              ActivityType = "RUNNING"
	ActivityType_MOTORCYCLING         ActivityType = "MOTORCYCLING"
	ActivityType_IN_BUS               ActivityType = "IN_BUS"
	ActivityType_IN_FERRY             ActivityType = "IN_FERRY"
	ActivityType_IN_SUBWAY            ActivityType = "IN_SUBWAY"
	ActivityType_FLYING               ActivityType = "FLYING"
	ActivityType_IN_TRAIN             ActivityType = "IN_TRAIN"
	ActivityType_IN_TRAM              ActivityType = "IN_TRAM"
	ActivityType_SKIING               ActivityType = "SKIING"
	ActivityType_SAILING              ActivityType = "SAILING"
	ActivityType_IN_VEHICLE           ActivityType = "IN_VEHICLE"
)

type ConfidenceType

type ConfidenceType string
const (
	ConfidenceType_LOW    ConfidenceType = "LOW"
	ConfidenceType_MEDIUM ConfidenceType = "MEDIUM"
	ConfidenceType_HIGH   ConfidenceType = "HIGH"
)

type Duration

type Duration struct {
	StartTimestampMs uint64 `json:"startTimestampMs,string"`
	EndTimestampMs   uint64 `json:"endTimestampMs,string"`
}

type EditConfirmationStatus

type EditConfirmationStatus string
const (
	EditConfirmationStatus_DONE EditConfirmationStatus = "CONFIRMED"
	EditConfirmationStatus_NOT  EditConfirmationStatus = "NOT_CONFIRMED"
)

type LL_E7

type LL_E7 int32

type MoveRepository

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

func NewMoveRepository

func NewMoveRepository(db *dynamodb.DB) *MoveRepository

func (*MoveRepository) GetWithSinceAndUntil

func (r *MoveRepository) GetWithSinceAndUntil(ctx context.Context, userID, since, until string) ([]*ActivitySegment, error)

func (*MoveRepository) Save

func (r *MoveRepository) Save(ctx context.Context, userID string, act *ActivitySegment) error

type PlaceConfidence

type PlaceConfidence string
const (
	PlaceConfidence_HIGH   PlaceConfidence = "HIGH_CONFIDENCE"
	PlaceConfidence_MEDIUM PlaceConfidence = "MEDIUM_CONFIDENCE"
	PlaceConfidence_LOW    PlaceConfidence = "LOW_CONFIDENCE"
	PlaceConfidence_USER   PlaceConfidence = "USER_CONFIRMED"
)

type PlaceLocation

type PlaceLocation struct {
	LatitudeE7         LL_E7        `json:"latitudeE7"`
	LongitudeE7        LL_E7        `json:"longitudeE7"`
	PlaceID            string       `json:"placeId"`
	Address            string       `json:"address"`
	Name               string       `json:"name"`
	SemanticType       SemanticType `json:"semanticType"`
	SourceInfo         SourceInfo   `json:"sourceInfo"`
	LocationConfidence float64      `json:"locationConfidence"`
}

type PlaceVisit

type PlaceVisit struct {
	Location                PlaceLocation          `json:"location"`
	Duration                Duration               `json:"duration"`
	PlaceConfidence         PlaceConfidence        `json:"placeConfidence"`
	CenterLatE7             LL_E7                  `json:"centerLatE7"`
	CenterLngE7             LL_E7                  `json:"centerLngE7"`
	VisitConfidence         int                    `json:"visitConfidence"`
	EditConfirmationStatus  EditConfirmationStatus `json:"editConfirmationStatus"`
	OtherCandidateLocations []PlaceLocation        `json:"otherCandidateLocations"`
}

type SemanticLocationHistory

type SemanticLocationHistory struct {
	TimelineObjects []TimelineObject `json:"timelineObjects"`
	// contains filtered or unexported fields
}

func (*SemanticLocationHistory) GetActivitySegment

func (hist *SemanticLocationHistory) GetActivitySegment() []*ActivitySegment

func (*SemanticLocationHistory) GetPlaceVisits

func (hist *SemanticLocationHistory) GetPlaceVisits() []*PlaceVisit

type SemanticType

type SemanticType string
const (
	SemanticType_HOME             SemanticType = "TYPE_HOME"
	SemanticType_WORK             SemanticType = "TYPE_WORK"
	SemanticType_SEARCHED_ADDRESS SemanticType = "TYPE_SEARCHED_ADDRESS"
)

type SourceInfo

type SourceInfo struct {
	DeviceTag int32 `json:"deviceTag"`
}

type TimelineObject

type TimelineObject struct {
	PlaceVisit      *PlaceVisit      `json:"placeVisit"`
	ActivitySegment *ActivitySegment `json:"activitySegment"`
}

func (TimelineObject) Type

type TimelineObjectType

type TimelineObjectType reflect.Type
var (
	TimelineObjectType_PLACE_VISIT      TimelineObjectType = reflect.TypeOf(PlaceVisit{})
	TimelineObjectType_ACTIVITY_SEGMENT TimelineObjectType = reflect.TypeOf(ActivitySegment{})
)

type VisitRepository

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

func NewVisitRepository

func NewVisitRepository(db *dynamodb.DB) *VisitRepository

func (*VisitRepository) Save

func (r *VisitRepository) Save(ctx context.Context, userID string, vis *PlaceVisit) error

type Waypoint

type Waypoint struct {
	LatE7 LL_E7 `json:"latE7"`
	LngE7 LL_E7 `json:"lngE7"`
}

type Waypoints

type Waypoints struct {
	Waypoints []Waypoint `json:"waypoints"`
}

Jump to

Keyboard shortcuts

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