Documentation ¶ Index ¶ type User type UserRepository func NewUserRepository() UserRepository Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type User ¶ type User struct { gorm.Model Id int `gorm:"not null int(11)"` Name string `gorm:"not null VARCHAR(191)"` Username string `gorm:"unique;VARCHAR(191)"` Password string `gorm:"not null VARCHAR(191)"` RoleID uint } type UserRepository ¶ type UserRepository interface { GetById(id int) (User, bool) DeleteById(id int) bool } func NewUserRepository ¶ func NewUserRepository() UserRepository Source Files ¶ View all Source files user.go Click to show internal directories. Click to hide internal directories.