data

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package data manages the operations on workouts

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Workout

type Workout struct {
	ID           string
	Date         time.Time
	Description  string
	IsInterval   bool
	Duration     time.Duration
	Distance     int
	StrokeRate   int
	StrokeCount  int
	DragFactor   int
	TotalCalores int
}

Workout Struct of a workout

type Workouts

type Workouts []Workout

Workouts A slice of workouts

func (Workouts) FilterShortWorkouts

func (wos Workouts) FilterShortWorkouts(minDist int) Workouts

FilterShortWorkouts - Returns workouts which are greater than a certain distance

func (Workouts) FilterWorkoutsByDistance

func (wos Workouts) FilterWorkoutsByDistance(minDist, maxDist int) Workouts

FilterWorkoutsByDistance - Returns the workouts between two distances

func (Workouts) GetLongestWorkout

func (wos Workouts) GetLongestWorkout() *Workout

GetLongestWorkout - Returns the longest workout over the workout slice

func (Workouts) GetTotalDistance

func (wos Workouts) GetTotalDistance() int

Jump to

Keyboard shortcuts

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