Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *gorm.DB
Functions ¶
func SetupDatabase ¶
func SetupDatabase()
func SetupTestDatabase ¶
func SetupTestDatabase()
Types ¶
type TokenClaims ¶
type TokenClaims struct {
jwt.StandardClaims
ID uint `json:"id"`
}
type User ¶
type User struct {
gorm.Model
Name string `gorm:"not null"`
Email string `gorm:"unique_index"`
Password []byte `gorm:"not null"`
TimerTitle *string
TimerStartAt *time.Time
}
func FindUserByEmail ¶
func FindUserByID ¶
func SetupTestUser ¶
func SetupTestUser() *User
func (*User) GenerateToken ¶
func (*User) StartTimer ¶
func (*User) VerifyPassword ¶
Click to show internal directories.
Click to hide internal directories.