db

package
v1.0.2-0...-48f91ac Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountApplicationDownloadLog

func CountApplicationDownloadLog(applicationId int64) (int64, error)

func CountDocViewLog

func CountDocViewLog(docId int64) (int64, error)

func CreateApplication

func CreateApplication(productId, uid int64, name, url, versionName string, versionCode int64, desc, createTime string) bool

func CreateDoc

func CreateDoc(productId, uid int64, name, ext, url, createTime string) error

func CreateMenu

func CreateMenu(menu *models.Menu) bool

func CreateNewUser

func CreateNewUser(username, name, roleList string) bool

func CreateProduct

func CreateProduct(projectId int64, productName string) error

func CreateProject

func CreateProject(name string) error

func CreateRole

func CreateRole(name string) bool

func CreateRoleMenu

func CreateRoleMenu(rid, mid int64) bool

func CreateRolePermission

func CreateRolePermission(rid int64, allowAccessPath, operation string) bool

func CreateUser

func CreateUser(username, name, pwd string) bool

func CreateUserRole

func CreateUserRole(uid, pid int64) bool

func DeleteSession

func DeleteSession(sessionId string)

func GetAllAdminMenus

func GetAllAdminMenus() ([]*models.AdminMenu, error)

func GetAllDocsByPid

func GetAllDocsByPid(projectId int64) ([]*models.Doc, error)

func GetAllProjectWithDocs

func GetAllProjectWithDocs() []*models.Project

func GetAllProjectWithProducts

func GetAllProjectWithProducts() []*models.Project

func GetAllProjects

func GetAllProjects() []*models.Project

func GetAllRoles

func GetAllRoles() ([]*models.Role, error)

func GetAllSession

func GetAllSession() []*models.Session

func GetAllUsers

func GetAllUsers() ([]*models.User, error)

func GetApplicationById

func GetApplicationById(cid int64) *models.Application

func GetApplicationsByProductId

func GetApplicationsByProductId(productId int64) []*models.Application

func GetDefaultMenu

func GetDefaultMenu() []*models.Menu

func GetDocById

func GetDocById(id int64) *models.Doc

func GetDocViewLogByDocId

func GetDocViewLogByDocId(docId int64) ([]*models.DocViewLog, error)

func GetDownloadLogByApplicationId

func GetDownloadLogByApplicationId(applicationId int64) ([]*models.ApplicationDownloadLog, error)

func GetMenuByMid

func GetMenuByMid(mid int64) *models.Menu

func GetProductionsByProjectId

func GetProductionsByProjectId(projectId int64) []*models.Product

func GetRoleMenusByRid

func GetRoleMenusByRid(rid int64) []*models.RoleMenu

func GetRolePermissionsByRid

func GetRolePermissionsByRid(rid int64) []*models.RolePermission

func GetUser

func GetUser(username string) *models.User

func GetUserById

func GetUserById(id int64) *models.User

func GetUserPermission

func GetUserPermission(uid int64) map[string]map[string]bool

func GetUserRoleMenu

func GetUserRoleMenu(uid int64) []*models.Menu

func GetUserRolesByUid

func GetUserRolesByUid(uid int64) []*models.UserRole

func InsertSession

func InsertSession(uid int64) *models.Session

func RecordApplicationDownloadLog

func RecordApplicationDownloadLog(uid int64, cid int64) bool

func RecordDocViewLog

func RecordDocViewLog(uid, docId int64) error

func ResetPassword

func ResetPassword(uid int64) error

func UpdateUser

func UpdateUser(user *models.User, ip string)

func UpdateUserPassword

func UpdateUserPassword(username string, password string) error

func UserRoleModify

func UserRoleModify(uid int64, roleList string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL