model

package
v0.0.0-...-2992433 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllSex = []Sex{
	SexFemale,
	SexMale,
}

Functions

This section is empty.

Types

type CalorieGoal

type CalorieGoal struct {
	Calories int `json:"calories"`
}

type CalorieGoalInput

type CalorieGoalInput struct {
	Calories int `json:"calories"`
}

type ExerciseRecord

type ExerciseRecord struct {
	User      *User  `json:"user"`
	Calories  int    `json:"calories"`
	Label     string `json:"label"`
	Timestamp string `json:"timestamp"`
}

type FoodRecord

type FoodRecord struct {
	User      *User  `json:"user"`
	Calories  int    `json:"calories"`
	Label     string `json:"label"`
	Timestamp string `json:"timestamp"`
}

type NewExerciseRecord

type NewExerciseRecord struct {
	Label    *string `json:"label"`
	Calories *int    `json:"calories"`
}

type NewFoodRecord

type NewFoodRecord struct {
	Label    *string `json:"label"`
	Calories *int    `json:"calories"`
}

type NewUser

type NewUser struct {
	ID string `json:"id"`
}

type Sex

type Sex string
const (
	SexFemale Sex = "FEMALE"
	SexMale   Sex = "MALE"
)

func (Sex) IsValid

func (e Sex) IsValid() bool

func (Sex) MarshalGQL

func (e Sex) MarshalGQL(w io.Writer)

func (Sex) String

func (e Sex) String() string

func (*Sex) UnmarshalGQL

func (e *Sex) UnmarshalGQL(v interface{}) error

type User

type User struct {
	ID                string   `json:"id"`
	DisplayName       string   `json:"displayName"`
	Age               int      `json:"age"`
	Height            int      `json:"height"`
	Sex               Sex      `json:"sex"`
	Weight            int      `json:"weight"`
	CalorieGoal       int      `json:"calorieGoal"`
	FoodRecordIDs     []string `json:"exerciseRecords"`
	ExerciseRecordIDs []string `json:"exerciseRecords"`
}

Jump to

Keyboard shortcuts

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