Documentation ¶
Index ¶
- Constants
- Variables
- func ApproveWorkflow(c echo.Context) error
- func AuditTaskGroupV1(c echo.Context) error
- func BatchCancelWorkflows(c echo.Context) error
- func BatchCheckInstanceConnections(c echo.Context) error
- func BindOauth2User(c echo.Context) error
- func CancelWorkflow(c echo.Context) error
- func CheckCurrentUserCanAccessAuditPlan(c echo.Context, apName string, opCode int) error
- func CheckCurrentUserCanOperateWorkflow(c echo.Context, workflow *model.Workflow, ops []uint) error
- func CheckCurrentUserCanViewTask(c echo.Context, task *model.Task) (err error)
- func CheckCurrentUserCanViewWorkflow(c echo.Context, workflow *model.Workflow) error
- func CheckInstanceAndRuleTemplateDbType(ruleTemplates []*model.RuleTemplate, instances ...*model.Instance) error
- func CheckInstanceCanBindOneRuleTemplate(ruleTemplates []string) bool
- func CheckInstanceIsConnectable(c echo.Context) error
- func CheckInstanceIsConnectableByName(c echo.Context) error
- func CheckLicense(c echo.Context) error
- func CheckRuleTemplateCanBeBindEachInstance(s *model.Storage, tplName string, instances []*model.Instance) error
- func CheckUserCanOperateStep(user *model.User, workflow *model.Workflow, stepId int) error
- func CloneRuleTemplate(c echo.Context) error
- func CreateAndAuditTask(c echo.Context) error
- func CreateAuditPlan(c echo.Context) error
- func CreateAuditTasksGroupV1(c echo.Context) error
- func CreateAuditWhitelist(c echo.Context) error
- func CreateInstance(c echo.Context) error
- func CreateRole(c echo.Context) error
- func CreateRuleTemplate(c echo.Context) error
- func CreateUser(c echo.Context) error
- func CreateUserGroup(c echo.Context) (err error)
- func CreateWorkflow(c echo.Context) error
- func CreateWorkflowTemplate(c echo.Context) error
- func Dashboard(c echo.Context) error
- func DeleteAuditPlan(c echo.Context) error
- func DeleteAuditWhitelistById(c echo.Context) error
- func DeleteInstance(c echo.Context) error
- func DeleteRole(c echo.Context) error
- func DeleteRuleTemplate(c echo.Context) error
- func DeleteUser(c echo.Context) error
- func DeleteUserGroup(c echo.Context) (err error)
- func DeleteWorkflowTemplate(c echo.Context) error
- func DirectAudit(c echo.Context) error
- func DownloadTaskSQLFile(c echo.Context) error
- func DownloadTaskSQLReportFile(c echo.Context) error
- func ExecuteOneTaskOnWorkflowV1(c echo.Context) error
- func ExecuteTaskOnWorkflow(c echo.Context) error
- func FormatStringToInt(s string) (ret int, err error)
- func FormatStringToUint64(s string) (ret uint64, err error)
- func FullSyncAuditPlanSQLs(c echo.Context) error
- func GetAuditPlan(c echo.Context) error
- func GetAuditPlanAnalysisData(c echo.Context) error
- func GetAuditPlanMetas(c echo.Context) error
- func GetAuditPlanNotifyConfig(c echo.Context) error
- func GetAuditPlanReport(c echo.Context) error
- func GetAuditPlanReportSQLs(c echo.Context) error
- func GetAuditPlanReports(c echo.Context) error
- func GetAuditPlanSQLs(c echo.Context) error
- func GetAuditPlanTypes(c echo.Context) error
- func GetAuditPlans(c echo.Context) error
- func GetAuditTaskSQLContent(c echo.Context) error
- func GetCurrentUser(c echo.Context) error
- func GetDrivers(c echo.Context) error
- func GetInstance(c echo.Context) error
- func GetInstanceAdditionalMetas(c echo.Context) error
- func GetInstanceRules(c echo.Context) error
- func GetInstanceSchemas(c echo.Context) error
- func GetInstanceTips(c echo.Context) error
- func GetInstanceWorkflowTemplate(c echo.Context) error
- func GetInstances(c echo.Context) error
- func GetInstancesTypePercentV1(c echo.Context) error
- func GetLDAPConfiguration(c echo.Context) error
- func GetLicense(c echo.Context) error
- func GetLicenseUsageV1(c echo.Context) error
- func GetNeedExecTaskIds(s *model.Storage, workflow *model.Workflow, user *model.User) (taskIds map[uint]uint, err error)
- func GetOauth2Configuration(c echo.Context) error
- func GetOauth2Tips(c echo.Context) error
- func GetOperations(c echo.Context) error
- func GetRoleTips(c echo.Context) error
- func GetRoles(c echo.Context) error
- func GetRuleTemplate(c echo.Context) error
- func GetRuleTemplateTips(c echo.Context) error
- func GetRuleTemplates(c echo.Context) error
- func GetRules(c echo.Context) error
- func GetSMTPConfiguration(c echo.Context) error
- func GetSQLEInfo(c echo.Context) error
- func GetSQLELicenseInfo(c echo.Context) error
- func GetSQLExplain(c echo.Context) error
- func GetSQLQueryConfiguration(c echo.Context) error
- func GetSQLQueryHistory(c echo.Context) error
- func GetSQLResult(c echo.Context) error
- func GetSqlAverageExecutionTimeV1(c echo.Context) error
- func GetSqlExecutionFailPercentV1(c echo.Context) error
- func GetSqlWhitelist(c echo.Context) error
- func GetSummaryOfWorkflowTasksV1(c echo.Context) error
- func GetSystemVariables(c echo.Context) error
- func GetTableMetadata(c echo.Context) error
- func GetTask(c echo.Context) error
- func GetTaskAnalysisData(c echo.Context) error
- func GetTaskSQLs(c echo.Context) error
- func GetUser(c echo.Context) error
- func GetUserGroupTips(c echo.Context) error
- func GetUserGroups(c echo.Context) (err error)
- func GetUserTips(c echo.Context) error
- func GetUsers(c echo.Context) error
- func GetWeChatConfiguration(c echo.Context) error
- func GetWorkflow(c echo.Context) error
- func GetWorkflowAuditPassPercentV1(c echo.Context) error
- func GetWorkflowCountsV1(c echo.Context) error
- func GetWorkflowCreatedCountsEachDayV1(c echo.Context) error
- func GetWorkflowDurationOfWaitingForAuditV1(c echo.Context) error
- func GetWorkflowDurationOfWaitingForExecutionV1(c echo.Context) error
- func GetWorkflowPassPercentV1(c echo.Context) error
- func GetWorkflowPercentCountedByInstanceTypeV1(c echo.Context) error
- func GetWorkflowRejectedPercentGroupByCreatorV1(c echo.Context) error
- func GetWorkflowRejectedPercentGroupByInstanceV1(c echo.Context) error
- func GetWorkflowStatusCountV1(c echo.Context) error
- func GetWorkflowTemplate(c echo.Context) error
- func GetWorkflowTemplateTips(c echo.Context) error
- func GetWorkflowTemplates(c echo.Context) error
- func GetWorkflows(c echo.Context) error
- func IsTaskCanExecute(s *model.Storage, taskId string) (bool, error)
- func ListTableBySchema(c echo.Context) error
- func Login(c echo.Context) error
- func Oauth2Callback(c echo.Context) error
- func Oauth2Link(c echo.Context) error
- func PartialSyncAuditPlanSQLs(c echo.Context) error
- func PrepareForWorkflowExecution(c echo.Context, workflow *model.Workflow, user *model.User, workflowId int) error
- func PrepareSQLQuery(c echo.Context) error
- func RejectWorkflow(c echo.Context) error
- func SetLicense(c echo.Context) error
- func TestAuditPlanNotifyConfig(c echo.Context) error
- func TestSMTPConfigurationV1(c echo.Context) error
- func TestWeChatConfigurationV1(c echo.Context) error
- func TriggerAuditPlan(c echo.Context) error
- func UpdateAuditPlan(c echo.Context) error
- func UpdateAuditPlanNotifyConfig(c echo.Context) error
- func UpdateAuditTaskSQLs(c echo.Context) error
- func UpdateAuditWhitelistById(c echo.Context) error
- func UpdateCurrentUser(c echo.Context) error
- func UpdateCurrentUserPassword(c echo.Context) error
- func UpdateInstance(c echo.Context) error
- func UpdateLDAPConfiguration(c echo.Context) error
- func UpdateOauth2Configuration(c echo.Context) error
- func UpdateOtherUserPassword(c echo.Context) error
- func UpdateRole(c echo.Context) error
- func UpdateRuleTemplate(c echo.Context) error
- func UpdateSMTPConfiguration(c echo.Context) error
- func UpdateSystemVariables(c echo.Context) error
- func UpdateUser(c echo.Context) error
- func UpdateUserGroup(c echo.Context) (err error)
- func UpdateWeChatConfigurationV1(c echo.Context) error
- func UpdateWorkflow(c echo.Context) error
- func UpdateWorkflowSchedule(c echo.Context) error
- func UpdateWorkflowTemplate(c echo.Context) error
- type AuditPlanMetaV1
- type AuditPlanParamReqV1
- type AuditPlanParamResV1
- type AuditPlanReportResV1
- type AuditPlanReportSQLResV1
- type AuditPlanResV1
- type AuditPlanSQLReqV1
- type AuditPlanSQLResV1
- type AuditPlanTypesV1
- type AuditResDataV1
- type AuditSQLResV1
- type AuditTaskGroupReqV1
- type AuditTaskGroupRes
- type AuditTaskGroupResV1
- type AuditTaskResV1
- type AuditTaskSQLContentResV1
- type AuditTaskSQLResV1
- type AuditTasksGroupResV1
- type AuditWhitelistResV1
- type BatchCancelWorkflowsReqV1
- type BatchCheckInstanceConnectionsReqV1
- type BatchGetInstanceConnectionsResV1
- type BindOauth2UserReqV1
- type BindOauth2UserResDataV1
- type BindOauth2UserResV1
- type CheckLicenseResV1
- type CloneRuleTemplateReqV1
- type CreateAuditPlanReqV1
- type CreateAuditTaskReqV1
- type CreateAuditTasksGroupReqV1
- type CreateAuditTasksGroupResV1
- type CreateAuditWhitelistReqV1
- type CreateInstanceReqV1
- type CreateRoleReqV1
- type CreateRuleTemplateReqV1
- type CreateUserGroupReqV1
- type CreateUserReqV1
- type CreateWorkflowReqV1
- type CreateWorkflowTemplateReqV1
- type DashboardResV1
- type DirectAuditReqV1
- type DirectAuditResV1
- type DownloadAuditTaskSQLsFileReqV1
- type DriversResV1
- type ExplainClassicResult
- type FullSyncAuditPlanSQLsReqV1
- type GetAuditPlanAnalysisDataResV1
- type GetAuditPlanMetasReqV1
- type GetAuditPlanMetasResV1
- type GetAuditPlanNotifyConfigResDataV1
- type GetAuditPlanNotifyConfigResV1
- type GetAuditPlanReportResV1
- type GetAuditPlanReportSQLsReqV1
- type GetAuditPlanReportSQLsResV1
- type GetAuditPlanReportsReqV1
- type GetAuditPlanReportsResV1
- type GetAuditPlanResV1
- type GetAuditPlanSQLsReqV1
- type GetAuditPlanSQLsResV1
- type GetAuditPlanTypesResV1
- type GetAuditPlansReqV1
- type GetAuditPlansResV1
- type GetAuditTaskResV1
- type GetAuditTaskSQLContentResV1
- type GetAuditTaskSQLsReqV1
- type GetAuditTaskSQLsResV1
- type GetAuditWhitelistReqV1
- type GetAuditWhitelistResV1
- type GetDashboardResV1
- type GetDriversResV1
- type GetInstanceAdditionalMetasResV1
- type GetInstanceConnectableReqV1
- type GetInstanceConnectableResV1
- type GetInstanceResV1
- type GetInstanceSchemaResV1
- type GetInstanceTipsResV1
- type GetInstanceWorkflowTemplateResV1
- type GetInstancesReqV1
- type GetInstancesResV1
- type GetInstancesTypePercentResV1
- type GetLDAPConfigurationResV1
- type GetLicenseResV1
- type GetLicenseUsageResV1
- type GetOauth2ConfigurationResDataV1
- type GetOauth2ConfigurationResV1
- type GetOauth2TipsResDataV1
- type GetOauth2TipsResV1
- type GetOperationsResV1
- type GetRoleTipsResV1
- type GetRolesReqV1
- type GetRolesResV1
- type GetRuleTemplateResV1
- type GetRuleTemplateTipsResV1
- type GetRuleTemplatesReqV1
- type GetRuleTemplatesResV1
- type GetRulesReqV1
- type GetRulesResV1
- type GetSMTPConfigurationResV1
- type GetSQLAnalysisDataResItemV1
- type GetSQLEInfoResV1
- type GetSQLExplainResV1
- type GetSQLQueryConfigurationResDataV1
- type GetSQLQueryConfigurationResV1
- type GetSQLQueryHistoryReqV1
- type GetSQLQueryHistoryResDataV1
- type GetSQLQueryHistoryResV1
- type GetSQLResultReqV1
- type GetSQLResultResDataV1
- type GetSQLResultResV1
- type GetSqlAverageExecutionTimeReqV1
- type GetSqlAverageExecutionTimeResV1
- type GetSqlExecutionFailPercentReqV1
- type GetSqlExecutionFailPercentResV1
- type GetSqlExplainReqV1
- type GetSystemVariablesResV1
- type GetTableMetadataResV1
- type GetTaskAnalysisDataResItemV1
- type GetTaskAnalysisDataResV1
- type GetUserDetailResV1
- type GetUserGroupTipsResV1
- type GetUserGroupsReqV1
- type GetUserGroupsResV1
- type GetUserLoginResV1
- type GetUserTipsResV1
- type GetUsersReqV1
- type GetUsersResV1
- type GetWeChatConfigurationResV1
- type GetWorkflowAuditPassPercentResV1
- type GetWorkflowCountsResV1
- type GetWorkflowCreatedCountsEachDayReqV1
- type GetWorkflowCreatedCountsEachDayResV1
- type GetWorkflowDurationOfWaitingForAuditResV1
- type GetWorkflowDurationOfWaitingForExecutionResV1
- type GetWorkflowPassPercentResV1
- type GetWorkflowPercentCountedByInstanceTypeResV1
- type GetWorkflowRejectedPercentGroupByCreatorReqV1
- type GetWorkflowRejectedPercentGroupByCreatorResV1
- type GetWorkflowRejectedPercentGroupByInstanceReqV1
- type GetWorkflowRejectedPercentGroupByInstanceResV1
- type GetWorkflowResV1
- type GetWorkflowStatusCountResV1
- type GetWorkflowTasksItemV1
- type GetWorkflowTasksResV1
- type GetWorkflowTemplateResV1
- type GetWorkflowTemplateTipResV1
- type GetWorkflowTemplatesReqV1
- type GetWorkflowTemplatesResV1
- type GetWorkflowsReqV1
- type GetWorkflowsResV1
- type InstanceAdditionalMetaV1
- type InstanceAdditionalParamReqV1
- type InstanceAdditionalParamResV1
- type InstanceConnectableResV1
- type InstanceConnectionResV1
- type InstanceForCheckConnection
- type InstanceForCreatingTask
- type InstanceResV1
- type InstanceSchemaResV1
- type InstanceTableMeta
- type InstanceTipReqV1
- type InstanceTipResV1
- type InstanceTypePercent
- type InstancesTypePercentV1
- type LDAPConfigurationReqV1
- type LDAPConfigurationResV1
- type LicenseItem
- type LicenseUsageItem
- type LicenseUsageV1
- type ListTableBySchemaResV1
- type LoginChecker
- type MaintenanceTimeReqV1
- type MaintenanceTimeResV1
- type Oauth2ConfigurationReqV1
- type OperationResV1
- type PartialSyncAuditPlanSQLsReqV1
- type PatchUserGroupReqV1
- type PrepareSQLQueryReqV1
- type PrepareSQLQueryResDataV1
- type PrepareSQLQueryResSQLV1
- type PrepareSQLQueryResV1
- type RejectWorkflowReqV1
- type RoleResV1
- type RoleTipResV1
- type RuleParamReqV1
- type RuleParamResV1
- type RuleReqV1
- type RuleResV1
- type RuleTemplateDetailResV1
- type RuleTemplateResV1
- type RuleTemplateTipReqV1
- type RuleTemplateTipResV1
- type SMTPConfigurationResV1
- type SQLExplain
- type SQLHistoryItemResV1
- type SQLQueryConfigReqV1
- type SQLQueryConfigResV1
- type SQLQuerySQLExplain
- type SQLResultItemHeadResV1
- type SqlAverageExecutionTime
- type SqlExecutionFailPercent
- type SystemVariablesResV1
- type Table
- type TableColumns
- type TableIndexes
- type TableMeta
- type TableMetaItemHeadResV1
- type TestAuditPlanNotifyConfigResDataV1
- type TestAuditPlanNotifyConfigResV1
- type TestSMTPConfigurationReqV1
- type TestSMTPConfigurationResDataV1
- type TestSMTPConfigurationResV1
- type TestWeChatConfigurationReqV1
- type TestWeChatConfigurationResDataV1
- type TestWeChatConfigurationResV1
- type TimeReqV1
- type TimeResV1
- type TriggerAuditPlanResV1
- type UpdateAuditPlanNotifyConfigReqV1
- type UpdateAuditPlanReqV1
- type UpdateAuditTaskSQLsReqV1
- type UpdateAuditWhitelistReqV1
- type UpdateCurrentUserPasswordReqV1
- type UpdateCurrentUserReqV1
- type UpdateInstanceReqV1
- type UpdateOtherUserPasswordReqV1
- type UpdateRoleReqV1
- type UpdateRuleTemplateReqV1
- type UpdateSMTPConfigurationReqV1
- type UpdateSystemVariablesReqV1
- type UpdateUserReqV1
- type UpdateWeChatConfigurationReqV1
- type UpdateWorkflowReqV1
- type UpdateWorkflowScheduleV1
- type UpdateWorkflowTemplateReqV1
- type UserDetailResV1
- type UserGroupListItemResV1
- type UserGroupTipListItem
- type UserLoginReqV1
- type UserLoginResV1
- type UserResV1
- type UserTipResV1
- type WeChatConfigurationResV1
- type WorkFlowStepTemplateReqV1
- type WorkFlowStepTemplateResV1
- type WorkflowAuditPassPercentV1
- type WorkflowCountsV1
- type WorkflowCreatedCountsEachDayItem
- type WorkflowCreatedCountsEachDayV1
- type WorkflowDetailResV1
- type WorkflowPassPercentV1
- type WorkflowPercentCountedByInstanceType
- type WorkflowPercentCountedByInstanceTypeV1
- type WorkflowRecordResV1
- type WorkflowRejectedPercentGroupByCreator
- type WorkflowRejectedPercentGroupByInstance
- type WorkflowResV1
- type WorkflowStageDuration
- type WorkflowStatisticsResV1
- type WorkflowStatusCountV1
- type WorkflowStepResV1
- type WorkflowTemplateDetailResV1
- type WorkflowTemplateResV1
- type WorkflowTemplateTipResV1
Constants ¶
const ( InputSQLFileName = "input_sql_file" InputMyBatisXMLFileName = "input_mybatis_xml_file" )
const MaximumDataSourceNum = 10
Variables ¶
var ErrDirectAudit = errors.New(errors.GenericError, fmt.Errorf("audit failed, please confirm whether the type of audit plugin supports static audit, please check the log for details"))
var ErrInstanceNotExist = errors.New(errors.DataNotExist, fmt.Errorf("instance is not exist"))
var ErrNoLicenseRequired = errors.New(errors.EnterpriseEditionFeatures, e.New("sqle-qa no license required"))
var ErrTaskNoAccess = errors.New(errors.DataNotExist, fmt.Errorf("task is not exist or you can't access it"))
var ErrTooManyDataSource = errors.New(errors.DataConflict, fmt.Errorf("the number of data sources must be less than %v", MaximumDataSourceNum))
var ErrWorkflowNoAccess = errors.New(errors.DataNotExist, fmt.Errorf("workflow is not exist or you can't access it"))
Functions ¶
func ApproveWorkflow ¶
func ApproveWorkflow(c echo.Context) error
@Summary 审批通过 @Description approve workflow @Tags workflow @Id approveWorkflowV1 @Security ApiKeyAuth @Param workflow_id path string true "workflow id" @Param workflow_step_id path string true "workflow step id" @Success 200 {object} controller.BaseRes @router /v1/workflows/{workflow_id}/steps/{workflow_step_id}/approve [post]
func AuditTaskGroupV1 ¶ added in v1.2209.0
func AuditTaskGroupV1(c echo.Context) error
AuditTaskGroupV1 @Summary 审核任务组 @Description audit task group. @Description 1. formData[sql]: sql content; @Description 2. file[input_sql_file]: it is a sql file; @Description 3. file[input_mybatis_xml_file]: it is mybatis xml file, sql will be parsed from it. @Accept mpfd @Produce json @Tags task @Id auditTaskGroupIdV1 @Security ApiKeyAuth @Param task_group_id formData uint true "group id of tasks" @Param sql formData string false "sqls for audit" @Param input_sql_file formData file false "input SQL file" @Param input_mybatis_xml_file formData file false "input mybatis XML file" @Success 200 {object} v1.AuditTaskGroupResV1 @router /v1/task_groups/audit [post]
func BatchCancelWorkflows ¶
func BatchCancelWorkflows(c echo.Context) error
BatchCancelWorkflows batch cancel workflows. @Summary 批量取消工单 @Description batch cancel workflows @Tags workflow @Id batchCancelWorkflowsV1 @Security ApiKeyAuth @Param BatchCancelWorkflowsReqV1 body v1.BatchCancelWorkflowsReqV1 true "batch cancel workflows request" @Success 200 {object} controller.BaseRes @router /v1/workflows/cancel [post]
func BatchCheckInstanceConnections ¶ added in v1.2209.0
func BatchCheckInstanceConnections(c echo.Context) error
BatchCheckInstanceConnections test instance db connection @Summary 批量测试实例连通性(实例提交后) @Description batch test instance db connections @Id batchCheckInstanceIsConnectableByName @Tags instance @Security ApiKeyAuth @Param instances body v1.BatchCheckInstanceConnectionsReqV1 true "instances" @Success 200 {object} v1.BatchGetInstanceConnectionsResV1 @router /v1/instances/connections [post]
func BindOauth2User ¶ added in v1.2205.0
func BindOauth2User(c echo.Context) error
@Summary 绑定 Oauth2 和 sqle用户 @Description bind Oauth2 user to sqle @Id bindOauth2User @Tags oauth2 @Param conf body v1.BindOauth2UserReqV1 true "bind oauth2 user req" @Success 200 {object} v1.BindOauth2UserResV1 @router /v1/oauth2/user/bind [post]
func CancelWorkflow ¶
func CancelWorkflow(c echo.Context) error
@Summary 审批关闭(中止) @Description cancel workflow @Tags workflow @Id cancelWorkflowV1 @Security ApiKeyAuth @Param workflow_id path string true "workflow id" @Success 200 {object} controller.BaseRes @router /v1/workflows/{workflow_id}/cancel [post]
func CheckCurrentUserCanAccessAuditPlan ¶ added in v1.2201.0
func CheckCurrentUserCanOperateWorkflow ¶ added in v1.2209.0
func CheckCurrentUserCanViewTask ¶ added in v1.2209.0
func CheckCurrentUserCanViewWorkflow ¶ added in v1.2209.0
func CheckInstanceAndRuleTemplateDbType ¶
func CheckInstanceAndRuleTemplateDbType(ruleTemplates []*model.RuleTemplate, instances ...*model.Instance) error
func CheckInstanceIsConnectable ¶
func CheckInstanceIsConnectable(c echo.Context) error
CheckInstanceIsConnectable test instance db connection @Summary 实例连通性测试(实例提交前) @Description test instance db connection 注:可直接提交创建实例接口的body,该接口的json 内容是创建实例的 json 的子集 @Accept json @Id checkInstanceIsConnectableV1 @Tags instance @Security ApiKeyAuth @Param instance body v1.GetInstanceConnectableReqV1 true "instance info" @Success 200 {object} v1.GetInstanceConnectableResV1 @router /v1/instance_connection [post]
func CheckInstanceIsConnectableByName ¶
func CheckInstanceIsConnectableByName(c echo.Context) error
CheckInstanceIsConnectableByName test instance db connection @Summary 实例连通性测试(实例提交后) @Description test instance db connection @Id checkInstanceIsConnectableByNameV1 @Tags instance @Security ApiKeyAuth @Param instance_name path string true "instance name" @Success 200 {object} v1.GetInstanceConnectableResV1 @router /v1/instances/{instance_name}/connection [get]
func CheckLicense ¶ added in v1.2203.0
func CheckLicense(c echo.Context) error
CheckLicense parse and check sqle license @Summary 解析和校验 sqle license @Description parse and check sqle license @Id checkSQLELicenseV1 @Tags configuration @Accept mpfd @Security ApiKeyAuth @Param license_file formData file true "SQLE license file" @Success 200 {object} v1.CheckLicenseResV1 @router /v1/configurations/license/check [post]
func CheckUserCanOperateStep ¶ added in v1.2209.0
func CloneRuleTemplate ¶
func CloneRuleTemplate(c echo.Context) error
@Summary 克隆规则模板 @Description clone a rule template @Id CloneRuleTemplateV1 @Tags rule_template @Security ApiKeyAuth @Accept json @Param rule_template_name path string true "rule template name" @Param instance body v1.CloneRuleTemplateReqV1 true "clone rule template request" @Success 200 {object} controller.BaseRes @router /v1/rule_templates/{rule_template_name}/clone [post]
func CreateAndAuditTask ¶
func CreateAndAuditTask(c echo.Context) error
@Summary 创建Sql扫描任务并提交审核 @Description create and audit a task, you can upload sql content in three ways, any one can be used, but only one is effective. @Description 1. formData[sql]: sql content; @Description 2. file[input_sql_file]: it is a sql file; @Description 3. file[input_mybatis_xml_file]: it is mybatis xml file, sql will be parsed from it. @Accept mpfd @Produce json @Tags task @Id createAndAuditTaskV1 @Security ApiKeyAuth @Param instance_name formData string true "instance name" @Param instance_schema formData string false "schema of instance" @Param sql formData string false "sqls for audit" @Param input_sql_file formData file false "input SQL file" @Param input_mybatis_xml_file formData file false "input mybatis XML file" @Success 200 {object} v1.GetAuditTaskResV1 @router /v1/tasks/audits [post]
func CreateAuditPlan ¶
func CreateAuditPlan(c echo.Context) error
@Summary 添加扫描任务 @Description create audit plan @Id createAuditPlanV1 @Tags audit_plan @Security ApiKeyAuth @Accept json @Param audit_plan body v1.CreateAuditPlanReqV1 true "create audit plan" @Success 200 {object} controller.BaseRes @router /v1/audit_plans [post]
func CreateAuditTasksGroupV1 ¶ added in v1.2209.0
func CreateAuditTasksGroupV1(c echo.Context) error
CreateAuditTasksGroupV1 @Summary 创建审核任务组 @Description create tasks group. @Accept json @Produce json @Tags task @Id createAuditTasksV1 @Security ApiKeyAuth @Param req body v1.CreateAuditTasksGroupReqV1 true "parameters for creating audit tasks group" @Success 200 {object} v1.CreateAuditTasksGroupResV1 @router /v1/task_groups [post]
func CreateAuditWhitelist ¶
func CreateAuditWhitelist(c echo.Context) error
@Summary 添加SQL白名单 @Description create a sql whitelist @Accept json @Id createAuditWhitelistV1 @Tags audit_whitelist @Security ApiKeyAuth @Param instance body v1.CreateAuditWhitelistReqV1 true "add sql whitelist req" @Success 200 {object} controller.BaseRes @router /v1/audit_whitelist [post]
func CreateInstance ¶
func CreateInstance(c echo.Context) error
CreateInstance create instance @Summary 添加实例 @Description create a instance @Id createInstanceV1 @Tags instance @Security ApiKeyAuth @Accept json @Param instance body v1.CreateInstanceReqV1 true "add instance" @Success 200 {object} controller.BaseRes @router /v1/instances [post]
func CreateRole ¶
func CreateRole(c echo.Context) error
@Summary 创建角色 @Description create role @Deprecated @Id createRoleV1 @Tags role @Security ApiKeyAuth @Accept json @Produce json @Param instance body v1.CreateRoleReqV1 true "create role" @Success 200 {object} controller.BaseRes @router /v1/roles [post]
func CreateRuleTemplate ¶
func CreateRuleTemplate(c echo.Context) error
@Summary 添加规则模板 @Description create a rule template @Id createRuleTemplateV1 @Tags rule_template @Security ApiKeyAuth @Accept json @Param instance body v1.CreateRuleTemplateReqV1 true "add rule template request" @Success 200 {object} controller.BaseRes @router /v1/rule_templates [post]
func CreateUser ¶
func CreateUser(c echo.Context) error
@Summary 创建用户 @Description create user @Id createUserV1 @Tags user @Security ApiKeyAuth @Accept json @Produce json @Param instance body v1.CreateUserReqV1 true "create user" @Success 200 {object} controller.BaseRes @router /v1/users [post]
func CreateUserGroup ¶ added in v1.2202.0
func CreateUserGroup(c echo.Context) (err error)
@Summary 创建用户组 @Description create user group @Id CreateUserGroupV1 @Tags user_group @Security ApiKeyAuth @Accept json @Produce json @Param instance body v1.CreateUserGroupReqV1 true "create user group" @Success 200 {object} controller.BaseRes @router /v1/user_groups [post]
func CreateWorkflow ¶
func CreateWorkflow(c echo.Context) error
@Summary 创建工单 @Deprecated @Description create workflow @Accept json @Produce json @Tags workflow @Id createWorkflowV1 @Security ApiKeyAuth @Param instance body v1.CreateWorkflowReqV1 true "create workflow request" @Success 200 {object} controller.BaseRes @router /v1/workflows [post]
func CreateWorkflowTemplate ¶
func CreateWorkflowTemplate(c echo.Context) error
@Summary 创建Sql审批流程模板 @Description create a workflow template @Accept json @Produce json @Tags workflow @Id createWorkflowTemplateV1 @Security ApiKeyAuth @Param instance body v1.CreateWorkflowTemplateReqV1 true "create workflow template request" @Success 200 {object} controller.BaseRes @router /v1/workflow_templates [post]
func Dashboard ¶
func Dashboard(c echo.Context) error
@Summary 获取 dashboard 信息 @Description get dashboard info @Id getDashboardV1 @Tags dashboard @Security ApiKeyAuth @Produce json @Success 200 {object} v1.GetDashboardResV1 @router /v1/dashboard [get]
func DeleteAuditPlan ¶
func DeleteAuditPlan(c echo.Context) error
@Summary 删除扫描任务 @Description delete audit plan @Id deleteAuditPlanV1 @Tags audit_plan @Security ApiKeyAuth @Param audit_plan_name path string true "audit plan name" @Success 200 {object} controller.BaseRes @router /v1/audit_plans/{audit_plan_name}/ [delete]
func DeleteAuditWhitelistById ¶
func DeleteAuditWhitelistById(c echo.Context) error
@Summary 删除SQL白名单信息 @Description remove sql white @Id deleteAuditWhitelistByIdV1 @Tags audit_whitelist @Security ApiKeyAuth @Param audit_whitelist_id path string true "audit whitelist id" @Success 200 {object} controller.BaseRes @router /v1/audit_whitelist/{audit_whitelist_id}/ [delete]
func DeleteInstance ¶
func DeleteInstance(c echo.Context) error
DeleteInstance delete instance @Summary 删除实例 @Description delete instance db @Id deleteInstanceV1 @Tags instance @Security ApiKeyAuth @Param instance_name path string true "instance name" @Success 200 {object} controller.BaseRes @router /v1/instances/{instance_name}/ [delete]
func DeleteRole ¶
func DeleteRole(c echo.Context) error
@Summary 删除角色 @Description delete role @Id deleteRoleV1 @Tags role @Security ApiKeyAuth @Accept json @Produce json @Param role_name path string true "role name" @Success 200 {object} controller.BaseRes @router /v1/roles/{role_name}/ [delete]
func DeleteRuleTemplate ¶
func DeleteRuleTemplate(c echo.Context) error
@Summary 删除规则模板 @Description delete rule template @Id deleteRuleTemplateV1 @Tags rule_template @Security ApiKeyAuth @Param rule_template_name path string true "rule template name" @Success 200 {object} controller.BaseRes @router /v1/rule_templates/{rule_template_name}/ [delete]
func DeleteUser ¶
func DeleteUser(c echo.Context) error
@Summary 删除用户 @Description delete user @Id deleteUserV1 @Tags user @Security ApiKeyAuth @Param user_name path string true "user name" @Success 200 {object} controller.BaseRes @router /v1/users/{user_name}/ [delete]
func DeleteUserGroup ¶ added in v1.2202.0
func DeleteUserGroup(c echo.Context) (err error)
@Summary 删除用户组 @Description delete user group @Id deleteUserGroupV1 @Tags user_group @Security ApiKeyAuth @Param user_group_name path string true "user_group_name" @Success 200 {object} controller.BaseRes @router /v1/user_groups/{user_group_name}/ [delete]
func DeleteWorkflowTemplate ¶
func DeleteWorkflowTemplate(c echo.Context) error
@Summary 删除Sql审批流程模板 @Description update the workflow template @Tags workflow @Id deleteWorkflowTemplateV1 @Security ApiKeyAuth @Accept json @Produce json @Param workflow_template_name path string true "workflow template name" @Success 200 {object} controller.BaseRes @router /v1/workflow_templates/{workflow_template_name}/ [delete]
func DirectAudit ¶ added in v1.2207.0
func DirectAudit(c echo.Context) error
@Summary 直接审核SQL @Description Direct audit sql @Id directAuditV1 @Tags sql_audit @Security ApiKeyAuth @Param req body v1.DirectAuditReqV1 true "sqls that should be audited" @Success 200 {object} v1.DirectAuditResV1 @router /v1/sql_audit [post]
func DownloadTaskSQLFile ¶
func DownloadTaskSQLFile(c echo.Context) error
@Summary 下载指定扫描任务的SQL文件 @Description download SQL file for the audit task @Tags task @Id downloadAuditTaskSQLFileV1 @Security ApiKeyAuth @Param task_id path string true "task id" @Success 200 file 1 "sql file" @router /v1/tasks/audits/{task_id}/sql_file [get]
func DownloadTaskSQLReportFile ¶
func DownloadTaskSQLReportFile(c echo.Context) error
@Summary 下载指定扫描任务的SQLs信息报告 @Description download report file of all SQLs information belong to the specified audit task @Tags task @Id downloadAuditTaskSQLReportV1 @Security ApiKeyAuth @Param task_id path string true "task id" @Param no_duplicate query boolean false "select unique (fingerprint and audit result) for task sql" @Success 200 file 1 "sql report csv file" @router /v1/tasks/audits/{task_id}/sql_report [get]
func ExecuteOneTaskOnWorkflowV1 ¶ added in v1.2209.0
func ExecuteOneTaskOnWorkflowV1(c echo.Context) error
ExecuteOneTaskOnWorkflowV1 @Summary 工单提交单个数据源上线 @Description execute one task on workflow @Tags workflow @Id executeOneTaskOnWorkflowV1 @Security ApiKeyAuth @Param workflow_id path string true "workflow id" @Param task_id path string true "task id" @Success 200 {object} controller.BaseRes @router /v1/workflows/{workflow_id}/tasks/{task_id}/execute [post]
func ExecuteTaskOnWorkflow ¶ added in v1.2112.0
func ExecuteTaskOnWorkflow(c echo.Context) error
@Summary 工单提交 SQL 上线 @Description execute task on workflow @Deprecated @Tags workflow @Id executeTaskOnWorkflowV1 @Security ApiKeyAuth @Param workflow_id path string true "workflow id" @Success 200 {object} controller.BaseRes @router /v1/workflows/{workflow_id}/task/execute [post]
func FormatStringToInt ¶
func FormatStringToUint64 ¶ added in v1.2209.0
func FullSyncAuditPlanSQLs ¶
func FullSyncAuditPlanSQLs(c echo.Context) error
@Summary 全量同步SQL到扫描任务 @Description full sync audit plan SQLs @Id fullSyncAuditPlanSQLsV1 @Tags audit_plan @Security ApiKeyAuth @Param audit_plan_name path string true "audit plan name" @Param sqls body v1.FullSyncAuditPlanSQLsReqV1 true "full sync audit plan SQLs request" @Success 200 {object} controller.BaseRes @router /v1/audit_plans/{audit_plan_name}/sqls/full [post]
func GetAuditPlan ¶
func GetAuditPlan(c echo.Context) error
@Summary 获取指定扫描任务 @Description get audit plan @Id getAuditPlanV1 @Tags audit_plan @Security ApiKeyAuth @Param audit_plan_name path string true "audit plan name" @Success 200 {object} v1.GetAuditPlanResV1 @router /v1/audit_plans/{audit_plan_name}/ [get]
func GetAuditPlanAnalysisData ¶ added in v1.2206.0
func GetAuditPlanAnalysisData(c echo.Context) error
GetAuditPlanAnalysisData get SQL explain and related table metadata for analysis @Summary 获取task相关的SQL执行计划和表元数据 @Description get SQL explain and related table metadata for analysis @Id getTaskAnalysisData @Tags audit_plan @Param audit_plan_report_id path string true "audit plan report id" @Param number path string true "sql number" @Security ApiKeyAuth @Success 200 {object} v1.GetAuditPlanAnalysisDataResV1 @router /v1/audit_plans/reports/{audit_plan_report_id}/sqls/{number}/analysis [get]
func GetAuditPlanMetas ¶ added in v1.2201.0
func GetAuditPlanMetas(c echo.Context) error
@Summary 获取扫描任务元信息 @Description get audit plan metas @Id getAuditPlanMetasV1 @Tags audit_plan @Security ApiKeyAuth @Param filter_instance_type query string false "filter instance type" @Success 200 {object} v1.GetAuditPlanMetasResV1 @router /v1/audit_plan_metas [get]
func GetAuditPlanNotifyConfig ¶ added in v1.2204.0
func GetAuditPlanNotifyConfig(c echo.Context) error
@Summary 获取扫描任务消息推送设置 @Description get audit plan notify config @Id getAuditPlanNotifyConfigV1 @Tags audit_plan @Security ApiKeyAuth @Param audit_plan_name path string true "audit plan name" @Success 200 {object} v1.GetAuditPlanNotifyConfigResV1 @router /v1/audit_plans/{audit_plan_name}/notify_config [get]
func GetAuditPlanReport ¶ added in v1.2204.0
func GetAuditPlanReport(c echo.Context) error
@Summary 获取指定扫描任务的SQL扫描记录统计信息 @Description get audit plan report @Id getAuditPlanReportV1 @Tags audit_plan @Security ApiKeyAuth @Param audit_plan_name path string true "audit plan name" @Param audit_plan_report_id path string true "audit plan report id" @Success 200 {object} v1.GetAuditPlanReportResV1 @router /v1/audit_plans/{audit_plan_name}/reports/{audit_plan_report_id}/ [get]
func GetAuditPlanReportSQLs ¶
func GetAuditPlanReportSQLs(c echo.Context) error
@Summary 获取指定扫描任务的SQL扫描详情 @Description get audit plan report SQLs @Deprecated @Id getAuditPlanReportSQLsV1 @Tags audit_plan @Security ApiKeyAuth @Param audit_plan_name path string true "audit plan name" @Param audit_plan_report_id path string true "audit plan report id" @Param page_index query uint32 false "page index" @Param page_size query uint32 false "size of per page" @Success 200 {object} v1.GetAuditPlanReportSQLsResV1 @router /v1/audit_plans/{audit_plan_name}/report/{audit_plan_report_id}/ [get]
func GetAuditPlanReports ¶
func GetAuditPlanReports(c echo.Context) error
@Summary 获取指定扫描任务的报告列表 @Description get audit plan report list @Id getAuditPlanReportsV1 @Tags audit_plan @Security ApiKeyAuth @Param audit_plan_name path string true "audit plan name" @Param page_index query uint32 false "page index" @Param page_size query uint32 false "size of per page" @Success 200 {object} v1.GetAuditPlanReportsResV1 @router /v1/audit_plans/{audit_plan_name}/reports [get]
func GetAuditPlanSQLs ¶
func GetAuditPlanSQLs(c echo.Context) error
@Summary 获取指定扫描任务的SQLs信息(不包括扫描结果) @Description get audit plan SQLs @Deprecated @Id getAuditPlanSQLsV1 @Tags audit_plan @Security ApiKeyAuth @Param audit_plan_name path string true "audit plan name" @Param page_index query uint32 false "page index" @Param page_size query uint32 false "size of per page" @Success 200 {object} v1.GetAuditPlanSQLsResV1 @router /v1/audit_plans/{audit_plan_name}/sqls [get]
func GetAuditPlanTypes ¶ added in v1.2210.0
func GetAuditPlanTypes(c echo.Context) error
GetAuditPlanTypes @Summary 获取扫描任务类型 @Description get audit plan types @Id getAuditPlanTypesV1 @Tags audit_plan @Security ApiKeyAuth @Success 200 {object} v1.GetAuditPlanTypesResV1 @router /v1/audit_plan_types [get]
func GetAuditPlans ¶
func GetAuditPlans(c echo.Context) error
GetAuditPlans @Summary 获取扫描任务信息列表 @Description get audit plan info list @Id getAuditPlansV1 @Tags audit_plan @Security ApiKeyAuth @Param filter_audit_plan_db_type query string false "filter audit plan db type" @Param fuzzy_search_audit_plan_name query string false "fuzzy search audit plan name" @Param filter_audit_plan_type query string false "filter audit plan type" @Param filter_audit_plan_instance_name query string false "filter audit plan instance name" @Param page_index query uint32 false "page index" @Param page_size query uint32 false "size of per page" @Success 200 {object} v1.GetAuditPlansResV1 @router /v1/audit_plans [get]
func GetAuditTaskSQLContent ¶
func GetAuditTaskSQLContent(c echo.Context) error
@Summary 获取指定扫描任务的SQL内容 @Description get SQL content for the audit task @Tags task @Id getAuditTaskSQLContentV1 @Security ApiKeyAuth @Param task_id path string true "task id" @Success 200 {object} v1.GetAuditTaskSQLContentResV1 @router /v1/tasks/audits/{task_id}/sql_content [get]
func GetCurrentUser ¶
func GetCurrentUser(c echo.Context) error
@Summary 获取当前用户信息 @Description get current user info @Id getCurrentUserV1 @Tags user @Security ApiKeyAuth @Success 200 {object} v1.GetUserDetailResV1 @router /v1/user [get]
func GetDrivers ¶
func GetDrivers(c echo.Context) error
GetDrivers get support Driver list. @Summary 获取当前 server 支持的审核类型 @Description get drivers @Id getDriversV1 @Tags configuration @Security ApiKeyAuth @Success 200 {object} v1.GetDriversResV1 @router /v1/configurations/drivers [get]
func GetInstance ¶
func GetInstance(c echo.Context) error
GetInstance get instance @Summary 获取实例信息 @Description get instance db @Id getInstanceV1 @Tags instance @Security ApiKeyAuth @Param instance_name path string true "instance name" @Success 200 {object} v1.GetInstanceResV1 @router /v1/instances/{instance_name}/ [get]
func GetInstanceAdditionalMetas ¶ added in v1.2203.0
func GetInstanceAdditionalMetas(c echo.Context) error
GetInstanceAdditionalMetas get instance additional metas @Summary 获取实例的额外属性列表 @Description get instance additional metas @Id getInstanceAdditionalMetas @Tags instance @Security ApiKeyAuth @Success 200 {object} v1.GetInstanceAdditionalMetasResV1 @router /v1/instance_additional_metas [get]
func GetInstanceRules ¶
func GetInstanceRules(c echo.Context) error
GetInstanceRules get instance all rule @Summary 获取实例应用的规则列表 @Description get instance all rule @Id getInstanceRuleListV1 @Tags instance @Security ApiKeyAuth @Param instance_name path string true "instance name" @Success 200 {object} v1.GetRulesResV1 @router /v1/instances/{instance_name}/rules [get]
func GetInstanceSchemas ¶
func GetInstanceSchemas(c echo.Context) error
GetInstanceSchemas get instance schema list @Summary 实例 Schema 列表 @Description instance schema list @Id getInstanceSchemasV1 @Tags instance @Security ApiKeyAuth @Param instance_name path string true "instance name" @Success 200 {object} v1.GetInstanceSchemaResV1 @router /v1/instances/{instance_name}/schemas [get]
func GetInstanceTips ¶
func GetInstanceTips(c echo.Context) error
GetInstanceTips get instance tip list @Summary 获取实例提示列表 @Description get instance tip list @Tags instance @Id getInstanceTipListV1 @Security ApiKeyAuth @Param filter_db_type query string false "filter db type" @Param filter_workflow_template_id query string false "filter workflow template id" @Param functional_module query string false "functional module" Enums(create_audit_plan,sql_query,create_workflow) @Success 200 {object} v1.GetInstanceTipsResV1 @router /v1/instance_tips [get]
func GetInstanceWorkflowTemplate ¶ added in v1.2201.0
func GetInstanceWorkflowTemplate(c echo.Context) error
GetInstanceWorkflowTemplate get instance workflow template @Summary 获取实例应用的工作流程模板 @Description get instance workflow template @Id getInstanceWorkflowTemplateV1 @Tags instance @Security ApiKeyAuth @Param instance_name path string true "instance name" @Success 200 {object} v1.GetInstanceWorkflowTemplateResV1 @router /v1/instances/{instance_name}/workflow_template [get]
func GetInstances ¶
func GetInstances(c echo.Context) error
GetInstances get instances @Summary 获取实例信息列表 @Description get instance info list @Id getInstanceListV1 @Tags instance @Security ApiKeyAuth @Param filter_instance_name query string false "filter instance name" @Param filter_db_type query string false "filter db type" @Param filter_db_host query string false "filter db host" @Param filter_db_port query string false "filter db port" @Param filter_db_user query string false "filter db user" @Param filter_workflow_template_name query string false "filter workflow rule template name" @Param filter_rule_template_name query string false "filter rule template name" @Param filter_role_name query string false "filter role name" @Param page_index query uint32 false "page index" @Param page_size query uint32 false "size of per page" @Success 200 {object} v1.GetInstancesResV1 @router /v1/instances [get]
func GetInstancesTypePercentV1 ¶ added in v1.2208.0
func GetInstancesTypePercentV1(c echo.Context) error
GetInstancesTypePercentV1 @Summary 获取数据源类型百分比 @Description get database instances' types percent @Tags statistic @Id getInstancesTypePercentV1 @Security ApiKeyAuth @Success 200 {object} v1.GetInstancesTypePercentResV1 @router /v1/statistic/instances/type_percent [get]
func GetLDAPConfiguration ¶ added in v1.2111.0
func GetLDAPConfiguration(c echo.Context) error
@Summary 获取 LDAP 配置 @Description get LDAP configuration @Id getLDAPConfigurationV1 @Tags configuration @Security ApiKeyAuth @Success 200 {object} v1.GetLDAPConfigurationResV1 @router /v1/configurations/ldap [get]
func GetLicense ¶ added in v1.2203.0
func GetLicense(c echo.Context) error
GetLicense get sqle license @Summary 获取 sqle license @Description get sqle license @Id getSQLELicenseV1 @Tags configuration @Security ApiKeyAuth @Success 200 {object} v1.GetLicenseResV1 @router /v1/configurations/license [get]
func GetLicenseUsageV1 ¶ added in v1.2208.0
func GetLicenseUsageV1(c echo.Context) error
GetLicenseUsageV1 @Summary 获取License使用情况 @Description get usage of license @Tags statistic @Id getLicenseUsageV1 @Security ApiKeyAuth @Success 200 {object} v1.GetLicenseUsageResV1 @router /v1/statistic/license/usage [get]
func GetNeedExecTaskIds ¶ added in v1.2209.0
func GetOauth2Configuration ¶ added in v1.2205.0
func GetOauth2Configuration(c echo.Context) error
@Summary 获取 Oauth2 配置 @Description get Oauth2 configuration @Id getOauth2ConfigurationV1 @Tags configuration @Security ApiKeyAuth @Success 200 {object} v1.GetOauth2ConfigurationResV1 @router /v1/configurations/oauth2 [get]
func GetOauth2Tips ¶ added in v1.2205.0
func GetOauth2Tips(c echo.Context) error
@Summary 获取 Oauth2 基本信息 @Description get Oauth2 tips @Id getOauth2Tips @Tags configuration @Success 200 {object} v1.GetOauth2TipsResV1 @router /v1/configurations/oauth2/tips [get]
func GetOperations ¶ added in v1.2202.0
func GetOperations(c echo.Context) error
@Summary 获取权限动作列表 @Description get permission operations @Id GetOperationsV1 @Tags operation @Security ApiKeyAuth @Success 200 {object} v1.GetOperationsResV1 @Router /v1/operations [get]
func GetRoleTips ¶
func GetRoleTips(c echo.Context) error
@Summary 获取角色提示列表 @Description get role tip list @Tags role @Id getRoleTipListV1 @Security ApiKeyAuth @Success 200 {object} v1.GetRoleTipsResV1 @router /v1/role_tips [get]
func GetRoles ¶
func GetRoles(c echo.Context) error
@Summary 获取角色列表 @Description get role list @Deprecated @Id getRoleListV1 @Tags role @Security ApiKeyAuth @Accept json @Produce json @Param filter_role_name query string false "filter role name" @Param filter_user_name query string false "filter user name" @Param filter_instance_name query string false "filter instance name" @Param page_index query uint32 false "page index" @Param page_size query uint32 false "size of per page" @Success 200 {object} v1.GetRolesResV1 @router /v1/roles [get]
func GetRuleTemplate ¶
func GetRuleTemplate(c echo.Context) error
@Summary 获取规则模板信息 @Description get rule template @Id getRuleTemplateV1 @Tags rule_template @Security ApiKeyAuth @Param rule_template_name path string true "rule template name" @Success 200 {object} v1.GetRuleTemplateResV1 @router /v1/rule_templates/{rule_template_name}/ [get]
func GetRuleTemplateTips ¶
func GetRuleTemplateTips(c echo.Context) error
@Summary 获取规则模板提示 @Description get rule template tips @Id getRuleTemplateTipsV1 @Tags rule_template @Security ApiKeyAuth @Param filter_db_type query string false "filter db type" @Success 200 {object} v1.GetRuleTemplateTipsResV1 @router /v1/rule_template_tips [get]
func GetRuleTemplates ¶
func GetRuleTemplates(c echo.Context) error
@Summary 规则模板列表 @Description get all rule template @Id getRuleTemplateListV1 @Tags rule_template @Security ApiKeyAuth @Param filter_instance_name query string false "filter instance name" @Param page_index query uint32 false "page index" @Param page_size query uint32 false "size of per page" @Success 200 {object} v1.GetRuleTemplatesResV1 @router /v1/rule_templates [get]
func GetRules ¶
func GetRules(c echo.Context) error
@Summary 规则列表 @Description get all rule template @Id getRuleListV1 @Tags rule_template @Security ApiKeyAuth @Param filter_db_type query string false "filter db type" @Success 200 {object} v1.GetRulesResV1 @router /v1/rules [get]
func GetSMTPConfiguration ¶
func GetSMTPConfiguration(c echo.Context) error
@Summary 获取 SMTP 配置 @Description get SMTP configuration @Id getSMTPConfigurationV1 @Tags configuration @Security ApiKeyAuth @Success 200 {object} v1.GetSMTPConfigurationResV1 @router /v1/configurations/smtp [get]
func GetSQLEInfo ¶ added in v1.2201.0
func GetSQLEInfo(c echo.Context) error
GetSQLEInfo get sqle basic info @Summary 获取 sqle 基本信息 @Description get sqle basic info @Id getSQLEInfoV1 @Tags global @Success 200 {object} v1.GetSQLEInfoResV1 @router /v1/basic_info [get]
func GetSQLELicenseInfo ¶ added in v1.2203.0
func GetSQLELicenseInfo(c echo.Context) error
GetSQLELicenseInfo get the information needed to generate the sqle license @Summary 获取生成 sqle license需要的的信息 @Description get the information needed to generate the sqle license @Id GetSQLELicenseInfoV1 @Tags configuration @Security ApiKeyAuth @Success 200 file 1 "server info" @router /v1/configurations/license/info [get]
func GetSQLExplain ¶ added in v1.2206.0
func GetSQLExplain(c echo.Context) error
GetSQLExplain get SQL explain @Summary 获取SQL执行计划 @Description get SQL explain @Accept json @Id getSQLExplain @Tags sql_query @Param instance_name path string true "instance name" @Param req body v1.GetSqlExplainReqV1 true "sql and schema" @Security ApiKeyAuth @Success 200 {object} v1.GetSQLExplainResV1 @router /v1/sql_query/explain/{instance_name}/ [post]
func GetSQLQueryConfiguration ¶ added in v1.2209.0
func GetSQLQueryConfiguration(c echo.Context) error
@Summary 获取SQL查询配置信息 @Description get sqle query configuration @Id getSQLQueryConfiguration @Tags configuration @Security ApiKeyAuth @Success 200 {object} v1.GetSQLQueryConfigurationResV1 @router /v1/configurations/sql_query [get]
func GetSQLQueryHistory ¶ added in v1.2205.0
func GetSQLQueryHistory(c echo.Context) error
GetSQLQueryHistory get current user sql query history @Summary 获取当前用户历史查询SQL @Description get sql query history @Id getSQLQueryHistory @Tags sql_query @Param instance_name path string true "instance name" @Param filter_fuzzy_search query string false "fuzzy search filter" @Param page_index query uint32 false "page index" @Param page_size query uint32 false "size of per page" @Security ApiKeyAuth @Success 200 {object} v1.GetSQLQueryHistoryResV1 @router /v1/sql_query/history/{instance_name}/ [get]
func GetSQLResult ¶ added in v1.2205.0
func GetSQLResult(c echo.Context) error
GetSQLResult get sql query result @Summary 获取SQL查询结果 @Description get sql query result @Id getSQLResult @Tags sql_query @Param query_id path string true "query sql id" @Param page_index query uint32 true "page index" @Param page_size query uint32 true "size of per page" @Security ApiKeyAuth @Success 200 {object} v1.GetSQLResultResV1 @router /v1/sql_query/results/{query_id}/ [get]
func GetSqlAverageExecutionTimeV1 ¶ added in v1.2210.0
func GetSqlAverageExecutionTimeV1(c echo.Context) error
GetSqlAverageExecutionTimeV1 @Summary 获取sql上线平均耗时,按平均耗时降序排列 @Description get average execution time of sql @Tags statistic @Id getSqlAverageExecutionTimeV1 @Security ApiKeyAuth @Param limit query uint true "the limit of result item number" @Success 200 {object} v1.GetSqlAverageExecutionTimeResV1 @router /v1/statistic/instances/sql_average_execution_time [get]
func GetSqlExecutionFailPercentV1 ¶ added in v1.2210.0
func GetSqlExecutionFailPercentV1(c echo.Context) error
GetSqlExecutionFailPercentV1 @Summary 获取SQL上线失败率,按失败率降序排列 @Description get sql execution fail percent @Tags statistic @Id getSqlExecutionFailPercentV1 @Security ApiKeyAuth @Param limit query uint true "the limit of result item number" @Success 200 {object} v1.GetSqlExecutionFailPercentResV1 @router /v1/statistic/instances/sql_execution_fail_percent [get]
func GetSqlWhitelist ¶
func GetSqlWhitelist(c echo.Context) error
@Summary 获取Sql审核白名单 @Description get all whitelist @Id getAuditWhitelistV1 @Tags audit_whitelist @Security ApiKeyAuth @Param page_index query string false "page index" @Param page_size query string false "page size" @Success 200 {object} v1.GetAuditWhitelistResV1 @router /v1/audit_whitelist [get]
func GetSummaryOfWorkflowTasksV1 ¶ added in v1.2209.0
func GetSummaryOfWorkflowTasksV1(c echo.Context) error
GetSummaryOfWorkflowTasksV1 @Summary 获取工单数据源任务概览 @Description get summary of workflow instance tasks @Tags workflow @Id getSummaryOfInstanceTasksV1 @Security ApiKeyAuth @Param workflow_id path integer true "workflow id" @Success 200 {object} v1.GetWorkflowTasksResV1 @router /v1/workflows/{workflow_id}/tasks [get]
func GetSystemVariables ¶
func GetSystemVariables(c echo.Context) error
@Summary 获取系统变量 @Description get system variables @Id getSystemVariablesV1 @Tags configuration @Security ApiKeyAuth @Success 200 {object} v1.GetSystemVariablesResV1 @router /v1/configurations/system_variables [get]
func GetTableMetadata ¶ added in v1.2206.0
func GetTableMetadata(c echo.Context) error
GetTableMetadata get table metadata @Summary 获取表元数据 @Description get table metadata @Id getTableMetadata @Tags instance @Param instance_name path string true "instance name" @Param schema_name path string true "schema name" @Param table_name path string true "table name" @Security ApiKeyAuth @Success 200 {object} v1.GetTableMetadataResV1 @router /v1/instances/{instance_name}/schemas/{schema_name}/tables/{table_name}/metadata [get]
func GetTask ¶
func GetTask(c echo.Context) error
@Summary 获取Sql扫描任务信息 @Description get task @Tags task @Id getAuditTaskV1 @Security ApiKeyAuth @Param task_id path string true "task id" @Success 200 {object} v1.GetAuditTaskResV1 @router /v1/tasks/audits/{task_id}/ [get]
func GetTaskAnalysisData ¶ added in v1.2206.0
func GetTaskAnalysisData(c echo.Context) error
GetTaskAnalysisData get SQL explain and related table metadata for analysis @Summary 获取task相关的SQL执行计划和表元数据 @Description get SQL explain and related table metadata for analysis @Id getTaskAnalysisData @Tags task @Param task_id path string true "task id" @Param number path uint true "sql number" @Security ApiKeyAuth @Success 200 {object} v1.GetTaskAnalysisDataResV1 @router /v1/tasks/audits/{task_id}/sqls/{number}/analysis [get]
func GetTaskSQLs ¶
func GetTaskSQLs(c echo.Context) error
@Summary 获取指定扫描任务的SQLs信息 @Description get information of all SQLs belong to the specified audit task @Tags task @Id getAuditTaskSQLsV1 @Security ApiKeyAuth @Param task_id path string true "task id" @Param filter_exec_status query string false "filter: exec status of task sql" Enums(initialized,doing,succeeded,failed) @Param filter_audit_status query string false "filter: audit status of task sql" Enums(initialized,doing,finished) @Param filter_audit_level query string false "filter: audit level of task sql" Enums(normal,notice,warn,error) @Param no_duplicate query boolean false "select unique (fingerprint and audit result) for task sql" @Param page_index query string false "page index" @Param page_size query string false "page size" @Success 200 {object} v1.GetAuditTaskSQLsResV1 @router /v1/tasks/audits/{task_id}/sqls [get]
func GetUser ¶
func GetUser(c echo.Context) error
@Summary 获取用户信息 @Description get user info @Id getUserV1 @Tags user @Security ApiKeyAuth @Param user_name path string true "user name" @Success 200 {object} v1.GetUserDetailResV1 @router /v1/users/{user_name}/ [get]
func GetUserGroupTips ¶ added in v1.2202.0
func GetUserGroupTips(c echo.Context) error
@Summary 获取用户组提示列表 @Description get user group tip list @Tags user_group @Id getUserGroupTipListV1 @Security ApiKeyAuth @Success 200 {object} v1.GetUserGroupTipsResV1 @router /v1/user_group_tips [get]
func GetUserGroups ¶ added in v1.2202.0
func GetUserGroups(c echo.Context) (err error)
@Summary 获取用户组列表 @Description get user group info list @Id GetUserGroupsV1 @Tags user_group @Id getUserGroupListV1 @Security ApiKeyAuth @Param filter_user_group_name query string false "filter user group name" @Param page_index query uint32 false "page index" @Param page_size query uint32 false "size of per page" @Produce json @Success 200 {object} v1.GetUserGroupsResV1 @router /v1/user_groups [get]
func GetUserTips ¶
func GetUserTips(c echo.Context) error
@Summary 获取用户提示列表 @Description get user tip list @Tags user @Id getUserTipListV1 @Security ApiKeyAuth @Success 200 {object} v1.GetUserTipsResV1 @router /v1/user_tips [get]
func GetUsers ¶
func GetUsers(c echo.Context) error
@Summary 获取用户信息列表 @Description get user info list @Tags user @Id getUserListV1 @Security ApiKeyAuth @Param filter_user_name query string false "filter user name" @Param filter_role_name query string false "filter role name" @Param page_index query uint32 false "page index" @Param page_size query uint32 false "size of per page" @Success 200 {object} v1.GetUsersResV1 @router /v1/users [get]
func GetWeChatConfiguration ¶ added in v1.2203.0
func GetWeChatConfiguration(c echo.Context) error
GetWeChatConfiguration used to get wechat configure @Summary 获取 企业微信 配置 @Description get WeChat configuration @Id getWeChatConfigurationV1 @Tags configuration @Security ApiKeyAuth @Success 200 {object} v1.GetWeChatConfigurationResV1 @router /v1/configurations/wechat [get]
func GetWorkflow ¶
func GetWorkflow(c echo.Context) error
@Summary 获取审批流程详情 @Deprecated @Description get workflow detail @Tags workflow @Id getWorkflowV1 @Security ApiKeyAuth @Param workflow_id path integer true "workflow id" @Success 200 {object} v1.GetWorkflowResV1 @router /v1/workflows/{workflow_id}/ [get]
func GetWorkflowAuditPassPercentV1 ¶ added in v1.2210.0
func GetWorkflowAuditPassPercentV1(c echo.Context) error
GetWorkflowAuditPassPercentV1 @Summary 获取工单审核通过率 @Description get workflow audit pass percent @Tags statistic @Id getWorkflowAuditPassPercentV1 @Security ApiKeyAuth @Success 200 {object} v1.GetWorkflowAuditPassPercentResV1 @router /v1/statistic/workflows/audit_pass_percent [get]
func GetWorkflowCountsV1 ¶ added in v1.2208.0
func GetWorkflowCountsV1(c echo.Context) error
GetWorkflowCountsV1 @Summary 获取工单数量统计数据 @Description get workflow counts @Tags statistic @Id getWorkflowCountV1 @Security ApiKeyAuth @Success 200 {object} v1.GetWorkflowCountsResV1 @router /v1/statistic/workflows/counts [get]
func GetWorkflowCreatedCountsEachDayV1 ¶ added in v1.2208.0
func GetWorkflowCreatedCountsEachDayV1(c echo.Context) error
GetWorkflowCreatedCountsEachDayV1 @Summary 获取每天工单创建数量 @Description get counts of created workflow each day @Tags statistic @Id getWorkflowCreatedCountEachDayV1 @Security ApiKeyAuth @Param filter_date_from query string true "filter date from.(format:yyyy-mm-dd)" @Param filter_date_to query string true "filter date to.(format:yyyy-mm-dd)" @Success 200 {object} v1.GetWorkflowCreatedCountsEachDayResV1 @router /v1/statistic/workflows/each_day_counts [get]
func GetWorkflowDurationOfWaitingForAuditV1 ¶ added in v1.2208.0
func GetWorkflowDurationOfWaitingForAuditV1(c echo.Context) error
GetWorkflowDurationOfWaitingForAuditV1 @Summary 获取工单从创建到审核结束的平均时长 @Description get duration from workflow being created to audited @Tags statistic @Id getWorkflowDurationOfWaitingForAuditV1 @Security ApiKeyAuth @Success 200 {object} v1.GetWorkflowDurationOfWaitingForAuditResV1 @router /v1/statistic/workflows/duration_of_waiting_for_audit [get]
func GetWorkflowDurationOfWaitingForExecutionV1 ¶ added in v1.2208.0
func GetWorkflowDurationOfWaitingForExecutionV1(c echo.Context) error
GetWorkflowDurationOfWaitingForExecutionV1 @Deprecated @Summary 获取工单各从审核完毕到执行上线的平均时长 @Description get duration from workflow being created to executed @Tags statistic @Id getWorkflowDurationOfWaitingForExecutionV1 @Security ApiKeyAuth @Success 200 {object} v1.GetWorkflowDurationOfWaitingForExecutionResV1 @router /v1/statistic/workflows/duration_of_waiting_for_execution [get]
func GetWorkflowPassPercentV1 ¶ added in v1.2208.0
func GetWorkflowPassPercentV1(c echo.Context) error
GetWorkflowPassPercentV1 @Deprecated @Summary 获取工单通过率 @Description get workflow pass percent @Tags statistic @Id getWorkflowPassPercentV1 @Security ApiKeyAuth @Success 200 {object} v1.GetWorkflowPassPercentResV1 @router /v1/statistic/workflows/pass_percent [get]
func GetWorkflowPercentCountedByInstanceTypeV1 ¶ added in v1.2208.0
func GetWorkflowPercentCountedByInstanceTypeV1(c echo.Context) error
GetWorkflowPercentCountedByInstanceTypeV1 @Summary 获取按数据源类型统计的工单百分比 @Description get workflows percent counted by instance type @Tags statistic @Id getWorkflowPercentCountedByInstanceTypeV1 @Security ApiKeyAuth @Success 200 {object} v1.GetWorkflowPercentCountedByInstanceTypeResV1 @router /v1/statistic/workflows/instance_type_percent [get]
func GetWorkflowRejectedPercentGroupByCreatorV1 ¶ added in v1.2208.0
func GetWorkflowRejectedPercentGroupByCreatorV1(c echo.Context) error
GetWorkflowRejectedPercentGroupByCreatorV1 @Summary 获取各个用户提交的工单驳回率,按驳回率降序排列 @Description get workflows rejected percent group by creator. The result will be sorted by rejected percent in descending order @Tags statistic @Id getWorkflowRejectedPercentGroupByCreatorV1 @Security ApiKeyAuth @Param limit query uint true "the limit of result item number" @Success 200 {object} v1.GetWorkflowRejectedPercentGroupByCreatorResV1 @router /v1/statistic/workflows/rejected_percent_group_by_creator [get]
func GetWorkflowRejectedPercentGroupByInstanceV1 ¶ added in v1.2208.0
func GetWorkflowRejectedPercentGroupByInstanceV1(c echo.Context) error
GetWorkflowRejectedPercentGroupByInstanceV1 @Deprecated @Summary 获取各个数据源相关的工单驳回率,按驳回率降序排列 @Description get workflow rejected percent group by instance. The result will be sorted by rejected percent in descending order @Tags statistic @Id getWorkflowRejectedPercentGroupByInstanceV1 @Security ApiKeyAuth @Param limit query uint true "the limit of result item number" @Success 200 {object} v1.GetWorkflowRejectedPercentGroupByInstanceResV1 @router /v1/statistic/workflows/rejected_percent_group_by_instance [get]
func GetWorkflowStatusCountV1 ¶ added in v1.2208.0
func GetWorkflowStatusCountV1(c echo.Context) error
GetWorkflowStatusCountV1 @Summary 获取各种状态工单的数量 @Description get count of workflow status @Tags statistic @Id getWorkflowStatusCountV1 @Security ApiKeyAuth @Success 200 {object} v1.GetWorkflowStatusCountResV1 @router /v1/statistic/workflows/status_count [get]
func GetWorkflowTemplate ¶
func GetWorkflowTemplate(c echo.Context) error
@Summary 获取审批流程模板详情 @Description get workflow template detail @Tags workflow @Id getWorkflowTemplateV1 @Security ApiKeyAuth @Param workflow_template_name path string true "workflow template name" @Success 200 {object} v1.GetWorkflowTemplateResV1 @router /v1/workflow_templates/{workflow_template_name}/ [get]
func GetWorkflowTemplateTips ¶
func GetWorkflowTemplateTips(c echo.Context) error
@Summary 获取审批流程模板提示信息 @Description get workflow template tips @Tags workflow @Id getWorkflowTemplateTipsV1 @Security ApiKeyAuth @Success 200 {object} v1.GetWorkflowTemplateTipResV1 @router /v1/workflow_template_tips [get]
func GetWorkflowTemplates ¶
func GetWorkflowTemplates(c echo.Context) error
@Summary 获取审批流程模板列表 @Description get workflow template list @Tags workflow @Id getWorkflowTemplateListV1 @Security ApiKeyAuth @Param page_index query uint32 false "page index" @Param page_size query uint32 false "size of per page" @Success 200 {object} v1.GetWorkflowTemplatesResV1 @router /v1/workflow_templates [get]
func GetWorkflows ¶
func GetWorkflows(c echo.Context) error
@Summary 获取审批流程列表 @Deprecated @Description get workflow list @Tags workflow @Id getWorkflowListV1 @Security ApiKeyAuth @Param filter_subject query string false "filter subject" @Param filter_create_time_from query string false "filter create time from" @Param filter_create_time_to query string false "filter create time to" @Param filter_create_user_name query string false "filter create user name" @Param filter_current_step_type query string false "filter current step type" Enums(sql_review, sql_execute) @Param filter_status query string false "filter workflow status" Enums(on_process, rejected, canceled, exec_scheduled, executing, exec_failed, finished) @Param filter_current_step_assignee_user_name query string false "filter current step assignee user name" @Param filter_task_instance_name query string false "filter instance name" @Param filter_task_execute_start_time_from query string false "filter task execute start time from" @Param filter_task_execute_start_time_to query string false "filter task execute start time to" @Param page_index query uint32 false "page index" @Param page_size query uint32 false "size of per page" @Success 200 {object} v1.GetWorkflowsResV1 @router /v1/workflows [get]
func IsTaskCanExecute ¶ added in v1.2209.0
func ListTableBySchema ¶ added in v1.2206.0
func ListTableBySchema(c echo.Context) error
ListTableBySchema list table by schema @Summary 获取数据库下的所有表 @Description list table by schema @Id listTableBySchema @Tags instance @Param instance_name path string true "instance name" @Param schema_name path string true "schema name" @Security ApiKeyAuth @Success 200 {object} v1.ListTableBySchemaResV1 @router /v1/instances/{instance_name}/schemas/{schema_name}/tables [get]
func Login ¶
func Login(c echo.Context) error
@Summary 用户登录 @Description user login @Tags user @Id loginV1 @Param user body v1.UserLoginReqV1 true "user login request" @Success 200 {object} v1.GetUserLoginResV1 @router /v1/login [post]
func Oauth2Callback ¶ added in v1.2205.0
func Oauth2Callback(c echo.Context) error
Oauth2Callback is a hidden interface for third-party platform callbacks for oauth2 verification
func Oauth2Link ¶ added in v1.2205.0
func Oauth2Link(c echo.Context) error
@Summary oauth2通过此链接跳转到第三方登录网址 @Description oauth2 link @Id Oauth2Link @Tags oauth2 @router /v1/oauth2/link [get]
func PartialSyncAuditPlanSQLs ¶
func PartialSyncAuditPlanSQLs(c echo.Context) error
@Summary 增量同步SQL到扫描任务 @Description partial sync audit plan SQLs @Id partialSyncAuditPlanSQLsV1 @Tags audit_plan @Security ApiKeyAuth @Param audit_plan_name path string true "audit plan name" @Param sqls body v1.PartialSyncAuditPlanSQLsReqV1 true "partial sync audit plan SQLs request" @Success 200 {object} controller.BaseRes @router /v1/audit_plans/{audit_plan_name}/sqls/partial [post]
func PrepareForWorkflowExecution ¶ added in v1.2209.0
func PrepareSQLQuery ¶ added in v1.2205.0
func PrepareSQLQuery(c echo.Context) error
PrepareSQLQuery prepare execute sql query @Summary 准备执行查询sql @Accept json @Description execute sql query @Id prepareSQLQuery @Tags sql_query @Param instance_name path string true "instance name" @Param req body v1.PrepareSQLQueryReqV1 true "exec sql" @Security ApiKeyAuth @Success 200 {object} v1.PrepareSQLQueryResV1 @router /v1/sql_query/prepare/{instance_name}/ [post]
func RejectWorkflow ¶
func RejectWorkflow(c echo.Context) error
@Summary 审批驳回 @Description reject workflow @Tags workflow @Id rejectWorkflowV1 @Security ApiKeyAuth @Param workflow_id path string true "workflow id" @Param workflow_step_id path string true "workflow step id" @param workflow_approve body v1.RejectWorkflowReqV1 true "workflow approve request" @Success 200 {object} controller.BaseRes @router /v1/workflows/{workflow_id}/steps/{workflow_step_id}/reject [post]
func SetLicense ¶ added in v1.2203.0
func SetLicense(c echo.Context) error
SetLicense set sqle license @Summary 导入 sqle license @Description set sqle license @Id setSQLELicenseV1 @Tags configuration @Accept mpfd @Security ApiKeyAuth @Param license_file formData file true "SQLE license file" @Success 200 {object} controller.BaseRes @router /v1/configurations/license [post]
func TestAuditPlanNotifyConfig ¶ added in v1.2204.0
func TestAuditPlanNotifyConfig(c echo.Context) error
@Summary 测试扫描任务消息推送 @Description Test audit task message push @Id testAuditPlanNotifyConfigV1 @Tags audit_plan @Security ApiKeyAuth @Param audit_plan_name path string true "audit plan name" @Success 200 {object} v1.TestAuditPlanNotifyConfigResV1 @router /v1/audit_plans/{audit_plan_name}/notify_config/test [get]
func TestSMTPConfigurationV1 ¶ added in v1.2203.0
func TestSMTPConfigurationV1(c echo.Context) error
TestSMTPConfigurationV1 used to test SMTP notifications @Summary 测试 邮箱 配置 @Description test SMTP configuration @Accept json @Id testSMTPConfigurationV1 @Tags configuration @Security ApiKeyAuth @Param req body v1.TestSMTPConfigurationReqV1 true "test SMTP configuration req" @Success 200 {object} v1.TestSMTPConfigurationResV1 @router /v1/configurations/smtp/test [post]
func TestWeChatConfigurationV1 ¶ added in v1.2203.0
func TestWeChatConfigurationV1(c echo.Context) error
TestWeChatConfigurationV1 used to test WeChat notifications @Summary 测试 企业微信 配置 @Description test WeChat configuration @Accept json @Id testWeChatConfigurationV1 @Tags configuration @Security ApiKeyAuth @Param instance body v1.TestWeChatConfigurationReqV1 true "test WeChat configuration req" @Success 200 {object} v1.TestWeChatConfigurationResV1 @router /v1/configurations/wechat/test [post]
func TriggerAuditPlan ¶
func TriggerAuditPlan(c echo.Context) error
@Summary 触发扫描任务 @Description trigger audit plan @Id triggerAuditPlanV1 @Tags audit_plan @Security ApiKeyAuth @Param audit_plan_name path string true "audit plan name" @Success 200 {object} v1.TriggerAuditPlanResV1 @router /v1/audit_plans/{audit_plan_name}/trigger [post]
func UpdateAuditPlan ¶
func UpdateAuditPlan(c echo.Context) error
@Summary 更新扫描任务 @Description update audit plan @Id updateAuditPlanV1 @Tags audit_plan @Security ApiKeyAuth @Param audit_plan_name path string true "audit plan name" @param audit_plan body v1.UpdateAuditPlanReqV1 true "update audit plan" @Success 200 {object} controller.BaseRes @router /v1/audit_plans/{audit_plan_name}/ [patch]
func UpdateAuditPlanNotifyConfig ¶ added in v1.2204.0
func UpdateAuditPlanNotifyConfig(c echo.Context) error
@Summary 更新扫描任务通知设置 @Description update audit plan notify config @Id updateAuditPlanNotifyConfigV1 @Tags audit_plan @Security ApiKeyAuth @Param audit_plan_name path string true "audit plan name" @param config body v1.UpdateAuditPlanNotifyConfigReqV1 true "update audit plan notify config" @Success 200 {object} controller.BaseRes @router /v1/audit_plans/{audit_plan_name}/notify_config [patch]
func UpdateAuditTaskSQLs ¶ added in v1.2201.0
func UpdateAuditTaskSQLs(c echo.Context) error
@Summary 修改扫描任务中某条SQL的相关信息 @Description modify the relevant information of a certain SQL in the audit task @Tags task @Id updateAuditTaskSQLsV1 @Accept json @Param task_id path string true "task id" @Param number path string true "sql number" @Param audit_plan body v1.UpdateAuditTaskSQLsReqV1 true "modify the relevant information of a certain SQL in the audit task" @Security ApiKeyAuth @Success 200 {object} controller.BaseRes @router /v1/tasks/audits/{task_id}/sqls/{number} [patch]
func UpdateAuditWhitelistById ¶
func UpdateAuditWhitelistById(c echo.Context) error
@Summary 更新SQL白名单 @Description update sql whitelist by id @Accept json @Id UpdateAuditWhitelistByIdV1 @Tags audit_whitelist @Security ApiKeyAuth @Param audit_whitelist_id path string true "sql audit whitelist id" @Param instance body v1.UpdateAuditWhitelistReqV1 true "update sql whitelist req" @Success 200 {object} controller.BaseRes @router /v1/audit_whitelist/{audit_whitelist_id}/ [patch]
func UpdateCurrentUser ¶
func UpdateCurrentUser(c echo.Context) error
@Summary 更新个人信息 @Description update current user @Id updateCurrentUserV1 @Tags user @Security ApiKeyAuth @Accept json @Produce json @Param instance body v1.UpdateCurrentUserReqV1 true "update user" @Success 200 {object} controller.BaseRes @router /v1/user [patch]
func UpdateCurrentUserPassword ¶
func UpdateCurrentUserPassword(c echo.Context) error
@Summary 用户修改密码 @Description update current user's password @Id UpdateCurrentUserPasswordV1 @Tags user @Security ApiKeyAuth @Accept json @Produce json @Param instance body v1.UpdateCurrentUserPasswordReqV1 true "update user's password" @Success 200 {object} controller.BaseRes @router /v1/user/password [put]
func UpdateInstance ¶
func UpdateInstance(c echo.Context) error
UpdateInstance update instance @Summary 更新实例 @Description update instance @Id updateInstanceV1 @Tags instance @Security ApiKeyAuth @Param instance_name path string true "instance name" @param instance body v1.UpdateInstanceReqV1 true "update instance request" @Success 200 {object} controller.BaseRes @router /v1/instances/{instance_name}/ [patch]
func UpdateLDAPConfiguration ¶ added in v1.2111.0
func UpdateLDAPConfiguration(c echo.Context) error
@Summary 添加 LDAP 配置 @Description update LDAP configuration @Accept json @Id updateLDAPConfigurationV1 @Tags configuration @Security ApiKeyAuth @Param instance body v1.LDAPConfigurationReqV1 true "update LDAP configuration req" @Success 200 {object} controller.BaseRes @router /v1/configurations/ldap [patch]
func UpdateOauth2Configuration ¶ added in v1.2205.0
func UpdateOauth2Configuration(c echo.Context) error
@Summary 修改 Oauth2 配置 @Description update Oauth2 configuration @Accept json @Id updateOauth2ConfigurationV1 @Tags configuration @Security ApiKeyAuth @Param conf body v1.Oauth2ConfigurationReqV1 true "update Oauth2 configuration req" @Success 200 {object} controller.BaseRes @router /v1/configurations/oauth2 [patch]
func UpdateOtherUserPassword ¶
func UpdateOtherUserPassword(c echo.Context) error
@Summary admin修改其他用户密码 @Description admin modifies the passwords of other users @Id UpdateOtherUserPasswordV1 @Tags user @Security ApiKeyAuth @Accept json @Produce json @Param user_name path string true "user name" @Param instance body v1.UpdateOtherUserPasswordReqV1 true "change user's password" @Success 200 {object} controller.BaseRes @router /v1/users/{user_name}/password [patch]
func UpdateRole ¶
func UpdateRole(c echo.Context) error
@Summary 更新角色信息 @Description update role @Deprecated @Id updateRoleV1 @Tags role @Security ApiKeyAuth @Accept json @Produce json @Param role_name path string true "role name" @Param instance body v1.UpdateRoleReqV1 true "update role request" @Success 200 {object} controller.BaseRes @router /v1/roles/{role_name}/ [patch]
func UpdateRuleTemplate ¶
func UpdateRuleTemplate(c echo.Context) error
@Summary 更新规则模板 @Description update rule template @Id updateRuleTemplateV1 @Tags rule_template @Security ApiKeyAuth @Param rule_template_name path string true "rule template name" @Param instance body v1.UpdateRuleTemplateReqV1 true "update rule template request" @Success 200 {object} controller.BaseRes @router /v1/rule_templates/{rule_template_name}/ [patch]
func UpdateSMTPConfiguration ¶
func UpdateSMTPConfiguration(c echo.Context) error
@Summary 添加 SMTP 配置 @Description update SMTP configuration @Accept json @Id updateSMTPConfigurationV1 @Tags configuration @Security ApiKeyAuth @Param instance body v1.UpdateSMTPConfigurationReqV1 true "update SMTP configuration req" @Success 200 {object} controller.BaseRes @router /v1/configurations/smtp [patch]
func UpdateSystemVariables ¶
func UpdateSystemVariables(c echo.Context) error
@Summary 修改系统变量 @Description update system variables @Accept json @Id updateSystemVariablesV1 @Tags configuration @Security ApiKeyAuth @Param instance body v1.UpdateSystemVariablesReqV1 true "update system variables request" @Success 200 {object} controller.BaseRes @router /v1/configurations/system_variables [patch]
func UpdateUser ¶
func UpdateUser(c echo.Context) error
@Summary 更新用户信息 @Description update user @Id updateUserV1 @Tags user @Security ApiKeyAuth @Accept json @Produce json @Param user_name path string true "user name" @Param instance body v1.UpdateUserReqV1 true "update user" @Success 200 {object} controller.BaseRes @router /v1/users/{user_name}/ [patch]
func UpdateUserGroup ¶ added in v1.2202.0
func UpdateUserGroup(c echo.Context) (err error)
@Summary 更新用户组 @Description update user group @Id updateUserGroupV1 @Tags user_group @Security ApiKeyAuth @Param user_group_name path string true "user_group_name" @Param instance body v1.PatchUserGroupReqV1 true "update user group" @Success 200 {object} controller.BaseRes @router /v1/user_groups/{user_group_name}/ [patch]
func UpdateWeChatConfigurationV1 ¶ added in v1.2203.0
func UpdateWeChatConfigurationV1(c echo.Context) error
UpdateWeChatConfigurationV1 used to configure WeChat notifications @Summary 添加 企业微信 配置 @Description update WeChat configuration @Accept json @Id updateWeChatConfigurationV1 @Tags configuration @Security ApiKeyAuth @Param instance body v1.UpdateWeChatConfigurationReqV1 true "update WeChat configuration req" @Success 200 {object} controller.BaseRes @router /v1/configurations/wechat [patch]
func UpdateWorkflow ¶
func UpdateWorkflow(c echo.Context) error
@Summary 更新审批流程(驳回后才可更新) @Deprecated @Description update workflow when it is rejected to creator. @Tags workflow @Accept json @Produce json @Id updateWorkflowV1 @Security ApiKeyAuth @Param workflow_id path string true "workflow id" @Param instance body v1.UpdateWorkflowReqV1 true "update workflow request" @Success 200 {object} controller.BaseRes @router /v1/workflows/{workflow_id}/ [patch]
func UpdateWorkflowSchedule ¶ added in v1.2112.0
func UpdateWorkflowSchedule(c echo.Context) error
@Summary 设置工单定时上线时间(设置为空则代表取消定时时间,需要SQL审核流程都通过后才可以设置) @Description update workflow schedule. @Deprecated @Tags workflow @Accept json @Produce json @Id updateWorkflowScheduleV1 @Security ApiKeyAuth @Param workflow_id path string true "workflow id" @Param instance body v1.UpdateWorkflowScheduleV1 true "update workflow schedule request" @Success 200 {object} controller.BaseRes @router /v1/workflows/{workflow_id}/schedule [put]
func UpdateWorkflowTemplate ¶
func UpdateWorkflowTemplate(c echo.Context) error
@Summary 更新Sql审批流程模板 @Description update the workflow template @Tags workflow @Id updateWorkflowTemplateV1 @Security ApiKeyAuth @Accept json @Produce json @Param workflow_template_name path string true "workflow template name" @Param instance body v1.UpdateWorkflowTemplateReqV1 true "create workflow template" @Success 200 {object} controller.BaseRes @router /v1/workflow_templates/{workflow_template_name}/ [patch]
Types ¶
type AuditPlanMetaV1 ¶ added in v1.2201.0
type AuditPlanMetaV1 struct { Type string `json:"audit_plan_type"` Desc string `json:"audit_plan_type_desc"` InstanceType string `json:"instance_type"` Params []AuditPlanParamResV1 `json:"audit_plan_params,omitempty"` }
type AuditPlanParamReqV1 ¶ added in v1.2201.0
type AuditPlanParamResV1 ¶ added in v1.2201.0
type AuditPlanReportResV1 ¶
type AuditPlanReportSQLResV1 ¶
type AuditPlanReportSQLResV1 struct { Fingerprint string `json:"audit_plan_report_sql_fingerprint" example:"select * from t1 where id = ?"` LastReceiveText string `json:"audit_plan_report_sql_last_receive_text" example:"select * from t1 where id = 1"` LastReceiveTimestamp string `json:"audit_plan_report_sql_last_receive_timestamp" example:"RFC3339"` AuditResult string `json:"audit_plan_report_sql_audit_result" example:"same format as task audit result"` }
type AuditPlanResV1 ¶
type AuditPlanResV1 struct { Name string `json:"audit_plan_name" example:"audit_for_java_app1"` Cron string `json:"audit_plan_cron" example:"0 */2 * * *"` DBType string `json:"audit_plan_db_type" example:"mysql"` Token string `json:"audit_plan_token" example:"it's a JWT Token for scanner"` InstanceName string `json:"audit_plan_instance_name" example:"test_mysql"` InstanceDatabase string `json:"audit_plan_instance_database" example:"app1"` RuleTemplateName string `json:"rule_template_name" example:"default_MySQL"` Meta AuditPlanMetaV1 `json:"audit_plan_meta"` }
type AuditPlanSQLReqV1 ¶
type AuditPlanSQLReqV1 struct { Fingerprint string `json:"audit_plan_sql_fingerprint" form:"audit_plan_sql_fingerprint" example:"select * from t1 where id = ?"` Counter string `json:"audit_plan_sql_counter" form:"audit_plan_sql_counter" example:"6" valid:"required"` LastReceiveText string `json:"audit_plan_sql_last_receive_text" form:"audit_plan_sql_last_receive_text" example:"select * from t1 where id = 1"` LastReceiveTimestamp string `json:"audit_plan_sql_last_receive_timestamp" form:"audit_plan_sql_last_receive_timestamp" example:"RFC3339"` Schema string `json:"audit_plan_sql_schema" from:"audit_plan_sql_schema" example:"db1"` }
type AuditPlanSQLResV1 ¶
type AuditPlanSQLResV1 struct { Fingerprint string `json:"audit_plan_sql_fingerprint" example:"select * from t1 where id = ?"` Counter string `json:"audit_plan_sql_counter" example:"6"` LastReceiveText string `json:"audit_plan_sql_last_receive_text" example:"select * from t1 where id = 1"` LastReceiveTimestamp string `json:"audit_plan_sql_last_receive_timestamp" example:"RFC3339"` }
type AuditPlanTypesV1 ¶ added in v1.2210.0
type AuditResDataV1 ¶ added in v1.2207.0
type AuditResDataV1 struct { AuditLevel string `json:"audit_level" enums:"normal,notice,warn,error,"` Score int32 `json:"score"` PassRate float64 `json:"pass_rate"` SQLResults []AuditSQLResV1 `json:"sql_results"` }
type AuditSQLResV1 ¶ added in v1.2207.0
type AuditTaskGroupReqV1 ¶ added in v1.2209.0
type AuditTaskGroupRes ¶ added in v1.2209.0
type AuditTaskGroupRes struct { TaskGroupId uint `json:"task_group_id"` Tasks []*AuditTaskResV1 `json:"tasks"` }
type AuditTaskGroupResV1 ¶ added in v1.2209.0
type AuditTaskGroupResV1 struct { controller.BaseRes Data AuditTaskGroupRes `json:"data"` }
type AuditTaskResV1 ¶
type AuditTaskResV1 struct { Id uint `json:"task_id"` InstanceName string `json:"instance_name"` InstanceDbType string `json:"instance_db_type"` InstanceSchema string `json:"instance_schema" example:"db1"` AuditLevel string `json:"audit_level" enums:"normal,notice,warn,error,"` Score int32 `json:"score"` PassRate float64 `json:"pass_rate"` Status string `json:"status" enums:"initialized,audited,executing,exec_success,exec_failed"` SQLSource string `json:"sql_source" enums:"form_data,sql_file,mybatis_xml_file,audit_plan"` ExecStartTime *time.Time `json:"exec_start_time,omitempty"` ExecEndTime *time.Time `json:"exec_end_time,omitempty"` }
type AuditTaskSQLContentResV1 ¶
type AuditTaskSQLContentResV1 struct {
Sql string `json:"sql" example:"alter table tb1 drop columns c1"`
}
type AuditTaskSQLResV1 ¶
type AuditTaskSQLResV1 struct { Number uint `json:"number"` ExecSQL string `json:"exec_sql"` AuditResult string `json:"audit_result"` AuditLevel string `json:"audit_level"` AuditStatus string `json:"audit_status"` ExecResult string `json:"exec_result"` ExecStatus string `json:"exec_status"` RollbackSQL string `json:"rollback_sql,omitempty"` Description string `json:"description"` }
type AuditTasksGroupResV1 ¶ added in v1.2209.0
type AuditTasksGroupResV1 struct {
TaskGroupId uint `json:"task_group_id" form:"task_group_id" valid:"required"`
}
type AuditWhitelistResV1 ¶
type BatchCancelWorkflowsReqV1 ¶
type BatchCancelWorkflowsReqV1 struct {
WorkflowIds []string `json:"workflow_ids" form:"workflow_ids"`
}
type BatchCheckInstanceConnectionsReqV1 ¶ added in v1.2209.0
type BatchCheckInstanceConnectionsReqV1 struct {
Instances []InstanceForCheckConnection `json:"instances" valid:"dive,required"`
}
type BatchGetInstanceConnectionsResV1 ¶ added in v1.2209.0
type BatchGetInstanceConnectionsResV1 struct { controller.BaseRes Data []InstanceConnectionResV1 `json:"data"` }
type BindOauth2UserReqV1 ¶ added in v1.2205.0
type BindOauth2UserResDataV1 ¶ added in v1.2205.0
type BindOauth2UserResDataV1 struct {
Token string `json:"token"`
}
type BindOauth2UserResV1 ¶ added in v1.2205.0
type BindOauth2UserResV1 struct { controller.BaseRes Data BindOauth2UserResDataV1 `json:"data"` }
type CheckLicenseResV1 ¶ added in v1.2203.0
type CheckLicenseResV1 struct { controller.BaseRes Content string `json:"content"` License []LicenseItem `json:"license"` }
type CloneRuleTemplateReqV1 ¶
type CreateAuditPlanReqV1 ¶
type CreateAuditPlanReqV1 struct { Name string `json:"audit_plan_name" form:"audit_plan_name" example:"audit_plan_for_java_repo_1" valid:"required,name"` Cron string `json:"audit_plan_cron" form:"audit_plan_cron" example:"0 */2 * * *" valid:"required,cron"` InstanceType string `json:"audit_plan_instance_type" form:"audit_plan_instance_type" example:"mysql" valid:"required"` InstanceName string `json:"audit_plan_instance_name" form:"audit_plan_instance_name" example:"test_mysql"` InstanceDatabase string `json:"audit_plan_instance_database" form:"audit_plan_instance_database" example:"app1"` RuleTemplateName string `json:"rule_template_name" from:"rule_template_name" example:"default_MySQL"` Type string `json:"audit_plan_type" form:"audit_plan_type" example:"slow log"` Params []AuditPlanParamReqV1 `json:"audit_plan_params" valid:"dive,required"` }
type CreateAuditTaskReqV1 ¶
type CreateAuditTasksGroupReqV1 ¶ added in v1.2209.0
type CreateAuditTasksGroupReqV1 struct {
Instances []*InstanceForCreatingTask `json:"instances" valid:"dive,required"`
}
type CreateAuditTasksGroupResV1 ¶ added in v1.2209.0
type CreateAuditTasksGroupResV1 struct { controller.BaseRes Data AuditTasksGroupResV1 `json:"data"` }
type CreateAuditWhitelistReqV1 ¶
type CreateAuditWhitelistReqV1 struct { Value string `json:"value" example:"create table" valid:"required"` MatchType string `json:"match_type" example:"exact_match" enums:"exact_match,fp_match" valid:"omitempty,oneof=exact_match fp_match"` Desc string `json:"desc" example:"used for rapid release"` }
type CreateInstanceReqV1 ¶
type CreateInstanceReqV1 struct { Name string `json:"instance_name" form:"instance_name" example:"test" valid:"required,name"` DBType string `json:"db_type" form:"db_type" example:"mysql"` User string `json:"db_user" form:"db_user" example:"root" valid:"required"` Host string `json:"db_host" form:"db_host" example:"10.10.10.10" valid:"required,ip_addr|uri|hostname|hostname_rfc1123"` Port string `json:"db_port" form:"db_port" example:"3306" valid:"required,port"` Password string `json:"db_password" form:"db_password" example:"123456" valid:"required"` Desc string `json:"desc" example:"this is a test instance"` WorkflowTemplateName string `json:"workflow_template_name" form:"workflow_template_name"` SQLQueryConfig *SQLQueryConfigReqV1 `json:"sql_query_config" from:"sql_query_config"` MaintenanceTimes []*MaintenanceTimeReqV1 `json:"maintenance_times" from:"maintenance_times"` RuleTemplates []string `json:"rule_template_name_list" form:"rule_template_name_list"` Roles []string `json:"role_name_list" form:"role_name_list"` AdditionalParams []*InstanceAdditionalParamReqV1 `json:"additional_params" from:"additional_params"` }
type CreateRoleReqV1 ¶
type CreateRuleTemplateReqV1 ¶
type CreateRuleTemplateReqV1 struct { Name string `json:"rule_template_name" valid:"required,name"` Desc string `json:"desc"` DBType string `json:"db_type" valid:"required"` Instances []string `json:"instance_name_list"` RuleList []RuleReqV1 `json:"rule_list" form:"rule_list" valid:"required,dive,required"` }
type CreateUserGroupReqV1 ¶ added in v1.2202.0
type CreateUserGroupReqV1 struct { Name string `json:"user_group_name" form:"user_group_name" example:"test" valid:"required,name"` Desc string `json:"user_group_desc" form:"user_group_desc" example:"this is a group"` Roles []string `json:"role_name_list" form:"role_name_list"` Users []string `json:"user_name_list" form:"user_name_list"` }
type CreateUserReqV1 ¶
type CreateUserReqV1 struct { Name string `json:"user_name" form:"user_name" example:"test" valid:"required,name"` Password string `json:"user_password" form:"user_name" example:"123456" valid:"required"` Email string `json:"email" form:"email" example:"test@email.com" valid:"omitempty,email"` WeChatID string `json:"wechat_id" example:"UserID"` Roles []string `json:"role_name_list" form:"role_name_list"` UserGroups []string `json:"user_group_name_list" form:"user_group_name_list"` }
type CreateWorkflowReqV1 ¶
type CreateWorkflowTemplateReqV1 ¶
type CreateWorkflowTemplateReqV1 struct { Name string `json:"workflow_template_name" form:"workflow_template_name" valid:"required,name"` Desc string `json:"desc" form:"desc"` AllowSubmitWhenLessAuditLevel string `json:"allow_submit_when_less_audit_level" enums:"normal,notice,warn,error"` Steps []*WorkFlowStepTemplateReqV1 `json:"workflow_step_template_list" form:"workflow_step_template_list" valid:"required,dive,required"` Instances []string `json:"instance_name_list" form:"instance_name_list"` }
type DashboardResV1 ¶
type DashboardResV1 struct {
WorkflowStatistics *WorkflowStatisticsResV1 `json:"workflow_statistics"`
}
type DirectAuditReqV1 ¶ added in v1.2207.0
type DirectAuditResV1 ¶ added in v1.2207.0
type DirectAuditResV1 struct { controller.BaseRes Data *AuditResDataV1 `json:"data"` }
type DownloadAuditTaskSQLsFileReqV1 ¶
type DownloadAuditTaskSQLsFileReqV1 struct {
NoDuplicate bool `json:"no_duplicate" query:"no_duplicate"`
}
type DriversResV1 ¶
type DriversResV1 struct {
Drivers []string `json:"driver_name_list"`
}
type ExplainClassicResult ¶ added in v1.2206.0
type ExplainClassicResult struct { Rows []map[string]string `json:"rows"` Head []TableMetaItemHeadResV1 `json:"head"` }
type FullSyncAuditPlanSQLsReqV1 ¶
type FullSyncAuditPlanSQLsReqV1 struct {
SQLs []AuditPlanSQLReqV1 `json:"audit_plan_sql_list" form:"audit_plan_sql_list" valid:"dive"`
}
type GetAuditPlanAnalysisDataResV1 ¶ added in v1.2206.0
type GetAuditPlanAnalysisDataResV1 struct { controller.BaseRes Data GetSQLAnalysisDataResItemV1 `json:"data"` }
type GetAuditPlanMetasReqV1 ¶ added in v1.2201.0
type GetAuditPlanMetasReqV1 struct {
FilterInstanceType *string `json:"filter_instance_type" query:"filter_instance_type"`
}
type GetAuditPlanMetasResV1 ¶ added in v1.2201.0
type GetAuditPlanMetasResV1 struct { controller.BaseRes Data []AuditPlanMetaV1 `json:"data"` }
type GetAuditPlanNotifyConfigResDataV1 ¶ added in v1.2204.0
type GetAuditPlanNotifyConfigResDataV1 struct { NotifyInterval int `json:"notify_interval"` NotifyLevel string `json:"notify_level"` EnableEmailNotify bool `json:"enable_email_notify"` EnableWebHookNotify bool `json:"enable_web_hook_notify"` WebHookURL string `json:"web_hook_url"` WebHookTemplate string `json:"web_hook_template"` }
type GetAuditPlanNotifyConfigResV1 ¶ added in v1.2204.0
type GetAuditPlanNotifyConfigResV1 struct { controller.BaseRes Data GetAuditPlanNotifyConfigResDataV1 `json:"data"` }
type GetAuditPlanReportResV1 ¶ added in v1.2204.0
type GetAuditPlanReportResV1 struct { controller.BaseRes Data AuditPlanReportResV1 `json:"data"` }
type GetAuditPlanReportSQLsResV1 ¶
type GetAuditPlanReportSQLsResV1 struct { controller.BaseRes Data []AuditPlanReportSQLResV1 `json:"data"` TotalNums uint64 `json:"total_nums"` }
type GetAuditPlanReportsResV1 ¶
type GetAuditPlanReportsResV1 struct { controller.BaseRes Data []AuditPlanReportResV1 `json:"data"` TotalNums uint64 `json:"total_nums"` }
type GetAuditPlanResV1 ¶
type GetAuditPlanResV1 struct { controller.BaseRes Data AuditPlanResV1 `json:"data"` }
type GetAuditPlanSQLsReqV1 ¶
type GetAuditPlanSQLsResV1 ¶
type GetAuditPlanSQLsResV1 struct { controller.BaseRes Data []AuditPlanSQLResV1 `json:"data"` TotalNums uint64 `json:"total_nums"` }
type GetAuditPlanTypesResV1 ¶ added in v1.2210.0
type GetAuditPlanTypesResV1 struct { controller.BaseRes Data []AuditPlanTypesV1 `json:"data"` }
type GetAuditPlansReqV1 ¶
type GetAuditPlansReqV1 struct { FilterAuditPlanDBType string `json:"filter_audit_plan_db_type" query:"filter_audit_plan_db_type"` FuzzySearchAuditPlanName string `json:"fuzzy_search_audit_plan_name" query:"fuzzy_search_audit_plan_name"` FilterAuditPlanType string `json:"filter_audit_plan_type" query:"filter_audit_plan_type"` FilterAuditPlanInstanceName string `json:"filter_audit_plan_instance_name" query:"filter_audit_plan_instance_name"` PageIndex uint32 `json:"page_index" query:"page_index" valid:"required"` PageSize uint32 `json:"page_size" query:"page_size" valid:"required"` }
type GetAuditPlansResV1 ¶
type GetAuditPlansResV1 struct { controller.BaseRes Data []AuditPlanResV1 `json:"data"` TotalNums uint64 `json:"total_nums"` }
type GetAuditTaskResV1 ¶
type GetAuditTaskResV1 struct { controller.BaseRes Data *AuditTaskResV1 `json:"data"` }
type GetAuditTaskSQLContentResV1 ¶
type GetAuditTaskSQLContentResV1 struct { controller.BaseRes Data *AuditTaskSQLContentResV1 `json:"data"` }
type GetAuditTaskSQLsReqV1 ¶
type GetAuditTaskSQLsReqV1 struct { FilterExecStatus string `json:"filter_exec_status" query:"filter_exec_status"` FilterAuditStatus string `json:"filter_audit_status" query:"filter_audit_status"` FilterAuditLevel string `json:"filter_audit_level" query:"filter_audit_level"` NoDuplicate bool `json:"no_duplicate" query:"no_duplicate"` PageIndex uint32 `json:"page_index" query:"page_index" valid:"required"` PageSize uint32 `json:"page_size" query:"page_size" valid:"required"` }
type GetAuditTaskSQLsResV1 ¶
type GetAuditTaskSQLsResV1 struct { controller.BaseRes Data []*AuditTaskSQLResV1 `json:"data"` TotalNums uint64 `json:"total_nums"` }
type GetAuditWhitelistReqV1 ¶
type GetAuditWhitelistResV1 ¶
type GetAuditWhitelistResV1 struct { controller.BaseRes Data []*AuditWhitelistResV1 `json:"data"` TotalNums uint32 `json:"total_nums"` }
type GetDashboardResV1 ¶
type GetDashboardResV1 struct { controller.BaseRes Data *DashboardResV1 `json:"data"` }
type GetDriversResV1 ¶
type GetDriversResV1 struct { controller.BaseRes Data DriversResV1 `json:"data"` }
type GetInstanceAdditionalMetasResV1 ¶ added in v1.2203.0
type GetInstanceAdditionalMetasResV1 struct { controller.BaseRes Metas []*InstanceAdditionalMetaV1 `json:"data"` }
type GetInstanceConnectableReqV1 ¶
type GetInstanceConnectableReqV1 struct { DBType string `json:"db_type" form:"db_type" example:"mysql"` User string `json:"user" form:"db_user" example:"root" valid:"required"` Host string `json:"host" form:"db_host" example:"10.10.10.10" valid:"required,ip_addr|uri|hostname|hostname_rfc1123"` Port string `json:"port" form:"db_port" example:"3306" valid:"required,port"` Password string `json:"password" form:"db_password" example:"123456"` AdditionalParams []*InstanceAdditionalParamReqV1 `json:"additional_params" from:"additional_params"` }
type GetInstanceConnectableResV1 ¶
type GetInstanceConnectableResV1 struct { controller.BaseRes Data InstanceConnectableResV1 `json:"data"` }
type GetInstanceResV1 ¶
type GetInstanceResV1 struct { controller.BaseRes Data InstanceResV1 `json:"data"` }
type GetInstanceSchemaResV1 ¶
type GetInstanceSchemaResV1 struct { controller.BaseRes Data InstanceSchemaResV1 `json:"data"` }
type GetInstanceTipsResV1 ¶
type GetInstanceTipsResV1 struct { controller.BaseRes Data []InstanceTipResV1 `json:"data"` }
type GetInstanceWorkflowTemplateResV1 ¶ added in v1.2201.0
type GetInstanceWorkflowTemplateResV1 struct { controller.BaseRes Data *WorkflowTemplateDetailResV1 `json:"data"` }
type GetInstancesReqV1 ¶
type GetInstancesReqV1 struct { FilterInstanceName string `json:"filter_instance_name" query:"filter_instance_name"` FilterDBType string `json:"filter_db_type" query:"filter_db_type"` FilterDBHost string `json:"filter_db_host" query:"filter_db_host"` FilterDBPort string `json:"filter_db_port" query:"filter_db_port"` FilterDBUser string `json:"filter_db_user" query:"filter_db_user"` FilterWorkflowTemplateName string `json:"filter_workflow_template_name" query:"filter_workflow_template_name"` FilterRuleTemplateName string `json:"filter_rule_template_name" query:"filter_rule_template_name"` FilterRoleName string `json:"filter_role_name" query:"filter_role_name"` PageIndex uint32 `json:"page_index" query:"page_index" valid:"required"` PageSize uint32 `json:"page_size" query:"page_size" valid:"required"` }
type GetInstancesResV1 ¶
type GetInstancesResV1 struct { controller.BaseRes Data []InstanceResV1 `json:"data"` TotalNums uint64 `json:"total_nums"` }
type GetInstancesTypePercentResV1 ¶ added in v1.2208.0
type GetInstancesTypePercentResV1 struct { controller.BaseRes Data *InstancesTypePercentV1 `json:"data"` }
type GetLDAPConfigurationResV1 ¶ added in v1.2111.0
type GetLDAPConfigurationResV1 struct { controller.BaseRes Data LDAPConfigurationResV1 `json:"data"` }
type GetLicenseResV1 ¶ added in v1.2203.0
type GetLicenseResV1 struct { controller.BaseRes Content string `json:"content"` License []LicenseItem `json:"license"` }
type GetLicenseUsageResV1 ¶ added in v1.2208.0
type GetLicenseUsageResV1 struct { controller.BaseRes Data *LicenseUsageV1 `json:"data"` }
type GetOauth2ConfigurationResDataV1 ¶ added in v1.2205.0
type GetOauth2ConfigurationResDataV1 struct { EnableOauth2 bool `json:"enable_oauth2"` ClientID string `json:"client_id"` ClientHost string `json:"client_host"` ServerAuthUrl string `json:"server_auth_url"` ServerTokenUrl string `json:"server_token_url"` ServerUserIdUrl string `json:"server_user_id_url"` Scopes []string `json:"scopes"` AccessTokenTag string `json:"access_token_tag"` UserIdTag string `json:"user_id_tag"` LoginTip string `json:"login_tip"` }
type GetOauth2ConfigurationResV1 ¶ added in v1.2205.0
type GetOauth2ConfigurationResV1 struct { controller.BaseRes Data GetOauth2ConfigurationResDataV1 `json:"data"` }
type GetOauth2TipsResDataV1 ¶ added in v1.2205.0
type GetOauth2TipsResV1 ¶ added in v1.2205.0
type GetOauth2TipsResV1 struct { controller.BaseRes Data GetOauth2TipsResDataV1 `json:"data"` }
type GetOperationsResV1 ¶ added in v1.2202.0
type GetOperationsResV1 struct { controller.BaseRes Data []*OperationResV1 `json:"data"` }
type GetRoleTipsResV1 ¶
type GetRoleTipsResV1 struct { controller.BaseRes Data []RoleTipResV1 `json:"data"` }
type GetRolesReqV1 ¶
type GetRolesReqV1 struct { FilterRoleName string `json:"filter_role_name" query:"filter_role_name"` FilterUserName string `json:"filter_user_name" query:"filter_user_name"` FilterInstanceName string `json:"filter_instance_name" query:"filter_instance_name"` PageIndex uint32 `json:"page_index" query:"page_index" valid:"required"` PageSize uint32 `json:"page_size" query:"page_size" valid:"required"` }
type GetRolesResV1 ¶
type GetRolesResV1 struct { controller.BaseRes Data []RoleResV1 `json:"data"` TotalNums uint64 `json:"total_nums"` }
type GetRuleTemplateResV1 ¶
type GetRuleTemplateResV1 struct { controller.BaseRes Data *RuleTemplateDetailResV1 `json:"data"` }
type GetRuleTemplateTipsResV1 ¶
type GetRuleTemplateTipsResV1 struct { controller.BaseRes Data []RuleTemplateTipResV1 `json:"data"` }
type GetRuleTemplatesReqV1 ¶
type GetRuleTemplatesResV1 ¶
type GetRuleTemplatesResV1 struct { controller.BaseRes Data []RuleTemplateResV1 `json:"data"` TotalNums uint64 `json:"total_nums"` }
type GetRulesReqV1 ¶
type GetRulesReqV1 struct {
FilterDBType string `json:"filter_db_type" query:"filter_db_type"`
}
type GetRulesResV1 ¶
type GetRulesResV1 struct { controller.BaseRes Data []RuleResV1 `json:"data"` }
type GetSMTPConfigurationResV1 ¶
type GetSMTPConfigurationResV1 struct { controller.BaseRes Data SMTPConfigurationResV1 `json:"data"` }
type GetSQLAnalysisDataResItemV1 ¶ added in v1.2206.0
type GetSQLAnalysisDataResItemV1 struct { SQLExplain SQLExplain `json:"sql_explain"` TableMetas []TableMeta `json:"table_metas"` }
type GetSQLEInfoResV1 ¶ added in v1.2201.0
type GetSQLEInfoResV1 struct { controller.BaseRes Version string `json:"version"` }
type GetSQLExplainResV1 ¶ added in v1.2206.0
type GetSQLExplainResV1 struct { controller.BaseRes Data []SQLQuerySQLExplain `json:"data"` }
type GetSQLQueryConfigurationResDataV1 ¶ added in v1.2209.0
type GetSQLQueryConfigurationResV1 ¶ added in v1.2209.0
type GetSQLQueryConfigurationResV1 struct { controller.BaseRes Data GetSQLQueryConfigurationResDataV1 `json:"data"` }
type GetSQLQueryHistoryReqV1 ¶ added in v1.2205.0
type GetSQLQueryHistoryResDataV1 ¶ added in v1.2205.0
type GetSQLQueryHistoryResDataV1 struct {
SQLHistories []SQLHistoryItemResV1 `json:"sql_histories"`
}
type GetSQLQueryHistoryResV1 ¶ added in v1.2205.0
type GetSQLQueryHistoryResV1 struct { controller.BaseRes Data GetSQLQueryHistoryResDataV1 `json:"data"` }
type GetSQLResultReqV1 ¶ added in v1.2205.0
type GetSQLResultResDataV1 ¶ added in v1.2205.0
type GetSQLResultResV1 ¶ added in v1.2205.0
type GetSQLResultResV1 struct { controller.BaseRes Data GetSQLResultResDataV1 `json:"data"` }
type GetSqlAverageExecutionTimeReqV1 ¶ added in v1.2210.0
type GetSqlAverageExecutionTimeReqV1 struct {
Limit uint `json:"limit" query:"limit" valid:"required"`
}
type GetSqlAverageExecutionTimeResV1 ¶ added in v1.2210.0
type GetSqlAverageExecutionTimeResV1 struct { controller.BaseRes Data []SqlAverageExecutionTime `json:"data"` }
type GetSqlExecutionFailPercentReqV1 ¶ added in v1.2210.0
type GetSqlExecutionFailPercentReqV1 struct {
Limit uint `json:"limit" query:"limit" valid:"required"`
}
type GetSqlExecutionFailPercentResV1 ¶ added in v1.2210.0
type GetSqlExecutionFailPercentResV1 struct { controller.BaseRes Data []SqlExecutionFailPercent `json:"data"` }
type GetSqlExplainReqV1 ¶ added in v1.2206.0
type GetSystemVariablesResV1 ¶
type GetSystemVariablesResV1 struct { controller.BaseRes Data SystemVariablesResV1 `json:"data"` }
type GetTableMetadataResV1 ¶ added in v1.2206.0
type GetTableMetadataResV1 struct { controller.BaseRes Data InstanceTableMeta `json:"data"` }
type GetTaskAnalysisDataResItemV1 ¶ added in v1.2206.0
type GetTaskAnalysisDataResItemV1 struct { SQLExplain SQLExplain `json:"sql_explain"` TableMetas []TableMeta `json:"table_metas"` }
type GetTaskAnalysisDataResV1 ¶ added in v1.2206.0
type GetTaskAnalysisDataResV1 struct { controller.BaseRes Data GetTaskAnalysisDataResItemV1 `json:"data"` }
type GetUserDetailResV1 ¶
type GetUserDetailResV1 struct { controller.BaseRes Data UserDetailResV1 `json:"data"` }
type GetUserGroupTipsResV1 ¶ added in v1.2202.0
type GetUserGroupTipsResV1 struct { controller.BaseRes Data []*UserGroupTipListItem `json:"data"` }
type GetUserGroupsReqV1 ¶ added in v1.2202.0
type GetUserGroupsResV1 ¶ added in v1.2202.0
type GetUserGroupsResV1 struct { controller.BaseRes Data []*UserGroupListItemResV1 `json:"data"` TotalNums uint64 `json:"total_nums"` }
type GetUserLoginResV1 ¶
type GetUserLoginResV1 struct { controller.BaseRes Data UserLoginResV1 `json:"data"` }
type GetUserTipsResV1 ¶
type GetUserTipsResV1 struct { controller.BaseRes Data []UserTipResV1 `json:"data"` }
type GetUsersReqV1 ¶
type GetUsersReqV1 struct { FilterUserName string `json:"filter_user_name" query:"filter_user_name"` FilterRoleName string `json:"filter_role_name" query:"filter_role_name"` PageIndex uint32 `json:"page_index" query:"page_index" valid:"required"` PageSize uint32 `json:"page_size" query:"page_size" valid:"required"` }
type GetUsersResV1 ¶
type GetUsersResV1 struct { controller.BaseRes Data []UserResV1 `json:"data"` TotalNums uint64 `json:"total_nums"` }
type GetWeChatConfigurationResV1 ¶ added in v1.2203.0
type GetWeChatConfigurationResV1 struct { controller.BaseRes Data WeChatConfigurationResV1 `json:"data"` }
type GetWorkflowAuditPassPercentResV1 ¶ added in v1.2210.0
type GetWorkflowAuditPassPercentResV1 struct { controller.BaseRes Data *WorkflowAuditPassPercentV1 `json:"data"` }
type GetWorkflowCountsResV1 ¶ added in v1.2208.0
type GetWorkflowCountsResV1 struct { controller.BaseRes Data *WorkflowCountsV1 `json:"data"` }
type GetWorkflowCreatedCountsEachDayReqV1 ¶ added in v1.2208.0
type GetWorkflowCreatedCountsEachDayResV1 ¶ added in v1.2208.0
type GetWorkflowCreatedCountsEachDayResV1 struct { controller.BaseRes Data *WorkflowCreatedCountsEachDayV1 `json:"data"` }
type GetWorkflowDurationOfWaitingForAuditResV1 ¶ added in v1.2208.0
type GetWorkflowDurationOfWaitingForAuditResV1 struct { controller.BaseRes Data *WorkflowStageDuration `json:"data"` }
type GetWorkflowDurationOfWaitingForExecutionResV1 ¶ added in v1.2208.0
type GetWorkflowDurationOfWaitingForExecutionResV1 struct { controller.BaseRes Data *WorkflowStageDuration `json:"data"` }
type GetWorkflowPassPercentResV1 ¶ added in v1.2208.0
type GetWorkflowPassPercentResV1 struct { controller.BaseRes Data *WorkflowPassPercentV1 `json:"data"` }
type GetWorkflowPercentCountedByInstanceTypeResV1 ¶ added in v1.2208.0
type GetWorkflowPercentCountedByInstanceTypeResV1 struct { controller.BaseRes Data *WorkflowPercentCountedByInstanceTypeV1 `json:"data"` }
type GetWorkflowRejectedPercentGroupByCreatorReqV1 ¶ added in v1.2208.0
type GetWorkflowRejectedPercentGroupByCreatorReqV1 struct {
Limit uint `json:"limit" query:"limit" valid:"required"`
}
type GetWorkflowRejectedPercentGroupByCreatorResV1 ¶ added in v1.2208.0
type GetWorkflowRejectedPercentGroupByCreatorResV1 struct { controller.BaseRes Data []*WorkflowRejectedPercentGroupByCreator `json:"data"` }
type GetWorkflowRejectedPercentGroupByInstanceReqV1 ¶ added in v1.2208.0
type GetWorkflowRejectedPercentGroupByInstanceReqV1 struct {
Limit uint `json:"limit" query:"limit" valid:"required"`
}
type GetWorkflowRejectedPercentGroupByInstanceResV1 ¶ added in v1.2208.0
type GetWorkflowRejectedPercentGroupByInstanceResV1 struct { controller.BaseRes Data []*WorkflowRejectedPercentGroupByInstance `json:"data"` }
type GetWorkflowResV1 ¶
type GetWorkflowResV1 struct { controller.BaseRes Data *WorkflowResV1 `json:"data"` }
type GetWorkflowStatusCountResV1 ¶ added in v1.2208.0
type GetWorkflowStatusCountResV1 struct { controller.BaseRes Data *WorkflowStatusCountV1 `json:"data"` }
type GetWorkflowTasksItemV1 ¶ added in v1.2209.0
type GetWorkflowTasksItemV1 struct { TaskId uint `json:"task_id"` InstanceName string `json:"instance_name"` Status string `json:"status" enums:"wait_for_audit,wait_for_execution,exec_scheduled,exec_failed,exec_succeeded,executing"` ExecStartTime *time.Time `json:"exec_start_time,omitempty"` ExecEndTime *time.Time `json:"exec_end_time,omitempty"` ScheduleTime *time.Time `json:"schedule_time,omitempty"` CurrentStepAssigneeUser []string `json:"current_step_assignee_user_name_list,omitempty"` TaskPassRate float64 `json:"task_pass_rate"` TaskScore int32 `json:"task_score"` InstanceMaintenanceTimes []*MaintenanceTimeResV1 `json:"instance_maintenance_times"` ExecutionUserName string `json:"execution_user_name"` }
type GetWorkflowTasksResV1 ¶ added in v1.2209.0
type GetWorkflowTasksResV1 struct { controller.BaseRes Data []*GetWorkflowTasksItemV1 `json:"data"` }
type GetWorkflowTemplateResV1 ¶
type GetWorkflowTemplateResV1 struct { controller.BaseRes Data *WorkflowTemplateDetailResV1 `json:"data"` }
type GetWorkflowTemplateTipResV1 ¶
type GetWorkflowTemplateTipResV1 struct { controller.BaseRes Data []*WorkflowTemplateTipResV1 `json:"data"` }
type GetWorkflowTemplatesResV1 ¶
type GetWorkflowTemplatesResV1 struct { controller.BaseRes Data []*WorkflowTemplateResV1 `json:"data"` TotalNums uint64 `json:"total_nums"` }
type GetWorkflowsReqV1 ¶
type GetWorkflowsReqV1 struct { FilterSubject string `json:"filter_subject" query:"filter_subject"` FilterCreateTimeFrom string `json:"filter_create_time_from" query:"filter_create_time_from"` FilterCreateTimeTo string `json:"filter_create_time_to" query:"filter_create_time_to"` FilterCreateUserName string `json:"filter_create_user_name" query:"filter_create_user_name"` FilterCurrentStepType string `json:"filter_current_step_type" query:"filter_current_step_type" valid:"omitempty,oneof=sql_review sql_execute"` FilterStatus string `` /* 141-byte string literal not displayed */ FilterCurrentStepAssigneeUserName string `json:"filter_current_step_assignee_user_name" query:"filter_current_step_assignee_user_name"` FilterTaskInstanceName string `json:"filter_task_instance_name" query:"filter_task_instance_name"` FilterTaskExecuteStartTimeFrom string `json:"filter_task_execute_start_time_from" query:"filter_task_execute_start_time_from"` FilterTaskExecuteStartTimeTo string `json:"filter_task_execute_start_time_to" query:"filter_task_execute_start_time_to"` PageIndex uint32 `json:"page_index" query:"page_index" valid:"required"` PageSize uint32 `json:"page_size" query:"page_size" valid:"required"` }
type GetWorkflowsResV1 ¶
type GetWorkflowsResV1 struct { controller.BaseRes Data []*WorkflowDetailResV1 `json:"data"` TotalNums uint64 `json:"total_nums"` }
type InstanceAdditionalMetaV1 ¶ added in v1.2203.0
type InstanceAdditionalMetaV1 struct { DBType string `json:"db_type"` Params []*InstanceAdditionalParamResV1 `json:"params"` }
type InstanceAdditionalParamReqV1 ¶ added in v1.2203.0
type InstanceAdditionalParamResV1 ¶ added in v1.2203.0
type InstanceConnectionResV1 ¶ added in v1.2209.0
type InstanceConnectionResV1 struct { InstanceName string `json:"instance_name"` InstanceConnectableResV1 }
type InstanceForCheckConnection ¶ added in v1.2209.0
type InstanceForCheckConnection struct {
Name string `json:"name"`
}
type InstanceForCreatingTask ¶ added in v1.2209.0
type InstanceResV1 ¶
type InstanceResV1 struct { Name string `json:"instance_name"` DBType string `json:"db_type" example:"mysql"` Host string `json:"db_host" example:"10.10.10.10"` Port string `json:"db_port" example:"3306"` User string `json:"db_user" example:"root"` Desc string `json:"desc" example:"this is a instance"` WorkflowTemplateName string `json:"workflow_template_name,omitempty"` MaintenanceTimes []*MaintenanceTimeResV1 `json:"maintenance_times" from:"maintenance_times"` RuleTemplates []string `json:"rule_template_name_list,omitempty"` Roles []string `json:"role_name_list,omitempty"` AdditionalParams []*InstanceAdditionalParamResV1 `json:"additional_params"` SQLQueryConfig *SQLQueryConfigResV1 `json:"sql_query_config"` }
type InstanceSchemaResV1 ¶
type InstanceSchemaResV1 struct {
Schemas []string `json:"schema_name_list"`
}
type InstanceTableMeta ¶ added in v1.2206.0
type InstanceTableMeta struct { Name string `json:"name"` Schema string `json:"schema"` Columns TableColumns `json:"columns"` Indexes TableIndexes `json:"indexes"` CreateTableSQL string `json:"create_table_sql"` }
type InstanceTipReqV1 ¶
type InstanceTipResV1 ¶
type InstanceTypePercent ¶ added in v1.2208.0
type InstancesTypePercentV1 ¶ added in v1.2208.0
type InstancesTypePercentV1 struct { InstanceTypePercents []InstanceTypePercent `json:"instance_type_percents"` InstanceTotalNum uint `json:"instance_total_num"` }
type LDAPConfigurationReqV1 ¶ added in v1.2111.0
type LDAPConfigurationReqV1 struct { EnableLdap *bool `json:"enable_ldap"` EnableSSL *bool `json:"enable_ssl"` LdapServerHost *string `json:"ldap_server_host"` LdapServerPort *string `json:"ldap_server_port"` LdapConnectDn *string `json:"ldap_connect_dn"` LdapConnectPwd *string `json:"ldap_connect_pwd"` LdapSearchBaseDn *string `json:"ldap_search_base_dn"` LdapUserNameRdnKey *string `json:"ldap_user_name_rdn_key"` LdapUserEmailRdnKey *string `json:"ldap_user_email_rdn_key"` }
type LDAPConfigurationResV1 ¶ added in v1.2111.0
type LDAPConfigurationResV1 struct { EnableLdap bool `json:"enable_ldap"` EnableSSL bool `json:"enable_ssl"` LdapServerHost string `json:"ldap_server_host"` LdapServerPort string `json:"ldap_server_port"` LdapConnectDn string `json:"ldap_connect_dn"` LdapSearchBaseDn string `json:"ldap_search_base_dn"` LdapUserNameRdnKey string `json:"ldap_user_name_rdn_key"` LdapUserEmailRdnKey string `json:"ldap_user_email_rdn_key"` }
type LicenseItem ¶ added in v1.2203.0
type LicenseUsageItem ¶ added in v1.2208.0
type LicenseUsageV1 ¶ added in v1.2208.0
type LicenseUsageV1 struct { UsersUsage LicenseUsageItem `json:"users_usage"` InstancesUsage []LicenseUsageItem `json:"instances_usage"` }
type ListTableBySchemaResV1 ¶ added in v1.2206.0
type ListTableBySchemaResV1 struct { controller.BaseRes Data []Table `json:"data"` }
type LoginChecker ¶ added in v1.2111.0
type LoginChecker interface {
// contains filtered or unexported methods
}
func GetLoginCheckerByUserName ¶ added in v1.2111.0
func GetLoginCheckerByUserName(userName string) (LoginChecker, error)
GetLoginCheckerByUserName get login checker by user name and init login checker
type MaintenanceTimeReqV1 ¶ added in v1.2203.0
type MaintenanceTimeResV1 ¶ added in v1.2203.0
type Oauth2ConfigurationReqV1 ¶ added in v1.2205.0
type Oauth2ConfigurationReqV1 struct { EnableOauth2 *bool `json:"enable_oauth2"` ClientID *string `json:"client_id"` ClientKey *string `json:"client_key"` ClientHost *string `json:"client_host"` ServerAuthUrl *string `json:"server_auth_url"` ServerTokenUrl *string `json:"server_token_url"` ServerUserIdUrl *string `json:"server_user_id_url"` Scopes *[]string `json:"scopes"` AccessTokenTag *string `json:"access_token_tag"` UserIdTag *string `json:"user_id_tag"` LoginTip *string `json:"login_tip"` }
type OperationResV1 ¶ added in v1.2202.0
type PartialSyncAuditPlanSQLsReqV1 ¶
type PartialSyncAuditPlanSQLsReqV1 struct {
SQLs []AuditPlanSQLReqV1 `json:"audit_plan_sql_list" form:"audit_plan_sql_list" valid:"dive"`
}
type PatchUserGroupReqV1 ¶ added in v1.2202.0
type PatchUserGroupReqV1 struct { Desc *string `json:"user_group_desc,omitempty" form:"user_group_desc" example:"this is a group"` Users *[]string `json:"user_name_list,omitempty" form:"user_name_list"` IsDisabled *bool `json:"is_disabled,omitempty" form:"is_disabled"` Roles *[]string `json:"role_name_list,omitempty" form:"role_name_list"` }
type PrepareSQLQueryReqV1 ¶ added in v1.2205.0
type PrepareSQLQueryResDataV1 ¶ added in v1.2205.0
type PrepareSQLQueryResDataV1 struct {
QueryIds []PrepareSQLQueryResSQLV1 `json:"query_ids"`
}
type PrepareSQLQueryResSQLV1 ¶ added in v1.2205.0
type PrepareSQLQueryResV1 ¶ added in v1.2205.0
type PrepareSQLQueryResV1 struct { controller.BaseRes Data PrepareSQLQueryResDataV1 `json:"data"` }
type RejectWorkflowReqV1 ¶
type RejectWorkflowReqV1 struct {
Reason string `json:"reason" form:"reason"`
}
type RoleTipResV1 ¶
type RoleTipResV1 struct {
Name string `json:"role_name"`
}
type RuleParamReqV1 ¶ added in v1.2112.0
type RuleParamResV1 ¶ added in v1.2112.0
type RuleReqV1 ¶
type RuleReqV1 struct { Name string `json:"name" form:"name" valid:"required" example:"ddl_check_index_count"` Level string `json:"level" form:"level" valid:"required" example:"error"` Params []RuleParamReqV1 `json:"params" form:"params" valid:"dive,required"` }
type RuleTemplateDetailResV1 ¶
type RuleTemplateResV1 ¶
type RuleTemplateTipReqV1 ¶
type RuleTemplateTipReqV1 struct {
FilterDBType string `json:"filter_db_type" query:"filter_db_type"`
}
type RuleTemplateTipResV1 ¶
type SMTPConfigurationResV1 ¶
type SQLExplain ¶ added in v1.2206.0
type SQLExplain struct { SQL string `json:"sql"` Message string `json:"message"` // explain result in table format ClassicResult ExplainClassicResult `json:"classic_result"` }
type SQLHistoryItemResV1 ¶ added in v1.2205.0
type SQLHistoryItemResV1 struct {
SQL string `json:"sql"`
}
type SQLQueryConfigReqV1 ¶ added in v1.2205.0
type SQLQueryConfigReqV1 struct { MaxPreQueryRows int `json:"max_pre_query_rows" from:"max_pre_query_rows" example:"100"` QueryTimeoutSecond int `json:"query_timeout_second" from:"query_timeout_second" example:"10"` AuditEnabled bool `json:"audit_enabled" from:"audit_enabled" example:"false"` AllowQueryWhenLessThanAuditLevel string `` /* 190-byte string literal not displayed */ }
type SQLQueryConfigResV1 ¶ added in v1.2205.0
type SQLQuerySQLExplain ¶ added in v1.2206.0
type SQLQuerySQLExplain struct { SQL string `json:"sql"` // explain result in table format ClassicResult ExplainClassicResult `json:"classic_result"` }
type SQLResultItemHeadResV1 ¶ added in v1.2205.0
type SQLResultItemHeadResV1 struct {
FieldName string `json:"field_name"`
}
type SqlAverageExecutionTime ¶ added in v1.2210.0
type SqlExecutionFailPercent ¶ added in v1.2210.0
type SystemVariablesResV1 ¶
type SystemVariablesResV1 struct {
WorkflowExpiredHours int `json:"workflow_expired_hours"`
}
type TableColumns ¶ added in v1.2206.0
type TableColumns struct { Rows []map[string]string `json:"rows"` Head []TableMetaItemHeadResV1 `json:"head"` }
type TableIndexes ¶ added in v1.2206.0
type TableIndexes struct { Rows []map[string]string `json:"rows"` Head []TableMetaItemHeadResV1 `json:"head"` }
type TableMeta ¶ added in v1.2206.0
type TableMeta struct { Name string `json:"name"` Schema string `json:"schema"` Columns TableColumns `json:"columns"` Indexes TableIndexes `json:"indexes"` CreateTableSQL string `json:"create_table_sql"` Message string `json:"message"` }
type TableMetaItemHeadResV1 ¶ added in v1.2206.0
type TestAuditPlanNotifyConfigResDataV1 ¶ added in v1.2204.0
type TestAuditPlanNotifyConfigResV1 ¶ added in v1.2204.0
type TestAuditPlanNotifyConfigResV1 struct { controller.BaseRes Data TestAuditPlanNotifyConfigResDataV1 `json:"data"` }
type TestSMTPConfigurationReqV1 ¶ added in v1.2203.0
type TestSMTPConfigurationReqV1 struct {
RecipientAddr string `json:"recipient_addr" from:"recipient_addr" description:"消息接收者邮箱地址" valid:"required,email"`
}
type TestSMTPConfigurationResDataV1 ¶ added in v1.2203.0
type TestSMTPConfigurationResV1 ¶ added in v1.2203.0
type TestSMTPConfigurationResV1 struct { controller.BaseRes Data TestSMTPConfigurationResDataV1 `json:"data"` }
type TestWeChatConfigurationReqV1 ¶ added in v1.2203.0
type TestWeChatConfigurationReqV1 struct {
RecipientID string `json:"recipient_id" from:"recipient_id" description:"消息接收者企业微信ID"`
}
type TestWeChatConfigurationResDataV1 ¶ added in v1.2203.0
type TestWeChatConfigurationResV1 ¶ added in v1.2203.0
type TestWeChatConfigurationResV1 struct { controller.BaseRes Data TestWeChatConfigurationResDataV1 `json:"data"` }
type TriggerAuditPlanResV1 ¶
type TriggerAuditPlanResV1 struct { controller.BaseRes Data AuditPlanReportResV1 `json:"data"` }
type UpdateAuditPlanNotifyConfigReqV1 ¶ added in v1.2204.0
type UpdateAuditPlanNotifyConfigReqV1 struct { NotifyInterval *int `json:"notify_interval" default:"10"` NotifyLevel *string `json:"notify_level" default:"warn" enums:"normal,notice,warn,error" valid:"oneof=normal notice warn error"` EnableEmailNotify *bool `json:"enable_email_notify"` EnableWebHookNotify *bool `json:"enable_web_hook_notify"` WebHookURL *string `json:"web_hook_url"` WebHookTemplate *string `json:"web_hook_template"` }
type UpdateAuditPlanReqV1 ¶
type UpdateAuditPlanReqV1 struct { Cron *string `json:"audit_plan_cron" form:"audit_plan_cron" example:"0 */2 * * *" valid:"omitempty,cron"` InstanceName *string `json:"audit_plan_instance_name" form:"audit_plan_instance_name" example:"test_mysql"` InstanceDatabase *string `json:"audit_plan_instance_database" form:"audit_plan_instance_database" example:"app1"` RuleTemplateName *string `json:"rule_template_name" form:"rule_template_name" example:"default_MySQL"` Params []AuditPlanParamReqV1 `json:"audit_plan_params" valid:"dive,required"` }
type UpdateAuditTaskSQLsReqV1 ¶ added in v1.2201.0
type UpdateAuditTaskSQLsReqV1 struct {
Description string `json:"description"`
}
type UpdateCurrentUserReqV1 ¶
type UpdateInstanceReqV1 ¶
type UpdateInstanceReqV1 struct { DBType *string `json:"db_type" form:"db_type" example:"mysql"` User *string `json:"db_user" form:"db_user" example:"root"` Host *string `json:"db_host" form:"db_host" example:"10.10.10.10" valid:"omitempty,ip_addr|uri|hostname|hostname_rfc1123"` Port *string `json:"db_port" form:"db_port" example:"3306" valid:"omitempty,port"` Password *string `json:"db_password" form:"db_password" example:"123456"` Desc *string `json:"desc" example:"this is a test instance"` WorkflowTemplateName *string `json:"workflow_template_name" form:"workflow_template_name"` MaintenanceTimes []*MaintenanceTimeReqV1 `json:"maintenance_times" from:"maintenance_times"` RuleTemplates []string `json:"rule_template_name_list" form:"rule_template_name_list"` Roles []string `json:"role_name_list" form:"role_name_list"` SQLQueryConfig *SQLQueryConfigReqV1 `json:"sql_query_config" from:"sql_query_config"` AdditionalParams []*InstanceAdditionalParamReqV1 `json:"additional_params" from:"additional_params"` }
type UpdateOtherUserPasswordReqV1 ¶
type UpdateOtherUserPasswordReqV1 struct {
Password string `json:"password" valid:"required"`
}
type UpdateRoleReqV1 ¶
type UpdateRuleTemplateReqV1 ¶
type UpdateSMTPConfigurationReqV1 ¶
type UpdateSMTPConfigurationReqV1 struct { EnableSMTPNotify *bool `json:"enable_smtp_notify" from:"enable_smtp_notify" description:"是否启用邮件通知"` Host *string `json:"smtp_host" form:"smtp_host" example:"smtp.email.qq.com"` Port *string `json:"smtp_port" form:"smtp_port" example:"465" valid:"omitempty,port"` Username *string `json:"smtp_username" form:"smtp_username" example:"test@qq.com" valid:"omitempty,email"` Password *string `json:"smtp_password" form:"smtp_password" example:"123"` }
type UpdateSystemVariablesReqV1 ¶
type UpdateSystemVariablesReqV1 struct {
WorkflowExpiredHours *int `json:"workflow_expired_hours" form:"workflow_expired_hours" example:"720"`
}
type UpdateUserReqV1 ¶
type UpdateUserReqV1 struct { Email *string `json:"email" valid:"omitempty,len=0|email" form:"email"` WeChatID *string `json:"wechat_id" example:"UserID"` Roles *[]string `json:"role_name_list" form:"role_name_list"` IsDisabled *bool `json:"is_disabled,omitempty" form:"is_disabled"` UserGroups *[]string `json:"user_group_name_list" form:"user_group_name_list"` }
type UpdateWeChatConfigurationReqV1 ¶ added in v1.2203.0
type UpdateWeChatConfigurationReqV1 struct { EnableWeChatNotify *bool `json:"enable_wechat_notify" from:"enable_wechat_notify" description:"是否启用微信通知"` CorpID *string `json:"corp_id" from:"corp_id" description:"企业微信ID"` CorpSecret *string `json:"corp_secret" from:"corp_secret" description:"企业微信ID对应密码"` AgentID *int `json:"agent_id" from:"agent_id" description:"企业微信应用ID"` SafeEnabled *bool `json:"safe_enabled" from:"safe_enabled" description:"是否对传输信息加密"` ProxyIP *string `json:"proxy_ip" from:"proxy_ip" description:"企业微信代理服务器IP"` }
type UpdateWorkflowReqV1 ¶
type UpdateWorkflowReqV1 struct {
TaskId string `json:"task_id" form:"task_id" valid:"required"`
}
type UpdateWorkflowScheduleV1 ¶ added in v1.2112.0
type UpdateWorkflowTemplateReqV1 ¶
type UpdateWorkflowTemplateReqV1 struct { Desc *string `json:"desc" form:"desc"` AllowSubmitWhenLessAuditLevel *string `json:"allow_submit_when_less_audit_level" enums:"normal,notice,warn,error"` Steps []*WorkFlowStepTemplateReqV1 `json:"workflow_step_template_list" form:"workflow_step_template_list"` Instances []string `json:"instance_name_list" form:"instance_name_list"` }
type UserDetailResV1 ¶
type UserDetailResV1 struct { Name string `json:"user_name"` Email string `json:"email"` IsAdmin bool `json:"is_admin"` WeChatID string `json:"wechat_id"` LoginType string `json:"login_type"` Roles []string `json:"role_name_list,omitempty"` IsDisabled bool `json:"is_disabled,omitempty"` UserGroups []string `json:"user_group_name_list,omitempty"` }
type UserGroupListItemResV1 ¶ added in v1.2202.0
type UserGroupTipListItem ¶ added in v1.2202.0
type UserGroupTipListItem struct {
Name string `json:"user_group_name"`
}
type UserLoginReqV1 ¶
type UserLoginResV1 ¶
type UserLoginResV1 struct {
Token string `json:"token" example:"this is a jwt token string"`
}
type UserResV1 ¶
type UserResV1 struct { Name string `json:"user_name"` Email string `json:"email"` WeChatID string `json:"wechat_id"` LoginType string `json:"login_type"` IsDisabled bool `json:"is_disabled,omitempty"` Roles []string `json:"role_name_list,omitempty"` UserGroups []string `json:"user_group_name_list,omitempty"` }
type UserTipResV1 ¶
type UserTipResV1 struct {
Name string `json:"user_name"`
}
type WeChatConfigurationResV1 ¶ added in v1.2203.0
type WorkFlowStepTemplateReqV1 ¶
type WorkFlowStepTemplateReqV1 struct { Type string `json:"type" form:"type" valid:"oneof=sql_review sql_execute" enums:"sql_review,sql_execute"` Desc string `json:"desc" form:"desc"` ApprovedByAuthorized bool `json:"approved_by_authorized"` Users []string `json:"assignee_user_name_list" form:"assignee_user_name_list"` }
type WorkflowAuditPassPercentV1 ¶ added in v1.2210.0
type WorkflowAuditPassPercentV1 struct {
AuditPassPercent float64 `json:"audit_pass_percent"`
}
type WorkflowCountsV1 ¶ added in v1.2208.0
type WorkflowCreatedCountsEachDayItem ¶ added in v1.2208.0
type WorkflowCreatedCountsEachDayV1 ¶ added in v1.2208.0
type WorkflowCreatedCountsEachDayV1 struct {
Samples []WorkflowCreatedCountsEachDayItem `json:"samples"`
}
type WorkflowDetailResV1 ¶
type WorkflowDetailResV1 struct { Id uint `json:"workflow_id"` Subject string `json:"subject"` Desc string `json:"desc"` TaskPassRate float64 `json:"task_pass_rate"` TaskScore int32 `json:"task_score"` TaskInstance string `json:"task_instance_name"` TaskInstanceSchema string `json:"task_instance_schema"` CreateUser string `json:"create_user_name"` CreateTime *time.Time `json:"create_time"` CurrentStepType string `json:"current_step_type,omitempty" enums:"sql_review,sql_execute"` CurrentStepAssigneeUser []string `json:"current_step_assignee_user_name_list,omitempty"` Status string `json:"status" enums:"on_process,rejected,canceled,exec_scheduled,executing,exec_failed,finished"` ScheduleTime *time.Time `json:"schedule_time,omitempty"` }
type WorkflowPassPercentV1 ¶ added in v1.2208.0
type WorkflowPercentCountedByInstanceType ¶ added in v1.2208.0
type WorkflowPercentCountedByInstanceTypeV1 ¶ added in v1.2208.0
type WorkflowPercentCountedByInstanceTypeV1 struct { WorkflowPercents []WorkflowPercentCountedByInstanceType `json:"workflow_percents"` WorkflowTotalNum uint `json:"workflow_total_num"` }
type WorkflowRecordResV1 ¶
type WorkflowRecordResV1 struct { TaskId uint `json:"task_id"` CurrentStepNumber uint `json:"current_step_number,omitempty"` Status string `json:"status" enums:"on_process,rejected,canceled,exec_scheduled,executing,exec_failed,finished"` ScheduleTime *time.Time `json:"schedule_time,omitempty"` ScheduleUser string `json:"schedule_user,omitempty"` Steps []*WorkflowStepResV1 `json:"workflow_step_list,omitempty"` }
type WorkflowRejectedPercentGroupByCreator ¶ added in v1.2208.0
type WorkflowRejectedPercentGroupByInstance ¶ added in v1.2208.0
type WorkflowResV1 ¶
type WorkflowResV1 struct { Id uint `json:"workflow_id"` Subject string `json:"subject"` Desc string `json:"desc,omitempty"` CreateUser string `json:"create_user_name"` CreateTime *time.Time `json:"create_time"` InstanceMaintenanceTimes []*MaintenanceTimeResV1 `json:"instance_maintenance_times"` Record *WorkflowRecordResV1 `json:"record"` RecordHistory []*WorkflowRecordResV1 `json:"record_history_list,omitempty"` }
type WorkflowStageDuration ¶ added in v1.2208.0
type WorkflowStageDuration struct {
Minutes uint `json:"minutes"`
}
type WorkflowStatisticsResV1 ¶
type WorkflowStatisticsResV1 struct { MyWorkflowNumber uint64 `json:"my_on_process_workflow_number"` MyRejectedWorkflowNumber uint64 `json:"my_rejected_workflow_number"` MyNeedReviewWorkflowNumber uint64 `json:"my_need_review_workflow_number"` MyNeedExecuteWorkflowNumber uint64 `json:"my_need_execute_workflow_number"` NeedMeReviewNumber uint64 `json:"need_me_to_review_workflow_number"` NeedMeExecuteNumber uint64 `json:"need_me_to_execute_workflow_number"` }
type WorkflowStatusCountV1 ¶ added in v1.2208.0
type WorkflowStatusCountV1 struct { ExecutionSuccessCount int `json:"execution_success_count"` ExecutingCount int `json:"executing_count"` ExecutingFailedCount int `json:"executing_failed_count"` WaitingForExecutionCount int `json:"waiting_for_execution_count"` RejectedCount int `json:"rejected_count"` WaitingForAuditCount int `json:"waiting_for_audit_count"` ClosedCount int `json:"closed_count"` }
type WorkflowStepResV1 ¶
type WorkflowStepResV1 struct { Id uint `json:"workflow_step_id,omitempty"` Number uint `json:"number"` Type string `json:"type" enums:"create_workflow,update_workflow,sql_review,sql_execute"` Desc string `json:"desc,omitempty"` Users []string `json:"assignee_user_name_list,omitempty"` OperationUser string `json:"operation_user_name,omitempty"` OperationTime *time.Time `json:"operation_time,omitempty"` State string `json:"state,omitempty" enums:"initialized,approved,rejected"` Reason string `json:"reason,omitempty"` }
type WorkflowTemplateDetailResV1 ¶
type WorkflowTemplateDetailResV1 struct { Name string `json:"workflow_template_name"` Desc string `json:"desc,omitempty"` AllowSubmitWhenLessAuditLevel string `json:"allow_submit_when_less_audit_level" enums:"normal,notice,warn,error"` Steps []*WorkFlowStepTemplateResV1 `json:"workflow_step_template_list"` Instances []string `json:"instance_name_list,omitempty"` }
type WorkflowTemplateResV1 ¶
type WorkflowTemplateTipResV1 ¶
type WorkflowTemplateTipResV1 struct {
Name string `json:"workflow_template_name"`
}
Source Files ¶
- audit_plan.go
- audit_plan_ce.go
- auth.go
- configuration.go
- configuration_ce.go
- dashboard.go
- instance.go
- instance_ce.go
- license.go
- license_qa.go
- oauth2.go
- oauth2_ce.go
- operation.go
- role.go
- rule.go
- sql_audit.go
- sql_query.go
- sql_query_ce.go
- sql_whitelist.go
- statistic.go
- statistic_ce.go
- task.go
- task_ce.go
- user.go
- user_group.go
- workflow.go