Documentation ¶
Index ¶
- Constants
- type AlreadyExistError
- type Claims
- type ConfirmVisit
- type Exercise
- type NoRightsOnEntityError
- type NotFoundError
- type ParamError
- type User
- type UserGender
- type UserStatistic
- type UserWeight
- type UserWorkout
- type ValidationError
- type Workout
- type WorkoutPlan
- type WorkoutStatistic
- type WorkoutsCalendar
Constants ¶
View Source
const ( ArgumentNullOrEmptyError = "can't be null or empty" InvalidFormat = "invalid format" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlreadyExistError ¶
type AlreadyExistError struct {
// contains filtered or unexported fields
}
func NewAlreadyExistError ¶
func NewAlreadyExistError(entity, value string) *AlreadyExistError
func (*AlreadyExistError) Error ¶
func (v *AlreadyExistError) Error() string
type ConfirmVisit ¶
type Exercise ¶
type Exercise struct { Name string ShortDescription *string Owner string Complex []*Exercise // contains filtered or unexported fields }
func (*Exercise) FillForCreate ¶
func (entity *Exercise) FillForCreate()
func (*Exercise) FillForUpdate ¶
func (entity *Exercise) FillForUpdate()
type NoRightsOnEntityError ¶
type NoRightsOnEntityError struct {
// contains filtered or unexported fields
}
func NewNoRightsOnEntityError ¶
func NewNoRightsOnEntityError(entity, value string) *NoRightsOnEntityError
func (*NoRightsOnEntityError) Error ¶
func (v *NoRightsOnEntityError) Error() string
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
func NewNotFoundByIdError ¶
func NewNotFoundByIdError(entity, valueColumn string) *NotFoundError
func NewNotFoundError ¶
func NewNotFoundError(entity, valueColumn, searchColumn string) *NotFoundError
func (*NotFoundError) Error ¶
func (v *NotFoundError) Error() string
type ParamError ¶
type User ¶
type User struct { Username string Password string Name *string Gender *UserGender Height *int // contains filtered or unexported fields }
func (*User) FillForCreate ¶
func (entity *User) FillForCreate()
func (*User) FillForUpdate ¶
func (entity *User) FillForUpdate()
type UserGender ¶
type UserGender int
const ( UserGenderMale UserGender = iota UserGenderFemale UserGender = iota )
type UserStatistic ¶
type UserStatistic struct { WorkoutsPerMonth int WorkoutsPerYear int Weight []*UserWeight // contains filtered or unexported fields }
func (*UserStatistic) FillForCreate ¶
func (entity *UserStatistic) FillForCreate()
func (*UserStatistic) FillForUpdate ¶
func (entity *UserStatistic) FillForUpdate()
type UserWeight ¶
type UserWeight struct { User string Weight float32 Date time.Time // contains filtered or unexported fields }
func (*UserWeight) FillForCreate ¶
func (entity *UserWeight) FillForCreate()
func (*UserWeight) FillForUpdate ¶
func (entity *UserWeight) FillForUpdate()
type UserWorkout ¶
type UserWorkout struct { UserId string WorkoutPlan *WorkoutPlan Active bool Schedule []time.Weekday // contains filtered or unexported fields }
func (*UserWorkout) FillForCreate ¶
func (entity *UserWorkout) FillForCreate()
func (*UserWorkout) FillForUpdate ¶
func (entity *UserWorkout) FillForUpdate()
type ValidationError ¶
type ValidationError struct {
Errors []*ParamError
}
func (*ValidationError) AddError ¶
func (v *ValidationError) AddError(fieldName string, validationErr error)
func (*ValidationError) Error ¶
func (v *ValidationError) Error() string
func (*ValidationError) HasErrors ¶
func (v *ValidationError) HasErrors() bool
type Workout ¶
type Workout struct { CustomName *string CustomDescription *string Owner string Complex []*Exercise // contains filtered or unexported fields }
func (*Workout) FillForCreate ¶
func (entity *Workout) FillForCreate()
func (*Workout) FillForUpdate ¶
func (entity *Workout) FillForUpdate()
type WorkoutPlan ¶
type WorkoutPlan struct { Name string ShortDescription *string Owner string Repeatable bool Workouts []*Workout // contains filtered or unexported fields }
func (*WorkoutPlan) FillForCreate ¶
func (entity *WorkoutPlan) FillForCreate()
func (*WorkoutPlan) FillForUpdate ¶
func (entity *WorkoutPlan) FillForUpdate()
type WorkoutStatistic ¶
type WorkoutStatistic struct { UserWorkout *UserWorkout Workout *Workout WorkoutDate *time.Time ScheduledDate time.Time Comment *string // contains filtered or unexported fields }
func (*WorkoutStatistic) FillForCreate ¶
func (entity *WorkoutStatistic) FillForCreate()
func (*WorkoutStatistic) FillForUpdate ¶
func (entity *WorkoutStatistic) FillForUpdate()
type WorkoutsCalendar ¶
type WorkoutsCalendar struct { // Short info about history (only ids, scheduled date and workout date) History []*WorkoutStatistic // Full info about current workout Current *WorkoutStatistic // Short info about upcoming workouts (only ids and scheduled date) Upcoming []*WorkoutStatistic }
Click to show internal directories.
Click to hide internal directories.