Documentation ¶
Index ¶
- type ExercisesRepository
- func (er *ExercisesRepository) CreateExercise(exercise models.Exercise) (*models.Exercise, error)
- func (er *ExercisesRepository) DeleteExerciseById(id string) error
- func (er *ExercisesRepository) GetExerciseById(id string) (*models.Exercise, error)
- func (er *ExercisesRepository) GetExercises() ([]*models.Exercise, error)
- func (er *ExercisesRepository) GetExercisesByIdWithoutComplex(id string) (*models.Exercise, error)
- func (er *ExercisesRepository) UpdateExercise(exercise models.Exercise) (*models.Exercise, error)
- type UserWeightMeasurementRepository
- func (er *UserWeightMeasurementRepository) CreateUserWeightMeasurement(weight models.UserWeight) (*models.UserWeight, error)
- func (er *UserWeightMeasurementRepository) DeleteUserWeightMeasurementById(id string) error
- func (er *UserWeightMeasurementRepository) GetUserWeightMeasurement(id string) (*models.UserWeight, error)
- func (er *UserWeightMeasurementRepository) GetUserWeightMeasurementByUserId(userId string) ([]*models.UserWeight, error)
- func (er *UserWeightMeasurementRepository) GetWorkoutVisitByDateForUser(userId string, from time.Time, to time.Time) (int, error)
- func (er *UserWeightMeasurementRepository) UpdateUserWeightMeasurement(userStatistic models.UserWeight) (*models.UserWeight, error)
- type UserWorkoutsRepository
- func (er *UserWorkoutsRepository) CreateUserWorkout(userWorkout models.UserWorkout) (*models.UserWorkout, error)
- func (er *UserWorkoutsRepository) GetActiveRepeatableUserWorkouts() ([]*models.UserWorkout, error)
- func (er *UserWorkoutsRepository) GetActiveUserWorkout(userId string) (*models.UserWorkout, error)
- func (er *UserWorkoutsRepository) GetUserWorkoutById(id string) (*models.UserWorkout, error)
- func (er *UserWorkoutsRepository) UpdateUserWorkout(userWorkout models.UserWorkout) (*models.UserWorkout, error)
- type UsersRepository
- type WorkoutPlansRepository
- func (wpr *WorkoutPlansRepository) CreateWorkoutPlan(workoutPlan models.WorkoutPlan) (*models.WorkoutPlan, error)
- func (wpr *WorkoutPlansRepository) DeleteWorkoutPlanById(id string) error
- func (wpr *WorkoutPlansRepository) GetWorkoutPlanById(id string) (*models.WorkoutPlan, error)
- func (wpr *WorkoutPlansRepository) GetWorkoutPlans() ([]*models.WorkoutPlan, error)
- func (wpr *WorkoutPlansRepository) GetWorkoutPlansByIdWithoutComplex(id string) (*models.WorkoutPlan, error)
- func (wpr *WorkoutPlansRepository) UpdateWorkoutPlan(workoutPlan models.WorkoutPlan) (*models.WorkoutPlan, error)
- type WorkoutsRepository
- func (wr *WorkoutsRepository) CreateWorkout(workout models.Workout) (*models.Workout, error)
- func (wr *WorkoutsRepository) DeleteWorkoutById(id string) error
- func (wr *WorkoutsRepository) GetWorkoutById(id string) (*models.Workout, error)
- func (wr *WorkoutsRepository) GetWorkouts() ([]*models.Workout, error)
- func (wr *WorkoutsRepository) GetWorkoutsByIdWithoutComplex(id string) (*models.Workout, error)
- func (wr *WorkoutsRepository) UpdateWorkout(workout models.Workout) (*models.Workout, error)
- type WorkoutsStatisticRepository
- func (wr *WorkoutsStatisticRepository) CreateWorkoutStatistics(workoutStatistics []*models.WorkoutStatistic) error
- func (wr *WorkoutsStatisticRepository) DeleteScheduledWorkoutsForUserWorkout(userWorkoutId string) error
- func (wr *WorkoutsStatisticRepository) GetLastWorkoutStatisticForUserWorkouts(userWorkoutsIds []string) (map[string]*models.WorkoutStatistic, error)
- func (wr *WorkoutsStatisticRepository) GetShortWorkoutsStatisticByUser(userId string) ([]*models.WorkoutStatistic, error)
- func (wr *WorkoutsStatisticRepository) GetWorkoutStatisticById(id string) (*models.WorkoutStatistic, error)
- func (wr *WorkoutsStatisticRepository) UpdateWorkoutsStatistic(workoutsStatistic models.WorkoutStatistic) (*models.WorkoutStatistic, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExercisesRepository ¶
type ExercisesRepository struct {
// contains filtered or unexported fields
}
func NewExercisesRepository ¶
func NewExercisesRepository(store *infrastructure.Store, logger *zap.SugaredLogger) (*ExercisesRepository, error)
func (*ExercisesRepository) CreateExercise ¶
CreateExercise Create new exercise
func (*ExercisesRepository) DeleteExerciseById ¶
func (er *ExercisesRepository) DeleteExerciseById(id string) error
func (*ExercisesRepository) GetExerciseById ¶
func (er *ExercisesRepository) GetExerciseById(id string) (*models.Exercise, error)
GetExerciseById Get exercise by id with filled complex
func (*ExercisesRepository) GetExercises ¶
func (er *ExercisesRepository) GetExercises() ([]*models.Exercise, error)
GetExercises Get exercises without filled complex (only ids)
func (*ExercisesRepository) GetExercisesByIdWithoutComplex ¶
func (er *ExercisesRepository) GetExercisesByIdWithoutComplex(id string) (*models.Exercise, error)
GetExercisesByIdWithoutComplex Get exercise by id without filled complex (only ids)
func (*ExercisesRepository) UpdateExercise ¶
type UserWeightMeasurementRepository ¶
type UserWeightMeasurementRepository struct {
// contains filtered or unexported fields
}
func NewUserWeightMeasurementRepository ¶
func NewUserWeightMeasurementRepository(store *infrastructure.Store, logger *zap.SugaredLogger) (*UserWeightMeasurementRepository, error)
func (*UserWeightMeasurementRepository) CreateUserWeightMeasurement ¶
func (er *UserWeightMeasurementRepository) CreateUserWeightMeasurement(weight models.UserWeight) (*models.UserWeight, error)
CreateUserWeightMeasurement Create new userStatistic
func (*UserWeightMeasurementRepository) DeleteUserWeightMeasurementById ¶
func (er *UserWeightMeasurementRepository) DeleteUserWeightMeasurementById(id string) error
func (*UserWeightMeasurementRepository) GetUserWeightMeasurement ¶
func (er *UserWeightMeasurementRepository) GetUserWeightMeasurement(id string) (*models.UserWeight, error)
func (*UserWeightMeasurementRepository) GetUserWeightMeasurementByUserId ¶
func (er *UserWeightMeasurementRepository) GetUserWeightMeasurementByUserId(userId string) ([]*models.UserWeight, error)
func (*UserWeightMeasurementRepository) GetWorkoutVisitByDateForUser ¶
func (*UserWeightMeasurementRepository) UpdateUserWeightMeasurement ¶
func (er *UserWeightMeasurementRepository) UpdateUserWeightMeasurement(userStatistic models.UserWeight) (*models.UserWeight, error)
type UserWorkoutsRepository ¶
type UserWorkoutsRepository struct {
// contains filtered or unexported fields
}
func NewUserWorkoutsRepository ¶
func NewUserWorkoutsRepository(store *infrastructure.Store, logger *zap.SugaredLogger) (*UserWorkoutsRepository, error)
func (*UserWorkoutsRepository) CreateUserWorkout ¶
func (er *UserWorkoutsRepository) CreateUserWorkout(userWorkout models.UserWorkout) (*models.UserWorkout, error)
CreateUserWorkout Create new userWorkout
func (*UserWorkoutsRepository) GetActiveRepeatableUserWorkouts ¶
func (er *UserWorkoutsRepository) GetActiveRepeatableUserWorkouts() ([]*models.UserWorkout, error)
func (*UserWorkoutsRepository) GetActiveUserWorkout ¶
func (er *UserWorkoutsRepository) GetActiveUserWorkout(userId string) (*models.UserWorkout, error)
GetActiveUserWorkout Get active userWorkout for userId TODO: it's not repository pattern, it's DAO. Refactoring later
func (*UserWorkoutsRepository) GetUserWorkoutById ¶
func (er *UserWorkoutsRepository) GetUserWorkoutById(id string) (*models.UserWorkout, error)
GetUserWorkoutById Get userWorkout by id
func (*UserWorkoutsRepository) UpdateUserWorkout ¶
func (er *UserWorkoutsRepository) UpdateUserWorkout(userWorkout models.UserWorkout) (*models.UserWorkout, error)
type UsersRepository ¶
type UsersRepository struct {
// contains filtered or unexported fields
}
func NewUsersRepository ¶
func NewUsersRepository(store *infrastructure.Store, logger *zap.SugaredLogger) (*UsersRepository, error)
func (*UsersRepository) CreateUser ¶
func (*UsersRepository) GetUserById ¶
func (ur *UsersRepository) GetUserById(id string) (*models.User, error)
func (*UsersRepository) GetUserByUsername ¶
func (ur *UsersRepository) GetUserByUsername(username string) (*models.User, error)
type WorkoutPlansRepository ¶
type WorkoutPlansRepository struct {
// contains filtered or unexported fields
}
func NewWorkoutPlansRepository ¶
func NewWorkoutPlansRepository(store *infrastructure.Store, logger *zap.SugaredLogger, workoutsRepository *WorkoutsRepository) (*WorkoutPlansRepository, error)
func (*WorkoutPlansRepository) CreateWorkoutPlan ¶
func (wpr *WorkoutPlansRepository) CreateWorkoutPlan(workoutPlan models.WorkoutPlan) (*models.WorkoutPlan, error)
CreateWorkoutPlan Create new workoutPlan
func (*WorkoutPlansRepository) DeleteWorkoutPlanById ¶
func (wpr *WorkoutPlansRepository) DeleteWorkoutPlanById(id string) error
func (*WorkoutPlansRepository) GetWorkoutPlanById ¶
func (wpr *WorkoutPlansRepository) GetWorkoutPlanById(id string) (*models.WorkoutPlan, error)
GetWorkoutPlanById Get workoutPlan by id with filled complex
func (*WorkoutPlansRepository) GetWorkoutPlans ¶
func (wpr *WorkoutPlansRepository) GetWorkoutPlans() ([]*models.WorkoutPlan, error)
GetWorkoutPlans Get workoutPlans without filled complex (only ids)
func (*WorkoutPlansRepository) GetWorkoutPlansByIdWithoutComplex ¶
func (wpr *WorkoutPlansRepository) GetWorkoutPlansByIdWithoutComplex(id string) (*models.WorkoutPlan, error)
GetWorkoutPlansByIdWithoutComplex Get workoutPlan by id without filled complex (only ids)
func (*WorkoutPlansRepository) UpdateWorkoutPlan ¶
func (wpr *WorkoutPlansRepository) UpdateWorkoutPlan(workoutPlan models.WorkoutPlan) (*models.WorkoutPlan, error)
UpdateWorkoutPlan Update workoutPlan
type WorkoutsRepository ¶
type WorkoutsRepository struct {
// contains filtered or unexported fields
}
func NewWorkoutsRepository ¶
func NewWorkoutsRepository(store *infrastructure.Store, logger *zap.SugaredLogger, exercisesRepository *ExercisesRepository) (*WorkoutsRepository, error)
func (*WorkoutsRepository) CreateWorkout ¶
CreateWorkout Create new workout
func (*WorkoutsRepository) DeleteWorkoutById ¶
func (wr *WorkoutsRepository) DeleteWorkoutById(id string) error
func (*WorkoutsRepository) GetWorkoutById ¶
func (wr *WorkoutsRepository) GetWorkoutById(id string) (*models.Workout, error)
GetWorkoutById Get workout by id with filled complex
func (*WorkoutsRepository) GetWorkouts ¶
func (wr *WorkoutsRepository) GetWorkouts() ([]*models.Workout, error)
GetWorkouts Get workouts without filled complex (only ids)
func (*WorkoutsRepository) GetWorkoutsByIdWithoutComplex ¶
func (wr *WorkoutsRepository) GetWorkoutsByIdWithoutComplex(id string) (*models.Workout, error)
GetWorkoutsByIdWithoutComplex Get workout by id without filled complex (only ids)
func (*WorkoutsRepository) UpdateWorkout ¶
type WorkoutsStatisticRepository ¶
type WorkoutsStatisticRepository struct {
// contains filtered or unexported fields
}
func NewWorkoutsStatisticRepository ¶
func NewWorkoutsStatisticRepository(store *infrastructure.Store, logger *zap.SugaredLogger) (*WorkoutsStatisticRepository, error)
func (*WorkoutsStatisticRepository) CreateWorkoutStatistics ¶
func (wr *WorkoutsStatisticRepository) CreateWorkoutStatistics(workoutStatistics []*models.WorkoutStatistic) error
CreateWorkoutStatistics Create new workoutsStatistics
func (*WorkoutsStatisticRepository) DeleteScheduledWorkoutsForUserWorkout ¶
func (wr *WorkoutsStatisticRepository) DeleteScheduledWorkoutsForUserWorkout(userWorkoutId string) error
func (*WorkoutsStatisticRepository) GetLastWorkoutStatisticForUserWorkouts ¶
func (wr *WorkoutsStatisticRepository) GetLastWorkoutStatisticForUserWorkouts(userWorkoutsIds []string) ( map[string]*models.WorkoutStatistic, error, )
func (*WorkoutsStatisticRepository) GetShortWorkoutsStatisticByUser ¶
func (wr *WorkoutsStatisticRepository) GetShortWorkoutsStatisticByUser(userId string) ([]*models.WorkoutStatistic, error)
GetShortWorkoutsStatisticByUser Get workouts statistic for user (only id and workout and schedule times)
func (*WorkoutsStatisticRepository) GetWorkoutStatisticById ¶
func (wr *WorkoutsStatisticRepository) GetWorkoutStatisticById(id string) (*models.WorkoutStatistic, error)
GetWorkoutStatisticById Get workoutsStatistic by id
func (*WorkoutsStatisticRepository) UpdateWorkoutsStatistic ¶
func (wr *WorkoutsStatisticRepository) UpdateWorkoutsStatistic(workoutsStatistic models.WorkoutStatistic) ( *models.WorkoutStatistic, error, )