trainings

package
v0.0.0-...-4877560 Latest Latest
Warning

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

Go to latest
Published: May 12, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TrainingRepository

type TrainingRepository struct {
	// contains filtered or unexported fields
}

func NewRepository

func NewRepository(logger *zerolog.Logger, collection *mongo.Collection) *TrainingRepository

func (TrainingRepository) AddSet

func (r TrainingRepository) AddSet(
	ctx context.Context,
	userID,
	teID string,
	set *entities.TrainingSet) (*entities.TrainingSet, error)

func (TrainingRepository) EndExercise

func (r TrainingRepository) EndExercise(
	ctx context.Context,
	userID, id string,
	endTime time.Time) (*entities.TrainingExercise, error)

func (*TrainingRepository) EndTraining

func (r *TrainingRepository) EndTraining(
	ctx context.Context,
	id string,
	endTime time.Time) (*entities.Training, error)

func (*TrainingRepository) GetTrainingByID

func (r *TrainingRepository) GetTrainingByID(
	ctx context.Context,
	id string) (*entities.Training, error)

func (TrainingRepository) GetTrainingExercises

func (r TrainingRepository) GetTrainingExercises(
	ctx context.Context,
	id string) ([]entities.TrainingExercise, error)

func (*TrainingRepository) GetUserTrainings

func (r *TrainingRepository) GetUserTrainings(
	ctx context.Context,
	userID string,
	started bool) ([]entities.Training, error)

func (TrainingRepository) StartExercise

func (*TrainingRepository) StartTraining

func (r *TrainingRepository) StartTraining(
	ctx context.Context,
	userID string,
	startTime time.Time) (*entities.Training, error)

Jump to

Keyboard shortcuts

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