Documentation ¶
Index ¶
- Variables
- type AuthData
- type Credentials
- type Group
- type GroupData
- type GroupUpdate
- type Habit
- type HabitCreate
- type HabitData
- type HabitFilterOptions
- type HabitUpdate
- type NewGroup
- type NewHabit
- type NewSuccess
- type RepeatUnit
- type Schedule
- type ScheduleInput
- type ScheduleType
- type Success
- type SuccessCreate
- type User
- type Weekday
Constants ¶
This section is empty.
Variables ¶
View Source
var AllScheduleType = []ScheduleType{ ScheduleTypeWeekly, ScheduleTypeMonthly, ScheduleTypePeriodic, }
View Source
var AllWeekday = []Weekday{ WeekdayMonday, WeekdayTuesday, WeekdayWednesday, WeekdayThursday, WeekdayFriday, WeekdaySaturday, WeekdaySunday, }
Functions ¶
This section is empty.
Types ¶
type Credentials ¶
type GroupUpdate ¶
type Habit ¶
type Habit struct { ID primitive.ObjectID `json:"id" bson:"_id"` Name string `json:"name" bson:"name"` Description *string `json:"description,omitempty" bson:"description,omitempty"` Schedule Schedule `json:"schedule" bson:"schedule"` GroupID primitive.ObjectID `json:"group_id" bson:"group_id"` UserID primitive.ObjectID `json:"user_id" bson:"user_id"` }
type HabitCreate ¶
type HabitCreate struct { Name string `json:"name" bson:"name"` Description *string `json:"description,omitempty" bson:"description,omitempty"` Schedule ScheduleInput `json:"schedule" bson:"schedule"` GroupID primitive.ObjectID `json:"group_id" bson:"group_id"` UserID primitive.ObjectID `json:"user_id" bson:"user_id"` }
type HabitData ¶
type HabitData struct { ID string `json:"id"` Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` Schedule *ScheduleInput `json:"schedule,omitempty"` GroupID *string `json:"group_id,omitempty"` }
type HabitFilterOptions ¶
type HabitUpdate ¶
type HabitUpdate struct { ID primitive.ObjectID `json:"id" bson:"_id"` Name *string `json:"name,omitempty" bson:"name,omitempty"` Description *string `json:"description,omitempty" bson:"description,omitempty"` Schedule *ScheduleInput `json:"schedule,omitempty" bson:"schedule,omitempty"` GroupID *primitive.ObjectID `json:"group_id,omitempty" bson:"group_id,omitempty"` }
type NewHabit ¶
type NewHabit struct { Name string `json:"name" bson:"name"` Description *string `json:"description,omitempty" bson:"description,omitempty"` Schedule ScheduleInput `json:"schedule" bson:"schedule"` GroupID string `json:"group_id" bson:"group_id"` }
type NewSuccess ¶
type RepeatUnit ¶
type RepeatUnit string
type Schedule ¶
type Schedule struct { Type ScheduleType `json:"type" bson:"type"` Weekdays []Weekday `json:"weekdays,omitempty" bson:"weekdays,omitempty"` Monthdays []int `json:"monthdays,omitempty" bson:"monthdays,omitempty"` PeriodInDays *int `json:"period_in_days,omitempty" bson:"period_in_days,omitempty"` Start time.Time `json:"start" bson:"start"` }
type ScheduleInput ¶
type ScheduleInput struct { Type ScheduleType `json:"type" bson:"type"` Weekdays []Weekday `json:"weekdays,omitempty" bson:"weekdays,omitempty"` Monthdays []int `json:"monthdays,omitempty" bson:"monthdays,omitempty"` PeriodInDays *int `json:"period_in_days,omitempty" bson:"period_in_days,omitempty"` Start time.Time `json:"start" bson:"start"` }
gqlgen does not allow using objects as inputs; only scalars, enums, and input_objects work
func (ScheduleInput) IsValid ¶
func (e ScheduleInput) IsValid() bool
type ScheduleType ¶
type ScheduleType string
const ( ScheduleTypeWeekly ScheduleType = "WEEKLY" ScheduleTypeMonthly ScheduleType = "MONTHLY" ScheduleTypePeriodic ScheduleType = "PERIODIC" )
func (ScheduleType) IsValid ¶
func (e ScheduleType) IsValid() bool
func (ScheduleType) MarshalGQL ¶
func (e ScheduleType) MarshalGQL(w io.Writer)
func (ScheduleType) String ¶
func (e ScheduleType) String() string
func (*ScheduleType) UnmarshalGQL ¶
func (e *ScheduleType) UnmarshalGQL(v interface{}) error
type SuccessCreate ¶
type User ¶
type User struct { ID primitive.ObjectID `json:"id" bson:"_id,omitempty"` Name string `json:"name" bson:"name,omitempty"` Email string `json:"email" bson:"email,omitempty"` Password string `json:"password" bson:"password,omitempty"` }
func (*User) ComparePassword ¶
type Weekday ¶
type Weekday string
func TimeToWeekday ¶
func (Weekday) MarshalGQL ¶
func (*Weekday) UnmarshalGQL ¶
Click to show internal directories.
Click to hide internal directories.