Documentation
¶
Index ¶
- Variables
- func HttpGet(api string, headers map[string]string, param map[string]interface{}) ([]byte, error)
- func HttpPost(api string, headers map[string]string, param map[string]interface{}) ([]byte, error)
- func HttpUpload(urlStr string, content string) ([]byte, error)
- func Md5(raw string) string
- func ParseMapToStruct(raw interface{}, dst interface{}) error
- func Sha1(raw string) string
- type Activity
- type Client
- type GPSPoint
- type Token
- type Zone
Constants ¶
This section is empty.
Variables ¶
View Source
var (
UA = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.39 Safari/537.36"
)
Functions ¶
func ParseMapToStruct ¶
func ParseMapToStruct(raw interface{}, dst interface{}) error
Types ¶
type Activity ¶
type Activity struct { ID int64 `json:"id"` WorkoutID string `json:"workout_id"` Name string `json:"name"` Description string `json:"description"` Rpe int `json:"rpe"` Feel string `json:"feel"` Type string `json:"type"` Source string `json:"source"` SurfaceType string `json:"surface_type"` Weight int `json:"weight"` Ftp float64 `json:"ftp"` Zones []Zone `json:"zones"` StartPoint GPSPoint `json:"start_point"` EndPoint GPSPoint `json:"end_point"` TimeStamp int64 `json:"timestamp"` StartTime int64 `json:"start_time"` MovingTime int64 `json:"moving_time"` ElapsedTime json.Number `json:"elapsed_time"` ClockTime int64 `json:"clock_time"` TimeZone string `json:"time_zone"` LapTimestampList []int64 `json:"lap_timestamp_list"` Distance float64 `json:"distance"` TotalElevationGain float64 `json:"total_elevation_gain"` TotalElevationLoss float64 `json:"total_elevation_loss"` MaxElevation float64 `json:"max_elevation"` MinElevation float64 `json:"min_elevation"` AverageSpeed float64 `json:"average_speed"` MaxSpeed float64 `json:"max_speed"` AverageCadence float64 `json:"average_cadence"` MaxCadence float64 `json:"max_cadence"` MinCadence float64 `json:"min_cadence"` AverageStrideLength float64 `json:"average_stride_length"` MaxStrideLegth float64 `json:"max_stride_length"` MinStrideLength float64 `json:"min_stride_length"` AverageGroundTime float64 `json:"average_ground_time"` MaxGroundTime float64 `json:"max_ground_time"` MinGroundTime float64 `json:"min_ground_time"` AverageOscillation float64 `json:"average_oscillation"` MaxOscillation float64 `json:"max_oscillation"` MinOscillation float64 `json:"min_oscillation"` AveragePower float64 `json:"average_power"` MaxPower float64 `json:"max_power"` AverageHeartRate float64 `json:"average_heart_rate"` MaxHeartRate float64 `json:"max_heart_rate"` AverageLegSpring float64 `json:"average_leg_spring"` Calories float64 `json:"calories"` Stress float64 `json:"stress"` MaxVerticalStiffness float64 `json:"max_vertical_stiffness"` SecondsInZones []int `json:"seconds_in_zones"` Public bool `json:"public"` Deleted bool `json:"deleted"` Favorite bool `json:"favorite"` Flagged bool `json:"flagged"` Pending bool `json:"pending"` Excluded bool `json:"excluded"` Elevation float64 `json:"elevation"` Temperature float64 `json:"temperature"` Humidity float64 `json:"humidity"` DewPoint float64 `json:"dewPoint"` WindBearing float64 `json:"windBearing"` WindSpeed float64 `json:"windSpeed"` WindGust float64 `json:"windGust"` Icon string `json:"icon"` LapEvents []int `json:"lap_events"` StartEvents []int `json:"start_events"` StopEvents []int `json:"stop_events"` FilePath string `json:"file_path"` UpdatedTime string `json:"updated_time"` UserID string `json:"user_id"` }
Click to show internal directories.
Click to hide internal directories.