Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateISOString ¶
func GenerateISOString() string
GenerateISOString generates a time string equivalent to Date.now().toISOString in JavaScript
Types ¶
type Base ¶
type Base struct { ID uint `gorm:"primaryKey;AUTO_INCREMENT"` UUID uuid.UUID `json:"_id" gorm:"primaryKey;autoIncrement:false"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` }
Base contains common columns for all tables
func (*Base) AfterUpdate ¶
AfterUpdate will update the Base struct after every update
type User ¶
type User struct { Base FirstName string `json:"first_name" validate:"required,ascii,max=128"` LastName string `json:"last_name" validate:"required,ascii,max=128"` Email string `json:"email" validate:"required,email,max=255"` Password string `json:"password" validate:"required,max=255"` Verified bool `json:"verified" gorm:"default:0"` }
Click to show internal directories.
Click to hide internal directories.