Documentation ¶
Overview ¶
Package models provides data structures
Package models provides data structures
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetUsersResponse ¶
type GetUsersResponse struct {
Users []*User
}
GetUsersResponse holds a slice of *Users
type SignInRequest ¶
SignInRequest holds an Email and Password
type SignInResponse ¶
type SignInResponse struct {
Token string `json:"token"`
}
SignInResponse holds a token
type SignUpRequest ¶
type SignUpRequest struct { Name string `json:"name"` Email string `json:"email"` Password string `json:"password"` }
SignUpRequest holds a Name, Email and Password
type User ¶
type User struct { ID uint `json:"id" gorm:"primaryKey"` Name string `json:"name" gorm:"<-;unique;not null"` Email string `json:"email" gorm:"<-;unique;not null"` Password []byte `json:"-"` CreatedAt time.Time `json:"createdAt" gorm:"autoCreateTime"` UpdatedAt time.Time `json:"updatedAt" gorm:"autoUpdateTime"` }
User model for user
Click to show internal directories.
Click to hide internal directories.