Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DB *gorm.DB
)
Functions ¶
func AddPermission ¶
func AddPermission(name string)
func AddPermissions ¶
func AddPermissions(names ...string)
Types ¶
type Permission ¶
type User ¶
type User struct { ID uint64 `gorm:"primaryKey"` CreatedAt time.Time UpdatedAt time.Time DeletedAt gorm.DeletedAt `gorm:"index"` Username string `gorm:"unique;not null"` Password string `gorm:"not null"` Disabled bool `gorm:"not null;default:false"` IsAdmin bool `gorm:"not null;default:false"` Groups []Group `gorm:"many2many:user_groups;"` Permissions []Permission `gorm:"many2many:user_permissions;"` Icon string `gorm:"default:'';"` }
func (*User) AllPermissionStrings ¶
Click to show internal directories.
Click to hide internal directories.