Documentation ¶
Index ¶
- func AddMenu(data map[string]string) (int, error)
- func AddRole(name string, data map[string][]int) (id int, err error)
- func AddUser(data map[string]interface{}) (id int, err error)
- func CheckUserUsername(username string) (bool, error)
- func CloseDB()
- func DeleteMenu(mid int) error
- func DeleteRole(rid int) error
- func DeleteUser(uid int) error
- func EditUser(uid int, data map[string][]int) error
- func ExistUserById(id int) (bool, error)
- func ExistsMenu(name string) (bool, error)
- func ExistsMenuById(id int) (bool, error)
- func ExistsRole(ro string) (bool, error)
- func ExistsRoleByID(rid int) (bool, error)
- func GetMenuTotal(maps map[string]interface{}) (id int, err error)
- func GetRoleTotal(data interface{}) (int, error)
- func GetUserTotal(maps interface{}) (int, error)
- func MigrateUsers() error
- func Setup()
- func UpdateMenu(data map[string]interface{}) error
- func UpdateRole(rid int, data map[string][]int) (id int, err error)
- func UpdateUswePassword(id int, password string) error
- type Menu
- type Model
- type Role
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckUserUsername ¶
func DeleteMenu ¶
func DeleteRole ¶
func DeleteUser ¶
func ExistUserById ¶
func ExistsMenu ¶
func ExistsMenuById ¶
func ExistsRole ¶
func ExistsRoleByID ¶
func GetMenuTotal ¶
func GetRoleTotal ¶
func GetUserTotal ¶
func MigrateUsers ¶
func MigrateUsers() error
func UpdateMenu ¶
func UpdateUswePassword ¶
Types ¶
type Menu ¶
type Role ¶
type Role struct { Model Name string `json:"name"` Menu []Menu `json:"menu" gorm:"many2many:role_menu;"` }
func GetRolesAll ¶
Click to show internal directories.
Click to hide internal directories.