Documentation
¶
Index ¶
- Constants
- func GetDb() *gorm.DB
- func Setup()
- func Shutdown() error
- type DataPerm
- func (dp DataPerm) Create(dataPerm *model.DataPerm) *gorm.DB
- func (dp DataPerm) Delete(dataPerm *model.DataPerm) *gorm.DB
- func (dp DataPerm) Get(id int) model.DataPerm
- func (dp DataPerm) List(listDto dto.GeneralListDto) ([]model.DataPerm, int64)
- func (dp DataPerm) Update(dataPerm *model.DataPerm) *gorm.DB
- type Dept
- func (u Dept) Create(Dept *model.Department) *gorm.DB
- func (u Dept) Delete(Dept *model.Department) *gorm.DB
- func (u Dept) Get(id int) model.Department
- func (u Dept) List(listDto dto.GeneralListDto) ([]model.Department, int64)
- func (u Dept) Update(Dept *model.Department, ups map[string]interface{}) *gorm.DB
- type DomainDao
- func (u DomainDao) Create(domain *model.Domain) *gorm.DB
- func (u DomainDao) Delete(domain *model.Domain) *gorm.DB
- func (u DomainDao) Get(id int) model.Domain
- func (u DomainDao) GetByCode(code string) model.Domain
- func (u DomainDao) List(listDto dto.GeneralListDto) ([]model.Domain, int64)
- func (u DomainDao) Update(domain *model.Domain, ups map[string]interface{}) *gorm.DB
- type LoginLog
- type LoginLogDao
- type LoginLogList
- type Menu
- func (m Menu) Create(menu *model.Menu) *gorm.DB
- func (m Menu) Delete(menu *model.Menu) *gorm.DB
- func (m Menu) Get(id int, preload bool) model.Menu
- func (m Menu) GetByAlias(alias string) model.Menu
- func (m Menu) GetMenusByIds(ids string) []model.Menu
- func (m Menu) GetMenusPermByIds(ids string) []model.Menu
- func (m Menu) GetSubMenus(id int) []model.Menu
- func (m Menu) List(treeDto dto.GeneralTreeDto) ([]model.Menu, int64)
- func (m Menu) Update(menu *model.Menu, ups map[string]interface{}) *gorm.DB
- type MenuPermAlias
- type OperationLog
- type OperationLogDao
- type OperationLogList
- type Role
- func (r Role) Create(role *model.Role) *gorm.DB
- func (r Role) Delete(role *model.Role) *gorm.DB
- func (u Role) Get(id int, preload bool) model.Role
- func (u Role) GetByName(name string) model.Role
- func (Role) GetRolesByIds(ids string) []model.Role
- func (Role) GetRolesByNames(names []string) []model.Role
- func (u Role) List(listDto dto.GeneralListDto) ([]model.Role, int64)
- func (r Role) Update(role *model.Role, ups map[string]interface{}) *gorm.DB
- type RoleDataPermDao
- func (dao RoleDataPermDao) DeleteByDataPermId(dataPermId int) error
- func (dao RoleDataPermDao) DeleteByRoleId(roleId int) error
- func (dao RoleDataPermDao) DeleteMulti(roleId int, dataPermIds []int) error
- func (dao RoleDataPermDao) GetByRoleId(roleId int) ([]model.GetByRoleIdData, int64)
- func (dao RoleDataPermDao) InsertMulti(dtos []dto.AssignDataPermDto) error
- type User
- func (u User) Create(user *model.User) *gorm.DB
- func (u User) Delete(user *model.User) *gorm.DB
- func (User) Get(id int, preload bool) model.User
- func (u User) GetByUserName(username string) model.User
- func (User) List(listDto dto.GeneralListDto) ([]model.User, int64)
- func (u User) Update(user *model.User, ups map[string]interface{}) *gorm.DB
- func (u User) UpdateDepartment(uids []string, departmentId int) error
- type UserOAuthDao
- func (u UserOAuthDao) Create(UserOAuth *model.UserOAuth) *gorm.DB
- func (u UserOAuthDao) Delete(UserOAuth *model.UserOAuth) *gorm.DB
- func (dao *UserOAuthDao) DeleteByUseridAndFrom(from int, user_id int) error
- func (u UserOAuthDao) Get(id int) model.UserOAuth
- func (dao *UserOAuthDao) GetUserByOpenId(openid string, from int) (model.UserOAuth, error)
- func (u UserOAuthDao) List(listDto dto.GeneralListDto) ([]model.UserOAuth, int64)
- type UserSecretDao
Constants ¶
View Source
const DRIVER_MYSQL = "mysql"
View Source
const DRIVER_SQLITE = "sqlite"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Dept ¶
type Dept struct { }
func (Dept) Get ¶
func (u Dept) Get(id int) model.Department
func (Dept) GetByRole(role model.Role){ db := GetDb() db.Where("code",role.Dept.Code) }
Get - get single Dept infoD
func (Dept) List ¶
func (u Dept) List(listDto dto.GeneralListDto) ([]model.Department, int64)
List - Depts list
type DomainDao ¶
type DomainDao struct { }
type LoginLogDao ¶
type LoginLogDao struct { }
func (LoginLogDao) Create ¶
func (LoginLogDao) Create(loginLogDto *dto.LoginLogDto) error
Insert Login Log
func (LoginLogDao) Lists ¶
func (LoginLogDao) Lists(listDto dto.LoginLogListDto) ([]LoginLogList, int64)
List
type LoginLogList ¶
type LoginLogList struct { Id int `json:"id"` UserId int `json:"user_id" binding:"required"` User User `json:"user"` Client string `json:"client"` Platform string `json:"platform"` LoginResult string `json:"login_result"` LoginStatus int `json:"login_status"` LoginTime time.Time `json:"login_time"` Ip string `json:"ip"` IpLocation string `json:"ip_location"` OperationTime string `json:"operation_time"` OperationContent string `json:"operation_content"` CreateTime time.Time `json:"-"` LastUpdateTime time.Time `json:"-"` Username string `json:"username"` }
type Menu ¶
type Menu struct { }
func (Menu) GetByAlias ¶
GetByAlias - get row by alias
func (Menu) GetMenusPermByIds ¶
GetMenusPermByIds - get permissions in menu table
type MenuPermAlias ¶
type MenuPermAlias struct { }
func (MenuPermAlias) Create ¶
func (MenuPermAlias) Create(menuPermAlias *model.MenuPermAlias)
Create - create of crud
func (MenuPermAlias) Delete ¶
func (MenuPermAlias) Delete(menuPermAlias model.MenuPermAlias)
Delete - delete of crud
func (MenuPermAlias) GetByAlias ¶
func (MenuPermAlias) GetByAlias(alias string, domainId int) model.MenuPermAlias
GetByAlias - get single row of alias
func (MenuPermAlias) GetByPerms ¶
func (MenuPermAlias) GetByPerms(perms string) []model.MenuPermAlias
GetByPerms - get all aliases rows of specific permission code
type OperationLog ¶
type OperationLog = model.OperationLog
type OperationLogDao ¶
type OperationLogDao struct { }
func (OperationLogDao) Create ¶
func (ol OperationLogDao) Create(orLogDto *dto.OperationLogDto) error
Insert OperationLog
func (OperationLogDao) Lists ¶
func (OperationLogDao) Lists(listDto dto.OperationLogListDto) ([]OperationLogList, int64)
List
type OperationLogList ¶
type OperationLogList struct { Id int `json:"id"` LogNo string `json:"log_no" binding:"required"` Module string `json:"module"` RequestUrl string `json:"request_url"` OperationMethod string `json:"operation_method"` Params string `json:"params"` ExceptionStack string `json:"exception_stack"` OperationResult string `json:"operation_result"` OperationSuccess int `json:"operation_success"` OperationTime time.Time `json:"operation_time"` UserId int `json:"user_id"` Ip string `json:"ip"` IpLocation string `json:"ip_location"` OperationContent string `json:"operation_content"` CreateTime time.Time `json:"create_time"` LastUpdateTime time.Time `json:"updated_time"` Username string `json:"username"` }
type Role ¶
type Role struct { }
func (Role) GetRolesByNames ¶
GetRolesByNames
type RoleDataPermDao ¶
type RoleDataPermDao struct { }
func (RoleDataPermDao) DeleteByDataPermId ¶
func (dao RoleDataPermDao) DeleteByDataPermId(dataPermId int) error
delete by dataPermId
func (RoleDataPermDao) DeleteByRoleId ¶
func (dao RoleDataPermDao) DeleteByRoleId(roleId int) error
delete by role_id
func (RoleDataPermDao) DeleteMulti ¶
func (dao RoleDataPermDao) DeleteMulti(roleId int, dataPermIds []int) error
batch delete
func (RoleDataPermDao) GetByRoleId ¶
func (dao RoleDataPermDao) GetByRoleId(roleId int) ([]model.GetByRoleIdData, int64)
get by role_id
func (RoleDataPermDao) InsertMulti ¶
func (dao RoleDataPermDao) InsertMulti(dtos []dto.AssignDataPermDto) error
assign data permission
type User ¶
type User struct { }
func (User) GetByUserName ¶
GetByUserName - get user from name
type UserOAuthDao ¶
type UserOAuthDao struct { }
func (*UserOAuthDao) DeleteByUseridAndFrom ¶
func (dao *UserOAuthDao) DeleteByUseridAndFrom(from int, user_id int) error
func (*UserOAuthDao) GetUserByOpenId ¶
func (UserOAuthDao) List ¶
func (u UserOAuthDao) List(listDto dto.GeneralListDto) ([]model.UserOAuth, int64)
List - userOAuth list
type UserSecretDao ¶
type UserSecretDao struct { }
func (UserSecretDao) Create ¶
func (u UserSecretDao) Create(UserSecret *model.UserSecret) *gorm.DB
func (UserSecretDao) Get ¶
func (u UserSecretDao) Get(uid int) model.UserSecret
func (UserSecretDao) Update ¶
func (u UserSecretDao) Update(UserSecret *model.UserSecret, ups map[string]interface{}) *gorm.DB
Update - update UserSecret
Click to show internal directories.
Click to hide internal directories.