model

package
v0.0.0-...-ff1f24d Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2015 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Unset    = RelationshipState("")
	Pending  = RelationshipState("pending")
	Accepted = RelationshipState("accepted")
	Blocked  = RelationshipState("blocked")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Activity

type Activity struct {
	Id                 ActivityId       `json:"id"`
	Name               string           `json:"name"`
	Athlete            *Athlete         `json:"athlete"`
	StartDate          time.Time        `json:"start_date"`
	StartDateLocal     time.Time        `json:"start_date_local"`
	Timezone           string           `json:"timezone"`
	MovingTime         uint32           `json:"moving_time"`          // Seconds
	ElapsedTime        uint32           `json:"elapsed_time"`         // Seconds
	Distance           float32          `json:"distance"`             // Meters
	TotalElevationGain float32          `json:"total_elevation_gain"` // Meters
	AverageSpeed       float32          `json:"average_speed"`        // Meters/sec
	MaxSpeed           float32          `json:"max_speed"`            // Meters/sec
	SegmentEfforts     []*SegmentEffort `json:"segment_efforts"`
}

type ActivityId

type ActivityId uint64

type ActivitySummary

type ActivitySummary struct {
	Id                 ActivityId `json:"id"`
	Name               string     `json:"name"`
	Athlete            *Athlete   `json:"athlete"`
	StartDate          time.Time  `json:"start_date"`
	StartDateLocal     time.Time  `json:"start_date_local"`
	Timezone           string     `json:"timezone"`
	MovingTime         uint32     `json:"moving_time"`          // Seconds
	ElapsedTime        uint32     `json:"elapsed_time"`         // Seconds
	Distance           float32    `json:"distance"`             // Meters
	TotalElevationGain float32    `json:"total_elevation_gain"` // Meters
	AverageSpeed       float32    `json:"average_speed"`        // Meters/sec
	MaxSpeed           float32    `json:"max_speed"`            // Meters/sec
}

type Athlete

type Athlete struct {
	Id        AthleteId         `json:"id"`
	FirstName string            `json:"firstname"`
	LastName  string            `json:"lastname"`
	Friend    RelationshipState `json:"friend"`
	Follower  RelationshipState `json:"follower"`
}

type AthleteId

type AthleteId int64

type RelationshipState

type RelationshipState string

type Segment

type Segment struct {
	Id            SegmentId `json:"id"`
	Name          string    `json:"name"`
	Distance      float32   `json:"distance"`       // Meters
	ElevationLow  float32   `json:"elevation_low"`  // Meters
	ElevationHigh float32   `json:"elevation_high"` // Meters
	AverageGrade  float32   `json:"average_grade"`
	MaximumGrade  float32   `json:"maximum_grade"`
	ClimbCategory uint8     `json:"climb_category"` // [0, 5], hard to easy
}

type SegmentEffort

type SegmentEffort struct {
	Id             SegmentEffortId `json:"id"`
	ElapsedTime    uint32          `json:"elapsed_time"`
	StartDate      time.Time       `json:"start_date"`
	StartDateLocal time.Time       `json:"start_date_local"`
	PrRank         uint32          `json:"pr_rank"`
	KomRank        uint32          `json:"kom_rank"`
	Segment        *Segment        `json:"segment"`
}

type SegmentEffortId

type SegmentEffortId int64

type SegmentId

type SegmentId int64

Jump to

Keyboard shortcuts

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