v2

package
v1.2206.0-pre1 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRole added in v1.2202.0

func CreateRole(c echo.Context) (err error)

@Summary 创建角色 @Description create role @Id createRoleV2 @Tags role @Security ApiKeyAuth @Accept json @Produce json @Param instance body v2.CreateRoleReqV2 true "create role" @Success 200 {object} controller.BaseRes @router /v2/roles [post]

func GetAuditPlanReportSQLs

func GetAuditPlanReportSQLs(c echo.Context) error

@Summary 获取指定审核计划的SQL审核详情 @Description get audit plan report SQLs @Id getAuditPlanReportSQLsV2 @Deprecated @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} v2.GetAuditPlanReportSQLsResV2 @router /v2/audit_plans/{audit_plan_name}/report/{audit_plan_report_id}/ [get]

func GetAuditPlanReportSQLsV2 added in v1.2204.0

func GetAuditPlanReportSQLsV2(c echo.Context) error

GetAuditPlanReportSQLsV2 is to fix the irregular uri used by GetAuditPlanReportSQLs issue: https://github.com/actiontech/sqle/issues/429 @Summary 获取指定审核计划的SQL审核详情 @Description get audit plan report SQLs @Id getAuditPlanReportsSQLsV2 @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} v2.GetAuditPlanReportSQLsResV2 @router /v2/audit_plans/{audit_plan_name}/reports/{audit_plan_report_id}/sqls [get]

func GetAuditPlanSQLs

func GetAuditPlanSQLs(c echo.Context) error

@Summary 获取指定审核计划的SQLs信息(不包括审核结果) @Description get audit plan SQLs @Id getAuditPlanSQLsV2 @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} v2.GetAuditPlanSQLsResV2 @router /v2/audit_plans/{audit_plan_name}/sqls [get]

func GetRoles added in v1.2202.0

func GetRoles(c echo.Context) error

@Summary 获取角色列表 @Description get role list @Id getRoleListV2 @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} v2.GetRolesResV2 @router /v2/roles [get]

func UpdateRole added in v1.2202.0

func UpdateRole(c echo.Context) (err error)

@Summary 更新角色信息 @Description update role @Id updateRoleV2 @Tags role @Security ApiKeyAuth @Accept json @Produce json @Param role_name path string true "role name" @Param instance body v2.UpdateRoleReqV2 true "update role request" @Success 200 {object} controller.BaseRes @router /v2/roles/{role_name}/ [patch]

Types

type AuditPlanReportSQLResV2

type AuditPlanReportSQLResV2 struct {
	SQL         string `json:"audit_plan_report_sql" example:"select * from t1 where id = 1"`
	AuditResult string `json:"audit_plan_report_sql_audit_result" example:"same format as task audit result"`
	Number      uint   `json:"number" example:"1"`
}

type AuditPlanSQLHeadV2

type AuditPlanSQLHeadV2 struct {
	Name string `json:"name"`
	Desc string `json:"desc"`
	Type string `json:"type,omitempty" enums:"sql"`
}

type AuditPlanSQLResV2

type AuditPlanSQLResV2 struct {
	Head []AuditPlanSQLHeadV2 `json:"head"`
	Rows []map[string]string  `json:"rows"`
}

type CreateRoleReqV2 added in v1.2202.0

type CreateRoleReqV2 struct {
	Name           string   `json:"role_name" form:"role_name" valid:"required,name"`
	Desc           string   `json:"role_desc" form:"role_desc"`
	Instances      []string `json:"instance_name_list" form:"instance_name_list"`
	OperationCodes []uint   `json:"operation_code_list" form:"operation_code_list"`
	Users          []string `json:"user_name_list,omitempty" form:"user_name_list"`
	UserGroups     []string `json:"user_group_name_list,omitempty" form:"user_group_name_list"`
}

type GetAuditPlanReportSQLsReqV2

type GetAuditPlanReportSQLsReqV2 struct {
	PageIndex uint32 `json:"page_index" query:"page_index" valid:"required"`
	PageSize  uint32 `json:"page_size" query:"page_size" valid:"required"`
}

type GetAuditPlanReportSQLsResV2

type GetAuditPlanReportSQLsResV2 struct {
	controller.BaseRes
	Data      []AuditPlanReportSQLResV2 `json:"data"`
	TotalNums uint64                    `json:"total_nums"`
}

type GetAuditPlanSQLsReqV2

type GetAuditPlanSQLsReqV2 struct {
	PageIndex uint32 `json:"page_index" query:"page_index" valid:"required"`
	PageSize  uint32 `json:"page_size" query:"page_size" valid:"required"`
}

type GetAuditPlanSQLsResV2

type GetAuditPlanSQLsResV2 struct {
	controller.BaseRes
	Data      AuditPlanSQLResV2 `json:"data"`
	TotalNums uint64            `json:"total_nums"`
}

type GetRolesReqV2 added in v1.2202.0

type GetRolesReqV2 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 GetRolesResV2 added in v1.2202.0

type GetRolesResV2 struct {
	controller.BaseRes
	Data      []*RoleResV2 `json:"data"`
	TotalNums uint64       `json:"total_nums"`
}

type Operation added in v1.2202.0

type Operation struct {
	Code uint   `json:"op_code"`
	Desc string `json:"op_desc"`
}

type RoleResV2 added in v1.2202.0

type RoleResV2 struct {
	Name       string       `json:"role_name"`
	Desc       string       `json:"role_desc"`
	Users      []string     `json:"user_name_list,omitempty"`
	Instances  []string     `json:"instance_name_list,omitempty"`
	Operations []*Operation `json:"operation_list,omitempty"`
	UserGroups []string     `json:"user_group_name_list,omitempty" form:"user_group_name_list"`
	IsDisabled bool         `json:"is_disabled,omitempty"`
}

type UpdateRoleReqV2 added in v1.2202.0

type UpdateRoleReqV2 struct {
	Desc           *string   `json:"role_desc" form:"role_desc"`
	Users          *[]string `json:"user_name_list,omitempty" form:"user_name_list"`
	Instances      *[]string `json:"instance_name_list,omitempty" form:"instance_name_list"`
	OperationCodes *[]uint   `json:"operation_code_list,omitempty" form:"operation_code_list"`
	UserGroups     *[]string `json:"user_group_name_list,omitempty" form:"user_group_name_list"`
	IsDisabled     *bool     `json:"is_disabled,omitempty"`
}

Jump to

Keyboard shortcuts

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