Documentation ¶
Index ¶
- func AddMenu(data map[string]interface{}) error
- func AddRole(data map[string]interface{}) (id int, err error)
- func AddUser(data map[string]interface{}) (id int, err error)
- func CheckRoleName(name string) (bool, error)
- func CheckRoleNameId(name string, id int) (bool, error)
- func CheckUser(username, password string) (bool, error)
- func CheckUserUsername(username string) (bool, error)
- func CheckUserUsernameId(username string, id int) (bool, error)
- func CleanAllMenu() error
- func CleanAllRole() error
- func CleanAllUser() error
- func CloseDB()
- func DeleteMenu(id int) error
- func DeleteRole(id int) error
- func DeleteUser(id int) error
- func EditMenu(id int, data interface{}) error
- func EditMenuGetRoles(id int) []int
- func EditRole(id int, data map[string]interface{}) error
- func EditUser(id int, data map[string]interface{}) error
- func ExistMenuByID(id int) (bool, error)
- func ExistRoleByID(id int) (bool, error)
- func ExistUserByID(id int) (bool, error)
- func GetMenuTotal(maps interface{}) (int, error)
- func GetRoleTotal(maps interface{}) (int, error)
- func GetUserTotal(maps interface{}) (int, error)
- type AuthSwag
- type Menu
- type Model
- type Role
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckRoleName ¶
func CheckUserUsername ¶
func CleanAllMenu ¶
func CleanAllMenu() error
func CleanAllRole ¶
func CleanAllRole() error
func CleanAllUser ¶
func CleanAllUser() error
func DeleteMenu ¶
func DeleteRole ¶
func DeleteUser ¶
func EditMenuGetRoles ¶
func ExistMenuByID ¶
func ExistRoleByID ¶
func ExistUserByID ¶
func GetMenuTotal ¶
func GetRoleTotal ¶
func GetUserTotal ¶
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.