web

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: MIT Imports: 12 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 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, mgSvc service.MGService, rmSvc relation.RMSvc, attrSvc attribute.Service,
	resourceSvc resource.Service) *Handler

func (*Handler) CreateModel

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

func (*Handler) CreateModelGroup added in v1.6.0

func (h *Handler) CreateModelGroup(ctx *gin.Context, req CreateModelGroupReq) (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) FindModelsGraph added in v1.6.0

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

FindModelsGraph 查询模型拓扑图

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) ListModelsByGroup added in v1.6.0

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

func (*Handler) PrivateRoutes added in v1.3.0

func (h *Handler) PrivateRoutes(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 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 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 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