web

package
v1.11.4 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2026 License: MIT Imports: 18 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminSearchPagedResourcesReq added in v1.11.4

type AdminSearchPagedResourcesReq = SearchPagedResourcesReq

type AdminSearchStructureModelVO added in v1.11.4

type AdminSearchStructureModelVO struct {
	ModelUID  string `json:"model_uid"`
	ModelName string `json:"model_name"`
	Total     int    `json:"total"`
}

AdminSearchStructureModelVO 单个模型 Tab 的统计与名称

type AdminSearchStructureReq added in v1.11.4

type AdminSearchStructureReq struct {
	Text string `json:"text"`
}

type AdminSearchStructureTenantVO added in v1.11.4

type AdminSearchStructureTenantVO struct {
	TenantID   int64                         `json:"tenant_id"`
	TenantType string                        `json:"tenant_type"`
	Total      int                           `json:"total"`
	Models     []AdminSearchStructureModelVO `json:"models"`
}

AdminSearchStructureTenantVO 租户维度统计与下属模型 Tabs

type CreateResourceRelationReq

type CreateResourceRelationReq struct {
	SourceResourceID int64  `json:"source_resource_id"`
	TargetResourceID int64  `json:"target_resource_id"`
	RelationName     string `json:"relation_name"`
}

type CreateResourceReq

type CreateResourceReq struct {
	Name     string        `json:"name"`
	ModelUid string        `json:"model_uid"`
	Data     mongox.MapStr `json:"data"`
}

type DeleteResourceRelationReq

type DeleteResourceRelationReq struct {
	ModelUid     string `json:"model_uid"`
	ResourceId   int64  `json:"resource_id"`
	RelationName string `json:"relation_name"`
}

type DeleteResourceReq

type DeleteResourceReq struct {
	Id int64 `json:"id"`
}

type DetailResourceReq

type DetailResourceReq struct {
	ModelUid string `json:"model_uid"`
	ID       int64  `json:"id"`
}

type FindSecureReq

type FindSecureReq struct {
	ID       int64  `json:"id"`
	FieldUid string `json:"field_uid"`
}

type GraphModel

type GraphModel struct {
	ModelUID  string `json:"model_uid"`
	ModelName string `json:"model_name"`
	Icon      string `json:"icon,omitempty"`
}

GraphModel 拓扑图模型图例元数据

type Handler

type Handler struct {
	capability.IRegistry
	// contains filtered or unexported fields
}

func (*Handler) AdminSearchStructure added in v1.11.4

func (h *Handler) AdminSearchStructure(ctx *ginx.Context, req AdminSearchStructureReq) (ginx.Result, error)

AdminSearchStructure 跨租户全局大盘结构与导航检索 NOTE: 纯数值聚合,不拉取资产 data 实体,10ms 极速画出左侧租户树与右侧模型 Tabs

func (*Handler) CreateResource

func (h *Handler) CreateResource(ctx *ginx.Context, req CreateResourceReq) (ginx.Result, error)

func (*Handler) CreateResourceRelation

func (h *Handler) CreateResourceRelation(ctx *ginx.Context, req CreateResourceRelationReq) (ginx.Result, error)

func (*Handler) DeleteResource

func (h *Handler) DeleteResource(ctx *ginx.Context, req DeleteResourceReq) (ginx.Result, error)

func (*Handler) DeleteResourceRelation

func (h *Handler) DeleteResourceRelation(ctx *ginx.Context, req DeleteResourceRelationReq) (ginx.Result, error)

func (*Handler) DetailResource

func (h *Handler) DetailResource(ctx *ginx.Context, req DetailResourceReq) (ginx.Result, error)

func (*Handler) FindAllGraph

func (h *Handler) FindAllGraph(ctx *ginx.Context, req ListDiagramReq) (ginx.Result, error)

func (*Handler) FindLeftGraph

func (h *Handler) FindLeftGraph(ctx *ginx.Context, req ListDiagramReq) (ginx.Result, error)

func (*Handler) FindRightGraph

func (h *Handler) FindRightGraph(ctx *ginx.Context, req ListDiagramReq) (ginx.Result, error)

func (*Handler) FindSecureData

func (h *Handler) FindSecureData(ctx *ginx.Context, req FindSecureReq) (ginx.Result, error)

func (*Handler) IdentifyRoutes added in v1.11.2

func (h *Handler) IdentifyRoutes(_ *gin.Engine)

func (*Handler) ListAllAggregated

func (h *Handler) ListAllAggregated(ctx *ginx.Context, req ListResourceDiagramReq) (ginx.Result, error)

func (*Handler) ListCanBeFilterRelated

func (h *Handler) ListCanBeFilterRelated(ctx *ginx.Context, req ListCanBeRelatedReqByModel) (ginx.Result, error)

func (*Handler) ListResource

func (h *Handler) ListResource(ctx *ginx.Context, req ListResourceReq) (ginx.Result, error)

func (*Handler) ListResourceByIds

func (h *Handler) ListResourceByIds(ctx *ginx.Context, req ListResourceByIdsReq) (ginx.Result, error)

func (*Handler) PrivateRoutes

func (h *Handler) PrivateRoutes(server *gin.Engine)

PrivateRoutes 注册资源管理模块需要中心化登录及权限判定(由 EIAM SDK 统一拦截承载)的私有路由

func (*Handler) PublicRoutes added in v1.11.2

func (h *Handler) PublicRoutes(_ *gin.Engine)

func (*Handler) SearchPagedResources added in v1.11.4

func (h *Handler) SearchPagedResources(ctx *ginx.Context, req SearchPagedResourcesReq) (ginx.Result, error)

SearchPagedResources 模型资产物理分页检索(支持指定租户或默认租户上下文)

func (*Handler) SearchStructure added in v1.11.4

func (h *Handler) SearchStructure(ctx *ginx.Context, req SearchStructureReq) (ginx.Result, error)

SearchStructure 单租户检索模型 Tabs 概览(两阶段模式:阶段一)

func (*Handler) SetCustomField

func (h *Handler) SetCustomField(ctx *ginx.Context, req SetCustomFieldReq) (ginx.Result, error)

func (*Handler) UpdateResource

func (h *Handler) UpdateResource(ctx *ginx.Context, req UpdateResourceReq) (ginx.Result, error)

type Line

type Line struct {
	From string `json:"from"`
	To   string `json:"to"`
}

Line 拓扑图连接边

type ListCanBeRelatedReqByModel

type ListCanBeRelatedReqByModel struct {
	Page
	ResourceId      int64  `json:"resource_id"`      // 当前资源ID
	ModelUid        string `json:"model_uid"`        // 目标模型ID
	RelationName    string `json:"relation_name"`    // 关联类型,以方便推断是数据正向 OR 反向
	FilterName      string `json:"filter_name"`      // 过滤名称
	FilterCondition string `json:"filter_condition"` // 过滤条件
	FilterInput     string `json:"filter_input"`     // 过滤输入
}

type ListDiagramReq

type ListDiagramReq struct {
	ModelUid     string `json:"model_uid"`
	ResourceId   int64  `json:"resource_id"`
	ResourceName string `json:"resource_name"`
	MaxDepth     int    `json:"max_depth"`
}

type ListResourceByIdsReq

type ListResourceByIdsReq struct {
	ModelUid    string  `json:"model_uid"`
	ResourceIds []int64 `json:"resource_ids"`
}

type ListResourceDiagramReq

type ListResourceDiagramReq struct {
	ModelUid   string `json:"model_uid"`
	ResourceId int64  `json:"resource_id"`
}

type ListResourceReq

type ListResourceReq struct {
	Page
	ModelUid string `json:"model_uid"`
}

type Node

type Node struct {
	ID                   string         `json:"id"`
	Text                 string         `json:"text"`
	ExpandHolderPosition string         `json:"expandHolderPosition,omitempty"`
	Expanded             bool           `json:"expanded"`
	Data                 map[string]any `json:"data,omitempty"`
}

Node 拓扑图单个节点

type Page

type Page struct {
	Offset int64 `json:"offset,omitempty"`
	Limit  int64 `json:"limit,omitempty"`
}

type Resource

type Resource struct {
	ID       int64         `json:"id"`
	Name     string        `json:"name"`
	ModelUID string        `json:"model_uid"`
	Data     mongox.MapStr `json:"data"`
}

Resource 单个资产对象展示视图

type RetrieveAdminSearchStructure added in v1.11.4

type RetrieveAdminSearchStructure struct {
	Total         int                            `json:"total"`
	Organizations []AdminSearchStructureTenantVO `json:"organizations"`
	Personals     []AdminSearchStructureTenantVO `json:"personals"`
}

RetrieveAdminSearchStructure 全局大盘结构与导航响应(支撑左侧租户树 + 右侧模型Tabs)

type RetrieveAggregatedAssets

type RetrieveAggregatedAssets struct {
	RelationName string  `json:"relation_name"`
	ModelUid     string  `json:"model_uid"`
	Total        int     `json:"total"`
	ResourceIds  []int64 `json:"resource_ids"`
}

RetrieveAggregatedAssets 资产关联关系聚合统计视图

type RetrieveGraph

type RetrieveGraph struct {
	RootId string       `json:"rootId"`
	Nodes  []Node       `json:"nodes"`
	Lines  []Line       `json:"lines"`
	Models []GraphModel `json:"models,omitempty"`
}

RetrieveGraph 资产关联拓扑图全貌视图

type RetrieveResources

type RetrieveResources struct {
	Resources []Resource `json:"resources"`
	Total     int64      `json:"total"`
}

RetrieveResources 资产列表查询结果

type RetrieveSearchStructure added in v1.11.4

type RetrieveSearchStructure struct {
	Total  int                           `json:"total"`
	Models []AdminSearchStructureModelVO `json:"models"`
}

RetrieveSearchStructure 单租户检索模型 Tabs 概览响应

type SearchPagedResourcesReq added in v1.11.4

type SearchPagedResourcesReq struct {
	Page
	TenantID int64  `json:"tenant_id"` // 可选:指定租户ID(用于跨租户大盘场景),不传默认使用当前租户
	Text     string `json:"text"`
	ModelUID string `json:"model_uid"`
}

type SearchStructureReq added in v1.11.4

type SearchStructureReq struct {
	Text string `json:"text"`
}

type SetCustomFieldReq

type SetCustomFieldReq struct {
	Id    int64       `json:"id"`
	Field string      `json:"field"`
	Data  interface{} `json:"data"`
}

type UpdateResourceReq

type UpdateResourceReq struct {
	Id       int64         `json:"id"`
	Name     string        `json:"name"`
	ModelUid string        `json:"model_uid"`
	Data     mongox.MapStr `json:"data"`
}

Jump to

Keyboard shortcuts

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