Documentation ¶
Overview ¶
Package runnerup provides commands to work with DB exported from RunnerUp app.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Activity ¶
type Activity struct { ID int `db:"_id"` StartTime TimeStamp `db:"start_time"` Distance float64 `db:"distance"` Time Seconds `db:"time"` Type ActivityType `db:"type"` }
Activity is a DB row that may own multiple items of Location..
type ActivityType ¶
type ActivityType int
ActivityType describes what was happening during tracking.
type Location ¶
type Location struct { ID int `db:"_id"` ActivityID int `db:"activity_id"` Time MSTimeStamp `db:"time"` Lon float64 `db:"longitude"` Lat float64 `db:"latitude"` Alt float64 `db:"altitude"` Accuracy float64 `db:"accurancy"` Speed float64 `db:"speed"` Bearing *float64 `db:"bearing"` Satellites int `db:"satellites"` }
Location is a DB row that holds GPS point, owned by Activity.
type MSTimeStamp ¶
type MSTimeStamp int
MSTimeStamp is a UNIX timestamp in milliseconds.
func (MSTimeStamp) String ¶
func (t MSTimeStamp) String() string
String returns time stamp in RFC 3339 format.
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
Repository provides access to DB entities.
func NewRepository ¶
func NewRepository(dbFile string) (*Repository, error)
NewRepository creates a new Repository.
func (*Repository) Close ¶
func (r *Repository) Close() error
Close closes underlying DB connection.
func (*Repository) ListActivities ¶
ListActivities returns latest Activity list.
func (*Repository) ListLocations ¶
ListLocations returns all Location points for an Activity ID.
Click to show internal directories.
Click to hide internal directories.