athlete

package
v0.0.0-...-ef3a72e Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2019 License: MIT Imports: 8 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 {
	strava.ActivityType `json:"activity_type"`
	IsTrainer           bool                `json:"trainer"`
	GearId              string              `json:"gear_id"`
	Private             bool                `json:"private"`
	Description         string              `json:"description"`
	NameFormats         []format.NameFormat `json:"name_formats"`
}

type Athlete

type Athlete struct {
	Id                int                 `json:"id"`
	AccessToken       string              `json:"access_token"`
	UpdateDescription bool                `json:"update_description"`
	MeasurementPref   string              `json:"measurement_preference"`
	DateFormat        format.DateFormat   `json:"date_format"`
	Activities        map[string]Activity `json:"activities,omitempty"`
	Commutes          map[string]Commute  `json:"commutes,omitempty"`
	Locations         map[string]string   `json:"locations"`
}

type Commute

type Commute struct {
	Coordinates1 []float64           `json:"loc1"`
	Coordinates2 []float64           `json:"loc2"`
	Distance     float64             `json:"distance"`
	Activities   map[string]Activity `json:"activities"`
}

type Service

type Service struct {
	dynamodbiface.DynamoDBAPI
	// contains filtered or unexported fields
}

func New

func New() (*Service, error)

func (*Service) Get

func (s *Service) Get(id int) (*Athlete, error)

func (*Service) UpdateLocations

func (s *Service) UpdateLocations(athlete *Athlete, locationKey, location string) error

Jump to

Keyboard shortcuts

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