db

package
v0.0.0-...-1bb2421 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const HistoryTablePrefix = "history_"

Variables

This section is empty.

Functions

func AddRoleCiTypeCondition

func AddRoleCiTypeCondition(roleCiType string, conditions []*models.RoleAttrConditionObj) error

func AddRoleCiTypeList

func AddRoleCiTypeList(roleCiType string, inputData []*models.SysRoleCiTypeListTable) error

func AutoCreateRoleCiTypeDataByCiType

func AutoCreateRoleCiTypeDataByCiType(ciTypeId string)

func AutoCreateRoleCiTypeDataByRole

func AutoCreateRoleCiTypeDataByRole(roleId string)

func BaseKeyCatCreate

func BaseKeyCatCreate(input models.SysBaseKeyCatTable) error

func BaseKeyCatQuery

func BaseKeyCatQuery(page, pageSize int) (pageInfo models.PageInfo, rowData []*models.SysBaseKeyCatTable, err error)

func BaseKeyCodeCreate

func BaseKeyCodeCreate(params []*models.BaseKeyCodeCreateObj) (rowData []*models.SysBaseKeyCodeTable, err error)

func BaseKeyCodeDelete

func BaseKeyCodeDelete(params []*models.BaseKeyCodeCreateObj) error

func BaseKeyCodeQuery

func BaseKeyCodeQuery(param *models.QueryRequestParam) (pageInfo models.PageInfo, rowData []*models.SysBaseKeyCodeTable, err error)

func BaseKeyCodeSwapPosition

func BaseKeyCodeSwapPosition(param *models.BaseKeyCodeSwapPositionParam) error

func BaseKeyCodeUpdate

func BaseKeyCodeUpdate(params []*models.BaseKeyCodeCreateObj) (rowData []*models.SysBaseKeyCodeTable, err error)

func CheckCiAttrIsPassword

func CheckCiAttrIsPassword(ciType, attr string) (isPwd bool, err error)

func CheckCiDataCallbackStatus

func CheckCiDataCallbackStatus(rowGuid, userToken string) (inProgressList []*models.SysWecubeProcessTable, err error)

func CheckIfCiTypesNameExists

func CheckIfCiTypesNameExists(name string) bool

func CiAttrApply

func CiAttrApply(ciTypeId, ciAttrId string, updateAutofill bool) error

func CiAttrCreate

func CiAttrCreate(param *models.SysCiTypeAttrTable) error

func CiAttrCreateByTemplate

func CiAttrCreateByTemplate(ciTypeId, ciTemplateId string) error

func CiAttrDelete

func CiAttrDelete(ciAttrId string) error

func CiAttrRollback

func CiAttrRollback(ciAttrId string) error

func CiAttrSwapPosition

func CiAttrSwapPosition(param *models.CiAttrSwapPositionParam, ciTypeId string) error

func CiAttrSwapPositionByUi

func CiAttrSwapPositionByUi(params []*models.CiAttrSwapPositionParam, ciTypeId string) error

func CiAttrUpdate

func CiAttrUpdate(param *models.SysCiTypeAttrTable) (updateAutoFill bool, err error)

func CiDataQuery

func CiDataQuery(ciType string, param *models.QueryRequestParam, permission *models.CiDataLegalGuidList, fromCore bool) (pageInfo models.PageInfo, rowData []map[string]interface{}, err error)

func CiTypesCreate

func CiTypesCreate(param *models.SysCiTypeTable) error

func CiTypesDelete

func CiTypesDelete(ciTypeId string) error

func CiTypesImageDelete

func CiTypesImageDelete(imageGuid, imageFileName string)

func CiTypesImageSave

func CiTypesImageSave(imageBytes []byte, imageType string) (imageGuid string, err error)

func CiTypesQuery

func CiTypesQuery(query *models.CiTypeQuery) error

func CiTypesRollback

func CiTypesRollback(ciTypeId string) error

func CiTypesUpdate

func CiTypesUpdate(param *models.SysCiTypeTable, newImageGuid string) (imageFileName string, err error)

func CreateCiTable

func CreateCiTable(ciTypeId string) error

func CreateReport

func CreateReport(param models.ModifyReport) (rowData *models.SysReportTable, err error)

func CreateRootReportObject

func CreateRootReportObject(param models.ModifyReportObject) (actions []*execAction, err error)

func DataPasswordQuery

func DataPasswordQuery(ciType, guid, field string, id int) (password string, err error)

func DataRollbackList

func DataRollbackList(inputGuid string) (rowData []map[string]interface{}, title []*models.CiDataActionQueryTitle, err error)

func DeleteReport

func DeleteReport(reportId string) (err error)

func DeleteRoleCiTypeCondition

func DeleteRoleCiTypeCondition(conditionGuidList []string) error

func DeleteRoleCiTypeList

func DeleteRoleCiTypeList(inputList []string) error

func EditRoleCiTypeCondition

func EditRoleCiTypeCondition(roleCiType string, conditions []*models.RoleAttrConditionObj) error

func EditRoleCiTypeList

func EditRoleCiTypeList(roleCiType string, inputData []*models.SysRoleCiTypeListTable) error

func ExportReportData

func ExportReportData(param *models.ExportReportParam) (result *models.ExportReportResult, err error)

func GenReportObjectDelAction

func GenReportObjectDelAction(reportObjectId string) (actions []*execAction, err error)

func GetAllDataModel

func GetAllDataModel() (result models.SyncDataModelResponse, err error)

func GetAllLogOperation

func GetAllLogOperation() []string

func GetCallbackQueryData

func GetCallbackQueryData(ciType, rowGuid, userToken string) (result models.CiDataActionQuery, err error)

func GetChildGraphElement

func GetChildGraphElement(root *models.GraphElementNode) (rowData *models.GraphElementNode, err error)

func GetChildReportObject

func GetChildReportObject(root *models.ReportObjectNode, rootGuidList []string, roAttrData []*models.SysReportObjectAttrTable, confirmTime, viewId string) (rowData []map[string]interface{}, editableList []string, err error)

func GetCiAttrByCiType

func GetCiAttrByCiType(ciTypeId string, isCreated bool) (rowData []*models.SysCiTypeAttrTable, err error)

func GetCiDataByFilters

func GetCiDataByFilters(attrId string, filterMap map[string]string, reqParam models.QueryRequestParam) (pageInfo models.PageInfo, rowData []map[string]interface{}, err error)

func GetCiDataPermissionGuidList

func GetCiDataPermissionGuidList(config *models.CiDataPermission, action string) (result models.CiDataLegalGuidList, err error)

func GetCiTemplate

func GetCiTemplate() (rowData []*models.SysCiTemplateTable, err error)

func GetCiTypeById

func GetCiTypeById(ciTypeId string) (rowData *models.SysCiTypeTable, err error)

func GetCiTypesReference

func GetCiTypesReference(ciTypeId string) (result []*models.CiTypeReferenceObj, err error)

func GetDeleteTableExecAction

func GetDeleteTableExecAction(tableName string, primeKey string, primeKeyVal string) (action *execAction, err error)

func GetGraphByView

func GetGraphByView(viewId string) (rowData []*models.SysGraphTable, err error)

func GetGuidByKeyName

func GetGuidByKeyName(ciType string, keyNameList []string) (guidList []string, err error)

func GetInsertTableExecAction

func GetInsertTableExecAction(tableName string, data interface{}, transNullStr map[string]string) (action *execAction, err error)

func GetMenuList

func GetMenuList() (rowData []*models.SysMenuTable, err error)

func GetPermissiveReportId

func GetPermissiveReportId(permissions []string, roles []string, hasReportIds []string) (reportIds []string, err error)

func GetPermissiveViewId

func GetPermissiveViewId(permissions []string, roles []string, hasViewIds []string) (viewIds []string, err error)

func GetReport

func GetReport(reportId string) (result models.ModifyReport, err error)

func GetReportAttr

func GetReportAttr(reportObj string) (roAttrData []*models.SysReportObjectAttrTable, dataNameMap map[string]string, err error)

func GetRoleCiDataPermission

func GetRoleCiDataPermission(roles []string, ciType string) (result models.CiDataPermission, err error)

func GetRoleCiPermission

func GetRoleCiPermission(query *models.RolePermissionQuery) error

func GetRoleCiTypeCondition

func GetRoleCiTypeCondition(roleCiType string) (result models.RoleAttrConditionResult, err error)

func GetRoleCiTypeList

func GetRoleCiTypeList(roleCiType string) (result []*models.SysRoleCiTypeListTable, err error)

func GetRoleList

func GetRoleList() (rowData []*models.SysRoleTable, err error)

func GetRoleMenu

func GetRoleMenu(role string) (rowData []*models.SysMenuTable, err error)

func GetRoleUser

func GetRoleUser(roleId string) (rowData []*models.SysUserTable, err error)

func GetRootCiDataWithReportId

func GetRootCiDataWithReportId(reportId string) (ciDataGuidList []string, err error)

func GetRootGraphElementByGraph

func GetRootGraphElementByGraph(graphId string) (rowData *models.GraphElementNode, err error)

func GetStateMachineStateList

func GetStateMachineStateList(machineList []string) (rowData []*models.GetStateMachineList, err error)

func GetStateTransitionByCiType

func GetStateTransitionByCiType(ciTypeId string, onlyOperation bool) (rowData []*models.SysStateTransitionTable, err error)

func GetUpdateTableExecAction

func GetUpdateTableExecAction(tableName string, primeKey string, primeKeyVal string, data interface{}, transNullStr map[string]string) (action *execAction, err error)

func GetUserList

func GetUserList() (rowData []*models.SysUserTable, err error)

func GetUserMenu

func GetUserMenu(user string) (rowData []*models.SysMenuTable, err error)

func GetUserRole

func GetUserRole(userId string, roles []string) (rowData []*models.SysRoleTable, err error)

func GetUserTokenPermission

func GetUserTokenPermission(userId string) (permissions []string, err error)

func GetViewList

func GetViewList(paramsMap map[string]interface{}, permissiveViewIds []string) (rowData []*models.SysViewTable, err error)

func HandleCiDataOperation

func HandleCiDataOperation(param models.HandleCiDataParam) (outputData []models.CiDataMapObj, newInputBody string, err error)

func ImportCiData

func ImportCiData(param *models.ExportReportResult, operator string) (err error)

func InitDatabase

func InitDatabase() error

func ListCiDataVariableCallback

func ListCiDataVariableCallback(ciType, rowGuid, userToken string) (processList []*models.CodeProcessQueryObj, err error)

func Login

func Login(param models.LoginParam) (userMessage models.SysUserTable, err error)

func ModifyReportObject

func ModifyReportObject(param models.ModifyReportObject) (err error)

func NewNullString

func NewNullString(s string) sql.NullString

func QueryMaxReportObjetSeqNo

func QueryMaxReportObjetSeqNo(reportId string) (seqNo int, err error)

func QueryOperationLog

func QueryOperationLog(param *models.QueryRequestParam) (pageInfo models.PageInfo, rowData []*models.SysLogTable, err error)

func QueryReportAttr

func QueryReportAttr(param *models.QueryRequestParam) (pageInfo models.PageInfo, rowData []*models.SysReportObjectAttrTable, err error)

func QueryReportData

func QueryReportData(reportId string, queryRequestParam *models.QueryRequestParam, user string) (pageInfo models.PageInfo, rowData []map[string]string, err error)

func QueryReportFlatStruct

func QueryReportFlatStruct(reportId string) (rowData *models.QueryReport, err error)

func QueryReportList

func QueryReportList(paramsMap map[string]interface{}, permissiveReportIds []string) (rowData []*models.SysReportTable, err error)

func QueryReportObject

func QueryReportObject(param *models.QueryRequestParam) (pageInfo models.PageInfo, rowData []*models.SysReportObjectTable, err error)

func QueryReportObjectStruct

func QueryReportObjectStruct(reportObjectData []*models.QueryReportObject) (objects []*models.QueryReportObject, err error)

func QueryReportStruct

func QueryReportStruct(reportId string) (rowData *models.QueryReport, err error)

func QueryRootReportObj

func QueryRootReportObj(reportId string) (rowData []*models.ReportObjectNode, err error)

func QueryViewById

func QueryViewById(viewId string) (rowData *models.ViewQuery, err error)

func ReferenceEnumCodes

func ReferenceEnumCodes(ciAttr string) (result []*models.OptionItemObj, err error)

func RoleCreate

func RoleCreate(role models.SysRoleTable) error

func RoleDelete

func RoleDelete(roleId string) error

func RoleUpdate

func RoleUpdate(role models.SysRoleTable) error

func SaveOperationLog

func SaveOperationLog(param *models.SysLogTable)

func StartCiDataCallback

func StartCiDataCallback(param models.CiDataCallbackParam) error

func StartConsumeAffectCiType

func StartConsumeAffectCiType()

func StartConsumeAffectGuidMap

func StartConsumeAffectGuidMap()

func StartConsumeUniquePathHandle

func StartConsumeUniquePathHandle()

func StartSyncImageFile

func StartSyncImageFile()

func SyncCoreRole

func SyncCoreRole()

func UpdateCiTypesStatus

func UpdateCiTypesStatus(ciTypeId, status string)

func UpdateReport

func UpdateReport(param models.ModifyReport) (rowData *models.SysReportTable, err error)

func UpdateRoleCiPermission

func UpdateRoleCiPermission(role string, params []*models.CiTypePermissionObj) error

func UpdateRoleMenu

func UpdateRoleMenu(param models.UpdateRoleMenuParam) error

func UpdateRoleUser

func UpdateRoleUser(params []*models.UpdateRoleUserParam) error

func UserCreate

func UserCreate(user models.SysUserTable) error

func UserDelete

func UserDelete(userId string) error

func UserPasswordReset

func UserPasswordReset(userId, pwd, oldPwd string) (password string, err error)

func UserUpdate

func UserUpdate(user models.SysUserTable) error

func ValidateInsertPermission

func ValidateInsertPermission(param map[string]*InsertPermissionObj, roles []string) error

func ValidateMenuApi

func ValidateMenuApi(roles []string, apiUrl, method string) (legal bool, err error)

func ViewConfirmAction

func ViewConfirmAction(param models.ViewData, userToken, operator string, userRoles []string) (result []models.CiDataMapObj, err error)

Types

type InsertPermissionObj

type InsertPermissionObj struct {
	CiType      string
	Actions     []*execAction
	GuidList    []string
	KeyNameList []string
}

Jump to

Keyboard shortcuts

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