Documentation ¶
Index ¶
- Constants
- type DataSeedingService
- type ExercisesService
- func (us *ExercisesService) CreateExercise(exercise models.Exercise) (*models.Exercise, error)
- func (us *ExercisesService) DeleteExerciseById(exerciseId string) error
- func (us *ExercisesService) GetExerciseById(exerciseId string) (*models.Exercise, error)
- func (us *ExercisesService) GetExercises() ([]*models.Exercise, error)
- func (us *ExercisesService) UpdateExercise(exercise models.Exercise) (*models.Exercise, error)
- type TokenService
- type UserStatisticService
- func (us *UserStatisticService) CreateUserWeightMeasurement(userWeight models.UserWeight) (*models.UserWeight, error)
- func (us *UserStatisticService) DeleteWeightMeasurementById(weightMeasurementId string) error
- func (us *UserStatisticService) GetGeneralStatisticForUser(userId string) (*models.UserStatistic, error)
- func (us *UserStatisticService) UpdateUserWeightMeasurement(userWeight models.UserWeight) (*models.UserWeight, error)
- type UserWorkoutsCalendarGenerator
- type UserWorkoutsCalendarService
- func (us *UserWorkoutsCalendarService) ConfirmVisit(confirmModel models.ConfirmVisit) (*models.WorkoutStatistic, error)
- func (us *UserWorkoutsCalendarService) CreateCalendarForRepeatableActiveUserWorkouts() error
- func (us *UserWorkoutsCalendarService) CreateCalendarForUserWorkout(userWorkout *models.UserWorkout) error
- func (us *UserWorkoutsCalendarService) DeleteScheduledWorkoutsForUserWorkout(userWorkoutId string) error
- func (us *UserWorkoutsCalendarService) GetCalendarForUser(userId string) (*models.WorkoutsCalendar, error)
- func (us *UserWorkoutsCalendarService) GetWorkoutStatisticById(statisticId string) (*models.WorkoutStatistic, error)
- type UserWorkoutsService
- type UsersService
- type WorkoutPlansService
- func (ws *WorkoutPlansService) CreateWorkoutPlan(workoutPlan models.WorkoutPlan) (*models.WorkoutPlan, error)
- func (ws *WorkoutPlansService) DeleteWorkoutPlanById(workoutPlanId string) error
- func (ws *WorkoutPlansService) GetWorkoutPlanById(workoutPlanId string) (*models.WorkoutPlan, error)
- func (ws *WorkoutPlansService) GetWorkoutPlans() ([]*models.WorkoutPlan, error)
- func (ws *WorkoutPlansService) UpdateWorkoutPlan(workoutPlan models.WorkoutPlan) (*models.WorkoutPlan, error)
- type WorkoutsService
- func (ws *WorkoutsService) CreateWorkout(workout models.Workout) (*models.Workout, error)
- func (ws *WorkoutsService) DeleteWorkoutById(workoutId string) error
- func (ws *WorkoutsService) GetWorkoutById(workoutId string) (*models.Workout, error)
- func (ws *WorkoutsService) GetWorkouts() ([]*models.Workout, error)
- func (ws *WorkoutsService) UpdateWorkout(workout models.Workout) (*models.Workout, error)
Constants ¶
View Source
const ( MaxWeight = 3000 MinWeight = 1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataSeedingService ¶
type DataSeedingService struct {
// contains filtered or unexported fields
}
func NewDataSeedingService ¶
func NewDataSeedingService(lc fx.Lifecycle, cfg *config.Configuration, logger *zap.SugaredLogger, users *UsersService, exercises *ExercisesService, workouts *WorkoutsService, workoutPlans *WorkoutPlansService, store *infrastructure.Store) (*DataSeedingService, error)
type ExercisesService ¶
type ExercisesService struct {
// contains filtered or unexported fields
}
func NewExercisesService ¶
func NewExercisesService(exerciseRepository *repositories.ExercisesRepository) (*ExercisesService, error)
func (*ExercisesService) CreateExercise ¶
func (*ExercisesService) DeleteExerciseById ¶
func (us *ExercisesService) DeleteExerciseById(exerciseId string) error
func (*ExercisesService) GetExerciseById ¶
func (us *ExercisesService) GetExerciseById(exerciseId string) (*models.Exercise, error)
func (*ExercisesService) GetExercises ¶
func (us *ExercisesService) GetExercises() ([]*models.Exercise, error)
func (*ExercisesService) UpdateExercise ¶
type TokenService ¶
type TokenService struct {
// contains filtered or unexported fields
}
func NewTokenService ¶
func NewTokenService(configuration *config.Configuration) (*TokenService, error)
func (*TokenService) CreateToken ¶
func (t *TokenService) CreateToken(user *models.User) (string, error)
func (*TokenService) ParseToken ¶
func (t *TokenService) ParseToken(accessToken string) (*models.Claims, error)
type UserStatisticService ¶
type UserStatisticService struct {
// contains filtered or unexported fields
}
func NewUserStatisticService ¶
func NewUserStatisticService(userStatisticRepository *repositories.UserWeightMeasurementRepository) (*UserStatisticService, error)
func (*UserStatisticService) CreateUserWeightMeasurement ¶
func (us *UserStatisticService) CreateUserWeightMeasurement(userWeight models.UserWeight) (*models.UserWeight, error)
func (*UserStatisticService) DeleteWeightMeasurementById ¶
func (us *UserStatisticService) DeleteWeightMeasurementById(weightMeasurementId string) error
func (*UserStatisticService) GetGeneralStatisticForUser ¶
func (us *UserStatisticService) GetGeneralStatisticForUser(userId string) (*models.UserStatistic, error)
func (*UserStatisticService) UpdateUserWeightMeasurement ¶
func (us *UserStatisticService) UpdateUserWeightMeasurement(userWeight models.UserWeight) (*models.UserWeight, error)
type UserWorkoutsCalendarGenerator ¶
type UserWorkoutsCalendarGenerator struct {
// contains filtered or unexported fields
}
func NewUserWorkoutsCalendarGenerator ¶
func NewUserWorkoutsCalendarGenerator(lc fx.Lifecycle, logger *zap.SugaredLogger, zapLoggerOriginal *zap.Logger, calendarService *UserWorkoutsCalendarService) (*UserWorkoutsCalendarGenerator, error)
type UserWorkoutsCalendarService ¶
type UserWorkoutsCalendarService struct {
// contains filtered or unexported fields
}
func NewUserWorkoutsCalendarService ¶
func NewUserWorkoutsCalendarService(logger *zap.SugaredLogger, workoutsStatisticRepository *repositories.WorkoutsStatisticRepository, workoutsService *WorkoutsService, userWorkoutsRepository *repositories.UserWorkoutsRepository) (*UserWorkoutsCalendarService, error)
func (*UserWorkoutsCalendarService) ConfirmVisit ¶
func (us *UserWorkoutsCalendarService) ConfirmVisit(confirmModel models.ConfirmVisit) (*models.WorkoutStatistic, error)
func (*UserWorkoutsCalendarService) CreateCalendarForRepeatableActiveUserWorkouts ¶
func (us *UserWorkoutsCalendarService) CreateCalendarForRepeatableActiveUserWorkouts() error
func (*UserWorkoutsCalendarService) CreateCalendarForUserWorkout ¶
func (us *UserWorkoutsCalendarService) CreateCalendarForUserWorkout(userWorkout *models.UserWorkout) error
func (*UserWorkoutsCalendarService) DeleteScheduledWorkoutsForUserWorkout ¶
func (us *UserWorkoutsCalendarService) DeleteScheduledWorkoutsForUserWorkout(userWorkoutId string) error
func (*UserWorkoutsCalendarService) GetCalendarForUser ¶
func (us *UserWorkoutsCalendarService) GetCalendarForUser(userId string) (*models.WorkoutsCalendar, error)
func (*UserWorkoutsCalendarService) GetWorkoutStatisticById ¶
func (us *UserWorkoutsCalendarService) GetWorkoutStatisticById(statisticId string) (*models.WorkoutStatistic, error)
type UserWorkoutsService ¶
type UserWorkoutsService struct {
// contains filtered or unexported fields
}
func NewUserWorkoutsService ¶
func NewUserWorkoutsService(logger *zap.SugaredLogger, userWorkoutsRepository *repositories.UserWorkoutsRepository, calendarService *UserWorkoutsCalendarService, workoutPlansService *WorkoutPlansService) (*UserWorkoutsService, error)
func (*UserWorkoutsService) CreateUserWorkout ¶
func (us *UserWorkoutsService) CreateUserWorkout(userWorkout models.UserWorkout) (*models.UserWorkout, error)
func (*UserWorkoutsService) DeactivateWorkoutForUser ¶
func (us *UserWorkoutsService) DeactivateWorkoutForUser(userId string) (*models.UserWorkout, error)
type UsersService ¶
type UsersService struct {
// contains filtered or unexported fields
}
func NewUsersService ¶
func NewUsersService(userRepository *repositories.UsersRepository) (*UsersService, error)
func (*UsersService) CreateUser ¶
func (*UsersService) GetUserByUsername ¶
func (us *UsersService) GetUserByUsername(username string) (*models.User, error)
type WorkoutPlansService ¶
type WorkoutPlansService struct {
// contains filtered or unexported fields
}
func NewWorkoutPlansService ¶
func NewWorkoutPlansService(workoutPlanRepository *repositories.WorkoutPlansRepository) (*WorkoutPlansService, error)
func (*WorkoutPlansService) CreateWorkoutPlan ¶
func (ws *WorkoutPlansService) CreateWorkoutPlan(workoutPlan models.WorkoutPlan) (*models.WorkoutPlan, error)
func (*WorkoutPlansService) DeleteWorkoutPlanById ¶
func (ws *WorkoutPlansService) DeleteWorkoutPlanById(workoutPlanId string) error
func (*WorkoutPlansService) GetWorkoutPlanById ¶
func (ws *WorkoutPlansService) GetWorkoutPlanById(workoutPlanId string) (*models.WorkoutPlan, error)
func (*WorkoutPlansService) GetWorkoutPlans ¶
func (ws *WorkoutPlansService) GetWorkoutPlans() ([]*models.WorkoutPlan, error)
func (*WorkoutPlansService) UpdateWorkoutPlan ¶
func (ws *WorkoutPlansService) UpdateWorkoutPlan(workoutPlan models.WorkoutPlan) (*models.WorkoutPlan, error)
type WorkoutsService ¶
type WorkoutsService struct {
// contains filtered or unexported fields
}
func NewWorkoutsService ¶
func NewWorkoutsService(workoutRepository *repositories.WorkoutsRepository) (*WorkoutsService, error)
func (*WorkoutsService) CreateWorkout ¶
func (*WorkoutsService) DeleteWorkoutById ¶
func (ws *WorkoutsService) DeleteWorkoutById(workoutId string) error
func (*WorkoutsService) GetWorkoutById ¶
func (ws *WorkoutsService) GetWorkoutById(workoutId string) (*models.Workout, error)
func (*WorkoutsService) GetWorkouts ¶
func (ws *WorkoutsService) GetWorkouts() ([]*models.Workout, error)
func (*WorkoutsService) UpdateWorkout ¶
Click to show internal directories.
Click to hide internal directories.