dto

package
v0.0.0-...-ff3b7a6 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfirmVisitModel

type ConfirmVisitModel struct {
	Comment     *string   `json:"comment,omitempty"`
	WorkoutDate *JsonDate `json:"workoutDate,omitempty"`
}

type CreateWeightStatisticModel

type CreateWeightStatisticModel struct {
	Date   JsonDate `json:"date"`
	Weight float32  `json:"weight"`
}

type Credentials

type Credentials struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type DaysOfWeekDto

type DaysOfWeekDto int
const (
	Sunday DaysOfWeekDto = iota
	Monday
	Tuesday
	Wednesday
	Thursday
	Friday
	Saturday
)

func (DaysOfWeekDto) MarshalJSON

func (s DaysOfWeekDto) MarshalJSON() ([]byte, error)

MarshalJSON marshals the enum as a quoted json string

func (DaysOfWeekDto) String

func (s DaysOfWeekDto) String() string

func (*DaysOfWeekDto) UnmarshalJSON

func (s *DaysOfWeekDto) UnmarshalJSON(b []byte) error

UnmarshalJSON unmashals a quoted json string to the enum value

type ExerciseCreateModel

type ExerciseCreateModel struct {
	Name             string   `json:"name"`
	ShortDescription *string  `json:"shortDescription"`
	Complex          []string `json:"complex"`
}

type ExerciseFullModel

type ExerciseFullModel struct {
	Id               string               `json:"id"`
	Name             string               `json:"name"`
	ShortDescription *string              `json:"shortDescription"`
	Complex          []*ExerciseFullModel `json:"complex"`
}

type ExerciseShortModel

type ExerciseShortModel struct {
	Id               string  `json:"id"`
	Name             string  `json:"name"`
	ShortDescription *string `json:"shortDescription"`
}

type GeneralStatisticModel

type GeneralStatisticModel struct {
	WorkoutsPerMonth int                     `json:"workoutsPerMonth"`
	WorkoutsPerYear  int                     `json:"workoutsPerYear"`
	WeightStatistic  []*WeightStatisticModel `json:"weightStatistic"`
}

type Healthcheck

type Healthcheck struct {
	TotalDbInvokes      int64 `json:"totalDbInvokes"`
	CurrentDbConnection int   `json:"currentDbConnection"`
	MaxDbConnections    int   `json:"maxDbConnections"`
}

type JsonDate

type JsonDate struct {
	time.Time
}

JsonDate Date in ISO 8601 format

func (JsonDate) MarshalJSON

func (c JsonDate) MarshalJSON() ([]byte, error)

func (*JsonDate) UnmarshalJSON

func (c *JsonDate) UnmarshalJSON(b []byte) (err error)

type ProblemDetails

type ProblemDetails struct {
	// A URI reference [RFC3986] that identifies the problem type. This specification encourages that, when dereferenced,
	// it provide human-readable documentation for the problem type (e.g., using HTML [W3C.REC-html5-20141028]).
	// When this member is not present, its value is assumed to be "about:blank".
	Type string `json:"type,omitempty"`

	// A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem,
	// except for purposes of localization(e.g., using proactive content negotiation; see[RFC7231], Section 3.4).
	Title string `json:"title"`

	// A human-readable explanation specific to this occurrence of the problem.
	Detail string `json:"detail,omitempty"`

	// A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
	Instance string `json:"instance"`

	// The HTTP status code([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.
	Status int `json:"status"`

	// Invalid params in request
	InvalidParams []*models.ParamError `json:"invalid-params,omitempty"`
}

ProblemDetails https://www.rfc-editor.org/rfc/rfc7807

type ProfileWorkoutCreateModel

type ProfileWorkoutCreateModel struct {
	WorkoutPlan string          `json:"workoutPlan"`
	Schedule    []DaysOfWeekDto `json:"schedule"`
}

type ProfileWorkoutShortModel

type ProfileWorkoutShortModel struct {
	Id string `json:"id"`
}

type TokenResponse

type TokenResponse struct {
	Token string `json:"token"`
}

type WeightStatisticModel

type WeightStatisticModel struct {
	Id     string   `json:"id"`
	Date   JsonDate `json:"date"`
	Weight float32  `json:"weight"`
}

type WorkoutCreateModel

type WorkoutCreateModel struct {
	CustomName        *string  `json:"customName"`
	CustomDescription *string  `json:"customDescription"`
	Complex           []string `json:"complex"`
}

type WorkoutFullModel

type WorkoutFullModel struct {
	Id                string               `json:"id"`
	CustomName        *string              `json:"customName"`
	CustomDescription *string              `json:"customDescription"`
	Complex           []*ExerciseFullModel `json:"complex"`
}

type WorkoutPlanCreateModel

type WorkoutPlanCreateModel struct {
	Name             string   `json:"name"`
	ShortDescription *string  `json:"shortDescription"`
	Repeatable       bool     `json:"repeatable"`
	Workouts         []string `json:"workouts"`
}

type WorkoutPlanFullModel

type WorkoutPlanFullModel struct {
	Id               string               `json:"id"`
	Name             string               `json:"name"`
	ShortDescription *string              `json:"shortDescription"`
	Repeatable       bool                 `json:"repeatable"`
	Workouts         []*WorkoutShortModel `json:"workouts"`
}

type WorkoutPlanShortModel

type WorkoutPlanShortModel struct {
	Id               string  `json:"id"`
	Name             string  `json:"name"`
	ShortDescription *string `json:"shortDescription"`
	Repeatable       bool    `json:"repeatable"`
}

type WorkoutShortModel

type WorkoutShortModel struct {
	Id                string  `json:"id"`
	CustomName        *string `json:"customName"`
	CustomDescription *string `json:"customDescription"`
}

type WorkoutStatisticModel

type WorkoutStatisticModel struct {
	Id            string            `json:"id"`
	ScheduledDate JsonDate          `json:"scheduledDate"`
	WorkoutDate   *JsonDate         `json:"workoutDate,omitempty"`
	Workout       *WorkoutFullModel `json:"workout,omitempty"`
	Comment       *string           `json:"comment,omitempty"`
}

type WorkoutStatisticShortModel

type WorkoutStatisticShortModel struct {
	Id            string    `json:"id"`
	ScheduledDate JsonDate  `json:"scheduledDate"`
	WorkoutDate   *JsonDate `json:"workoutDate,omitempty"`
}

type WorkoutsCalendarModel

type WorkoutsCalendarModel struct {
	History  []*WorkoutStatisticModel `json:"history"`
	Current  *WorkoutStatisticModel   `json:"current"`
	Upcoming []*WorkoutStatisticModel `json:"upcoming"`
}

Jump to

Keyboard shortcuts

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