web

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateModelGroupReq

type CreateModelGroupReq struct {
	Name string `json:"name"`
}

type CreateModelRelationReq

type CreateModelRelationReq struct {
	SourceModelUID  string `json:"source_model_uid"`
	TargetModelUID  string `json:"target_model_uid"`
	RelationTypeUID string `json:"relation_type_uid"`
	Mapping         string `json:"mapping"`
}

type CreateModelReq

type CreateModelReq struct {
	Name    string `json:"name"`
	GroupId int64  `json:"group_id"`
	UID     string `json:"uid"`
	Icon    string `json:"icon"`
}

type DeleteModelByUidReq

type DeleteModelByUidReq struct {
	ModelUid string `json:"model_uid"`
}

type DeleteModelGroup

type DeleteModelGroup struct {
	ID int64 `json:"id"`
}

type DetailModelReq

type DetailModelReq struct {
	ID int64 `json:"id"`
}

type Handler

type Handler struct {
	RMSvc   relation.RMSvc
	AttrSvc attribute.Service
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(svc service.Service, groupSvc service.MGService, RMSvc relation.RMSvc, attrSvc attribute.Service,
	resourceSvc resource.Service) *Handler

func (*Handler) CreateGroup

func (h *Handler) CreateGroup(ctx *gin.Context, req CreateModelGroupReq) (ginx.Result, error)

func (*Handler) CreateModel

func (h *Handler) CreateModel(ctx *gin.Context, req CreateModelReq) (ginx.Result, error)

func (*Handler) DeleteModelByUid

func (h *Handler) DeleteModelByUid(ctx *gin.Context, req DeleteModelByUidReq) (ginx.Result, error)

func (*Handler) DeleteModelGroup

func (h *Handler) DeleteModelGroup(ctx *gin.Context, req DeleteModelGroup) (ginx.Result, error)

func (*Handler) DetailModel

func (h *Handler) DetailModel(ctx *gin.Context, req DetailModelReq) (ginx.Result, error)

func (*Handler) FindRelationModelDiagram

func (h *Handler) FindRelationModelDiagram(ctx *gin.Context, req Page) (ginx.Result, error)

func (*Handler) FindRelationModelGraph

func (h *Handler) FindRelationModelGraph(ctx *gin.Context, req Page) (ginx.Result, error)

func (*Handler) ListModelGroups

func (h *Handler) ListModelGroups(ctx *gin.Context, req Page) (ginx.Result, error)

func (*Handler) ListModels

func (h *Handler) ListModels(ctx *gin.Context, req Page) (ginx.Result, error)

func (*Handler) ListModelsByGroupId

func (h *Handler) ListModelsByGroupId(ctx *gin.Context, req Page) (ginx.Result, error)

func (*Handler) RegisterRoutes

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

type Model

type Model struct {
	Id    int64  `json:"id"`
	Name  string `json:"name"`
	UID   string `json:"uid"`
	Icon  string `json:"icon"`
	Total int    `json:"total"`
	Ctime string `json:"ctime"`
	Utime string `json:"utime"`
}

type ModelDiagram

type ModelDiagram struct {
	ID        int64           `json:"id"`
	Icon      string          `json:"icon"`
	ModelUID  string          `json:"model_uid"`
	ModelName string          `json:"model_name"`
	Assets    []RelationModel `json:"assets"`
}

type ModelGroup

type ModelGroup struct {
	Id   int64  `json:"id"`
	Name string `json:"name"`
}

type ModelLine

type ModelLine struct {
	From string `json:"from"`
	To   string `json:"to"`
	Text string `json:"text"`
}

type ModelListByGroupId

type ModelListByGroupId struct {
	GroupId   int64   `json:"group_id"`
	GroupName string  `json:"group_name"`
	Models    []Model `json:"models"`
}

type ModelNode

type ModelNode struct {
	ID   string            `json:"id"`
	Text string            `json:"text"`
	Data map[string]string `json:"data,omitempty"`
}

type ModelRelation

type ModelRelation struct {
	ID              int64  `json:"id"`
	RelationTypeUID string `json:"relation_type_uid"`
	TargetModelUID  string `json:"target_model_uid"`
}

type Page

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

type RelationModel

type RelationModel struct {
	ID              int64  `json:"id"`
	RelationTypeUID string `json:"relation_type_uid"`
	TargetModelUID  string `json:"target_model_uid"`
}

RelationModel 拓补图模型关联节点信息

type RetrieveModelGroupsListResp

type RetrieveModelGroupsListResp struct {
	Total int64        `json:"total,omitempty"`
	Mgs   []ModelGroup `json:"model_groups,omitempty"`
}

type RetrieveModelListByGroupId

type RetrieveModelListByGroupId struct {
	Mgs []ModelListByGroupId `json:"mgs"`
}

type RetrieveModelsListResp

type RetrieveModelsListResp struct {
	Total  int64   `json:"total,omitempty"`
	Models []Model `json:"models,omitempty"`
}

type RetrieveRelationModelDiagram

type RetrieveRelationModelDiagram struct {
	Diagrams []ModelDiagram `json:"diagrams"`
}

type RetrieveRelationModelGraph

type RetrieveRelationModelGraph struct {
	RootId string      `json:"rootId"`
	Nodes  []ModelNode `json:"nodes"`
	Lines  []ModelLine `json:"lines"`
}

Jump to

Keyboard shortcuts

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