Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPasswordHash ¶
CheckPasswordHash checks passwordhash and password from user input
func GetAllUsers ¶
GetAllUsers returns a list of all users in the database
func HashPassword ¶
HashPassword hashes password from user input
Types ¶
type Carpark ¶
type Carpark struct { gorm.Model //ParkID string `gorm:"size:100,not null;unique" json:"park_id"` Name string `gorm:"size:100,not null" json:"name"` Description string `gorm:"not null" json:"description"` Location string `gorm:"size:100,not null" json:"location"` Capacity string `gorm:"size:100,not null" json:"capacity"` City string `gorm:"size:100,not null" json:"city"` CreatedBy User `gorm:"foreignKey:UserID;" json:"-"` UserID uint `gorm:"not null" json:"user_id"` }
Carpark is the car parks
func (*Carpark) UpdateCarpark ¶
type User ¶
type User struct { gorm.Model ProfilePicture string `gorm:"size:255;not null" json:"profilepicture"` Email string `gorm:"type:varchar(100)e;unique_index" json:"email"` FirstName string `gorm:"size:100;not null" json:"firstName"` LastName string `gorm:"size:100;not null" json:"lastName"` Password string `gorm:"size:100;not null" json:"password"` }
User is the car owner
Click to show internal directories.
Click to hide internal directories.