Merge branch 'master' of https://git.code.tencent.com/beijing-rtss-test/bj-rtsts-server-go
This commit is contained in:
commit
cdb9654799
43
api/auth.go
43
api/auth.go
@ -10,6 +10,7 @@ import (
|
||||
"joylink.club/bj-rtsts-server/dto"
|
||||
"joylink.club/bj-rtsts-server/middleware"
|
||||
"joylink.club/bj-rtsts-server/service"
|
||||
"joylink.club/bj-rtsts-server/sys_error"
|
||||
)
|
||||
|
||||
func InitAuthRouter(api *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
|
||||
@ -49,13 +50,9 @@ func InitAuthRouter(api *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware)
|
||||
func pageQueryRole(c *gin.Context) {
|
||||
req := dto.PageQueryDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("查询失败,请求参数异常", err))
|
||||
}
|
||||
page, err := service.PageAuthRoleQuery(&req)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()})
|
||||
}
|
||||
c.JSON(http.StatusOK, page)
|
||||
c.JSON(http.StatusOK, service.PageAuthRoleQuery(&req))
|
||||
}
|
||||
|
||||
// 查询角色列表
|
||||
@ -74,8 +71,7 @@ func pageQueryRole(c *gin.Context) {
|
||||
// @Failure 500 {object} dto.ErrorDto
|
||||
// @Router /api/v1/auth/role/list [get]
|
||||
func listQueryRole(c *gin.Context) {
|
||||
page := service.ListAuthRoleQuery()
|
||||
c.JSON(http.StatusOK, page)
|
||||
c.JSON(http.StatusOK, service.ListAuthRoleQuery())
|
||||
}
|
||||
|
||||
// 创建角色
|
||||
@ -97,7 +93,7 @@ func listQueryRole(c *gin.Context) {
|
||||
func createRole(c *gin.Context) {
|
||||
req := dto.AuthRoleReqDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("创建失败,请求参数异常", err))
|
||||
}
|
||||
slog.Debug("保存数据", req)
|
||||
c.JSON(http.StatusOK, service.CreateAuthRole(&req))
|
||||
@ -122,7 +118,7 @@ func createRole(c *gin.Context) {
|
||||
func queryRoleInfo(c *gin.Context) {
|
||||
id, exist := c.Params.Get("id")
|
||||
if !exist {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: "必要参数id不存在"})
|
||||
panic(sys_error.New("查询失败,缺少id"))
|
||||
}
|
||||
slog.Debug("传入参数id为" + id)
|
||||
int64Id, _ := strconv.ParseInt(id, 10, 64)
|
||||
@ -149,12 +145,12 @@ func queryRoleInfo(c *gin.Context) {
|
||||
func updateRoleInfo(c *gin.Context) {
|
||||
id, exist := c.Params.Get("id")
|
||||
if !exist {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: "必要参数id不存在"})
|
||||
panic(sys_error.New("更新失败,缺少id"))
|
||||
}
|
||||
slog.Debug("传入参数id为" + id)
|
||||
req := dto.AuthRoleReqDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("更新角色信息出错,参数格式错误", err))
|
||||
}
|
||||
int64Id, _ := strconv.ParseInt(id, 10, 64)
|
||||
rid := int32(int64Id)
|
||||
@ -184,9 +180,8 @@ func updateRoleInfo(c *gin.Context) {
|
||||
func deleteRoleInfo(c *gin.Context) {
|
||||
id, exist := c.Params.Get("id")
|
||||
if !exist {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: "必要参数id不存在"})
|
||||
panic(sys_error.New("删除失败,缺少id"))
|
||||
}
|
||||
slog.Debug("传入参数id为" + id)
|
||||
int64Id, _ := strconv.ParseInt(id, 10, 64)
|
||||
rid := int32(int64Id)
|
||||
result := service.DeleteAuthRole(rid)
|
||||
@ -215,13 +210,9 @@ func deleteRoleInfo(c *gin.Context) {
|
||||
func pageQueryApiPath(c *gin.Context) {
|
||||
req := dto.AuthApiPathPageReqDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("查询失败,参数格式错误", err))
|
||||
}
|
||||
page, err := service.PageAuthApiPathQuery(&req)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()})
|
||||
}
|
||||
c.JSON(http.StatusOK, page)
|
||||
c.JSON(http.StatusOK, service.PageAuthApiPathQuery(&req))
|
||||
}
|
||||
|
||||
// 查询接口路径列表
|
||||
@ -262,7 +253,7 @@ func listQueryApiPath(c *gin.Context) {
|
||||
func createApiPath(c *gin.Context) {
|
||||
req := dto.AuthApiPathReqDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("创建失败,参数格式错误", err))
|
||||
}
|
||||
slog.Debug("保存数据", req)
|
||||
c.JSON(http.StatusOK, service.CreateAuthApiPath(&req))
|
||||
@ -287,7 +278,7 @@ func createApiPath(c *gin.Context) {
|
||||
func queryApiPathInfo(c *gin.Context) {
|
||||
id, exist := c.Params.Get("id")
|
||||
if !exist {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: "必要参数id不存在"})
|
||||
panic(sys_error.New("查询失败,缺少id"))
|
||||
}
|
||||
slog.Debug("传入参数id为" + id)
|
||||
int64Id, _ := strconv.ParseInt(id, 10, 64)
|
||||
@ -314,11 +305,11 @@ func queryApiPathInfo(c *gin.Context) {
|
||||
func updateApiPathInfo(c *gin.Context) {
|
||||
id, exist := c.Params.Get("id")
|
||||
if !exist {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: "必要参数id不存在"})
|
||||
panic(sys_error.New("更新失败,缺少id"))
|
||||
}
|
||||
req := dto.AuthApiPathReqDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("更新失败,参数格式错误", err))
|
||||
}
|
||||
int64Id, _ := strconv.ParseInt(id, 10, 64)
|
||||
c.JSON(http.StatusOK, service.UpdateAuthApiPath(int32(int64Id), &req))
|
||||
@ -343,7 +334,7 @@ func updateApiPathInfo(c *gin.Context) {
|
||||
func deleteApiPathInfo(c *gin.Context) {
|
||||
id, exist := c.Params.Get("id")
|
||||
if !exist {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: "必要参数id不存在"})
|
||||
panic(sys_error.New("删除失败,缺少id"))
|
||||
}
|
||||
slog.Debug("传入参数id为" + id)
|
||||
int64Id, _ := strconv.ParseInt(id, 10, 64)
|
||||
@ -369,7 +360,7 @@ func deleteApiPathInfo(c *gin.Context) {
|
||||
func assignRoleToUser(c *gin.Context) {
|
||||
req := dto.AuthRoleUserReqDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("关联失败,参数格式错误", err))
|
||||
}
|
||||
result := service.UserLinkRole(&req)
|
||||
if result {
|
||||
|
@ -10,6 +10,7 @@ import (
|
||||
"joylink.club/bj-rtsts-server/dto"
|
||||
"joylink.club/bj-rtsts-server/middleware"
|
||||
"joylink.club/bj-rtsts-server/service"
|
||||
"joylink.club/bj-rtsts-server/sys_error"
|
||||
)
|
||||
|
||||
func InitCategoryRouter(api *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
|
||||
@ -39,18 +40,12 @@ func InitCategoryRouter(api *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddlewa
|
||||
// @Failure 500 {object} dto.ErrorDto
|
||||
// @Router /api/v1/category/paging [get]
|
||||
func pageQueryCategory(c *gin.Context) {
|
||||
user, _ := c.Get(middleware.IdentityKey)
|
||||
slog.Debug("分页查询厂家", user)
|
||||
req := dto.PageCategoryReqDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("查询失败,参数格式错误", err))
|
||||
}
|
||||
slog.Debug("分页查厂家参数", req)
|
||||
page, err := service.PageCategoryQuery(&req)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()})
|
||||
}
|
||||
c.JSON(http.StatusOK, page)
|
||||
c.JSON(http.StatusOK, service.PageCategoryQuery(&req))
|
||||
}
|
||||
|
||||
// 查询厂家信息列表
|
||||
@ -72,14 +67,10 @@ func pageQueryCategory(c *gin.Context) {
|
||||
func listQueryCategory(c *gin.Context) {
|
||||
req := dto.CategoryReqDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("查询失败,参数格式错误", err))
|
||||
}
|
||||
slog.Debug("查厂家参数", req)
|
||||
page, err := service.ListCategoryQuery(&req)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()})
|
||||
}
|
||||
c.JSON(http.StatusOK, page)
|
||||
c.JSON(http.StatusOK, service.ListCategoryQuery(&req))
|
||||
}
|
||||
|
||||
// 创建厂家信息
|
||||
@ -101,14 +92,10 @@ func listQueryCategory(c *gin.Context) {
|
||||
func createCategory(c *gin.Context) {
|
||||
req := dto.CategoryDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: "传入参数错误"})
|
||||
panic(sys_error.New("保存失败,参数格式错误", err))
|
||||
}
|
||||
slog.Debug("保存数据", req)
|
||||
data, err := service.CreateCategory(&req)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()})
|
||||
}
|
||||
c.JSON(http.StatusOK, data)
|
||||
c.JSON(http.StatusOK, service.CreateCategory(&req))
|
||||
}
|
||||
|
||||
// 查询厂家信息
|
||||
@ -130,9 +117,8 @@ func createCategory(c *gin.Context) {
|
||||
func queryCategoryInfo(c *gin.Context) {
|
||||
id, exist := c.Params.Get("id")
|
||||
if !exist {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: "必要参数id不存在"})
|
||||
panic(sys_error.New("查询失败,缺少id"))
|
||||
}
|
||||
slog.Debug("传入参数id为" + id)
|
||||
int64Id, _ := strconv.ParseInt(id, 10, 64)
|
||||
c.JSON(http.StatusOK, service.QueryCategory(int32(int64Id)))
|
||||
}
|
||||
@ -157,19 +143,15 @@ func queryCategoryInfo(c *gin.Context) {
|
||||
func updateCategoryInfo(c *gin.Context) {
|
||||
id, exist := c.Params.Get("id")
|
||||
if !exist {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: "必要参数id不存在"})
|
||||
panic(sys_error.New("更新失败,缺少id"))
|
||||
}
|
||||
slog.Debug("传入参数id为" + id)
|
||||
req := dto.CategoryDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("更新失败,参数格式错误", err))
|
||||
}
|
||||
int64Id, _ := strconv.ParseInt(id, 10, 64)
|
||||
result := service.UpdateCategory(int32(int64Id), &req)
|
||||
if !result {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: "保存参数出错"})
|
||||
}
|
||||
c.JSON(http.StatusOK, result)
|
||||
c.JSON(http.StatusOK, service.UpdateCategory(int32(int64Id), &req))
|
||||
}
|
||||
|
||||
// 删除厂家信息
|
||||
@ -189,14 +171,11 @@ func updateCategoryInfo(c *gin.Context) {
|
||||
// @Failure 500 {object} dto.ErrorDto
|
||||
// @Router /api/v1/category/{id} [delete]
|
||||
func deleteCategory(c *gin.Context) {
|
||||
user, _ := c.Get(middleware.IdentityKey)
|
||||
slog.Debug("id删除草稿的图形数据", user)
|
||||
idStr := c.Param("id")
|
||||
id, err := strconv.Atoi(idStr)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("删除失败,主键格式错误", err))
|
||||
}
|
||||
slog.Debug("id查询草稿的图形数据", id)
|
||||
service.DeleteCategoryById(id)
|
||||
c.JSON(http.StatusOK, true)
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"log/slog"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
@ -14,6 +13,7 @@ import (
|
||||
"joylink.club/bj-rtsts-server/dto"
|
||||
"joylink.club/bj-rtsts-server/middleware"
|
||||
"joylink.club/bj-rtsts-server/service"
|
||||
"joylink.club/bj-rtsts-server/sys_error"
|
||||
)
|
||||
|
||||
func InitDraftingRouter(api *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
|
||||
@ -45,18 +45,11 @@ func InitDraftingRouter(api *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddlewa
|
||||
// @Failure 500 {object} dto.ErrorDto
|
||||
// @Router /api/v1/drafting/paging [get]
|
||||
func pageQueryDrafting(c *gin.Context) {
|
||||
user, _ := c.Get(middleware.IdentityKey)
|
||||
slog.Debug("分页查询草稿", user)
|
||||
req := dto.PageDraftingReqDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("查询失败,参数格式错误", err))
|
||||
}
|
||||
slog.Debug("分页查草稿参数", req)
|
||||
page, err := service.PageDraftingQuery(&req)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()})
|
||||
}
|
||||
c.JSON(http.StatusOK, page)
|
||||
c.JSON(http.StatusOK, service.PageDraftingQuery(&req))
|
||||
}
|
||||
|
||||
// 列表查询草稿
|
||||
@ -76,18 +69,11 @@ func pageQueryDrafting(c *gin.Context) {
|
||||
// @Failure 500 {object} dto.ErrorDto
|
||||
// @Router /api/v1/drafting/list [get]
|
||||
func listQueryDrafting(c *gin.Context) {
|
||||
user, _ := c.Get(middleware.IdentityKey)
|
||||
slog.Debug("列表查询草稿", user)
|
||||
req := dto.ListDraftingReqDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("查询失败,参数格式错误", err))
|
||||
}
|
||||
slog.Debug("列表查草稿参数", req)
|
||||
list, err := service.ListDraftingQuery(&req)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()})
|
||||
}
|
||||
c.JSON(http.StatusOK, list)
|
||||
c.JSON(http.StatusOK, service.ListDraftingQuery(&req))
|
||||
}
|
||||
|
||||
// 创建草稿
|
||||
@ -111,14 +97,9 @@ func createDrafting(c *gin.Context) {
|
||||
createId := user.(*model.User).ID
|
||||
req := dto.DraftingDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("创建失败,参数格式错误", err))
|
||||
}
|
||||
slog.Debug("保存数据", req)
|
||||
data, err := service.CreateDrafting(createId, &req)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()})
|
||||
}
|
||||
c.JSON(http.StatusOK, data)
|
||||
c.JSON(http.StatusOK, service.CreateDrafting(createId, &req))
|
||||
}
|
||||
|
||||
// 草稿另存为
|
||||
@ -141,21 +122,16 @@ func createDrafting(c *gin.Context) {
|
||||
func saveAsDrafting(c *gin.Context) {
|
||||
id, exist := c.Params.Get("id")
|
||||
if !exist {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: "必要参数id不存在"})
|
||||
panic(sys_error.New("另存为失败,缺少主键"))
|
||||
}
|
||||
slog.Debug("传入参数id为" + id)
|
||||
user, _ := c.Get(middleware.IdentityKey)
|
||||
createrId := user.(*model.User).ID
|
||||
req := dto.DraftingDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("另存为失败,参数格式错误", err))
|
||||
}
|
||||
int64Id, _ := strconv.ParseInt(id, 10, 64)
|
||||
newData, err := service.SaveAsDrafting(createrId, int32(int64Id), &req)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()})
|
||||
}
|
||||
c.JSON(http.StatusOK, newData)
|
||||
c.JSON(http.StatusOK, service.SaveAsDrafting(createrId, int32(int64Id), &req))
|
||||
}
|
||||
|
||||
// 查询草稿详情
|
||||
@ -177,9 +153,8 @@ func saveAsDrafting(c *gin.Context) {
|
||||
func queryDraftingInfo(c *gin.Context) {
|
||||
id, exist := c.Params.Get("id")
|
||||
if !exist {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: "必要参数id不存在"})
|
||||
panic(sys_error.New("查询失败,缺少主键"))
|
||||
}
|
||||
slog.Debug("传入参数id为" + id)
|
||||
int64Id, _ := strconv.ParseInt(id, 10, 64)
|
||||
c.JSON(http.StatusOK, service.QueryDrafting(int32(int64Id)))
|
||||
}
|
||||
@ -204,19 +179,14 @@ func queryDraftingInfo(c *gin.Context) {
|
||||
func updateDraftingInfo(c *gin.Context) {
|
||||
id, exist := c.Params.Get("id")
|
||||
if !exist {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: "必要参数id不存在"})
|
||||
panic(sys_error.New("更新失败,缺少主键"))
|
||||
}
|
||||
slog.Debug("传入参数id为" + id)
|
||||
req := dto.DraftingDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("更新失败,参数格式错误", err))
|
||||
}
|
||||
int64Id, _ := strconv.ParseInt(id, 10, 64)
|
||||
result := service.UpdateDrafting(int32(int64Id), &req)
|
||||
if !result {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: "保存出错"})
|
||||
}
|
||||
c.JSON(http.StatusOK, result)
|
||||
c.JSON(http.StatusOK, service.UpdateDrafting(int32(int64Id), &req))
|
||||
}
|
||||
|
||||
// 删除草稿数据
|
||||
@ -236,14 +206,11 @@ func updateDraftingInfo(c *gin.Context) {
|
||||
// @Failure 500 {object} dto.ErrorDto
|
||||
// @Router /api/v1/drafting/{id} [delete]
|
||||
func deleteDrafting(c *gin.Context) {
|
||||
user, _ := c.Get(middleware.IdentityKey)
|
||||
slog.Debug("id删除草稿的图形数据", user)
|
||||
idStr := c.Param("id")
|
||||
id, err := strconv.Atoi(idStr)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("删除失败,主键格式错误", err))
|
||||
}
|
||||
slog.Debug("id查询草稿的图形数据", id)
|
||||
service.DeleteDraftingById(id)
|
||||
c.JSON(http.StatusOK, true)
|
||||
}
|
||||
@ -267,7 +234,7 @@ func deleteDrafting(c *gin.Context) {
|
||||
func generateCalculateLinkData(c *gin.Context) {
|
||||
req := dto.DraftingMapDataDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("link生成失败,参数格式错误", err))
|
||||
}
|
||||
gd := &graphicData.RtssGraphicStorage{}
|
||||
proto.Unmarshal(req.Proto, gd)
|
||||
|
@ -1,7 +1,6 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"log/slog"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
@ -10,6 +9,7 @@ import (
|
||||
"joylink.club/bj-rtsts-server/dto"
|
||||
"joylink.club/bj-rtsts-server/middleware"
|
||||
"joylink.club/bj-rtsts-server/service"
|
||||
"joylink.club/bj-rtsts-server/sys_error"
|
||||
)
|
||||
|
||||
func InitProjectRouter(api *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
|
||||
@ -41,14 +41,9 @@ func InitProjectRouter(api *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddlewar
|
||||
func pageQueryProject(c *gin.Context) {
|
||||
req := dto.PageProjectReqDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("查询失败,参数格式错误", err))
|
||||
}
|
||||
slog.Debug("分页查项目参数", req)
|
||||
page, err := service.PageProjectQuery(&req)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()})
|
||||
}
|
||||
c.JSON(http.StatusOK, page)
|
||||
c.JSON(http.StatusOK, service.PageProjectQuery(&req))
|
||||
}
|
||||
|
||||
// 查询项目信息列表
|
||||
@ -70,14 +65,9 @@ func pageQueryProject(c *gin.Context) {
|
||||
func listQueryProject(c *gin.Context) {
|
||||
req := dto.ProjectReqDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("查询失败,参数格式错误", err))
|
||||
}
|
||||
slog.Debug("查项目参数", req)
|
||||
page, err := service.ListProjectQuery(&req)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()})
|
||||
}
|
||||
c.JSON(http.StatusOK, page)
|
||||
c.JSON(http.StatusOK, service.ListProjectQuery(&req))
|
||||
}
|
||||
|
||||
// 创建项目信息
|
||||
@ -99,14 +89,9 @@ func listQueryProject(c *gin.Context) {
|
||||
func createProject(c *gin.Context) {
|
||||
req := dto.ProjectDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("创建失败,参数格式错误", err))
|
||||
}
|
||||
slog.Debug("保存数据", req)
|
||||
data, err := service.CreateProject(&req)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()})
|
||||
}
|
||||
c.JSON(http.StatusOK, data)
|
||||
c.JSON(http.StatusOK, service.CreateProject(&req))
|
||||
}
|
||||
|
||||
// 查询项目信息
|
||||
@ -128,9 +113,8 @@ func createProject(c *gin.Context) {
|
||||
func queryProjectInfo(c *gin.Context) {
|
||||
id, exist := c.Params.Get("id")
|
||||
if !exist {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: "必要参数id不存在"})
|
||||
panic(sys_error.New("查询失败,缺少主键"))
|
||||
}
|
||||
slog.Debug("传入参数id为" + id)
|
||||
int64Id, _ := strconv.ParseInt(id, 10, 64)
|
||||
c.JSON(http.StatusOK, service.QueryProject(int32(int64Id)))
|
||||
}
|
||||
@ -155,18 +139,14 @@ func queryProjectInfo(c *gin.Context) {
|
||||
func updateProjectInfo(c *gin.Context) {
|
||||
id, exist := c.Params.Get("id")
|
||||
if !exist {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: "必要参数id不存在"})
|
||||
panic(sys_error.New("更新失败,缺少主键"))
|
||||
}
|
||||
req := dto.ProjectDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("更新失败,参数格式错误", err))
|
||||
}
|
||||
int64Id, _ := strconv.ParseInt(id, 10, 64)
|
||||
result := service.UpdateProject(int32(int64Id), &req)
|
||||
if !result {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: "保存出错"})
|
||||
}
|
||||
c.JSON(http.StatusOK, result)
|
||||
c.JSON(http.StatusOK, service.UpdateProject(int32(int64Id), &req))
|
||||
}
|
||||
|
||||
// 删除项目信息
|
||||
@ -189,9 +169,8 @@ func deleteProject(c *gin.Context) {
|
||||
idStr := c.Param("id")
|
||||
id, err := strconv.Atoi(idStr)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("删除失败,缺少主键"))
|
||||
}
|
||||
slog.Debug("id查询草稿的图形数据", id)
|
||||
service.DeleteProjectById(id)
|
||||
c.JSON(http.StatusOK, true)
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ import (
|
||||
"joylink.club/bj-rtsts-server/dto"
|
||||
"joylink.club/bj-rtsts-server/middleware"
|
||||
"joylink.club/bj-rtsts-server/service"
|
||||
"joylink.club/bj-rtsts-server/sys_error"
|
||||
)
|
||||
|
||||
func InitProjectLinkRouter(api *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
|
||||
@ -39,7 +40,7 @@ func InitProjectLinkRouter(api *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddl
|
||||
func queryProjectLinkInfo(c *gin.Context) {
|
||||
id, exist := c.Params.Get("id")
|
||||
if !exist {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: "必要参数id不存在"})
|
||||
panic(sys_error.New("查询失败,缺少id"))
|
||||
}
|
||||
slog.Debug("传入参数id为" + id)
|
||||
int64Id, _ := strconv.ParseInt(id, 10, 64)
|
||||
@ -65,7 +66,7 @@ func queryProjectLinkInfo(c *gin.Context) {
|
||||
func queryTrainSizeByMapId(c *gin.Context) {
|
||||
id, exist := c.Params.Get("id")
|
||||
if !exist {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: "必要参数id不存在"})
|
||||
panic(sys_error.New("查询失败,缺少id"))
|
||||
}
|
||||
slog.Debug("传入参数id为" + id)
|
||||
int64Id, _ := strconv.ParseInt(id, 10, 64)
|
||||
@ -91,7 +92,7 @@ func queryTrainSizeByMapId(c *gin.Context) {
|
||||
func queryTrainSizeByPId(c *gin.Context) {
|
||||
id, exist := c.Params.Get("id")
|
||||
if !exist {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: "必要参数id不存在"})
|
||||
panic(sys_error.New("查询失败,缺少id"))
|
||||
}
|
||||
slog.Debug("传入参数id为" + id)
|
||||
int64Id, _ := strconv.ParseInt(id, 10, 64)
|
||||
@ -118,7 +119,7 @@ func queryTrainSizeByPId(c *gin.Context) {
|
||||
func saveProjectLinkInfo(c *gin.Context) {
|
||||
req := dto.ProjectLinkReqDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("保持失败,参数格式化错误", err))
|
||||
}
|
||||
service.UpdateProjectLink(&req)
|
||||
c.JSON(http.StatusOK, true)
|
||||
|
171
api/projectRunConfig.go
Normal file
171
api/projectRunConfig.go
Normal file
@ -0,0 +1,171 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
jwt "github.com/appleboy/gin-jwt/v2"
|
||||
"github.com/gin-gonic/gin"
|
||||
"joylink.club/bj-rtsts-server/dto"
|
||||
"joylink.club/bj-rtsts-server/middleware"
|
||||
"joylink.club/bj-rtsts-server/service"
|
||||
"joylink.club/bj-rtsts-server/sys_error"
|
||||
)
|
||||
|
||||
func InitProjectRunConfigRouter(api *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
|
||||
authed := api.Group("/v1/runconfig").Use(authMiddleware.MiddlewareFunc(), middleware.PermissMiddleware)
|
||||
authed.GET("/paging", pageQueryProjectRunConfig)
|
||||
authed.GET("/list", listQueryProjectRunConfig)
|
||||
authed.POST("", createProjectRunConfig)
|
||||
authed.GET("/:id", queryProjectRunConfig)
|
||||
authed.PUT("/:id", updateProjectRunConfig)
|
||||
authed.DELETE("/:id", deleteProjectRunConfig)
|
||||
}
|
||||
|
||||
// 分页查询项目运行环境配置信息
|
||||
//
|
||||
// @Summary 分页查询项目运行环境配置信息
|
||||
//
|
||||
// @Security JwtAuth
|
||||
//
|
||||
// @Description 可以通过项目名称过滤,分页查询项目运行环境配置信息
|
||||
// @Tags 项目运行环境配置Api
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param PageProjectRunConfigReqDto query dto.PageProjectRunConfigReqDto true "运行环境配置查询条件带分页信息"
|
||||
// @Success 200 {object} dto.PageDto
|
||||
// @Failure 401 {object} dto.ErrorDto
|
||||
// @Failure 404 {object} dto.ErrorDto
|
||||
// @Failure 500 {object} dto.ErrorDto
|
||||
// @Router /api/v1/runconfig/paging [get]
|
||||
func pageQueryProjectRunConfig(c *gin.Context) {
|
||||
req := dto.PageProjectRunConfigReqDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(sys_error.New("查询失败,参数格式错误", err))
|
||||
}
|
||||
c.JSON(http.StatusOK, service.PageProjectRunConfigQuery(&req))
|
||||
}
|
||||
|
||||
// 查询项目运行环境配置信息列表
|
||||
//
|
||||
// @Summary 查询项目运行环境配置信息列表
|
||||
//
|
||||
// @Security JwtAuth
|
||||
//
|
||||
// @Description 无参数,查询项目运行环境配置列表
|
||||
// @Tags 项目运行环境配置Api
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Success 200 {object} dto.ProjectRunConfigDto
|
||||
// @Failure 401 {object} dto.ErrorDto
|
||||
// @Failure 404 {object} dto.ErrorDto
|
||||
// @Failure 500 {object} dto.ErrorDto
|
||||
// @Router /api/v1/runconfig/list [get]
|
||||
func listQueryProjectRunConfig(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, service.ListProjectRunConfigQuery())
|
||||
}
|
||||
|
||||
// 创建项目运行环境配置信息
|
||||
//
|
||||
// @Summary 创建项目运行环境配置信息
|
||||
//
|
||||
// @Security JwtAuth
|
||||
//
|
||||
// @Description 创建项目运行环境配置数据
|
||||
// @Tags 项目运行环境配置Api
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param ProjectRunConfigReqDto query dto.ProjectRunConfigReqDto true "创建的项目运行环境配置信息"
|
||||
// @Success 200 {object} nil
|
||||
// @Failure 401 {object} dto.ErrorDto
|
||||
// @Failure 404 {object} dto.ErrorDto
|
||||
// @Failure 500 {object} dto.ErrorDto
|
||||
// @Router /api/v1/runconfig [post]
|
||||
func createProjectRunConfig(c *gin.Context) {
|
||||
req := dto.ProjectRunConfigReqDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(sys_error.New("创建失败,参数格式错误", err))
|
||||
}
|
||||
c.JSON(http.StatusOK, service.CreateProjectRunConfig(&req))
|
||||
}
|
||||
|
||||
// 查询项目运行环境信息
|
||||
//
|
||||
// @Summary 查询项目运行环境信息
|
||||
//
|
||||
// @Security JwtAuth
|
||||
//
|
||||
// @Description 查询项目运行环境信息
|
||||
// @Tags 项目运行环境配置Api
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param id path int true "项目运行环境ID"
|
||||
// @Success 200 {object} dto.ProjectRunConfigDto
|
||||
// @Failure 401 {object} dto.ErrorDto
|
||||
// @Failure 404 {object} dto.ErrorDto
|
||||
// @Failure 500 {object} dto.ErrorDto
|
||||
// @Router /api/v1/runconfig/{id} [get]
|
||||
func queryProjectRunConfig(c *gin.Context) {
|
||||
id, exist := c.Params.Get("id")
|
||||
if !exist {
|
||||
panic(sys_error.New("查询失败,缺少主键"))
|
||||
}
|
||||
intId, _ := strconv.Atoi(id)
|
||||
c.JSON(http.StatusOK, service.QueryProjectRunConfig(int32(intId)))
|
||||
}
|
||||
|
||||
// 修改项目运行环境信息
|
||||
//
|
||||
// @Summary 修改项目运行环境信息
|
||||
//
|
||||
// @Security JwtAuth
|
||||
//
|
||||
// @Description 修改项目运行环境信息
|
||||
// @Tags 项目运行环境配置Api
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param id path int true "项目运行环境信息ID"
|
||||
// @Param ProjectDto query dto.ProjectDto true "修改的项目信息"
|
||||
// @Success 200 {object} nil
|
||||
// @Failure 401 {object} dto.ErrorDto
|
||||
// @Failure 404 {object} dto.ErrorDto
|
||||
// @Failure 500 {object} dto.ErrorDto
|
||||
// @Router /api/v1/runconfig/{id} [put]
|
||||
func updateProjectRunConfig(c *gin.Context) {
|
||||
id, exist := c.Params.Get("id")
|
||||
if !exist {
|
||||
panic(sys_error.New("更新失败,缺少主键"))
|
||||
}
|
||||
req := dto.ProjectRunConfigReqDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(sys_error.New("更新失败,参数格式错误", err))
|
||||
}
|
||||
intId, _ := strconv.Atoi(id)
|
||||
c.JSON(http.StatusOK, service.UpdateProjectRunConfig(int32(intId), &req))
|
||||
}
|
||||
|
||||
// 删除项目运行环境信息
|
||||
//
|
||||
// @Summary 删除项目运行环境信息
|
||||
//
|
||||
// @Security JwtAuth
|
||||
//
|
||||
// @Description 删除项目运行环境信息
|
||||
// @Tags 项目运行环境配置Api
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param id path int true "项目运行环境信息ID"
|
||||
// @Success 200 {object} nil
|
||||
// @Failure 401 {object} dto.ErrorDto
|
||||
// @Failure 404 {object} dto.ErrorDto
|
||||
// @Failure 500 {object} dto.ErrorDto
|
||||
// @Router /api/v1/runconfig/{id} [delete]
|
||||
func deleteProjectRunConfig(c *gin.Context) {
|
||||
idStr := c.Param("id")
|
||||
id, err := strconv.Atoi(idStr)
|
||||
if err != nil {
|
||||
panic(sys_error.New("删除失败,缺少主键"))
|
||||
}
|
||||
service.DeleteProjectRunConfigById(int32(id))
|
||||
c.JSON(http.StatusOK, true)
|
||||
}
|
@ -8,10 +8,10 @@ import (
|
||||
jwt "github.com/appleboy/gin-jwt/v2"
|
||||
"github.com/gin-gonic/gin"
|
||||
"joylink.club/bj-rtsts-server/db/model"
|
||||
"joylink.club/bj-rtsts-server/dto"
|
||||
"joylink.club/bj-rtsts-server/dto/publishedGi"
|
||||
"joylink.club/bj-rtsts-server/middleware"
|
||||
"joylink.club/bj-rtsts-server/service"
|
||||
"joylink.club/bj-rtsts-server/sys_error"
|
||||
)
|
||||
|
||||
func InitPublishedGiRouter(api *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
|
||||
@ -41,13 +41,10 @@ func InitPublishedGiRouter(api *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddl
|
||||
// @Failure 500 {object} dto.ErrorDto
|
||||
// @Router /api/v1/publishedGi/paging [get]
|
||||
func pageQueryPublishedGi(c *gin.Context) {
|
||||
user, _ := c.Get(middleware.IdentityKey)
|
||||
slog.Debug("分页查询发布的图形数据", user)
|
||||
req := publishedGi.PublishedGiReqDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("查询失败,查询参数格式错误", err))
|
||||
}
|
||||
slog.Debug("分页查询发布的图形数据", req)
|
||||
page := service.PageQueryPublishedGi(&req)
|
||||
c.JSON(http.StatusOK, page)
|
||||
}
|
||||
@ -68,13 +65,10 @@ func pageQueryPublishedGi(c *gin.Context) {
|
||||
// @Failure 500 {object} dto.ErrorDto
|
||||
// @Router /api/v1/publishedGi/list [get]
|
||||
func listQueryPublishedGi(c *gin.Context) {
|
||||
user, _ := c.Get(middleware.IdentityKey)
|
||||
slog.Debug("列表查询发布的图形数据", user)
|
||||
req := publishedGi.PublishedGiListReqDto{}
|
||||
if err := c.ShouldBindQuery(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("查询失败,查询参数格式错误", err))
|
||||
}
|
||||
slog.Debug("列表查询发布的图形数据", req)
|
||||
list := service.ListQueryPublishedGi(&req)
|
||||
c.JSON(http.StatusOK, list)
|
||||
}
|
||||
@ -95,18 +89,12 @@ func listQueryPublishedGi(c *gin.Context) {
|
||||
// @Failure 500 {object} dto.ErrorDto
|
||||
// @Router /api/v1/publishedGi/{id} [get]
|
||||
func getPublishedGiById(c *gin.Context) {
|
||||
user, _ := c.Get(middleware.IdentityKey)
|
||||
slog.Debug("id查询发布的图形数据", user)
|
||||
idStr := c.Param("id")
|
||||
id, err := strconv.Atoi(idStr)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
}
|
||||
slog.Debug("id查询发布的图形数据", id)
|
||||
entity, err := service.GetPublishedGiById(id)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()})
|
||||
panic(sys_error.New("查询失败,传入参数格式错误", err))
|
||||
}
|
||||
entity := service.GetPublishedGiById(id)
|
||||
c.JSON(http.StatusOK, entity)
|
||||
}
|
||||
|
||||
@ -130,10 +118,8 @@ func publishFromDraft(c *gin.Context) {
|
||||
slog.Debug("发布图形数据", user)
|
||||
req := publishedGi.PublishReqDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("发布失败,参数格式错误", err))
|
||||
}
|
||||
//todo
|
||||
slog.Debug("发布图形数据请求参数", req)
|
||||
service.PublishFormDraft(&req, user.(*model.User))
|
||||
}
|
||||
|
||||
@ -153,14 +139,11 @@ func publishFromDraft(c *gin.Context) {
|
||||
// @Failure 500 {object} dto.ErrorDto
|
||||
// @Router /api/v1/publishedGi/{id} [delete]
|
||||
func deletePublishedGiById(c *gin.Context) {
|
||||
user, _ := c.Get(middleware.IdentityKey)
|
||||
slog.Debug("id删除发布的图形数据", user)
|
||||
idStr := c.Param("id")
|
||||
id, err := strconv.Atoi(idStr)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("删除失败,传入参数格式错误", err))
|
||||
}
|
||||
slog.Debug("id查询发布的图形数据", id)
|
||||
service.DeletePublishedGiById(id)
|
||||
}
|
||||
|
||||
@ -186,11 +169,11 @@ func saveAsDraftingFromPublish(c *gin.Context) {
|
||||
slog.Debug("用户拉取发布图形数据", "userId", user, "发布图数据id", idStr)
|
||||
id, err := strconv.Atoi(idStr)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("另存为草稿失败,传入参数格式错误", err))
|
||||
}
|
||||
req := publishedGi.PublishReqDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("另存为草稿失败,传入参数格式错误", err))
|
||||
}
|
||||
service.SaveAsDraftingFromPublish(int32(id), user.(*model.User), req.Name)
|
||||
}
|
||||
@ -211,16 +194,11 @@ func saveAsDraftingFromPublish(c *gin.Context) {
|
||||
// @Failure 500 {object} dto.ErrorDto
|
||||
// @Router /api/v1/publishedGi/name [get]
|
||||
func getPublishedGiByName(c *gin.Context) {
|
||||
user, _ := c.Get(middleware.IdentityKey)
|
||||
slog.Debug("name查询发布的图形数据", user)
|
||||
param := &publishedGi.PublishedGiSingleQueryDto{}
|
||||
if err := c.ShouldBind(param); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("查询失败,查询参数格式错误", err))
|
||||
}
|
||||
slog.Debug("name查询发布的图形数据", param.Name)
|
||||
entity, err := service.GetPublishedGiByName(param)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()})
|
||||
}
|
||||
entity := service.GetPublishedGiByName(param)
|
||||
c.JSON(http.StatusOK, entity)
|
||||
}
|
||||
|
@ -35,6 +35,7 @@ func InitSimulationRouter(api *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddle
|
||||
authed.GET("/getDataChannelName", getDataChannelName)
|
||||
authed.POST("/relay/operation", relayOperation)
|
||||
authed.POST("/signal/operation", signalOperation)
|
||||
authed.POST("/axleSection/operation", axleSectionOperation)
|
||||
authed.POST("/esbBtn/operation", esbBtnOperation)
|
||||
authed.POST("/ibp/btn/operation", ibpBtnOperation)
|
||||
authed.POST("/ibp/key/operation", ibpKeyOperation)
|
||||
@ -78,12 +79,10 @@ func initPublishMapInfo() {
|
||||
func createByProjectId(c *gin.Context) {
|
||||
req := dto.SimulationCreateReqDto{}
|
||||
if err := c.ShouldBind(&req); nil != err {
|
||||
// panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("测试启动失败,请求参数异常", err))
|
||||
}
|
||||
mapInfos := service.QueryProjectPublishedGi(req.ProjectId)
|
||||
if len(mapInfos) == 0 {
|
||||
// panic(dto.ErrorDto{Code: dto.DataNotExist, Message: "项目未关联地图"})
|
||||
panic(sys_error.New("测试启动失败,项目未关联发布图"))
|
||||
}
|
||||
mapIds := make([]int32, len(mapInfos))
|
||||
@ -158,12 +157,11 @@ func findAllSimulations(c *gin.Context) {
|
||||
func checkSimMapData(c *gin.Context) {
|
||||
rt := &dto.CheckMapDataReqDto{}
|
||||
if err := c.ShouldBind(&rt); nil != err {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("请求参数异常", err))
|
||||
}
|
||||
err := proto.Unmarshal(rt.Data, &graphicData.RtssGraphicStorage{})
|
||||
if err != nil {
|
||||
c.JSON(http.StatusInternalServerError, "参数错误")
|
||||
return
|
||||
panic(sys_error.New("非平面布置图数据"))
|
||||
}
|
||||
c.JSON(http.StatusOK, &dto.CheckMapDataRspDto{Success: true})
|
||||
}
|
||||
@ -186,13 +184,12 @@ func checkSimMapData(c *gin.Context) {
|
||||
func addTrain(c *gin.Context) {
|
||||
req := dto.AddTrainReqDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("添加列车失败,请求参数异常", err))
|
||||
}
|
||||
simulation := checkDeviceDataAndReturn(req.SimulationId)
|
||||
id := getAddTrainPrimaryKey(simulation)
|
||||
if id == -1 {
|
||||
c.JSON(http.StatusBadRequest, "已存在在线列车")
|
||||
return
|
||||
panic(sys_error.New("添加列车失败,已有列车在运行"))
|
||||
}
|
||||
rsp := &state.TrainState{
|
||||
Id: strconv.Itoa(id),
|
||||
@ -225,7 +222,7 @@ func addTrain(c *gin.Context) {
|
||||
func removeTrain(c *gin.Context) {
|
||||
rt := &dto.RemoveTrainDto{}
|
||||
if err := c.ShouldBind(&rt); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("移除列车失败,请求参数异常", err))
|
||||
}
|
||||
slog.Debug("ATS测试仿真-移除列车,请求:", rt)
|
||||
simulation := checkDeviceDataAndReturn(rt.SimulationId)
|
||||
@ -253,7 +250,7 @@ func removeTrain(c *gin.Context) {
|
||||
func switchOperation(c *gin.Context) {
|
||||
req := &request_proto.TurnoutOperationReq{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("道岔操作失败,请求参数异常", err))
|
||||
}
|
||||
simulation := checkDeviceDataAndReturn(req.SimulationId)
|
||||
slog.Info("传入状态参数", "request", req)
|
||||
@ -280,7 +277,7 @@ func switchOperation(c *gin.Context) {
|
||||
func signalOperation(c *gin.Context) {
|
||||
req := &dto.SignalOperationReqDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("输入参数格式错误", err))
|
||||
}
|
||||
simulation := checkDeviceDataAndReturn(req.SimulationId)
|
||||
slog.Info("传入状态参数", req)
|
||||
@ -288,6 +285,33 @@ func signalOperation(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, "ok")
|
||||
}
|
||||
|
||||
// ATS测试-计轴区段操作
|
||||
//
|
||||
// @Summary ATS测试-计轴区段操作
|
||||
//
|
||||
// @Security JwtAuth
|
||||
//
|
||||
// @Description ATS测试-计轴区段操作
|
||||
// @Tags ATS测试仿真Api
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param Authorization header string true "JWT Token"
|
||||
// @Param AxleSectionOperationReqDto body dto.AxleSectionOperationReqDto true "ATS测试仿真-操作计轴区段"
|
||||
//
|
||||
// @Success 200 {object} string
|
||||
// @Failure 500 {object} dto.ErrorDto
|
||||
// @Router /api/v1/simulation/axleSection/operation [post]
|
||||
func axleSectionOperation(c *gin.Context) {
|
||||
req := &dto.AxleSectionOperationReqDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(sys_error.New("输入参数格式错误", err))
|
||||
}
|
||||
simulation := checkDeviceDataAndReturn(req.SimulationId)
|
||||
slog.Info("传入状态参数", req)
|
||||
memory.ChangeAxleSectionState(simulation, req)
|
||||
c.JSON(http.StatusOK, "ok")
|
||||
}
|
||||
|
||||
// ATS测试-ESB按钮操作
|
||||
//
|
||||
// @Summary ATS测试-ESB按钮操作
|
||||
@ -307,7 +331,7 @@ func signalOperation(c *gin.Context) {
|
||||
func esbBtnOperation(c *gin.Context) {
|
||||
req := &dto.EsbButtonOperationReqDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("紧急关闭按钮操作失败,请求参数异常", err))
|
||||
}
|
||||
simulation := checkDeviceDataAndReturn(req.SimulationId)
|
||||
slog.Info("传入状态参数", req)
|
||||
@ -334,7 +358,7 @@ func esbBtnOperation(c *gin.Context) {
|
||||
func ibpBtnOperation(c *gin.Context) {
|
||||
req := &dto.IBPButtonOperationReqDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("IBP按钮操作失败,请求参数异常", err))
|
||||
}
|
||||
simulation := checkDeviceDataAndReturn(req.SimulationId)
|
||||
slog.Info("传入状态参数", req)
|
||||
@ -361,7 +385,7 @@ func ibpBtnOperation(c *gin.Context) {
|
||||
func ibpKeyOperation(c *gin.Context) {
|
||||
req := &dto.KeyOperationReqDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("IBP开关操作失败,请求参数异常", err))
|
||||
}
|
||||
simulation := checkDeviceDataAndReturn(req.SimulationId)
|
||||
slog.Info("传入状态参数", req)
|
||||
@ -433,7 +457,7 @@ func getDataChannelName(c *gin.Context) {
|
||||
func getMapKilometerRange(c *gin.Context) {
|
||||
id, exist := c.Params.Get("id")
|
||||
if !exist {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: "必要参数id不存在"})
|
||||
panic(sys_error.New("缺少仿真编号"))
|
||||
}
|
||||
simulation := checkDeviceDataAndReturn(id)
|
||||
c.JSON(http.StatusOK, simulation.Repo.GetCoordinateInfo())
|
||||
@ -458,7 +482,7 @@ func getMapKilometerRange(c *gin.Context) {
|
||||
func relayOperation(c *gin.Context) {
|
||||
req := &dto.RelayOperationReqDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("继电器操作失败,请求参数异常", err))
|
||||
}
|
||||
simulation := checkDeviceDataAndReturn(req.SimulationId)
|
||||
slog.Info("传入状态参数", req)
|
||||
@ -470,7 +494,7 @@ func relayOperation(c *gin.Context) {
|
||||
func checkDeviceDataAndReturn(simId string) *memory.VerifySimulation {
|
||||
deviceMemory := simulation.FindSimulation(simId)
|
||||
if deviceMemory == nil {
|
||||
panic(&dto.ErrorDto{Code: dto.DataNotExist, Message: fmt.Sprintf("仿真[%s]不存在", simId)})
|
||||
panic(sys_error.New(fmt.Sprintf("仿真[%s]不存在", simId)))
|
||||
}
|
||||
return deviceMemory
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ import (
|
||||
"joylink.club/bj-rtsts-server/dto"
|
||||
"joylink.club/bj-rtsts-server/middleware"
|
||||
"joylink.club/bj-rtsts-server/service"
|
||||
"joylink.club/bj-rtsts-server/sys_error"
|
||||
)
|
||||
|
||||
func InitTrainManageRouter(api *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
|
||||
@ -53,13 +54,9 @@ func InitTrainManageRouter(api *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddl
|
||||
func pageQueryTrainModel(c *gin.Context) {
|
||||
req := dto.PageTrainManageReqDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("查询失败,参数格式错误", err))
|
||||
}
|
||||
page, err := service.PageTrainModelQuery(&req)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()})
|
||||
}
|
||||
c.JSON(http.StatusOK, page)
|
||||
c.JSON(http.StatusOK, service.PageTrainModelQuery(&req))
|
||||
}
|
||||
|
||||
// 创建列车型号
|
||||
@ -81,13 +78,9 @@ func pageQueryTrainModel(c *gin.Context) {
|
||||
func createTrainModel(c *gin.Context) {
|
||||
req := dto.TrainModelDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("保存失败,参数格式错误", err))
|
||||
}
|
||||
data, err := service.CreateTrainModel(&req)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()})
|
||||
}
|
||||
c.JSON(http.StatusOK, data)
|
||||
c.JSON(http.StatusOK, service.CreateTrainModel(&req))
|
||||
}
|
||||
|
||||
// 查询列车型号详情
|
||||
@ -109,7 +102,7 @@ func createTrainModel(c *gin.Context) {
|
||||
func queryTrainModel(c *gin.Context) {
|
||||
id, exist := c.Params.Get("id")
|
||||
if !exist {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: "必要参数id不存在"})
|
||||
panic(sys_error.New("查询失败,缺少主键"))
|
||||
}
|
||||
int64Id, _ := strconv.ParseInt(id, 10, 64)
|
||||
c.JSON(http.StatusOK, service.QueryTrainModel(int32(int64Id)))
|
||||
@ -135,18 +128,14 @@ func queryTrainModel(c *gin.Context) {
|
||||
func updateTrainModel(c *gin.Context) {
|
||||
id, exist := c.Params.Get("id")
|
||||
if !exist {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: "必要参数id不存在"})
|
||||
panic(sys_error.New("更新失败,缺少主键"))
|
||||
}
|
||||
req := dto.TrainModelDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("更新失败,参数格式错误", err))
|
||||
}
|
||||
int64Id, _ := strconv.ParseInt(id, 10, 64)
|
||||
result := service.UpdateTrainModel(int32(int64Id), &req)
|
||||
if !result {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: "保存参数出错"})
|
||||
}
|
||||
c.JSON(http.StatusOK, result)
|
||||
c.JSON(http.StatusOK, service.UpdateTrainModel(int32(int64Id), &req))
|
||||
}
|
||||
|
||||
// 删除列车型号数据
|
||||
@ -169,7 +158,7 @@ func deleteTrainModel(c *gin.Context) {
|
||||
idStr := c.Param("id")
|
||||
id, err := strconv.Atoi(idStr)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("删除失败,缺少主键"))
|
||||
}
|
||||
service.DeleteTrainModelById(id)
|
||||
c.JSON(http.StatusOK, true)
|
||||
@ -194,13 +183,9 @@ func deleteTrainModel(c *gin.Context) {
|
||||
func queryTrainModelList(c *gin.Context) {
|
||||
req := dto.TrainManageReqDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("查询失败,参数格式错误", err))
|
||||
}
|
||||
models, err := service.ListTrainModelQuery(&req)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()})
|
||||
}
|
||||
c.JSON(http.StatusOK, models)
|
||||
c.JSON(http.StatusOK, service.ListTrainModelQuery(&req))
|
||||
}
|
||||
|
||||
// 分页查询列车尺寸列表
|
||||
@ -222,13 +207,9 @@ func queryTrainModelList(c *gin.Context) {
|
||||
func pageQueryTrainSize(c *gin.Context) {
|
||||
req := dto.PageTrainManageReqDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("查询失败,参数格式错误", err))
|
||||
}
|
||||
page, err := service.PageTrainSizeQuery(&req)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()})
|
||||
}
|
||||
c.JSON(http.StatusOK, page)
|
||||
c.JSON(http.StatusOK, service.PageTrainSizeQuery(&req))
|
||||
}
|
||||
|
||||
// 查询列车尺寸列表
|
||||
@ -250,13 +231,9 @@ func pageQueryTrainSize(c *gin.Context) {
|
||||
func queryTrainSizeList(c *gin.Context) {
|
||||
req := dto.TrainManageReqDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("查询失败,参数格式错误", err))
|
||||
}
|
||||
sizeList, err := service.ListTrainSizeQuery(&req)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()})
|
||||
}
|
||||
c.JSON(http.StatusOK, sizeList)
|
||||
c.JSON(http.StatusOK, service.ListTrainSizeQuery(&req))
|
||||
}
|
||||
|
||||
// 创建列车尺寸
|
||||
@ -278,13 +255,9 @@ func queryTrainSizeList(c *gin.Context) {
|
||||
func createTrainSize(c *gin.Context) {
|
||||
req := dto.TrainSizeDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("创建失败,参数格式错误", err))
|
||||
}
|
||||
data, err := service.CreateTrainSize(&req)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()})
|
||||
}
|
||||
c.JSON(http.StatusOK, data)
|
||||
c.JSON(http.StatusOK, service.CreateTrainSize(&req))
|
||||
}
|
||||
|
||||
// 查询列车尺寸详情
|
||||
@ -306,7 +279,7 @@ func createTrainSize(c *gin.Context) {
|
||||
func queryTrainSize(c *gin.Context) {
|
||||
id, exist := c.Params.Get("id")
|
||||
if !exist {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: "必要参数id不存在"})
|
||||
panic(sys_error.New("查询失败,缺少查询主键"))
|
||||
}
|
||||
int64Id, _ := strconv.ParseInt(id, 10, 64)
|
||||
c.JSON(http.StatusOK, service.QueryTrainSize(int32(int64Id)))
|
||||
@ -332,18 +305,14 @@ func queryTrainSize(c *gin.Context) {
|
||||
func updateTrainSize(c *gin.Context) {
|
||||
id, exist := c.Params.Get("id")
|
||||
if !exist {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: "必要参数id不存在"})
|
||||
panic(sys_error.New("更新失败,缺少查询主键"))
|
||||
}
|
||||
req := dto.TrainSizeDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("更新失败,参数格式错误", err))
|
||||
}
|
||||
int64Id, _ := strconv.ParseInt(id, 10, 64)
|
||||
result := service.UpdateTrainSize(int32(int64Id), &req)
|
||||
if !result {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: "保存出错"})
|
||||
}
|
||||
c.JSON(http.StatusOK, result)
|
||||
c.JSON(http.StatusOK, service.UpdateTrainSize(int32(int64Id), &req))
|
||||
}
|
||||
|
||||
// 删除列车尺寸数据
|
||||
@ -366,7 +335,7 @@ func deleteTrainSize(c *gin.Context) {
|
||||
idStr := c.Param("id")
|
||||
id, err := strconv.Atoi(idStr)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("删除失败,主键格式错误", err))
|
||||
}
|
||||
service.DeleteTrainSizeById(id)
|
||||
c.JSON(http.StatusOK, true)
|
||||
@ -391,13 +360,9 @@ func deleteTrainSize(c *gin.Context) {
|
||||
func pageQueryTrainWheelDiameter(c *gin.Context) {
|
||||
req := dto.PageTrainManageReqDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("查询失败,参数格式错误", err))
|
||||
}
|
||||
page, err := service.PageTrainWheelDiameterQuery(&req)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()})
|
||||
}
|
||||
c.JSON(http.StatusOK, page)
|
||||
c.JSON(http.StatusOK, service.PageTrainWheelDiameterQuery(&req))
|
||||
}
|
||||
|
||||
// 查询列车轮径列表
|
||||
@ -419,13 +384,9 @@ func pageQueryTrainWheelDiameter(c *gin.Context) {
|
||||
func queryTrainWheelDiameterList(c *gin.Context) {
|
||||
req := dto.TrainManageReqDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("查询失败,参数格式错误", err))
|
||||
}
|
||||
wheels, err := service.ListTrainWheelDiameterQuery(&req)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()})
|
||||
}
|
||||
c.JSON(http.StatusOK, wheels)
|
||||
c.JSON(http.StatusOK, service.ListTrainWheelDiameterQuery(&req))
|
||||
}
|
||||
|
||||
// 创建列车轮径
|
||||
@ -447,13 +408,9 @@ func queryTrainWheelDiameterList(c *gin.Context) {
|
||||
func createTrainWheelDiameter(c *gin.Context) {
|
||||
req := dto.TrainWheelDiameterDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("创建失败,参数格式错误", err))
|
||||
}
|
||||
data, err := service.CreateTrainWheelDiameter(&req)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()})
|
||||
}
|
||||
c.JSON(http.StatusOK, data)
|
||||
c.JSON(http.StatusOK, service.CreateTrainWheelDiameter(&req))
|
||||
}
|
||||
|
||||
// 查询列车轮径详情
|
||||
@ -475,7 +432,7 @@ func createTrainWheelDiameter(c *gin.Context) {
|
||||
func queryTrainWheelDiameter(c *gin.Context) {
|
||||
id, exist := c.Params.Get("id")
|
||||
if !exist {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: "必要参数id不存在"})
|
||||
panic(sys_error.New("查询失败,缺少查询主键"))
|
||||
}
|
||||
int64Id, _ := strconv.ParseInt(id, 10, 64)
|
||||
c.JSON(http.StatusOK, service.QueryTrainWheelDiameter(int32(int64Id)))
|
||||
@ -501,18 +458,14 @@ func queryTrainWheelDiameter(c *gin.Context) {
|
||||
func updateTrainWheelDiameter(c *gin.Context) {
|
||||
id, exist := c.Params.Get("id")
|
||||
if !exist {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: "必要参数id不存在"})
|
||||
panic(sys_error.New("更新失败,缺少查询主键"))
|
||||
}
|
||||
req := dto.TrainWheelDiameterDto{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||
panic(sys_error.New("查询失败,参数格式错误", err))
|
||||
}
|
||||
int64Id, _ := strconv.ParseInt(id, 10, 64)
|
||||
result := service.UpdateTrainWheelDiameter(int32(int64Id), &req)
|
||||
if !result {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: "保存出错"})
|
||||
}
|
||||
c.JSON(http.StatusOK, result)
|
||||
c.JSON(http.StatusOK, service.UpdateTrainWheelDiameter(int32(int64Id), &req))
|
||||
}
|
||||
|
||||
// 删除列车轮径数据
|
||||
@ -535,7 +488,7 @@ func deleteTrainWheelDiameter(c *gin.Context) {
|
||||
idStr := c.Param("id")
|
||||
id, err := strconv.Atoi(idStr)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: "必要参数id不存在"})
|
||||
panic(sys_error.New("删除失败,缺少主键"))
|
||||
}
|
||||
service.DeleteTrainWheelDiameterById(id)
|
||||
c.JSON(http.StatusOK, true)
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v4.23.1
|
||||
// source: ibpGraphics.proto
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v4.23.1
|
||||
// source: picture.proto
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v4.23.1
|
||||
// source: pslGraphics.proto
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v4.23.1
|
||||
// source: relayCabinetLayoutGraphics.proto
|
||||
|
||||
@ -100,6 +100,7 @@ type RelayCabinetGraphicStorage struct {
|
||||
UniqueIdPrefix *UniqueIdType `protobuf:"bytes,6,opt,name=UniqueIdPrefix,proto3" json:"UniqueIdPrefix,omitempty"` //设备唯一编码--前缀
|
||||
PhaseFailureProtectors []*PhaseFailureProtector `protobuf:"bytes,7,rep,name=phaseFailureProtectors,proto3" json:"phaseFailureProtectors,omitempty"`
|
||||
CombinationtypeList []*Combinationtype `protobuf:"bytes,8,rep,name=combinationtypeList,proto3" json:"combinationtypeList,omitempty"`
|
||||
SignalFaultAlarms []*SignalFaultAlarm `protobuf:"bytes,9,rep,name=signalFaultAlarms,proto3" json:"signalFaultAlarms,omitempty"`
|
||||
}
|
||||
|
||||
func (x *RelayCabinetGraphicStorage) Reset() {
|
||||
@ -183,6 +184,13 @@ func (x *RelayCabinetGraphicStorage) GetCombinationtypeList() []*Combinationtype
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *RelayCabinetGraphicStorage) GetSignalFaultAlarms() []*SignalFaultAlarm {
|
||||
if x != nil {
|
||||
return x.SignalFaultAlarms
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type RelayCabinet struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@ -358,6 +366,62 @@ func (x *PhaseFailureProtector) GetCode() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
// 信号机故障报警仪
|
||||
type SignalFaultAlarm struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Common *CommonInfo `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"`
|
||||
Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` //编号
|
||||
}
|
||||
|
||||
func (x *SignalFaultAlarm) Reset() {
|
||||
*x = SignalFaultAlarm{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_relayCabinetLayoutGraphics_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *SignalFaultAlarm) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SignalFaultAlarm) ProtoMessage() {}
|
||||
|
||||
func (x *SignalFaultAlarm) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_relayCabinetLayoutGraphics_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SignalFaultAlarm.ProtoReflect.Descriptor instead.
|
||||
func (*SignalFaultAlarm) Descriptor() ([]byte, []int) {
|
||||
return file_relayCabinetLayoutGraphics_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *SignalFaultAlarm) GetCommon() *CommonInfo {
|
||||
if x != nil {
|
||||
return x.Common
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *SignalFaultAlarm) GetCode() string {
|
||||
if x != nil {
|
||||
return x.Code
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// 设备管理的继电器列表
|
||||
type DeviceRelateRelay struct {
|
||||
state protoimpl.MessageState
|
||||
@ -375,7 +439,7 @@ type DeviceRelateRelay struct {
|
||||
func (x *DeviceRelateRelay) Reset() {
|
||||
*x = DeviceRelateRelay{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_relayCabinetLayoutGraphics_proto_msgTypes[4]
|
||||
mi := &file_relayCabinetLayoutGraphics_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -388,7 +452,7 @@ func (x *DeviceRelateRelay) String() string {
|
||||
func (*DeviceRelateRelay) ProtoMessage() {}
|
||||
|
||||
func (x *DeviceRelateRelay) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_relayCabinetLayoutGraphics_proto_msgTypes[4]
|
||||
mi := &file_relayCabinetLayoutGraphics_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -401,7 +465,7 @@ func (x *DeviceRelateRelay) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use DeviceRelateRelay.ProtoReflect.Descriptor instead.
|
||||
func (*DeviceRelateRelay) Descriptor() ([]byte, []int) {
|
||||
return file_relayCabinetLayoutGraphics_proto_rawDescGZIP(), []int{4}
|
||||
return file_relayCabinetLayoutGraphics_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *DeviceRelateRelay) GetCode() string {
|
||||
@ -437,7 +501,7 @@ type Combinationtype struct {
|
||||
func (x *Combinationtype) Reset() {
|
||||
*x = Combinationtype{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_relayCabinetLayoutGraphics_proto_msgTypes[5]
|
||||
mi := &file_relayCabinetLayoutGraphics_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -450,7 +514,7 @@ func (x *Combinationtype) String() string {
|
||||
func (*Combinationtype) ProtoMessage() {}
|
||||
|
||||
func (x *Combinationtype) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_relayCabinetLayoutGraphics_proto_msgTypes[5]
|
||||
mi := &file_relayCabinetLayoutGraphics_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -463,7 +527,7 @@ func (x *Combinationtype) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use Combinationtype.ProtoReflect.Descriptor instead.
|
||||
func (*Combinationtype) Descriptor() ([]byte, []int) {
|
||||
return file_relayCabinetLayoutGraphics_proto_rawDescGZIP(), []int{5}
|
||||
return file_relayCabinetLayoutGraphics_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *Combinationtype) GetCode() string {
|
||||
@ -493,7 +557,7 @@ type UniqueIdType struct {
|
||||
func (x *UniqueIdType) Reset() {
|
||||
*x = UniqueIdType{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_relayCabinetLayoutGraphics_proto_msgTypes[6]
|
||||
mi := &file_relayCabinetLayoutGraphics_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -506,7 +570,7 @@ func (x *UniqueIdType) String() string {
|
||||
func (*UniqueIdType) ProtoMessage() {}
|
||||
|
||||
func (x *UniqueIdType) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_relayCabinetLayoutGraphics_proto_msgTypes[6]
|
||||
mi := &file_relayCabinetLayoutGraphics_proto_msgTypes[7]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -519,7 +583,7 @@ func (x *UniqueIdType) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use UniqueIdType.ProtoReflect.Descriptor instead.
|
||||
func (*UniqueIdType) Descriptor() ([]byte, []int) {
|
||||
return file_relayCabinetLayoutGraphics_proto_rawDescGZIP(), []int{6}
|
||||
return file_relayCabinetLayoutGraphics_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *UniqueIdType) GetCity() string {
|
||||
@ -551,7 +615,7 @@ var file_relayCabinetLayoutGraphics_proto_rawDesc = []byte{
|
||||
0x74, 0x6f, 0x12, 0x17, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x43, 0x61, 0x62, 0x69, 0x6e, 0x65, 0x74,
|
||||
0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x1b, 0x73, 0x74, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69,
|
||||
0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc3, 0x04, 0x0a, 0x1a, 0x52, 0x65, 0x6c,
|
||||
0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9c, 0x05, 0x0a, 0x1a, 0x52, 0x65, 0x6c,
|
||||
0x61, 0x79, 0x43, 0x61, 0x62, 0x69, 0x6e, 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63,
|
||||
0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x12, 0x2b, 0x0a, 0x06, 0x63, 0x61, 0x6e, 0x76, 0x61,
|
||||
0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69,
|
||||
@ -587,65 +651,76 @@ var file_relayCabinetLayoutGraphics_proto_rawDesc = []byte{
|
||||
0x28, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x43, 0x61, 0x62, 0x69, 0x6e, 0x65, 0x74, 0x47, 0x72,
|
||||
0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x74, 0x79, 0x70, 0x65, 0x52, 0x13, 0x63, 0x6f, 0x6d, 0x62, 0x69,
|
||||
0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x74, 0x79, 0x70, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x53,
|
||||
0x0a, 0x0c, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x43, 0x61, 0x62, 0x69, 0x6e, 0x65, 0x74, 0x12, 0x2f,
|
||||
0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17,
|
||||
0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d,
|
||||
0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63,
|
||||
0x6f, 0x64, 0x65, 0x22, 0xac, 0x02, 0x0a, 0x05, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x2f, 0x0a,
|
||||
0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x74, 0x79, 0x70, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x57,
|
||||
0x0a, 0x11, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x41, 0x6c, 0x61,
|
||||
0x72, 0x6d, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x72, 0x65, 0x6c, 0x61,
|
||||
0x79, 0x43, 0x61, 0x62, 0x69, 0x6e, 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44,
|
||||
0x61, 0x74, 0x61, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x41,
|
||||
0x6c, 0x61, 0x72, 0x6d, 0x52, 0x11, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x46, 0x61, 0x75, 0x6c,
|
||||
0x74, 0x41, 0x6c, 0x61, 0x72, 0x6d, 0x73, 0x22, 0x53, 0x0a, 0x0c, 0x52, 0x65, 0x6c, 0x61, 0x79,
|
||||
0x43, 0x61, 0x62, 0x69, 0x6e, 0x65, 0x74, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
|
||||
0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69,
|
||||
0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f,
|
||||
0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0xac, 0x02, 0x0a,
|
||||
0x05, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63,
|
||||
0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52,
|
||||
0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x44, 0x0a, 0x08, 0x6e,
|
||||
0x65, 0x77, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e,
|
||||
0x72, 0x65, 0x6c, 0x61, 0x79, 0x43, 0x61, 0x62, 0x69, 0x6e, 0x65, 0x74, 0x47, 0x72, 0x61, 0x70,
|
||||
0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x4d, 0x6f,
|
||||
0x64, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x4d, 0x6f, 0x64, 0x65,
|
||||
0x6c, 0x22, 0x97, 0x01, 0x0a, 0x09, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12,
|
||||
0x0b, 0x0a, 0x07, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09,
|
||||
0x4a, 0x50, 0x58, 0x43, 0x5f, 0x31, 0x30, 0x30, 0x30, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4a,
|
||||
0x50, 0x58, 0x43, 0x5f, 0x31, 0x37, 0x30, 0x30, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x57,
|
||||
0x4a, 0x58, 0x43, 0x5f, 0x34, 0x38, 0x30, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x4a, 0x57, 0x4a,
|
||||
0x58, 0x43, 0x5f, 0x48, 0x31, 0x32, 0x35, 0x5f, 0x38, 0x30, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09,
|
||||
0x4a, 0x57, 0x58, 0x43, 0x5f, 0x31, 0x37, 0x30, 0x30, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x4a,
|
||||
0x57, 0x58, 0x43, 0x5f, 0x48, 0x33, 0x34, 0x30, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x4a, 0x59,
|
||||
0x4a, 0x58, 0x43, 0x5f, 0x31, 0x36, 0x30, 0x5f, 0x32, 0x36, 0x30, 0x10, 0x07, 0x12, 0x0c, 0x0a,
|
||||
0x08, 0x4a, 0x5a, 0x58, 0x43, 0x5f, 0x48, 0x31, 0x38, 0x10, 0x08, 0x22, 0x5c, 0x0a, 0x15, 0x50,
|
||||
0x68, 0x61, 0x73, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x65,
|
||||
0x63, 0x74, 0x6f, 0x72, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61,
|
||||
0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63,
|
||||
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x57, 0x0a, 0x10, 0x53, 0x69, 0x67,
|
||||
0x6e, 0x61, 0x6c, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x41, 0x6c, 0x61, 0x72, 0x6d, 0x12, 0x2f, 0x0a,
|
||||
0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e,
|
||||
0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d,
|
||||
0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f,
|
||||
0x64, 0x65, 0x12, 0x44, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x04,
|
||||
0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x43, 0x61, 0x62, 0x69,
|
||||
0x6e, 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52,
|
||||
0x65, 0x6c, 0x61, 0x79, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08,
|
||||
0x6e, 0x65, 0x77, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0x97, 0x01, 0x0a, 0x09, 0x4d, 0x6f, 0x64,
|
||||
0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77,
|
||||
0x6e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x50, 0x58, 0x43, 0x5f, 0x31, 0x30, 0x30, 0x30,
|
||||
0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x50, 0x58, 0x43, 0x5f, 0x31, 0x37, 0x30, 0x30, 0x10,
|
||||
0x02, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x57, 0x4a, 0x58, 0x43, 0x5f, 0x34, 0x38, 0x30, 0x10, 0x03,
|
||||
0x12, 0x11, 0x0a, 0x0d, 0x4a, 0x57, 0x4a, 0x58, 0x43, 0x5f, 0x48, 0x31, 0x32, 0x35, 0x5f, 0x38,
|
||||
0x30, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x57, 0x58, 0x43, 0x5f, 0x31, 0x37, 0x30, 0x30,
|
||||
0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x57, 0x58, 0x43, 0x5f, 0x48, 0x33, 0x34, 0x30, 0x10,
|
||||
0x06, 0x12, 0x11, 0x0a, 0x0d, 0x4a, 0x59, 0x4a, 0x58, 0x43, 0x5f, 0x31, 0x36, 0x30, 0x5f, 0x32,
|
||||
0x36, 0x30, 0x10, 0x07, 0x12, 0x0c, 0x0a, 0x08, 0x4a, 0x5a, 0x58, 0x43, 0x5f, 0x48, 0x31, 0x38,
|
||||
0x10, 0x08, 0x22, 0x5c, 0x0a, 0x15, 0x50, 0x68, 0x61, 0x73, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x75,
|
||||
0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x2f, 0x0a, 0x06, 0x63,
|
||||
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72,
|
||||
0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
|
||||
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04,
|
||||
0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65,
|
||||
0x22, 0xc1, 0x01, 0x0a, 0x11, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74,
|
||||
0x65, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x54, 0x0a, 0x10, 0x63, 0x6f,
|
||||
0x6d, 0x62, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x05,
|
||||
0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x43, 0x61, 0x62, 0x69,
|
||||
0x6e, 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43,
|
||||
0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x74, 0x79, 0x70, 0x65, 0x52, 0x10,
|
||||
0x64, 0x65, 0x22, 0xc1, 0x01, 0x0a, 0x11, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x6c,
|
||||
0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x54, 0x0a, 0x10,
|
||||
0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x74, 0x79, 0x70, 0x65, 0x73,
|
||||
0x12, 0x42, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x06,
|
||||
0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61,
|
||||
0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x2e, 0x44, 0x65,
|
||||
0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65,
|
||||
0x54, 0x79, 0x70, 0x65, 0x22, 0x43, 0x0a, 0x0f, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x61, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72,
|
||||
0x65, 0x66, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09,
|
||||
0x72, 0x65, 0x66, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x73, 0x22, 0x7c, 0x0a, 0x0c, 0x55, 0x6e, 0x69,
|
||||
0x71, 0x75, 0x65, 0x49, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x74,
|
||||
0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a,
|
||||
0x06, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c,
|
||||
0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x1b, 0x62, 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x73,
|
||||
0x43, 0x6f, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1b, 0x62, 0x65, 0x6c, 0x6f,
|
||||
0x6e, 0x67, 0x73, 0x43, 0x6f, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x21, 0x5a, 0x1f, 0x2e, 0x2f, 0x61, 0x74, 0x73,
|
||||
0x2f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x67,
|
||||
0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x33,
|
||||
0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x43, 0x61,
|
||||
0x62, 0x69, 0x6e, 0x65, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61,
|
||||
0x2e, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x74, 0x79, 0x70, 0x65,
|
||||
0x52, 0x10, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x74, 0x79, 0x70,
|
||||
0x65, 0x73, 0x12, 0x42, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65,
|
||||
0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63,
|
||||
0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x2e,
|
||||
0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69,
|
||||
0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x43, 0x0a, 0x0f, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64,
|
||||
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x0a,
|
||||
0x09, 0x72, 0x65, 0x66, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09,
|
||||
0x52, 0x09, 0x72, 0x65, 0x66, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x73, 0x22, 0x7c, 0x0a, 0x0c, 0x55,
|
||||
0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63,
|
||||
0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x06, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x1b, 0x62, 0x65, 0x6c, 0x6f, 0x6e,
|
||||
0x67, 0x73, 0x43, 0x6f, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53,
|
||||
0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1b, 0x62, 0x65,
|
||||
0x6c, 0x6f, 0x6e, 0x67, 0x73, 0x43, 0x6f, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x21, 0x5a, 0x1f, 0x2e, 0x2f, 0x61,
|
||||
0x74, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73,
|
||||
0x2f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -661,39 +736,42 @@ func file_relayCabinetLayoutGraphics_proto_rawDescGZIP() []byte {
|
||||
}
|
||||
|
||||
var file_relayCabinetLayoutGraphics_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_relayCabinetLayoutGraphics_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
||||
var file_relayCabinetLayoutGraphics_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
|
||||
var file_relayCabinetLayoutGraphics_proto_goTypes = []interface{}{
|
||||
(Relay_ModelType)(0), // 0: relayCabinetGraphicData.Relay.ModelType
|
||||
(*RelayCabinetGraphicStorage)(nil), // 1: relayCabinetGraphicData.RelayCabinetGraphicStorage
|
||||
(*RelayCabinet)(nil), // 2: relayCabinetGraphicData.RelayCabinet
|
||||
(*Relay)(nil), // 3: relayCabinetGraphicData.Relay
|
||||
(*PhaseFailureProtector)(nil), // 4: relayCabinetGraphicData.PhaseFailureProtector
|
||||
(*DeviceRelateRelay)(nil), // 5: relayCabinetGraphicData.DeviceRelateRelay
|
||||
(*Combinationtype)(nil), // 6: relayCabinetGraphicData.Combinationtype
|
||||
(*UniqueIdType)(nil), // 7: relayCabinetGraphicData.UniqueIdType
|
||||
(*Canvas)(nil), // 8: graphicData.Canvas
|
||||
(*CommonInfo)(nil), // 9: graphicData.CommonInfo
|
||||
(RelatedRef_DeviceType)(0), // 10: graphicData.RelatedRef.DeviceType
|
||||
(*SignalFaultAlarm)(nil), // 5: relayCabinetGraphicData.SignalFaultAlarm
|
||||
(*DeviceRelateRelay)(nil), // 6: relayCabinetGraphicData.DeviceRelateRelay
|
||||
(*Combinationtype)(nil), // 7: relayCabinetGraphicData.Combinationtype
|
||||
(*UniqueIdType)(nil), // 8: relayCabinetGraphicData.UniqueIdType
|
||||
(*Canvas)(nil), // 9: graphicData.Canvas
|
||||
(*CommonInfo)(nil), // 10: graphicData.CommonInfo
|
||||
(RelatedRef_DeviceType)(0), // 11: graphicData.RelatedRef.DeviceType
|
||||
}
|
||||
var file_relayCabinetLayoutGraphics_proto_depIdxs = []int32{
|
||||
8, // 0: relayCabinetGraphicData.RelayCabinetGraphicStorage.canvas:type_name -> graphicData.Canvas
|
||||
9, // 0: relayCabinetGraphicData.RelayCabinetGraphicStorage.canvas:type_name -> graphicData.Canvas
|
||||
2, // 1: relayCabinetGraphicData.RelayCabinetGraphicStorage.relayCabinets:type_name -> relayCabinetGraphicData.RelayCabinet
|
||||
3, // 2: relayCabinetGraphicData.RelayCabinetGraphicStorage.relays:type_name -> relayCabinetGraphicData.Relay
|
||||
5, // 3: relayCabinetGraphicData.RelayCabinetGraphicStorage.deviceRelateRelayList:type_name -> relayCabinetGraphicData.DeviceRelateRelay
|
||||
7, // 4: relayCabinetGraphicData.RelayCabinetGraphicStorage.UniqueIdPrefix:type_name -> relayCabinetGraphicData.UniqueIdType
|
||||
6, // 3: relayCabinetGraphicData.RelayCabinetGraphicStorage.deviceRelateRelayList:type_name -> relayCabinetGraphicData.DeviceRelateRelay
|
||||
8, // 4: relayCabinetGraphicData.RelayCabinetGraphicStorage.UniqueIdPrefix:type_name -> relayCabinetGraphicData.UniqueIdType
|
||||
4, // 5: relayCabinetGraphicData.RelayCabinetGraphicStorage.phaseFailureProtectors:type_name -> relayCabinetGraphicData.PhaseFailureProtector
|
||||
6, // 6: relayCabinetGraphicData.RelayCabinetGraphicStorage.combinationtypeList:type_name -> relayCabinetGraphicData.Combinationtype
|
||||
9, // 7: relayCabinetGraphicData.RelayCabinet.common:type_name -> graphicData.CommonInfo
|
||||
9, // 8: relayCabinetGraphicData.Relay.common:type_name -> graphicData.CommonInfo
|
||||
0, // 9: relayCabinetGraphicData.Relay.newModel:type_name -> relayCabinetGraphicData.Relay.ModelType
|
||||
9, // 10: relayCabinetGraphicData.PhaseFailureProtector.common:type_name -> graphicData.CommonInfo
|
||||
6, // 11: relayCabinetGraphicData.DeviceRelateRelay.combinationtypes:type_name -> relayCabinetGraphicData.Combinationtype
|
||||
10, // 12: relayCabinetGraphicData.DeviceRelateRelay.deviceType:type_name -> graphicData.RelatedRef.DeviceType
|
||||
13, // [13:13] is the sub-list for method output_type
|
||||
13, // [13:13] is the sub-list for method input_type
|
||||
13, // [13:13] is the sub-list for extension type_name
|
||||
13, // [13:13] is the sub-list for extension extendee
|
||||
0, // [0:13] is the sub-list for field type_name
|
||||
7, // 6: relayCabinetGraphicData.RelayCabinetGraphicStorage.combinationtypeList:type_name -> relayCabinetGraphicData.Combinationtype
|
||||
5, // 7: relayCabinetGraphicData.RelayCabinetGraphicStorage.signalFaultAlarms:type_name -> relayCabinetGraphicData.SignalFaultAlarm
|
||||
10, // 8: relayCabinetGraphicData.RelayCabinet.common:type_name -> graphicData.CommonInfo
|
||||
10, // 9: relayCabinetGraphicData.Relay.common:type_name -> graphicData.CommonInfo
|
||||
0, // 10: relayCabinetGraphicData.Relay.newModel:type_name -> relayCabinetGraphicData.Relay.ModelType
|
||||
10, // 11: relayCabinetGraphicData.PhaseFailureProtector.common:type_name -> graphicData.CommonInfo
|
||||
10, // 12: relayCabinetGraphicData.SignalFaultAlarm.common:type_name -> graphicData.CommonInfo
|
||||
7, // 13: relayCabinetGraphicData.DeviceRelateRelay.combinationtypes:type_name -> relayCabinetGraphicData.Combinationtype
|
||||
11, // 14: relayCabinetGraphicData.DeviceRelateRelay.deviceType:type_name -> graphicData.RelatedRef.DeviceType
|
||||
15, // [15:15] is the sub-list for method output_type
|
||||
15, // [15:15] is the sub-list for method input_type
|
||||
15, // [15:15] is the sub-list for extension type_name
|
||||
15, // [15:15] is the sub-list for extension extendee
|
||||
0, // [0:15] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_relayCabinetLayoutGraphics_proto_init() }
|
||||
@ -752,7 +830,7 @@ func file_relayCabinetLayoutGraphics_proto_init() {
|
||||
}
|
||||
}
|
||||
file_relayCabinetLayoutGraphics_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeviceRelateRelay); i {
|
||||
switch v := v.(*SignalFaultAlarm); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -764,7 +842,7 @@ func file_relayCabinetLayoutGraphics_proto_init() {
|
||||
}
|
||||
}
|
||||
file_relayCabinetLayoutGraphics_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Combinationtype); i {
|
||||
switch v := v.(*DeviceRelateRelay); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -776,6 +854,18 @@ func file_relayCabinetLayoutGraphics_proto_init() {
|
||||
}
|
||||
}
|
||||
file_relayCabinetLayoutGraphics_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Combinationtype); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_relayCabinetLayoutGraphics_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UniqueIdType); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -794,7 +884,7 @@ func file_relayCabinetLayoutGraphics_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_relayCabinetLayoutGraphics_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumMessages: 7,
|
||||
NumMessages: 8,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v4.23.1
|
||||
// source: stationLayoutGraphics.proto
|
||||
|
||||
@ -279,6 +279,7 @@ const (
|
||||
RelatedRef_signal RelatedRef_DeviceType = 5
|
||||
RelatedRef_station RelatedRef_DeviceType = 6
|
||||
RelatedRef_ScreenDoor RelatedRef_DeviceType = 7
|
||||
RelatedRef_SignalFaultAlarm RelatedRef_DeviceType = 8
|
||||
)
|
||||
|
||||
// Enum value maps for RelatedRef_DeviceType.
|
||||
@ -292,6 +293,7 @@ var (
|
||||
5: "signal",
|
||||
6: "station",
|
||||
7: "ScreenDoor",
|
||||
8: "SignalFaultAlarm",
|
||||
}
|
||||
RelatedRef_DeviceType_value = map[string]int32{
|
||||
"Section": 0,
|
||||
@ -302,6 +304,7 @@ var (
|
||||
"signal": 5,
|
||||
"station": 6,
|
||||
"ScreenDoor": 7,
|
||||
"SignalFaultAlarm": 8,
|
||||
}
|
||||
)
|
||||
|
||||
@ -4274,7 +4277,7 @@ var file_stationLayoutGraphics_proto_rawDesc = []byte{
|
||||
0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x30, 0x0a, 0x0b, 0x53, 0x65, 0x63,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x68, 0x79, 0x73,
|
||||
0x69, 0x63, 0x61, 0x6c, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75,
|
||||
0x74, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x10, 0x02, 0x22, 0xcd, 0x02, 0x0a, 0x0a,
|
||||
0x74, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x10, 0x02, 0x22, 0xe3, 0x02, 0x0a, 0x0a,
|
||||
0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x12, 0x42, 0x0a, 0x0a, 0x64, 0x65,
|
||||
0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22,
|
||||
0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c,
|
||||
@ -4285,7 +4288,7 @@ var file_stationLayoutGraphics_proto_rawDesc = []byte{
|
||||
0x28, 0x0e, 0x32, 0x22, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61,
|
||||
0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x2e, 0x44, 0x65, 0x76, 0x69,
|
||||
0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f,
|
||||
0x72, 0x74, 0x22, 0x83, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70,
|
||||
0x72, 0x74, 0x22, 0x99, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70,
|
||||
0x65, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x00, 0x12, 0x0b,
|
||||
0x0a, 0x07, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x54,
|
||||
0x72, 0x61, 0x69, 0x6e, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c,
|
||||
@ -4293,312 +4296,313 @@ var file_stationLayoutGraphics_proto_rawDesc = []byte{
|
||||
0x0a, 0x0b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x6e, 0x6b, 0x10, 0x04, 0x12,
|
||||
0x0a, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x73,
|
||||
0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x06, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x63, 0x72, 0x65,
|
||||
0x65, 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x10, 0x07, 0x22, 0x21, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69,
|
||||
0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x05, 0x0a, 0x01, 0x41, 0x10, 0x00, 0x12, 0x05, 0x0a,
|
||||
0x01, 0x42, 0x10, 0x01, 0x12, 0x05, 0x0a, 0x01, 0x43, 0x10, 0x02, 0x22, 0x3b, 0x0a, 0x0d, 0x54,
|
||||
0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x50, 0x6f, 0x73, 0x52, 0x65, 0x66, 0x12, 0x0e, 0x0a, 0x02,
|
||||
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08,
|
||||
0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08,
|
||||
0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x76, 0x0a, 0x09, 0x53, 0x65, 0x70, 0x61,
|
||||
0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44,
|
||||
0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06,
|
||||
0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x65,
|
||||
0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0d, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65,
|
||||
0x22, 0xcd, 0x02, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x72,
|
||||
0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43,
|
||||
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
|
||||
0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f,
|
||||
0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12,
|
||||
0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05,
|
||||
0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x46, 0x0a, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74,
|
||||
0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c,
|
||||
0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x69, 0x6c,
|
||||
0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x0f, 0x6b, 0x69,
|
||||
0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x3f, 0x0a,
|
||||
0x0e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x72, 0x52, 0x65, 0x66, 0x18,
|
||||
0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44,
|
||||
0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x0e,
|
||||
0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x72, 0x52, 0x65, 0x66, 0x12, 0x30,
|
||||
0x0a, 0x13, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x63, 0x65, 0x6e,
|
||||
0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
|
||||
0x22, 0x8b, 0x01, 0x0a, 0x09, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x66, 0x12, 0x41,
|
||||
0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x0e, 0x32, 0x21, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61,
|
||||
0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x66, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63,
|
||||
0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70,
|
||||
0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
|
||||
0x64, 0x22, 0x2b, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12,
|
||||
0x0b, 0x0a, 0x07, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c,
|
||||
0x41, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x10, 0x01, 0x22, 0xe2,
|
||||
0x02, 0x0a, 0x0b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x2f,
|
||||
0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17,
|
||||
0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d,
|
||||
0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63,
|
||||
0x6f, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20,
|
||||
0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74,
|
||||
0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12,
|
||||
0x0e, 0x0a, 0x02, 0x75, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x75, 0x70, 0x12,
|
||||
0x30, 0x0a, 0x07, 0x61, 0x53, 0x69, 0x6d, 0x52, 0x65, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x16, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x53,
|
||||
0x69, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x66, 0x52, 0x07, 0x61, 0x53, 0x69, 0x6d, 0x52, 0x65,
|
||||
0x66, 0x12, 0x30, 0x0a, 0x07, 0x62, 0x53, 0x69, 0x6d, 0x52, 0x65, 0x66, 0x18, 0x06, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61,
|
||||
0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x66, 0x52, 0x07, 0x62, 0x53, 0x69, 0x6d,
|
||||
0x52, 0x65, 0x66, 0x12, 0x2b, 0x0a, 0x04, 0x61, 0x52, 0x65, 0x66, 0x18, 0x07, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e,
|
||||
0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x04, 0x61, 0x52, 0x65, 0x66,
|
||||
0x12, 0x2b, 0x0a, 0x04, 0x62, 0x52, 0x65, 0x66, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17,
|
||||
0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c,
|
||||
0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x04, 0x62, 0x52, 0x65, 0x66, 0x12, 0x14, 0x0a,
|
||||
0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e,
|
||||
0x64, 0x65, 0x78, 0x22, 0xb6, 0x02, 0x0a, 0x13, 0x41, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63,
|
||||
0x65, 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x10, 0x07, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x69, 0x67, 0x6e,
|
||||
0x61, 0x6c, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x41, 0x6c, 0x61, 0x72, 0x6d, 0x10, 0x08, 0x22, 0x21,
|
||||
0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x05, 0x0a, 0x01,
|
||||
0x41, 0x10, 0x00, 0x12, 0x05, 0x0a, 0x01, 0x42, 0x10, 0x01, 0x12, 0x05, 0x0a, 0x01, 0x43, 0x10,
|
||||
0x02, 0x22, 0x3b, 0x0a, 0x0d, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x50, 0x6f, 0x73, 0x52,
|
||||
0x65, 0x66, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02,
|
||||
0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x76,
|
||||
0x0a, 0x09, 0x53, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2f, 0x0a, 0x06, 0x63,
|
||||
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72,
|
||||
0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
|
||||
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04,
|
||||
0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65,
|
||||
0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50,
|
||||
0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x2d, 0x0a, 0x05,
|
||||
0x70, 0x61, 0x52, 0x65, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72,
|
||||
0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65,
|
||||
0x64, 0x52, 0x65, 0x66, 0x52, 0x05, 0x70, 0x61, 0x52, 0x65, 0x66, 0x12, 0x2d, 0x0a, 0x05, 0x70,
|
||||
0x62, 0x52, 0x65, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61,
|
||||
0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64,
|
||||
0x52, 0x65, 0x66, 0x52, 0x05, 0x70, 0x62, 0x52, 0x65, 0x66, 0x12, 0x3a, 0x0a, 0x0a, 0x74, 0x75,
|
||||
0x72, 0x6e, 0x6f, 0x75, 0x74, 0x50, 0x6f, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a,
|
||||
0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x75, 0x72,
|
||||
0x6e, 0x6f, 0x75, 0x74, 0x50, 0x6f, 0x73, 0x52, 0x65, 0x66, 0x52, 0x0a, 0x74, 0x75, 0x72, 0x6e,
|
||||
0x6f, 0x75, 0x74, 0x50, 0x6f, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18,
|
||||
0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0xd9, 0x01, 0x0a,
|
||||
0x0c, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a,
|
||||
0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e,
|
||||
0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d,
|
||||
0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f,
|
||||
0x64, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61,
|
||||
0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x24,
|
||||
0x0a, 0x0d, 0x61, 0x78, 0x6c, 0x65, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x78, 0x6c, 0x65, 0x53, 0x65, 0x63, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x75,
|
||||
0x72, 0x6e, 0x6f, 0x75, 0x74, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74,
|
||||
0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x49, 0x64, 0x22, 0x97, 0x03, 0x0a, 0x0c, 0x54, 0x72, 0x61,
|
||||
0x63, 0x6b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d,
|
||||
0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70,
|
||||
0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e,
|
||||
0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f,
|
||||
0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61,
|
||||
0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06,
|
||||
0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e,
|
||||
0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78,
|
||||
0x12, 0x3e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a,
|
||||
0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x72, 0x61,
|
||||
0x63, 0x6b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53,
|
||||
0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,
|
||||
0x12, 0x28, 0x0a, 0x0f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43,
|
||||
0x6f, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x74, 0x69,
|
||||
0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x74, 0x72,
|
||||
0x61, 0x63, 0x6b, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18,
|
||||
0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x4c, 0x6f, 0x67, 0x69,
|
||||
0x63, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x73, 0x43, 0x75,
|
||||
0x72, 0x76, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x43, 0x75, 0x72,
|
||||
0x76, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x43, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x73, 0x65, 0x67, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x28, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x63,
|
||||
0x6b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06,
|
||||
0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x4f, 0x52, 0x4b,
|
||||
0x10, 0x01, 0x22, 0x9c, 0x01, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x4c, 0x6f, 0x67, 0x69,
|
||||
0x63, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d,
|
||||
0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68,
|
||||
0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66,
|
||||
0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69,
|
||||
0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70,
|
||||
0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70,
|
||||
0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e,
|
||||
0x67, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74,
|
||||
0x68, 0x22, 0xe0, 0x02, 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x70, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61,
|
||||
0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d,
|
||||
0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x12, 0x3e, 0x0a, 0x08, 0x63,
|
||||
0x6f, 0x61, 0x63, 0x68, 0x4e, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e,
|
||||
0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x74, 0x6f, 0x70,
|
||||
0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x61, 0x63, 0x68, 0x4e, 0x75,
|
||||
0x6d, 0x52, 0x08, 0x63, 0x6f, 0x61, 0x63, 0x68, 0x4e, 0x75, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x69,
|
||||
0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65,
|
||||
0x78, 0x12, 0x46, 0x0a, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79,
|
||||
0x73, 0x74, 0x65, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x61,
|
||||
0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74,
|
||||
0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65,
|
||||
0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x2f, 0x0a, 0x06, 0x72, 0x65, 0x66,
|
||||
0x44, 0x65, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70,
|
||||
0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52,
|
||||
0x65, 0x66, 0x52, 0x06, 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, 0x22, 0x28, 0x0a, 0x08, 0x43, 0x6f,
|
||||
0x61, 0x63, 0x68, 0x4e, 0x75, 0x6d, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x6f, 0x75, 0x72, 0x10, 0x00,
|
||||
0x12, 0x07, 0x0a, 0x03, 0x53, 0x69, 0x78, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x69, 0x67,
|
||||
0x68, 0x74, 0x10, 0x02, 0x22, 0xb9, 0x01, 0x0a, 0x0a, 0x53, 0x70, 0x6b, 0x73, 0x53, 0x77, 0x69,
|
||||
0x74, 0x63, 0x68, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74,
|
||||
0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f,
|
||||
0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x69, 0x70,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05,
|
||||
0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64,
|
||||
0x65, 0x78, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x66, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x66, 0x53, 0x65, 0x63, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x6e, 0x64,
|
||||
0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x6e, 0x64,
|
||||
0x22, 0x96, 0x01, 0x0a, 0x09, 0x45, 0x73, 0x62, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x12, 0x2f,
|
||||
0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17,
|
||||
0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d,
|
||||
0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63,
|
||||
0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x08, 0x52, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78,
|
||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1a, 0x0a,
|
||||
0x08, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x08, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x22, 0xcf, 0x01, 0x0a, 0x08, 0x47, 0x61,
|
||||
0x74, 0x65, 0x64, 0x42, 0x6f, 0x78, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
|
||||
0x12, 0x24, 0x0a, 0x0d, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70,
|
||||
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74,
|
||||
0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x22, 0xcd, 0x02, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63,
|
||||
0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52,
|
||||
0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66,
|
||||
0x6c, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x12,
|
||||
0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05,
|
||||
0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x66, 0x53, 0x63, 0x72, 0x65,
|
||||
0x65, 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65,
|
||||
0x66, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x12, 0x2e, 0x0a, 0x12, 0x72,
|
||||
0x65, 0x66, 0x47, 0x61, 0x74, 0x65, 0x64, 0x42, 0x6f, 0x78, 0x4d, 0x61, 0x70, 0x43, 0x6f, 0x64,
|
||||
0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x72, 0x65, 0x66, 0x47, 0x61, 0x74, 0x65,
|
||||
0x64, 0x42, 0x6f, 0x78, 0x4d, 0x61, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x9e, 0x01, 0x0a, 0x0f,
|
||||
0x53, 0x6c, 0x6f, 0x70, 0x65, 0x4b, 0x69, 0x6c, 0x6f, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x72, 0x12,
|
||||
0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f,
|
||||
0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
|
||||
0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
|
||||
0x63, 0x6f, 0x64, 0x65, 0x12, 0x46, 0x0a, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65,
|
||||
0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e,
|
||||
0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x69, 0x6c, 0x6f,
|
||||
0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x0f, 0x6b, 0x69, 0x6c,
|
||||
0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, 0xa2, 0x01, 0x0a,
|
||||
0x13, 0x43, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x4b, 0x69, 0x6c, 0x6f, 0x4d, 0x61,
|
||||
0x72, 0x6b, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x74,
|
||||
0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65,
|
||||
0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x46, 0x0a, 0x0f, 0x6b,
|
||||
0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x05,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61,
|
||||
0x74, 0x61, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74,
|
||||
0x65, 0x6d, 0x52, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73,
|
||||
0x74, 0x65, 0x6d, 0x12, 0x3f, 0x0a, 0x0e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x6e, 0x64,
|
||||
0x65, 0x72, 0x52, 0x65, 0x66, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72,
|
||||
0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65,
|
||||
0x64, 0x52, 0x65, 0x66, 0x52, 0x0e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65,
|
||||
0x72, 0x52, 0x65, 0x66, 0x12, 0x30, 0x0a, 0x13, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69,
|
||||
0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28,
|
||||
0x09, 0x52, 0x13, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x8b, 0x01, 0x0a, 0x09, 0x53, 0x69, 0x6d, 0x70, 0x6c,
|
||||
0x65, 0x52, 0x65, 0x66, 0x12, 0x41, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79,
|
||||
0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68,
|
||||
0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x66,
|
||||
0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x76,
|
||||
0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x2b, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x63,
|
||||
0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74,
|
||||
0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x41, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69,
|
||||
0x6e, 0x67, 0x10, 0x01, 0x22, 0xe2, 0x02, 0x0a, 0x0b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61,
|
||||
0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63,
|
||||
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x46, 0x0a, 0x0f, 0x6b, 0x69, 0x6c,
|
||||
0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x04, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61,
|
||||
0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d,
|
||||
0x52, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65,
|
||||
0x6d, 0x22, 0xa8, 0x01, 0x0a, 0x05, 0x53, 0x6c, 0x6f, 0x70, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x63,
|
||||
0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69,
|
||||
0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70,
|
||||
0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70,
|
||||
0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x75, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x08, 0x52, 0x02, 0x75, 0x70, 0x12, 0x30, 0x0a, 0x07, 0x61, 0x53, 0x69, 0x6d, 0x52, 0x65, 0x66,
|
||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63,
|
||||
0x44, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x66, 0x52, 0x07,
|
||||
0x61, 0x53, 0x69, 0x6d, 0x52, 0x65, 0x66, 0x12, 0x30, 0x0a, 0x07, 0x62, 0x53, 0x69, 0x6d, 0x52,
|
||||
0x65, 0x66, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68,
|
||||
0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x66,
|
||||
0x52, 0x07, 0x62, 0x53, 0x69, 0x6d, 0x52, 0x65, 0x66, 0x12, 0x2b, 0x0a, 0x04, 0x61, 0x52, 0x65,
|
||||
0x66, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69,
|
||||
0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66,
|
||||
0x52, 0x04, 0x61, 0x52, 0x65, 0x66, 0x12, 0x2b, 0x0a, 0x04, 0x62, 0x52, 0x65, 0x66, 0x18, 0x08,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61,
|
||||
0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x04, 0x62,
|
||||
0x52, 0x65, 0x66, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0xb6, 0x02, 0x0a, 0x13, 0x41, 0x78,
|
||||
0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e,
|
||||
0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d,
|
||||
0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73,
|
||||
0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63,
|
||||
0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e,
|
||||
0x74, 0x73, 0x12, 0x2d, 0x0a, 0x05, 0x70, 0x61, 0x52, 0x65, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e,
|
||||
0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x05, 0x70, 0x61, 0x52, 0x65,
|
||||
0x66, 0x12, 0x2d, 0x0a, 0x05, 0x70, 0x62, 0x52, 0x65, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52,
|
||||
0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x05, 0x70, 0x62, 0x52, 0x65, 0x66,
|
||||
0x12, 0x3a, 0x0a, 0x0a, 0x74, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x50, 0x6f, 0x73, 0x18, 0x06,
|
||||
0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61,
|
||||
0x74, 0x61, 0x2e, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x50, 0x6f, 0x73, 0x52, 0x65, 0x66,
|
||||
0x52, 0x0a, 0x74, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x50, 0x6f, 0x73, 0x12, 0x14, 0x0a, 0x05,
|
||||
0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64,
|
||||
0x65, 0x78, 0x22, 0xd9, 0x01, 0x0a, 0x0c, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x53, 0x65, 0x63, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74,
|
||||
0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f,
|
||||
0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e,
|
||||
0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68,
|
||||
0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f,
|
||||
0x69, 0x6e, 0x74, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x78, 0x6c, 0x65, 0x53, 0x65, 0x63, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x78, 0x6c,
|
||||
0x65, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e,
|
||||
0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78,
|
||||
0x12, 0x1c, 0x0a, 0x09, 0x74, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x49, 0x64, 0x18, 0x06, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x49, 0x64, 0x22, 0x97,
|
||||
0x03, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12,
|
||||
0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f,
|
||||
0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
|
||||
0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50,
|
||||
0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04,
|
||||
0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65,
|
||||
0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x3e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05,
|
||||
0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61,
|
||||
0x74, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
|
||||
0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65,
|
||||
0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x0f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65,
|
||||
0x12, 0x2c, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x53, 0x65,
|
||||
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x74, 0x72, 0x61,
|
||||
0x63, 0x6b, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18,
|
||||
0x0a, 0x07, 0x69, 0x73, 0x43, 0x75, 0x72, 0x76, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||
0x07, 0x69, 0x73, 0x43, 0x75, 0x72, 0x76, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x65, 0x67, 0x6d,
|
||||
0x65, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x0d, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x28,
|
||||
0x0a, 0x10, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79,
|
||||
0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x08,
|
||||
0x0a, 0x04, 0x46, 0x4f, 0x52, 0x4b, 0x10, 0x01, 0x22, 0x9c, 0x01, 0x0a, 0x11, 0x54, 0x72, 0x61,
|
||||
0x63, 0x6b, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f,
|
||||
0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17,
|
||||
0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d,
|
||||
0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12,
|
||||
0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||
0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f,
|
||||
0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63,
|
||||
0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xe0, 0x02, 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x70,
|
||||
0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d,
|
||||
0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68,
|
||||
0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66,
|
||||
0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64,
|
||||
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a,
|
||||
0x04, 0x66, 0x6c, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66, 0x6c, 0x69,
|
||||
0x70, 0x12, 0x3e, 0x0a, 0x08, 0x63, 0x6f, 0x61, 0x63, 0x68, 0x4e, 0x75, 0x6d, 0x18, 0x04, 0x20,
|
||||
0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74,
|
||||
0x61, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43,
|
||||
0x6f, 0x61, 0x63, 0x68, 0x4e, 0x75, 0x6d, 0x52, 0x08, 0x63, 0x6f, 0x61, 0x63, 0x68, 0x4e, 0x75,
|
||||
0x6d, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x46, 0x0a, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d,
|
||||
0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x1c, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4b,
|
||||
0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x0f,
|
||||
0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12,
|
||||
0x2f, 0x0a, 0x06, 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65,
|
||||
0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x06, 0x72, 0x65, 0x66, 0x44, 0x65, 0x76,
|
||||
0x22, 0x28, 0x0a, 0x08, 0x43, 0x6f, 0x61, 0x63, 0x68, 0x4e, 0x75, 0x6d, 0x12, 0x08, 0x0a, 0x04,
|
||||
0x46, 0x6f, 0x75, 0x72, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x69, 0x78, 0x10, 0x01, 0x12,
|
||||
0x09, 0x0a, 0x05, 0x45, 0x69, 0x67, 0x68, 0x74, 0x10, 0x02, 0x22, 0xb9, 0x01, 0x0a, 0x0a, 0x53,
|
||||
0x70, 0x6b, 0x73, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d,
|
||||
0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70,
|
||||
0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e,
|
||||
0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f,
|
||||
0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66, 0x6c,
|
||||
0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x66, 0x53,
|
||||
0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x72,
|
||||
0x65, 0x66, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65,
|
||||
0x66, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65,
|
||||
0x66, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x22, 0x96, 0x01, 0x0a, 0x09, 0x45, 0x73, 0x62, 0x42, 0x75,
|
||||
0x74, 0x74, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61,
|
||||
0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63,
|
||||
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x69,
|
||||
0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x12, 0x14, 0x0a,
|
||||
0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e,
|
||||
0x64, 0x65, 0x78, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x18,
|
||||
0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x22,
|
||||
0xcf, 0x01, 0x0a, 0x08, 0x47, 0x61, 0x74, 0x65, 0x64, 0x42, 0x6f, 0x78, 0x12, 0x2f, 0x0a, 0x06,
|
||||
0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67,
|
||||
0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f,
|
||||
0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a,
|
||||
0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64,
|
||||
0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||
0x04, 0x66, 0x6c, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x24, 0x0a, 0x0d, 0x72,
|
||||
0x65, 0x66, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x44, 0x6f, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x66, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x44, 0x6f, 0x6f,
|
||||
0x72, 0x12, 0x2e, 0x0a, 0x12, 0x72, 0x65, 0x66, 0x47, 0x61, 0x74, 0x65, 0x64, 0x42, 0x6f, 0x78,
|
||||
0x4d, 0x61, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x72,
|
||||
0x65, 0x66, 0x47, 0x61, 0x74, 0x65, 0x64, 0x42, 0x6f, 0x78, 0x4d, 0x61, 0x70, 0x43, 0x6f, 0x64,
|
||||
0x65, 0x22, 0x9e, 0x01, 0x0a, 0x0f, 0x53, 0x6c, 0x6f, 0x70, 0x65, 0x4b, 0x69, 0x6c, 0x6f, 0x4d,
|
||||
0x61, 0x72, 0x6b, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44,
|
||||
0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06,
|
||||
0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x46, 0x0a, 0x0f, 0x6b, 0x69,
|
||||
0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x04, 0x20,
|
||||
0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74,
|
||||
0x61, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65,
|
||||
0x6d, 0x52, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74,
|
||||
0x65, 0x6d, 0x22, 0xa2, 0x01, 0x0a, 0x13, 0x43, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65,
|
||||
0x4b, 0x69, 0x6c, 0x6f, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f,
|
||||
0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61,
|
||||
0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49,
|
||||
0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63,
|
||||
0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12,
|
||||
0x46, 0x0a, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74,
|
||||
0x65, 0x6d, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68,
|
||||
0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72,
|
||||
0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x0f, 0x6b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65,
|
||||
0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, 0xa8, 0x01, 0x0a, 0x05, 0x53, 0x6c, 0x6f, 0x70,
|
||||
0x65, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e,
|
||||
0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d,
|
||||
0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61,
|
||||
0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x20,
|
||||
0x0a, 0x0b, 0x73, 0x6c, 0x6f, 0x70, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x11, 0x52, 0x0b, 0x73, 0x6c, 0x6f, 0x70, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72,
|
||||
0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18,
|
||||
0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
|
||||
0x49, 0x64, 0x22, 0xb4, 0x01, 0x0a, 0x09, 0x43, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65,
|
||||
0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43,
|
||||
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
|
||||
0x6e, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e,
|
||||
0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x28, 0x0a,
|
||||
0x0f, 0x63, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x11, 0x52, 0x0f, 0x63, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72,
|
||||
0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x66, 0x44, 0x65,
|
||||
0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65,
|
||||
0x66, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x22, 0xcb, 0x03, 0x0a, 0x0d, 0x43, 0x61,
|
||||
0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x2f, 0x0a, 0x06, 0x63,
|
||||
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72,
|
||||
0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
|
||||
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x06,
|
||||
0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67,
|
||||
0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74,
|
||||
0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x6c, 0x6f, 0x70,
|
||||
0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x11, 0x52, 0x0b, 0x73,
|
||||
0x6c, 0x6f, 0x70, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65,
|
||||
0x66, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52,
|
||||
0x0b, 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x22, 0xb4, 0x01, 0x0a,
|
||||
0x09, 0x43, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f,
|
||||
0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61,
|
||||
0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49,
|
||||
0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x06, 0x70,
|
||||
0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72,
|
||||
0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52,
|
||||
0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x75, 0x72, 0x76, 0x61,
|
||||
0x74, 0x75, 0x72, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x11,
|
||||
0x52, 0x0f, 0x63, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65,
|
||||
0x72, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64,
|
||||
0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, 0x69, 0x63,
|
||||
0x65, 0x49, 0x64, 0x22, 0xcb, 0x03, 0x0a, 0x0d, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74,
|
||||
0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44,
|
||||
0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06,
|
||||
0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73,
|
||||
0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63,
|
||||
0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e,
|
||||
0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x39, 0x0a, 0x0b, 0x61, 0x52,
|
||||
0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65,
|
||||
0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x0b, 0x61, 0x52, 0x65, 0x6c, 0x61, 0x74,
|
||||
0x65, 0x64, 0x52, 0x65, 0x66, 0x12, 0x39, 0x0a, 0x0b, 0x62, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65,
|
||||
0x64, 0x52, 0x65, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61,
|
||||
0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64,
|
||||
0x52, 0x65, 0x66, 0x52, 0x0b, 0x62, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66,
|
||||
0x12, 0x53, 0x0a, 0x0f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x72, 0x61, 0x70,
|
||||
0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74,
|
||||
0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x1a, 0x64, 0x0a, 0x0e, 0x44,
|
||||
0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a,
|
||||
0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6f,
|
||||
0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49,
|
||||
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49,
|
||||
0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70,
|
||||
0x65, 0x22, 0x79, 0x0a, 0x17, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x64, 0x4f, 0x66, 0x53,
|
||||
0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x12, 0x12, 0x0a, 0x04,
|
||||
0x63, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79,
|
||||
0x12, 0x16, 0x0a, 0x06, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x06, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x14, 0x6d, 0x61, 0x69, 0x6e,
|
||||
0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6d, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6f, 0x72,
|
||||
0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, 0x90, 0x01, 0x0a,
|
||||
0x10, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72,
|
||||
0x74, 0x12, 0x2e, 0x0a, 0x03, 0x6b, 0x6d, 0x41, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c,
|
||||
0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x69, 0x6c,
|
||||
0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x03, 0x6b, 0x6d,
|
||||
0x41, 0x12, 0x2e, 0x0a, 0x03, 0x6b, 0x6d, 0x42, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c,
|
||||
0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x69, 0x6c,
|
||||
0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x03, 0x6b, 0x6d,
|
||||
0x42, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x61, 0x6d, 0x65, 0x54, 0x72, 0x65, 0x6e, 0x64, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, 0x61, 0x6d, 0x65, 0x54, 0x72, 0x65, 0x6e, 0x64, 0x22,
|
||||
0xbd, 0x01, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6c, 0x61, 0x74,
|
||||
0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x4e, 0x0a, 0x10, 0x63,
|
||||
0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18,
|
||||
0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44,
|
||||
0x61, 0x74, 0x61, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x74, 0x79, 0x70, 0x65, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x62, 0x69,
|
||||
0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x0a, 0x64,
|
||||
0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32,
|
||||
0x22, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65,
|
||||
0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54,
|
||||
0x79, 0x70, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22,
|
||||
0x4b, 0x0a, 0x15, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x0a, 0x0a,
|
||||
0x72, 0x65, 0x66, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09,
|
||||
0x52, 0x0a, 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2a, 0x20, 0x0a, 0x09,
|
||||
0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x45, 0x46,
|
||||
0x54, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x49, 0x47, 0x48, 0x54, 0x10, 0x01, 0x42, 0x5d,
|
||||
0x0a, 0x25, 0x63, 0x6c, 0x75, 0x62, 0x2e, 0x6a, 0x6f, 0x79, 0x6c, 0x69, 0x6e, 0x6b, 0x2e, 0x62,
|
||||
0x6a, 0x72, 0x74, 0x73, 0x73, 0x2e, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x42, 0x13, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x47,
|
||||
0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x1f, 0x2e, 0x2f,
|
||||
0x61, 0x74, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x73, 0x2f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x62, 0x06, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67,
|
||||
0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68,
|
||||
0x12, 0x39, 0x0a, 0x0b, 0x61, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44,
|
||||
0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x0b,
|
||||
0x61, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x12, 0x39, 0x0a, 0x0b, 0x62,
|
||||
0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52,
|
||||
0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x52, 0x0b, 0x62, 0x52, 0x65, 0x6c, 0x61,
|
||||
0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x12, 0x53, 0x0a, 0x0f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65,
|
||||
0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||
0x29, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x61,
|
||||
0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x2e, 0x44, 0x65, 0x76, 0x69,
|
||||
0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x64, 0x65, 0x76, 0x69,
|
||||
0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69,
|
||||
0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65,
|
||||
0x78, 0x1a, 0x64, 0x0a, 0x0e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64,
|
||||
0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64,
|
||||
0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63,
|
||||
0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x76,
|
||||
0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x79, 0x0a, 0x17, 0x55, 0x6e, 0x69, 0x71, 0x75,
|
||||
0x65, 0x49, 0x64, 0x4f, 0x66, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x61, 0x79, 0x6f,
|
||||
0x75, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x32,
|
||||
0x0a, 0x14, 0x6d, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65,
|
||||
0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6d, 0x61,
|
||||
0x69, 0x6e, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x53, 0x79, 0x73, 0x74,
|
||||
0x65, 0x6d, 0x22, 0x90, 0x01, 0x0a, 0x10, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72,
|
||||
0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x12, 0x2e, 0x0a, 0x03, 0x6b, 0x6d, 0x41, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61,
|
||||
0x74, 0x61, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74,
|
||||
0x65, 0x6d, 0x52, 0x03, 0x6b, 0x6d, 0x41, 0x12, 0x2e, 0x0a, 0x03, 0x6b, 0x6d, 0x42, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61,
|
||||
0x74, 0x61, 0x2e, 0x4b, 0x69, 0x6c, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x79, 0x73, 0x74,
|
||||
0x65, 0x6d, 0x52, 0x03, 0x6b, 0x6d, 0x42, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x61, 0x6d, 0x65, 0x54,
|
||||
0x72, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, 0x61, 0x6d, 0x65,
|
||||
0x54, 0x72, 0x65, 0x6e, 0x64, 0x22, 0xbd, 0x01, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a,
|
||||
0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64,
|
||||
0x65, 0x12, 0x4e, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x72,
|
||||
0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
|
||||
0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x74, 0x79, 0x70, 0x65, 0x52,
|
||||
0x10, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x74, 0x79, 0x70, 0x65,
|
||||
0x73, 0x12, 0x42, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44,
|
||||
0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x66, 0x2e, 0x44,
|
||||
0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63,
|
||||
0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x4b, 0x0a, 0x15, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x43,
|
||||
0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f,
|
||||
0x64, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73,
|
||||
0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x66, 0x44, 0x65, 0x76, 0x69, 0x63,
|
||||
0x65, 0x73, 0x2a, 0x20, 0x0a, 0x09, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12,
|
||||
0x08, 0x0a, 0x04, 0x4c, 0x45, 0x46, 0x54, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x49, 0x47,
|
||||
0x48, 0x54, 0x10, 0x01, 0x42, 0x5d, 0x0a, 0x25, 0x63, 0x6c, 0x75, 0x62, 0x2e, 0x6a, 0x6f, 0x79,
|
||||
0x6c, 0x69, 0x6e, 0x6b, 0x2e, 0x62, 0x6a, 0x72, 0x74, 0x73, 0x73, 0x2e, 0x61, 0x74, 0x73, 0x2e,
|
||||
0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x42, 0x13, 0x4c,
|
||||
0x61, 0x79, 0x6f, 0x75, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x50, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x5a, 0x1f, 0x2e, 0x2f, 0x61, 0x74, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79,
|
||||
0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44,
|
||||
0x61, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v4.23.1
|
||||
// source: device_state.proto
|
||||
|
||||
|
@ -31,14 +31,12 @@ func CreateSimulation(projectId int32, mapIds []int32) (string, error) {
|
||||
simulationId := createSimulationId(projectId)
|
||||
_, e := simulationMap.Load(simulationId)
|
||||
if !e && IsExistSimulation() {
|
||||
// panic(dto.ErrorDto{Code: dto.DataAlreadyExist, Message: "已有仿真在运行"})
|
||||
return "", sys_error.New("一套环境同时只能运行一个仿真")
|
||||
}
|
||||
if !e {
|
||||
verifySimulation, err := memory.CreateSimulation(projectId, mapIds)
|
||||
if err != nil {
|
||||
return "", err
|
||||
// panic(fmt.Sprintf("创建仿真失败:%s", err.Error()))
|
||||
}
|
||||
verifySimulation.SimulationId = simulationId
|
||||
if config.Config.Dynamics.Open {
|
||||
@ -47,7 +45,6 @@ func CreateSimulation(projectId int32, mapIds []int32) (string, error) {
|
||||
err := dynamics.Default().RequestStartSimulation(lineBaseInfo)
|
||||
if err != nil {
|
||||
return "", err
|
||||
// panic(dto.ErrorDto{Code: dto.DynamicsError, Message: err.Error()})
|
||||
}
|
||||
dynamics.Default().Start(verifySimulation)
|
||||
}
|
||||
|
@ -0,0 +1,56 @@
|
||||
package memory
|
||||
|
||||
import (
|
||||
"joylink.club/bj-rtsts-server/ats/verify/protos/graphicData"
|
||||
"joylink.club/bj-rtsts-server/ats/verify/protos/state"
|
||||
"joylink.club/bj-rtsts-server/dto"
|
||||
"joylink.club/bj-rtsts-server/dto/request_proto"
|
||||
"joylink.club/ecs"
|
||||
"joylink.club/rtsssimulation/component"
|
||||
"joylink.club/rtsssimulation/entity"
|
||||
"joylink.club/rtsssimulation/fi"
|
||||
"log/slog"
|
||||
)
|
||||
|
||||
func GetMapAllSectionState(sim *VerifySimulation, mapId int32) []*state.SectionState {
|
||||
uidMap := QueryMapUidMapByType(mapId, &graphicData.Section{})
|
||||
var sectionArr []*state.SectionState
|
||||
for _, u := range uidMap {
|
||||
s := handlerSectionState(sim.World, u.Uid)
|
||||
if s == nil {
|
||||
continue
|
||||
}
|
||||
s.Id = u.CommonId
|
||||
sectionArr = append(sectionArr, s)
|
||||
}
|
||||
return sectionArr
|
||||
}
|
||||
func handlerSectionState(w ecs.World, uid string) *state.SectionState {
|
||||
entry, ok := entity.GetEntityByUid(w, uid)
|
||||
if !ok {
|
||||
//fmt.Printf("id=%s的信号机不存在", uid)
|
||||
return nil
|
||||
}
|
||||
if entry.HasComponent(component.AxleSectionTag) { //计轴区段
|
||||
sectionState := &state.SectionState{}
|
||||
axleState := component.AxleSectionStateType.Get(entry)
|
||||
sectionState.Occupied = axleState.Occ
|
||||
sectionState.Type = state.SectionType_Axle
|
||||
return sectionState
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func ChangeAxleSectionState(simulation *VerifySimulation, req *dto.AxleSectionOperationReqDto) {
|
||||
sectionUid := QueryUidByMidAndComId(req.MapId, req.DeviceId, &graphicData.Section{})
|
||||
slog.Debug("操作计轴区段", "axleSectionUid", sectionUid)
|
||||
switch req.Operation {
|
||||
case request_proto.Section_Drst:
|
||||
fi.DriveAxleSectionDrst(simulation.World, sectionUid, req.Reset)
|
||||
case request_proto.Section_Pdrst:
|
||||
fi.DriveAxleSectionPdrst(simulation.World, sectionUid, req.Reset)
|
||||
case request_proto.Section_TrainIn:
|
||||
fi.DriveAxleSectionTrainIn(simulation.World, sectionUid)
|
||||
case request_proto.Section_TrainOut:
|
||||
fi.DriveAxleSectionTrainOut(simulation.World, sectionUid)
|
||||
}
|
||||
}
|
@ -11,9 +11,6 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"joylink.club/rtsssimulation/component"
|
||||
"joylink.club/rtsssimulation/entity"
|
||||
|
||||
rtss_simulation "joylink.club/rtsssimulation"
|
||||
|
||||
"joylink.club/bj-rtsts-server/ats/verify/protos/graphicData"
|
||||
@ -24,6 +21,7 @@ import (
|
||||
"joylink.club/bj-rtsts-server/third_party/message"
|
||||
"joylink.club/bj-rtsts-server/third_party/semi_physical_train"
|
||||
"joylink.club/ecs"
|
||||
"joylink.club/rtsssimulation/fi"
|
||||
"joylink.club/rtsssimulation/repository"
|
||||
"joylink.club/rtsssimulation/repository/model/proto"
|
||||
)
|
||||
@ -152,6 +150,7 @@ func (s *VerifySimulation) GetAllState(mapId int32) *state.PushedDevicesStatus {
|
||||
SignalState: GetMapAllSignalState(s, mapId),
|
||||
ButtonState: GetMapAllStationButtonState(s, mapId),
|
||||
PsdState: GetMapAllPsdState(s, mapId),
|
||||
SectionState: GetMapAllSectionState(s, mapId),
|
||||
},
|
||||
}
|
||||
case graphicData.PictureType_RelayCabinetLayout:
|
||||
@ -167,33 +166,34 @@ func (s *VerifySimulation) GetAllState(mapId int32) *state.PushedDevicesStatus {
|
||||
|
||||
// 获取门控箱状态
|
||||
func (s *VerifySimulation) GetAllPSLState(mapId int32, boxId string) *state.PushedDevicesStatus {
|
||||
world := s.GetSimulationWorld()
|
||||
uidStructure := queryUidStructure[*stationUidStructure](mapId)
|
||||
boxUid := uidStructure.GateBoxIds[boxId].Uid
|
||||
mkxEntry, ok := entity.GetEntityByUid(world, boxUid)
|
||||
var buttonStateArr []*state.ButtonState
|
||||
if ok {
|
||||
mkxCircuit := component.MkxCircuitType.Get(mkxEntry)
|
||||
var boxArr []*ecs.Entry
|
||||
boxArr = append(boxArr, mkxCircuit.PcbList...)
|
||||
boxArr = append(boxArr, mkxCircuit.PobList...)
|
||||
boxArr = append(boxArr, mkxCircuit.PabList...)
|
||||
for _, mkxBoxEntry := range boxArr {
|
||||
mkxBox := component.MkxBoxType.Get(mkxBoxEntry)
|
||||
uid := component.UidType.Get(mkxBox.Btn).Id
|
||||
down := component.BitStateType.Get(mkxBox.Btn).Val
|
||||
buttonStateArr = append(buttonStateArr, &state.ButtonState{
|
||||
Id: uid,
|
||||
Down: down,
|
||||
})
|
||||
}
|
||||
}
|
||||
return &state.PushedDevicesStatus{
|
||||
All: true,
|
||||
AllStatus: &state.AllDevicesStatus{
|
||||
ButtonState: buttonStateArr,
|
||||
},
|
||||
}
|
||||
//world := s.GetSimulationWorld()
|
||||
//uidStructure := queryUidStructure[*stationUidStructure](mapId)
|
||||
//boxUid := uidStructure.GateBoxIds[boxId].Uid
|
||||
//mkxEntry, ok := entity.GetEntityByUid(world, boxUid)
|
||||
//var buttonStateArr []*state.ButtonState
|
||||
//if ok {
|
||||
// mkxCircuit := component.MkxCircuitType.Get(mkxEntry)
|
||||
// var boxArr []*ecs.Entry
|
||||
// boxArr = append(boxArr, mkxCircuit.PcbList...)
|
||||
// boxArr = append(boxArr, mkxCircuit.PobList...)
|
||||
// boxArr = append(boxArr, mkxCircuit.PabList...)
|
||||
// for _, mkxBoxEntry := range boxArr {
|
||||
// mkxBox := component.MkxBoxType.Get(mkxBoxEntry)
|
||||
// uid := component.UidType.Get(mkxBox.Btn).Id
|
||||
// down := component.BitStateType.Get(mkxBox.Btn).Val
|
||||
// buttonStateArr = append(buttonStateArr, &state.ButtonState{
|
||||
// Id: uid,
|
||||
// Down: down,
|
||||
// })
|
||||
// }
|
||||
//}
|
||||
//return &state.PushedDevicesStatus{
|
||||
// All: true,
|
||||
// AllStatus: &state.AllDevicesStatus{
|
||||
// ButtonState: buttonStateArr,
|
||||
// },
|
||||
//}
|
||||
return nil
|
||||
}
|
||||
|
||||
// 获取车站IBP状态
|
||||
@ -390,6 +390,33 @@ func (s *VerifySimulation) HandleSemiPhysicalTrainControlMsg(b []byte) {
|
||||
})
|
||||
}
|
||||
|
||||
// 处理接到的联锁消息
|
||||
func (s *VerifySimulation) HandleDriverInfo(b []byte) {
|
||||
driverMsg := message.NewInterlockReceiveMsgPkg(0, 128, 8*131)
|
||||
driverMsg.Decode(b)
|
||||
driveState := driverMsg.DriveInfo
|
||||
for x, lenght := 0, len(driveState); x < lenght/32; x++ {
|
||||
for y := 0; y < 32; y++ {
|
||||
fi.DriveCircuitStateChange(s.World, x, y, driveState[x*32+y])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 采集联锁中的继电器消息
|
||||
func (s *VerifySimulation) CollectRelayInfo() *message.InterlockSendMsgPkg {
|
||||
msg := &message.InterlockSendMsgPkg{}
|
||||
relayArr := make([]string, 256)
|
||||
for index, id := range relayArr {
|
||||
if index%2 == 0 {
|
||||
msg.Info = append(msg.Info, fi.CollectXQCircuitState(s.World, id))
|
||||
} else {
|
||||
msg.Info = append(msg.Info, fi.CollectLXCircuitState(s.World, id))
|
||||
|
||||
}
|
||||
}
|
||||
return msg
|
||||
}
|
||||
|
||||
func buildProtoRepository(mapIds []int32) (*proto.Repository, error) {
|
||||
repo := &proto.Repository{}
|
||||
var exceptStationGiMapIds []int32
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 9b1c6d78012eff4f9d300412ad41c8175751767d
|
||||
Subproject commit 6827f9671a619b95d80dac699463bbcd9ed0cb15
|
@ -18,6 +18,12 @@ vobc:
|
||||
localPort: 10000
|
||||
remotePort: 4000
|
||||
open: true
|
||||
# interlock
|
||||
interlock:
|
||||
ip: 10.60.1.59
|
||||
localPort: 10000
|
||||
remotePort: 4000
|
||||
open: true
|
||||
|
||||
# 数据源
|
||||
datasource:
|
||||
|
@ -20,6 +20,7 @@ type AppConfig struct {
|
||||
Messaging messaging
|
||||
Dynamics dynamics
|
||||
Vobc vobc
|
||||
Interlock interlock
|
||||
}
|
||||
type server struct {
|
||||
Port int
|
||||
@ -63,6 +64,13 @@ type vobc struct {
|
||||
Open bool
|
||||
}
|
||||
|
||||
type interlock struct {
|
||||
Ip string
|
||||
LocalPort int
|
||||
RemotePort int
|
||||
Open bool
|
||||
}
|
||||
|
||||
var Config AppConfig
|
||||
|
||||
var SimulationId_prefix = (func() string {
|
||||
|
@ -18,6 +18,13 @@ vobc:
|
||||
localPort: 10000
|
||||
remotePort: 4000
|
||||
open: false
|
||||
# interlock
|
||||
interlock:
|
||||
ip: 10.60.1.59
|
||||
localPort: 10000
|
||||
remotePort: 4000
|
||||
open: false
|
||||
|
||||
|
||||
# 数据源
|
||||
datasource:
|
||||
|
@ -18,6 +18,12 @@ vobc:
|
||||
localPort: 10000
|
||||
remotePort: 4000
|
||||
open: true
|
||||
# interlock
|
||||
interlock:
|
||||
ip: 10.60.1.59
|
||||
localPort: 10000
|
||||
remotePort: 4000
|
||||
open: true
|
||||
|
||||
# 数据源
|
||||
datasource:
|
||||
|
@ -25,6 +25,7 @@ var (
|
||||
Drafting *drafting
|
||||
Project *project
|
||||
ProjectPublishLink *projectPublishLink
|
||||
ProjectRunConfig *projectRunConfig
|
||||
ProjectTrainSizeLink *projectTrainSizeLink
|
||||
PublishedGi *publishedGi
|
||||
TrainModel *trainModel
|
||||
@ -43,6 +44,7 @@ func SetDefault(db *gorm.DB, opts ...gen.DOOption) {
|
||||
Drafting = &Q.Drafting
|
||||
Project = &Q.Project
|
||||
ProjectPublishLink = &Q.ProjectPublishLink
|
||||
ProjectRunConfig = &Q.ProjectRunConfig
|
||||
ProjectTrainSizeLink = &Q.ProjectTrainSizeLink
|
||||
PublishedGi = &Q.PublishedGi
|
||||
TrainModel = &Q.TrainModel
|
||||
@ -62,6 +64,7 @@ func Use(db *gorm.DB, opts ...gen.DOOption) *Query {
|
||||
Drafting: newDrafting(db, opts...),
|
||||
Project: newProject(db, opts...),
|
||||
ProjectPublishLink: newProjectPublishLink(db, opts...),
|
||||
ProjectRunConfig: newProjectRunConfig(db, opts...),
|
||||
ProjectTrainSizeLink: newProjectTrainSizeLink(db, opts...),
|
||||
PublishedGi: newPublishedGi(db, opts...),
|
||||
TrainModel: newTrainModel(db, opts...),
|
||||
@ -82,6 +85,7 @@ type Query struct {
|
||||
Drafting drafting
|
||||
Project project
|
||||
ProjectPublishLink projectPublishLink
|
||||
ProjectRunConfig projectRunConfig
|
||||
ProjectTrainSizeLink projectTrainSizeLink
|
||||
PublishedGi publishedGi
|
||||
TrainModel trainModel
|
||||
@ -103,6 +107,7 @@ func (q *Query) clone(db *gorm.DB) *Query {
|
||||
Drafting: q.Drafting.clone(db),
|
||||
Project: q.Project.clone(db),
|
||||
ProjectPublishLink: q.ProjectPublishLink.clone(db),
|
||||
ProjectRunConfig: q.ProjectRunConfig.clone(db),
|
||||
ProjectTrainSizeLink: q.ProjectTrainSizeLink.clone(db),
|
||||
PublishedGi: q.PublishedGi.clone(db),
|
||||
TrainModel: q.TrainModel.clone(db),
|
||||
@ -131,6 +136,7 @@ func (q *Query) ReplaceDB(db *gorm.DB) *Query {
|
||||
Drafting: q.Drafting.replaceDB(db),
|
||||
Project: q.Project.replaceDB(db),
|
||||
ProjectPublishLink: q.ProjectPublishLink.replaceDB(db),
|
||||
ProjectRunConfig: q.ProjectRunConfig.replaceDB(db),
|
||||
ProjectTrainSizeLink: q.ProjectTrainSizeLink.replaceDB(db),
|
||||
PublishedGi: q.PublishedGi.replaceDB(db),
|
||||
TrainModel: q.TrainModel.replaceDB(db),
|
||||
@ -149,6 +155,7 @@ type queryCtx struct {
|
||||
Drafting IDraftingDo
|
||||
Project IProjectDo
|
||||
ProjectPublishLink IProjectPublishLinkDo
|
||||
ProjectRunConfig IProjectRunConfigDo
|
||||
ProjectTrainSizeLink IProjectTrainSizeLinkDo
|
||||
PublishedGi IPublishedGiDo
|
||||
TrainModel ITrainModelDo
|
||||
@ -167,6 +174,7 @@ func (q *Query) WithContext(ctx context.Context) *queryCtx {
|
||||
Drafting: q.Drafting.WithContext(ctx),
|
||||
Project: q.Project.WithContext(ctx),
|
||||
ProjectPublishLink: q.ProjectPublishLink.WithContext(ctx),
|
||||
ProjectRunConfig: q.ProjectRunConfig.WithContext(ctx),
|
||||
ProjectTrainSizeLink: q.ProjectTrainSizeLink.WithContext(ctx),
|
||||
PublishedGi: q.PublishedGi.WithContext(ctx),
|
||||
TrainModel: q.TrainModel.WithContext(ctx),
|
||||
|
400
db/dbquery/project_run_config.gen.go
Normal file
400
db/dbquery/project_run_config.gen.go
Normal file
@ -0,0 +1,400 @@
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
|
||||
package dbquery
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gorm.io/gorm"
|
||||
"gorm.io/gorm/clause"
|
||||
"gorm.io/gorm/schema"
|
||||
|
||||
"gorm.io/gen"
|
||||
"gorm.io/gen/field"
|
||||
|
||||
"gorm.io/plugin/dbresolver"
|
||||
|
||||
"joylink.club/bj-rtsts-server/db/model"
|
||||
)
|
||||
|
||||
func newProjectRunConfig(db *gorm.DB, opts ...gen.DOOption) projectRunConfig {
|
||||
_projectRunConfig := projectRunConfig{}
|
||||
|
||||
_projectRunConfig.projectRunConfigDo.UseDB(db, opts...)
|
||||
_projectRunConfig.projectRunConfigDo.UseModel(&model.ProjectRunConfig{})
|
||||
|
||||
tableName := _projectRunConfig.projectRunConfigDo.TableName()
|
||||
_projectRunConfig.ALL = field.NewAsterisk(tableName)
|
||||
_projectRunConfig.ID = field.NewInt32(tableName, "id")
|
||||
_projectRunConfig.Name = field.NewString(tableName, "name")
|
||||
_projectRunConfig.Description = field.NewString(tableName, "description")
|
||||
_projectRunConfig.ConfigContent = field.NewString(tableName, "config_content")
|
||||
_projectRunConfig.CreateTime = field.NewTime(tableName, "create_time")
|
||||
_projectRunConfig.UpdateTime = field.NewTime(tableName, "update_time")
|
||||
|
||||
_projectRunConfig.fillFieldMap()
|
||||
|
||||
return _projectRunConfig
|
||||
}
|
||||
|
||||
type projectRunConfig struct {
|
||||
projectRunConfigDo
|
||||
|
||||
ALL field.Asterisk
|
||||
ID field.Int32
|
||||
Name field.String // 测试环境名称
|
||||
Description field.String // 环境描述
|
||||
ConfigContent field.String // 环境配置信息
|
||||
CreateTime field.Time // 创建时间
|
||||
UpdateTime field.Time // 更新时间
|
||||
|
||||
fieldMap map[string]field.Expr
|
||||
}
|
||||
|
||||
func (p projectRunConfig) Table(newTableName string) *projectRunConfig {
|
||||
p.projectRunConfigDo.UseTable(newTableName)
|
||||
return p.updateTableName(newTableName)
|
||||
}
|
||||
|
||||
func (p projectRunConfig) As(alias string) *projectRunConfig {
|
||||
p.projectRunConfigDo.DO = *(p.projectRunConfigDo.As(alias).(*gen.DO))
|
||||
return p.updateTableName(alias)
|
||||
}
|
||||
|
||||
func (p *projectRunConfig) updateTableName(table string) *projectRunConfig {
|
||||
p.ALL = field.NewAsterisk(table)
|
||||
p.ID = field.NewInt32(table, "id")
|
||||
p.Name = field.NewString(table, "name")
|
||||
p.Description = field.NewString(table, "description")
|
||||
p.ConfigContent = field.NewString(table, "config_content")
|
||||
p.CreateTime = field.NewTime(table, "create_time")
|
||||
p.UpdateTime = field.NewTime(table, "update_time")
|
||||
|
||||
p.fillFieldMap()
|
||||
|
||||
return p
|
||||
}
|
||||
|
||||
func (p *projectRunConfig) GetFieldByName(fieldName string) (field.OrderExpr, bool) {
|
||||
_f, ok := p.fieldMap[fieldName]
|
||||
if !ok || _f == nil {
|
||||
return nil, false
|
||||
}
|
||||
_oe, ok := _f.(field.OrderExpr)
|
||||
return _oe, ok
|
||||
}
|
||||
|
||||
func (p *projectRunConfig) fillFieldMap() {
|
||||
p.fieldMap = make(map[string]field.Expr, 6)
|
||||
p.fieldMap["id"] = p.ID
|
||||
p.fieldMap["name"] = p.Name
|
||||
p.fieldMap["description"] = p.Description
|
||||
p.fieldMap["config_content"] = p.ConfigContent
|
||||
p.fieldMap["create_time"] = p.CreateTime
|
||||
p.fieldMap["update_time"] = p.UpdateTime
|
||||
}
|
||||
|
||||
func (p projectRunConfig) clone(db *gorm.DB) projectRunConfig {
|
||||
p.projectRunConfigDo.ReplaceConnPool(db.Statement.ConnPool)
|
||||
return p
|
||||
}
|
||||
|
||||
func (p projectRunConfig) replaceDB(db *gorm.DB) projectRunConfig {
|
||||
p.projectRunConfigDo.ReplaceDB(db)
|
||||
return p
|
||||
}
|
||||
|
||||
type projectRunConfigDo struct{ gen.DO }
|
||||
|
||||
type IProjectRunConfigDo interface {
|
||||
gen.SubQuery
|
||||
Debug() IProjectRunConfigDo
|
||||
WithContext(ctx context.Context) IProjectRunConfigDo
|
||||
WithResult(fc func(tx gen.Dao)) gen.ResultInfo
|
||||
ReplaceDB(db *gorm.DB)
|
||||
ReadDB() IProjectRunConfigDo
|
||||
WriteDB() IProjectRunConfigDo
|
||||
As(alias string) gen.Dao
|
||||
Session(config *gorm.Session) IProjectRunConfigDo
|
||||
Columns(cols ...field.Expr) gen.Columns
|
||||
Clauses(conds ...clause.Expression) IProjectRunConfigDo
|
||||
Not(conds ...gen.Condition) IProjectRunConfigDo
|
||||
Or(conds ...gen.Condition) IProjectRunConfigDo
|
||||
Select(conds ...field.Expr) IProjectRunConfigDo
|
||||
Where(conds ...gen.Condition) IProjectRunConfigDo
|
||||
Order(conds ...field.Expr) IProjectRunConfigDo
|
||||
Distinct(cols ...field.Expr) IProjectRunConfigDo
|
||||
Omit(cols ...field.Expr) IProjectRunConfigDo
|
||||
Join(table schema.Tabler, on ...field.Expr) IProjectRunConfigDo
|
||||
LeftJoin(table schema.Tabler, on ...field.Expr) IProjectRunConfigDo
|
||||
RightJoin(table schema.Tabler, on ...field.Expr) IProjectRunConfigDo
|
||||
Group(cols ...field.Expr) IProjectRunConfigDo
|
||||
Having(conds ...gen.Condition) IProjectRunConfigDo
|
||||
Limit(limit int) IProjectRunConfigDo
|
||||
Offset(offset int) IProjectRunConfigDo
|
||||
Count() (count int64, err error)
|
||||
Scopes(funcs ...func(gen.Dao) gen.Dao) IProjectRunConfigDo
|
||||
Unscoped() IProjectRunConfigDo
|
||||
Create(values ...*model.ProjectRunConfig) error
|
||||
CreateInBatches(values []*model.ProjectRunConfig, batchSize int) error
|
||||
Save(values ...*model.ProjectRunConfig) error
|
||||
First() (*model.ProjectRunConfig, error)
|
||||
Take() (*model.ProjectRunConfig, error)
|
||||
Last() (*model.ProjectRunConfig, error)
|
||||
Find() ([]*model.ProjectRunConfig, error)
|
||||
FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.ProjectRunConfig, err error)
|
||||
FindInBatches(result *[]*model.ProjectRunConfig, batchSize int, fc func(tx gen.Dao, batch int) error) error
|
||||
Pluck(column field.Expr, dest interface{}) error
|
||||
Delete(...*model.ProjectRunConfig) (info gen.ResultInfo, err error)
|
||||
Update(column field.Expr, value interface{}) (info gen.ResultInfo, err error)
|
||||
UpdateSimple(columns ...field.AssignExpr) (info gen.ResultInfo, err error)
|
||||
Updates(value interface{}) (info gen.ResultInfo, err error)
|
||||
UpdateColumn(column field.Expr, value interface{}) (info gen.ResultInfo, err error)
|
||||
UpdateColumnSimple(columns ...field.AssignExpr) (info gen.ResultInfo, err error)
|
||||
UpdateColumns(value interface{}) (info gen.ResultInfo, err error)
|
||||
UpdateFrom(q gen.SubQuery) gen.Dao
|
||||
Attrs(attrs ...field.AssignExpr) IProjectRunConfigDo
|
||||
Assign(attrs ...field.AssignExpr) IProjectRunConfigDo
|
||||
Joins(fields ...field.RelationField) IProjectRunConfigDo
|
||||
Preload(fields ...field.RelationField) IProjectRunConfigDo
|
||||
FirstOrInit() (*model.ProjectRunConfig, error)
|
||||
FirstOrCreate() (*model.ProjectRunConfig, error)
|
||||
FindByPage(offset int, limit int) (result []*model.ProjectRunConfig, count int64, err error)
|
||||
ScanByPage(result interface{}, offset int, limit int) (count int64, err error)
|
||||
Scan(result interface{}) (err error)
|
||||
Returning(value interface{}, columns ...string) IProjectRunConfigDo
|
||||
UnderlyingDB() *gorm.DB
|
||||
schema.Tabler
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) Debug() IProjectRunConfigDo {
|
||||
return p.withDO(p.DO.Debug())
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) WithContext(ctx context.Context) IProjectRunConfigDo {
|
||||
return p.withDO(p.DO.WithContext(ctx))
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) ReadDB() IProjectRunConfigDo {
|
||||
return p.Clauses(dbresolver.Read)
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) WriteDB() IProjectRunConfigDo {
|
||||
return p.Clauses(dbresolver.Write)
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) Session(config *gorm.Session) IProjectRunConfigDo {
|
||||
return p.withDO(p.DO.Session(config))
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) Clauses(conds ...clause.Expression) IProjectRunConfigDo {
|
||||
return p.withDO(p.DO.Clauses(conds...))
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) Returning(value interface{}, columns ...string) IProjectRunConfigDo {
|
||||
return p.withDO(p.DO.Returning(value, columns...))
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) Not(conds ...gen.Condition) IProjectRunConfigDo {
|
||||
return p.withDO(p.DO.Not(conds...))
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) Or(conds ...gen.Condition) IProjectRunConfigDo {
|
||||
return p.withDO(p.DO.Or(conds...))
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) Select(conds ...field.Expr) IProjectRunConfigDo {
|
||||
return p.withDO(p.DO.Select(conds...))
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) Where(conds ...gen.Condition) IProjectRunConfigDo {
|
||||
return p.withDO(p.DO.Where(conds...))
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) Order(conds ...field.Expr) IProjectRunConfigDo {
|
||||
return p.withDO(p.DO.Order(conds...))
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) Distinct(cols ...field.Expr) IProjectRunConfigDo {
|
||||
return p.withDO(p.DO.Distinct(cols...))
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) Omit(cols ...field.Expr) IProjectRunConfigDo {
|
||||
return p.withDO(p.DO.Omit(cols...))
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) Join(table schema.Tabler, on ...field.Expr) IProjectRunConfigDo {
|
||||
return p.withDO(p.DO.Join(table, on...))
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) LeftJoin(table schema.Tabler, on ...field.Expr) IProjectRunConfigDo {
|
||||
return p.withDO(p.DO.LeftJoin(table, on...))
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) RightJoin(table schema.Tabler, on ...field.Expr) IProjectRunConfigDo {
|
||||
return p.withDO(p.DO.RightJoin(table, on...))
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) Group(cols ...field.Expr) IProjectRunConfigDo {
|
||||
return p.withDO(p.DO.Group(cols...))
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) Having(conds ...gen.Condition) IProjectRunConfigDo {
|
||||
return p.withDO(p.DO.Having(conds...))
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) Limit(limit int) IProjectRunConfigDo {
|
||||
return p.withDO(p.DO.Limit(limit))
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) Offset(offset int) IProjectRunConfigDo {
|
||||
return p.withDO(p.DO.Offset(offset))
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) Scopes(funcs ...func(gen.Dao) gen.Dao) IProjectRunConfigDo {
|
||||
return p.withDO(p.DO.Scopes(funcs...))
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) Unscoped() IProjectRunConfigDo {
|
||||
return p.withDO(p.DO.Unscoped())
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) Create(values ...*model.ProjectRunConfig) error {
|
||||
if len(values) == 0 {
|
||||
return nil
|
||||
}
|
||||
return p.DO.Create(values)
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) CreateInBatches(values []*model.ProjectRunConfig, batchSize int) error {
|
||||
return p.DO.CreateInBatches(values, batchSize)
|
||||
}
|
||||
|
||||
// Save : !!! underlying implementation is different with GORM
|
||||
// The method is equivalent to executing the statement: db.Clauses(clause.OnConflict{UpdateAll: true}).Create(values)
|
||||
func (p projectRunConfigDo) Save(values ...*model.ProjectRunConfig) error {
|
||||
if len(values) == 0 {
|
||||
return nil
|
||||
}
|
||||
return p.DO.Save(values)
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) First() (*model.ProjectRunConfig, error) {
|
||||
if result, err := p.DO.First(); err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
return result.(*model.ProjectRunConfig), nil
|
||||
}
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) Take() (*model.ProjectRunConfig, error) {
|
||||
if result, err := p.DO.Take(); err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
return result.(*model.ProjectRunConfig), nil
|
||||
}
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) Last() (*model.ProjectRunConfig, error) {
|
||||
if result, err := p.DO.Last(); err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
return result.(*model.ProjectRunConfig), nil
|
||||
}
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) Find() ([]*model.ProjectRunConfig, error) {
|
||||
result, err := p.DO.Find()
|
||||
return result.([]*model.ProjectRunConfig), err
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.ProjectRunConfig, err error) {
|
||||
buf := make([]*model.ProjectRunConfig, 0, batchSize)
|
||||
err = p.DO.FindInBatches(&buf, batchSize, func(tx gen.Dao, batch int) error {
|
||||
defer func() { results = append(results, buf...) }()
|
||||
return fc(tx, batch)
|
||||
})
|
||||
return results, err
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) FindInBatches(result *[]*model.ProjectRunConfig, batchSize int, fc func(tx gen.Dao, batch int) error) error {
|
||||
return p.DO.FindInBatches(result, batchSize, fc)
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) Attrs(attrs ...field.AssignExpr) IProjectRunConfigDo {
|
||||
return p.withDO(p.DO.Attrs(attrs...))
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) Assign(attrs ...field.AssignExpr) IProjectRunConfigDo {
|
||||
return p.withDO(p.DO.Assign(attrs...))
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) Joins(fields ...field.RelationField) IProjectRunConfigDo {
|
||||
for _, _f := range fields {
|
||||
p = *p.withDO(p.DO.Joins(_f))
|
||||
}
|
||||
return &p
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) Preload(fields ...field.RelationField) IProjectRunConfigDo {
|
||||
for _, _f := range fields {
|
||||
p = *p.withDO(p.DO.Preload(_f))
|
||||
}
|
||||
return &p
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) FirstOrInit() (*model.ProjectRunConfig, error) {
|
||||
if result, err := p.DO.FirstOrInit(); err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
return result.(*model.ProjectRunConfig), nil
|
||||
}
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) FirstOrCreate() (*model.ProjectRunConfig, error) {
|
||||
if result, err := p.DO.FirstOrCreate(); err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
return result.(*model.ProjectRunConfig), nil
|
||||
}
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) FindByPage(offset int, limit int) (result []*model.ProjectRunConfig, count int64, err error) {
|
||||
result, err = p.Offset(offset).Limit(limit).Find()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
if size := len(result); 0 < limit && 0 < size && size < limit {
|
||||
count = int64(size + offset)
|
||||
return
|
||||
}
|
||||
|
||||
count, err = p.Offset(-1).Limit(-1).Count()
|
||||
return
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) ScanByPage(result interface{}, offset int, limit int) (count int64, err error) {
|
||||
count, err = p.Count()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
err = p.Offset(offset).Limit(limit).Scan(result)
|
||||
return
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) Scan(result interface{}) (err error) {
|
||||
return p.DO.Scan(result)
|
||||
}
|
||||
|
||||
func (p projectRunConfigDo) Delete(models ...*model.ProjectRunConfig) (result gen.ResultInfo, err error) {
|
||||
return p.DO.Delete(models)
|
||||
}
|
||||
|
||||
func (p *projectRunConfigDo) withDO(do gen.Dao) *projectRunConfigDo {
|
||||
p.DO = *do.(*gen.DO)
|
||||
return p
|
||||
}
|
26
db/model/project_run_config.gen.go
Normal file
26
db/model/project_run_config.gen.go
Normal file
@ -0,0 +1,26 @@
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
|
||||
package model
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
const TableNameProjectRunConfig = "project_run_config"
|
||||
|
||||
// ProjectRunConfig mapped from table <project_run_config>
|
||||
type ProjectRunConfig struct {
|
||||
ID int32 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
|
||||
Name string `gorm:"column:name;comment:测试环境名称" json:"name"` // 测试环境名称
|
||||
Description string `gorm:"column:description;comment:环境描述" json:"description"` // 环境描述
|
||||
ConfigContent string `gorm:"column:config_content;comment:环境配置信息" json:"config_content"` // 环境配置信息
|
||||
CreateTime time.Time `gorm:"column:create_time;comment:创建时间" json:"create_time"` // 创建时间
|
||||
UpdateTime time.Time `gorm:"column:update_time;comment:更新时间" json:"update_time"` // 更新时间
|
||||
}
|
||||
|
||||
// TableName ProjectRunConfig's table name
|
||||
func (*ProjectRunConfig) TableName() string {
|
||||
return TableNameProjectRunConfig
|
||||
}
|
472
docs/docs.go
472
docs/docs.go
@ -2736,6 +2736,356 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/runconfig": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"JwtAuth": []
|
||||
}
|
||||
],
|
||||
"description": "创建项目运行环境配置数据",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"项目运行环境配置Api"
|
||||
],
|
||||
"summary": "创建项目运行环境配置信息",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"name": "config",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "description",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "id",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "name",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK"
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/runconfig/list": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"JwtAuth": []
|
||||
}
|
||||
],
|
||||
"description": "无参数,查询项目运行环境配置列表",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"项目运行环境配置Api"
|
||||
],
|
||||
"summary": "查询项目运行环境配置信息列表",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ProjectRunConfigDto"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/runconfig/paging": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"JwtAuth": []
|
||||
}
|
||||
],
|
||||
"description": "可以通过项目名称过滤,分页查询项目运行环境配置信息",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"项目运行环境配置Api"
|
||||
],
|
||||
"summary": "分页查询项目运行环境配置信息",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"name": "name",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"example": 1,
|
||||
"description": "页码",
|
||||
"name": "current",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"example": 10,
|
||||
"description": "页面行数",
|
||||
"name": "size",
|
||||
"in": "query",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.PageDto"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/runconfig/{id}": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"JwtAuth": []
|
||||
}
|
||||
],
|
||||
"description": "查询项目运行环境信息",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"项目运行环境配置Api"
|
||||
],
|
||||
"summary": "查询项目运行环境信息",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "项目运行环境ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ProjectRunConfigDto"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"JwtAuth": []
|
||||
}
|
||||
],
|
||||
"description": "修改项目运行环境信息",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"项目运行环境配置Api"
|
||||
],
|
||||
"summary": "修改项目运行环境信息",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "项目运行环境信息ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "code",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "id",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "name",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK"
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
"JwtAuth": []
|
||||
}
|
||||
],
|
||||
"description": "删除项目运行环境信息",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"项目运行环境配置Api"
|
||||
],
|
||||
"summary": "删除项目运行环境信息",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "项目运行环境信息ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK"
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/simulation/:id/getMapKilometerRange": {
|
||||
"get": {
|
||||
"security": [
|
||||
@ -2779,6 +3129,58 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/simulation/axleSection/operation": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"JwtAuth": []
|
||||
}
|
||||
],
|
||||
"description": "ATS测试-计轴区段操作",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"ATS测试仿真Api"
|
||||
],
|
||||
"summary": "ATS测试-计轴区段操作",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "JWT Token",
|
||||
"name": "Authorization",
|
||||
"in": "header",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "ATS测试仿真-操作计轴区段",
|
||||
"name": "AxleSectionOperationReqDto",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.AxleSectionOperationReqDto"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/simulation/check/data": {
|
||||
"post": {
|
||||
"security": [
|
||||
@ -4878,6 +5280,32 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.AxleSectionOperationReqDto": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"mapId",
|
||||
"simulationId"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"mapId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"operation": {
|
||||
"$ref": "#/definitions/request_proto.Section_AxleOperation"
|
||||
},
|
||||
"reset": {
|
||||
"description": "当操作为直接复位或预复位时有效,true-复位,false-取消或结束复位",
|
||||
"type": "boolean"
|
||||
},
|
||||
"simulationId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.CheckMapDataReqDto": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@ -5079,6 +5507,29 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.ProjectRunConfigDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"config": {
|
||||
"type": "string"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"updateAt": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.PslOperationReqDto": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@ -5597,6 +6048,27 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"request_proto.Section_AxleOperation": {
|
||||
"type": "integer",
|
||||
"enum": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3
|
||||
],
|
||||
"x-enum-comments": {
|
||||
"Section_Drst": "设置计轴直接复位",
|
||||
"Section_Pdrst": "设置计轴预复位",
|
||||
"Section_TrainIn": "设置计轴区段内有车轴",
|
||||
"Section_TrainOut": "设置计轴区段内没有车轴"
|
||||
},
|
||||
"x-enum-varnames": [
|
||||
"Section_Drst",
|
||||
"Section_Pdrst",
|
||||
"Section_TrainIn",
|
||||
"Section_TrainOut"
|
||||
]
|
||||
},
|
||||
"request_proto.Signal_Operation": {
|
||||
"type": "integer",
|
||||
"enum": [
|
||||
|
@ -2729,6 +2729,356 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/runconfig": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"JwtAuth": []
|
||||
}
|
||||
],
|
||||
"description": "创建项目运行环境配置数据",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"项目运行环境配置Api"
|
||||
],
|
||||
"summary": "创建项目运行环境配置信息",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"name": "config",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "description",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "id",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "name",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK"
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/runconfig/list": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"JwtAuth": []
|
||||
}
|
||||
],
|
||||
"description": "无参数,查询项目运行环境配置列表",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"项目运行环境配置Api"
|
||||
],
|
||||
"summary": "查询项目运行环境配置信息列表",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ProjectRunConfigDto"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/runconfig/paging": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"JwtAuth": []
|
||||
}
|
||||
],
|
||||
"description": "可以通过项目名称过滤,分页查询项目运行环境配置信息",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"项目运行环境配置Api"
|
||||
],
|
||||
"summary": "分页查询项目运行环境配置信息",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"name": "name",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"example": 1,
|
||||
"description": "页码",
|
||||
"name": "current",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"example": 10,
|
||||
"description": "页面行数",
|
||||
"name": "size",
|
||||
"in": "query",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.PageDto"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/runconfig/{id}": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"JwtAuth": []
|
||||
}
|
||||
],
|
||||
"description": "查询项目运行环境信息",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"项目运行环境配置Api"
|
||||
],
|
||||
"summary": "查询项目运行环境信息",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "项目运行环境ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ProjectRunConfigDto"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"JwtAuth": []
|
||||
}
|
||||
],
|
||||
"description": "修改项目运行环境信息",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"项目运行环境配置Api"
|
||||
],
|
||||
"summary": "修改项目运行环境信息",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "项目运行环境信息ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "code",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "id",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "name",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK"
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
"JwtAuth": []
|
||||
}
|
||||
],
|
||||
"description": "删除项目运行环境信息",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"项目运行环境配置Api"
|
||||
],
|
||||
"summary": "删除项目运行环境信息",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "项目运行环境信息ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK"
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/simulation/:id/getMapKilometerRange": {
|
||||
"get": {
|
||||
"security": [
|
||||
@ -2772,6 +3122,58 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/simulation/axleSection/operation": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"JwtAuth": []
|
||||
}
|
||||
],
|
||||
"description": "ATS测试-计轴区段操作",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"ATS测试仿真Api"
|
||||
],
|
||||
"summary": "ATS测试-计轴区段操作",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "JWT Token",
|
||||
"name": "Authorization",
|
||||
"in": "header",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "ATS测试仿真-操作计轴区段",
|
||||
"name": "AxleSectionOperationReqDto",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.AxleSectionOperationReqDto"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ErrorDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/simulation/check/data": {
|
||||
"post": {
|
||||
"security": [
|
||||
@ -4871,6 +5273,32 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.AxleSectionOperationReqDto": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"mapId",
|
||||
"simulationId"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"mapId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"operation": {
|
||||
"$ref": "#/definitions/request_proto.Section_AxleOperation"
|
||||
},
|
||||
"reset": {
|
||||
"description": "当操作为直接复位或预复位时有效,true-复位,false-取消或结束复位",
|
||||
"type": "boolean"
|
||||
},
|
||||
"simulationId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.CheckMapDataReqDto": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@ -5072,6 +5500,29 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.ProjectRunConfigDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"config": {
|
||||
"type": "string"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"updateAt": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.PslOperationReqDto": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@ -5590,6 +6041,27 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"request_proto.Section_AxleOperation": {
|
||||
"type": "integer",
|
||||
"enum": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3
|
||||
],
|
||||
"x-enum-comments": {
|
||||
"Section_Drst": "设置计轴直接复位",
|
||||
"Section_Pdrst": "设置计轴预复位",
|
||||
"Section_TrainIn": "设置计轴区段内有车轴",
|
||||
"Section_TrainOut": "设置计轴区段内没有车轴"
|
||||
},
|
||||
"x-enum-varnames": [
|
||||
"Section_Drst",
|
||||
"Section_Pdrst",
|
||||
"Section_TrainIn",
|
||||
"Section_TrainOut"
|
||||
]
|
||||
},
|
||||
"request_proto.Signal_Operation": {
|
||||
"type": "integer",
|
||||
"enum": [
|
||||
|
@ -60,6 +60,24 @@ definitions:
|
||||
name:
|
||||
type: string
|
||||
type: object
|
||||
dto.AxleSectionOperationReqDto:
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
mapId:
|
||||
type: integer
|
||||
operation:
|
||||
$ref: '#/definitions/request_proto.Section_AxleOperation'
|
||||
reset:
|
||||
description: 当操作为直接复位或预复位时有效,true-复位,false-取消或结束复位
|
||||
type: boolean
|
||||
simulationId:
|
||||
type: string
|
||||
required:
|
||||
- id
|
||||
- mapId
|
||||
- simulationId
|
||||
type: object
|
||||
dto.CheckMapDataReqDto:
|
||||
properties:
|
||||
data:
|
||||
@ -197,6 +215,21 @@ definitions:
|
||||
$ref: '#/definitions/dto.TrainSizeDto'
|
||||
type: array
|
||||
type: object
|
||||
dto.ProjectRunConfigDto:
|
||||
properties:
|
||||
config:
|
||||
type: string
|
||||
createdAt:
|
||||
type: string
|
||||
description:
|
||||
type: string
|
||||
id:
|
||||
type: integer
|
||||
name:
|
||||
type: string
|
||||
updateAt:
|
||||
type: string
|
||||
type: object
|
||||
dto.PslOperationReqDto:
|
||||
properties:
|
||||
buttonCode:
|
||||
@ -559,6 +592,23 @@ definitions:
|
||||
description: 名称
|
||||
type: string
|
||||
type: object
|
||||
request_proto.Section_AxleOperation:
|
||||
enum:
|
||||
- 0
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
type: integer
|
||||
x-enum-comments:
|
||||
Section_Drst: 设置计轴直接复位
|
||||
Section_Pdrst: 设置计轴预复位
|
||||
Section_TrainIn: 设置计轴区段内有车轴
|
||||
Section_TrainOut: 设置计轴区段内没有车轴
|
||||
x-enum-varnames:
|
||||
- Section_Drst
|
||||
- Section_Pdrst
|
||||
- Section_TrainIn
|
||||
- Section_TrainOut
|
||||
request_proto.Signal_Operation:
|
||||
enum:
|
||||
- 0
|
||||
@ -2406,6 +2456,228 @@ paths:
|
||||
summary: 从发布数据拉取信息到草稿
|
||||
tags:
|
||||
- 发布的图形数据Api
|
||||
/api/v1/runconfig:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 创建项目运行环境配置数据
|
||||
parameters:
|
||||
- in: query
|
||||
name: config
|
||||
type: string
|
||||
- in: query
|
||||
name: description
|
||||
type: string
|
||||
- in: query
|
||||
name: id
|
||||
type: integer
|
||||
- in: query
|
||||
name: name
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
"401":
|
||||
description: Unauthorized
|
||||
schema:
|
||||
$ref: '#/definitions/dto.ErrorDto'
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/dto.ErrorDto'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/dto.ErrorDto'
|
||||
security:
|
||||
- JwtAuth: []
|
||||
summary: 创建项目运行环境配置信息
|
||||
tags:
|
||||
- 项目运行环境配置Api
|
||||
/api/v1/runconfig/{id}:
|
||||
delete:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 删除项目运行环境信息
|
||||
parameters:
|
||||
- description: 项目运行环境信息ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
"401":
|
||||
description: Unauthorized
|
||||
schema:
|
||||
$ref: '#/definitions/dto.ErrorDto'
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/dto.ErrorDto'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/dto.ErrorDto'
|
||||
security:
|
||||
- JwtAuth: []
|
||||
summary: 删除项目运行环境信息
|
||||
tags:
|
||||
- 项目运行环境配置Api
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 查询项目运行环境信息
|
||||
parameters:
|
||||
- description: 项目运行环境ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/dto.ProjectRunConfigDto'
|
||||
"401":
|
||||
description: Unauthorized
|
||||
schema:
|
||||
$ref: '#/definitions/dto.ErrorDto'
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/dto.ErrorDto'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/dto.ErrorDto'
|
||||
security:
|
||||
- JwtAuth: []
|
||||
summary: 查询项目运行环境信息
|
||||
tags:
|
||||
- 项目运行环境配置Api
|
||||
put:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 修改项目运行环境信息
|
||||
parameters:
|
||||
- description: 项目运行环境信息ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- in: query
|
||||
name: code
|
||||
type: string
|
||||
- in: query
|
||||
name: id
|
||||
type: integer
|
||||
- in: query
|
||||
name: name
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
"401":
|
||||
description: Unauthorized
|
||||
schema:
|
||||
$ref: '#/definitions/dto.ErrorDto'
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/dto.ErrorDto'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/dto.ErrorDto'
|
||||
security:
|
||||
- JwtAuth: []
|
||||
summary: 修改项目运行环境信息
|
||||
tags:
|
||||
- 项目运行环境配置Api
|
||||
/api/v1/runconfig/list:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 无参数,查询项目运行环境配置列表
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/dto.ProjectRunConfigDto'
|
||||
"401":
|
||||
description: Unauthorized
|
||||
schema:
|
||||
$ref: '#/definitions/dto.ErrorDto'
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/dto.ErrorDto'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/dto.ErrorDto'
|
||||
security:
|
||||
- JwtAuth: []
|
||||
summary: 查询项目运行环境配置信息列表
|
||||
tags:
|
||||
- 项目运行环境配置Api
|
||||
/api/v1/runconfig/paging:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 可以通过项目名称过滤,分页查询项目运行环境配置信息
|
||||
parameters:
|
||||
- in: query
|
||||
name: name
|
||||
type: string
|
||||
- description: 页码
|
||||
example: 1
|
||||
in: query
|
||||
name: current
|
||||
required: true
|
||||
type: integer
|
||||
- description: 页面行数
|
||||
example: 10
|
||||
in: query
|
||||
name: size
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/dto.PageDto'
|
||||
"401":
|
||||
description: Unauthorized
|
||||
schema:
|
||||
$ref: '#/definitions/dto.ErrorDto'
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/dto.ErrorDto'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/dto.ErrorDto'
|
||||
security:
|
||||
- JwtAuth: []
|
||||
summary: 分页查询项目运行环境配置信息
|
||||
tags:
|
||||
- 项目运行环境配置Api
|
||||
/api/v1/simulation/:id/getMapKilometerRange:
|
||||
get:
|
||||
consumes:
|
||||
@ -2433,6 +2705,39 @@ paths:
|
||||
summary: 获取仿真地图的公里标范围
|
||||
tags:
|
||||
- ATS测试仿真Api
|
||||
/api/v1/simulation/axleSection/operation:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: ATS测试-计轴区段操作
|
||||
parameters:
|
||||
- description: JWT Token
|
||||
in: header
|
||||
name: Authorization
|
||||
required: true
|
||||
type: string
|
||||
- description: ATS测试仿真-操作计轴区段
|
||||
in: body
|
||||
name: AxleSectionOperationReqDto
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/dto.AxleSectionOperationReqDto'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
type: string
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/dto.ErrorDto'
|
||||
security:
|
||||
- JwtAuth: []
|
||||
summary: ATS测试-计轴区段操作
|
||||
tags:
|
||||
- ATS测试仿真Api
|
||||
/api/v1/simulation/check/data:
|
||||
post:
|
||||
consumes:
|
||||
|
43
dto/projectRunConfig.go
Normal file
43
dto/projectRunConfig.go
Normal file
@ -0,0 +1,43 @@
|
||||
package dto
|
||||
|
||||
import "joylink.club/bj-rtsts-server/db/model"
|
||||
|
||||
type PageProjectRunConfigReqDto struct {
|
||||
PageQueryDto
|
||||
Name string `json:"name" form:"name"`
|
||||
}
|
||||
|
||||
type ProjectRunConfigReqDto struct {
|
||||
Id int32 `json:"id" form:"id"`
|
||||
Name string `json:"name" form:"name"`
|
||||
Description string `json:"description" form:"description"`
|
||||
ConfigContent string `json:"config" form:"config"`
|
||||
}
|
||||
|
||||
type ProjectRunConfigDto struct {
|
||||
Id int32 `json:"id" form:"id"`
|
||||
Name string `json:"name" form:"name"`
|
||||
Description string `json:"description" form:"description"`
|
||||
ConfigContent string `json:"config" form:"config"`
|
||||
CreatedAt JsonTime `json:"createdAt" time_format:"2006-01-02 15:04:05"`
|
||||
UpdateAt JsonTime `json:"updateAt" time_format:"2006-01-02 15:04:05"`
|
||||
}
|
||||
|
||||
func ConvertToRunConfigDto(gi *model.ProjectRunConfig) *ProjectRunConfigDto {
|
||||
return &ProjectRunConfigDto{
|
||||
Id: gi.ID,
|
||||
Name: gi.Name,
|
||||
Description: gi.Description,
|
||||
ConfigContent: gi.ConfigContent,
|
||||
CreatedAt: JsonTime(gi.CreateTime),
|
||||
UpdateAt: JsonTime(gi.UpdateTime),
|
||||
}
|
||||
}
|
||||
|
||||
func ConvertToRunConfigFromSlice(giSlice []*model.ProjectRunConfig) []*ProjectRunConfigDto {
|
||||
var result []*ProjectRunConfigDto
|
||||
for _, gi := range giSlice {
|
||||
result = append(result, ConvertToRunConfigDto(gi))
|
||||
}
|
||||
return result
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v4.23.1
|
||||
// source: request.proto
|
||||
|
||||
@ -165,6 +165,59 @@ func (Signal_Operation) EnumDescriptor() ([]byte, []int) {
|
||||
return file_request_proto_rawDescGZIP(), []int{2, 0}
|
||||
}
|
||||
|
||||
// 计轴区段操作
|
||||
type Section_AxleOperation int32
|
||||
|
||||
const (
|
||||
Section_Drst Section_AxleOperation = 0 //设置计轴直接复位
|
||||
Section_Pdrst Section_AxleOperation = 1 //设置计轴预复位
|
||||
Section_TrainIn Section_AxleOperation = 2 //设置计轴区段内有车轴
|
||||
Section_TrainOut Section_AxleOperation = 3 //设置计轴区段内没有车轴
|
||||
)
|
||||
|
||||
// Enum value maps for Section_AxleOperation.
|
||||
var (
|
||||
Section_AxleOperation_name = map[int32]string{
|
||||
0: "Drst",
|
||||
1: "Pdrst",
|
||||
2: "TrainIn",
|
||||
3: "TrainOut",
|
||||
}
|
||||
Section_AxleOperation_value = map[string]int32{
|
||||
"Drst": 0,
|
||||
"Pdrst": 1,
|
||||
"TrainIn": 2,
|
||||
"TrainOut": 3,
|
||||
}
|
||||
)
|
||||
|
||||
func (x Section_AxleOperation) Enum() *Section_AxleOperation {
|
||||
p := new(Section_AxleOperation)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x Section_AxleOperation) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (Section_AxleOperation) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_request_proto_enumTypes[2].Descriptor()
|
||||
}
|
||||
|
||||
func (Section_AxleOperation) Type() protoreflect.EnumType {
|
||||
return &file_request_proto_enumTypes[2]
|
||||
}
|
||||
|
||||
func (x Section_AxleOperation) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Section_AxleOperation.Descriptor instead.
|
||||
func (Section_AxleOperation) EnumDescriptor() ([]byte, []int) {
|
||||
return file_request_proto_rawDescGZIP(), []int{3, 0}
|
||||
}
|
||||
|
||||
// 道岔
|
||||
type Turnout struct {
|
||||
state protoimpl.MessageState
|
||||
@ -315,6 +368,45 @@ func (*Signal) Descriptor() ([]byte, []int) {
|
||||
return file_request_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
// 区段
|
||||
type Section struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *Section) Reset() {
|
||||
*x = Section{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_request_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Section) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Section) ProtoMessage() {}
|
||||
|
||||
func (x *Section) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_request_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Section.ProtoReflect.Descriptor instead.
|
||||
func (*Section) Descriptor() ([]byte, []int) {
|
||||
return file_request_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
var File_request_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_request_proto_rawDesc = []byte{
|
||||
@ -353,9 +445,14 @@ var file_request_proto_rawDesc = []byte{
|
||||
0x10, 0x08, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x4c, 0x43, 0x61, 0x6e, 0x63,
|
||||
0x65, 0x6c, 0x44, 0x73, 0x10, 0x09, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x41,
|
||||
0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x44, 0x73, 0x10, 0x0a, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x69,
|
||||
0x67, 0x68, 0x74, 0x42, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x44, 0x73, 0x10, 0x0b, 0x42, 0x15,
|
||||
0x5a, 0x13, 0x2e, 0x2f, 0x64, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x67, 0x68, 0x74, 0x42, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x44, 0x73, 0x10, 0x0b, 0x22, 0x4a,
|
||||
0x0a, 0x07, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3f, 0x0a, 0x0d, 0x41, 0x78, 0x6c,
|
||||
0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x72,
|
||||
0x73, 0x74, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x64, 0x72, 0x73, 0x74, 0x10, 0x01, 0x12,
|
||||
0x0b, 0x0a, 0x07, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08,
|
||||
0x54, 0x72, 0x61, 0x69, 0x6e, 0x4f, 0x75, 0x74, 0x10, 0x03, 0x42, 0x15, 0x5a, 0x13, 0x2e, 0x2f,
|
||||
0x64, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -370,14 +467,16 @@ func file_request_proto_rawDescGZIP() []byte {
|
||||
return file_request_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_request_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
||||
var file_request_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_request_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
|
||||
var file_request_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_request_proto_goTypes = []interface{}{
|
||||
(Turnout_Operation)(0), // 0: request.Turnout.Operation
|
||||
(Signal_Operation)(0), // 1: request.Signal.Operation
|
||||
(*Turnout)(nil), // 2: request.Turnout
|
||||
(*TurnoutOperationReq)(nil), // 3: request.TurnoutOperationReq
|
||||
(*Signal)(nil), // 4: request.Signal
|
||||
(Section_AxleOperation)(0), // 2: request.Section.AxleOperation
|
||||
(*Turnout)(nil), // 3: request.Turnout
|
||||
(*TurnoutOperationReq)(nil), // 4: request.TurnoutOperationReq
|
||||
(*Signal)(nil), // 5: request.Signal
|
||||
(*Section)(nil), // 6: request.Section
|
||||
}
|
||||
var file_request_proto_depIdxs = []int32{
|
||||
0, // 0: request.TurnoutOperationReq.operation:type_name -> request.Turnout.Operation
|
||||
@ -430,14 +529,26 @@ func file_request_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_request_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Section); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_request_proto_rawDesc,
|
||||
NumEnums: 2,
|
||||
NumMessages: 3,
|
||||
NumEnums: 3,
|
||||
NumMessages: 4,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
@ -11,6 +11,8 @@ type SimulationCreateReqDto struct {
|
||||
MapId int32 `json:"mapId" form:"mapId"`
|
||||
// 项目id
|
||||
ProjectId int32 `json:"projectId" form:"projectId"`
|
||||
// 运行环境ID
|
||||
ProjectRunConfigId int32 `json:"runConfigId" form:"runConfigId"`
|
||||
}
|
||||
|
||||
// 创建仿真响应
|
||||
@ -80,6 +82,13 @@ type SignalOperationReqDto struct {
|
||||
Operation request_proto.Signal_Operation `form:"operation" json:"operation" binding:"required"` //信号机操作类型
|
||||
Aspect state.Signal_Aspect `form:"aspect" json:"aspect" binding:"required"` // 当操作为Operation.Display时有效,表示显示的信号
|
||||
}
|
||||
type AxleSectionOperationReqDto struct {
|
||||
SimulationId string `form:"simulationId" json:"simulationId" binding:"required"`
|
||||
MapId int32 `json:"mapId" from:"mapId" binding:"required"`
|
||||
DeviceId string `form:"id" json:"id" binding:"required"`
|
||||
Operation request_proto.Section_AxleOperation `form:"operation" json:"operation"`
|
||||
Reset bool `form:"reset" json:"reset"` //当操作为直接复位或预复位时有效,true-复位,false-取消或结束复位
|
||||
}
|
||||
|
||||
type EsbButtonOperationReqDto struct {
|
||||
SimulationId string `form:"simulationId" json:"simulationId" binding:"required"`
|
||||
|
13
init.go
13
init.go
@ -60,19 +60,6 @@ func InitServer() *gin.Engine {
|
||||
Tip: be.UserMsg,
|
||||
Message: be.Error(),
|
||||
})
|
||||
// switch e := e.(type) {
|
||||
// case error:
|
||||
// c.JSON(http.StatusInternalServerError, &dto.ErrorDto{
|
||||
// Code: dto.LogicError,
|
||||
// Tip: dto.ErrorTipMap[dto.LogicError],
|
||||
// Message: e.Error(),
|
||||
// })
|
||||
// case dto.ErrorDto:
|
||||
// e.Tip = dto.ErrorTipMap[e.Code]
|
||||
// c.JSON(http.StatusInternalServerError, e)
|
||||
// default:
|
||||
// c.JSON(http.StatusInternalServerError, e)
|
||||
// }
|
||||
c.Writer.WriteHeaderNow()
|
||||
c.Abort()
|
||||
}))
|
||||
|
1
main.go
1
main.go
@ -40,6 +40,7 @@ func main() {
|
||||
api.InitTrainManageRouter(router, authMiddleware)
|
||||
api.InitProjectLinkRouter(router, authMiddleware)
|
||||
api.InitAuthRouter(router, authMiddleware)
|
||||
api.InitProjectRunConfigRouter(router, authMiddleware)
|
||||
docs.SwaggerInfo.Title = "CBTC测试系统API"
|
||||
engine.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
|
||||
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 89dd583d1990729e1925e31b7bb5da3c6aeb3a94
|
||||
Subproject commit 4fc223c9f7154d6a01e75db0c5745ad6c177c57e
|
@ -7,16 +7,17 @@ import (
|
||||
"joylink.club/bj-rtsts-server/db/dbquery"
|
||||
"joylink.club/bj-rtsts-server/db/model"
|
||||
"joylink.club/bj-rtsts-server/dto"
|
||||
"joylink.club/bj-rtsts-server/sys_error"
|
||||
)
|
||||
|
||||
// 查询权限角色信息列表
|
||||
func PageAuthRoleQuery(query *dto.PageQueryDto) (*dto.PageDto, error) {
|
||||
func PageAuthRoleQuery(query *dto.PageQueryDto) *dto.PageDto {
|
||||
d := dbquery.AuthRole
|
||||
records, total, err := d.Debug().Select(d.ID, d.Name).Order(d.CreateTime).FindByPage(query.Offset(), query.Size)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()})
|
||||
panic(sys_error.New("查询权限数据库出错,请联系维护人员", err))
|
||||
}
|
||||
return &dto.PageDto{Total: int(total), PageQueryDto: *query, Records: dto.ConvertFromAuthRole(records)}, nil
|
||||
return &dto.PageDto{Total: int(total), PageQueryDto: *query, Records: dto.ConvertFromAuthRole(records)}
|
||||
}
|
||||
|
||||
// 获取角色列表
|
||||
@ -24,7 +25,7 @@ func ListAuthRoleQuery() []*dto.AuthRoleRspDto {
|
||||
d := dbquery.AuthRole
|
||||
records, err := d.Debug().Select(d.ID, d.Name).Order(d.CreateTime).Find()
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()})
|
||||
panic(sys_error.New("查询权限数据库出错,请联系维护人员", err))
|
||||
}
|
||||
return dto.ConvertFromAuthRole(records)
|
||||
}
|
||||
@ -35,11 +36,11 @@ func CreateAuthRole(a *dto.AuthRoleReqDto) bool {
|
||||
aq := dbquery.AuthRole
|
||||
err := aq.Save(&d)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()})
|
||||
panic(sys_error.New("保存权限数据库出错,请联系维护人员", err))
|
||||
}
|
||||
n := len(a.AddPaths)
|
||||
if n == 0 {
|
||||
return false
|
||||
return true
|
||||
}
|
||||
// 查询刚插入的角色
|
||||
newAuthRole, _ := aq.Where(aq.Name.Eq(a.Name)).Order(aq.CreateTime).Last()
|
||||
@ -56,7 +57,7 @@ func QueryAuthRole(rid int32) *dto.AuthRoleDetailRspDto {
|
||||
// 查询用户角色信息
|
||||
role, err := dbquery.AuthRole.Where(dbquery.AuthRole.ID.Eq(rid)).First()
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()})
|
||||
panic(sys_error.New("查询角色数据库出错,请联系维护人员", err))
|
||||
}
|
||||
rsp := &dto.AuthRoleDetailRspDto{
|
||||
Id: role.ID,
|
||||
@ -71,7 +72,7 @@ func QueryAuthRoleByUid(uid int32) []*model.AuthRole {
|
||||
aru := dbquery.AuthRoleUser
|
||||
arus, err1 := aru.Distinct(aru.Rid).Select(aru.Rid).Where(aru.UID.Eq(uid)).Find()
|
||||
if err1 != nil {
|
||||
panic(dto.ErrorDto{Code: dto.DataNotExist, Message: err1.Error()})
|
||||
panic(sys_error.New("查询角色数据库出错,请联系维护人员", err1))
|
||||
}
|
||||
if len(arus) == 0 {
|
||||
return nil
|
||||
@ -82,7 +83,7 @@ func QueryAuthRoleByUid(uid int32) []*model.AuthRole {
|
||||
}
|
||||
roles, err2 := dbquery.AuthRole.Where(dbquery.AuthRole.ID.In(rids...)).Find()
|
||||
if err2 != nil {
|
||||
panic(dto.ErrorDto{Code: dto.DataNotExist, Message: err2.Error()})
|
||||
panic(sys_error.New("查询角色数据库发生错误,请联系维护人员", err2))
|
||||
}
|
||||
return roles
|
||||
}
|
||||
@ -92,7 +93,7 @@ func UpdateAuthRole(rid int32, info *dto.AuthRoleReqDto) bool {
|
||||
// 查询用户角色信息
|
||||
role, err := dbquery.AuthRole.Where(dbquery.AuthRole.ID.Eq(rid)).First()
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()})
|
||||
panic(sys_error.New("更新角色数据库发生错误,不存在此用户", err))
|
||||
}
|
||||
role.Name = info.Name // 更新名称
|
||||
dbquery.AuthRole.Updates(role)
|
||||
@ -119,18 +120,18 @@ func UpdateAuthRole(rid int32, info *dto.AuthRoleReqDto) bool {
|
||||
func DeleteAuthRole(rid int32) bool {
|
||||
oldD, err1 := dbquery.AuthRole.Where(dbquery.AuthRole.ID.Eq(rid)).First()
|
||||
if err1 != nil {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err1.Error()})
|
||||
panic(sys_error.New("删除权限角色数据库发生错误", err1))
|
||||
}
|
||||
if dto.IsSystemRole(oldD.ID) {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: "系统角色不可删除"})
|
||||
panic(sys_error.New("系统角色不可删除", err1))
|
||||
}
|
||||
// 如果有用户关联则不删除
|
||||
count, err2 := dbquery.AuthRoleUser.Where(dbquery.AuthRoleUser.Rid.Eq(rid)).Count()
|
||||
if err2 != nil {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err2.Error()})
|
||||
panic(sys_error.New("删除失败,还存在用户关联", err2))
|
||||
}
|
||||
if count > 0 {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: "有用户关联该角色"})
|
||||
panic(sys_error.New("删除失败,有用户关联该角色"))
|
||||
}
|
||||
// 删除用户关联关系
|
||||
dbquery.AuthRoleUser.Where(dbquery.AuthRoleUser.Rid.Eq(rid)).Delete()
|
||||
@ -142,7 +143,7 @@ func DeleteAuthRole(rid int32) bool {
|
||||
}
|
||||
|
||||
// 查询接口路径信息列表
|
||||
func PageAuthApiPathQuery(query *dto.AuthApiPathPageReqDto) (*dto.PageDto, error) {
|
||||
func PageAuthApiPathQuery(query *dto.AuthApiPathPageReqDto) *dto.PageDto {
|
||||
d := dbquery.AuthAPIPath
|
||||
dq := d.Where()
|
||||
if query.Name != "" {
|
||||
@ -152,7 +153,7 @@ func PageAuthApiPathQuery(query *dto.AuthApiPathPageReqDto) (*dto.PageDto, error
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()})
|
||||
}
|
||||
return &dto.PageDto{Total: int(total), PageQueryDto: query.PageQueryDto, Records: records}, nil
|
||||
return &dto.PageDto{Total: int(total), PageQueryDto: query.PageQueryDto, Records: records}
|
||||
}
|
||||
|
||||
// 查询接口路径信息列表
|
||||
|
@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
// 查询草稿列表
|
||||
func PageCategoryQuery(query *dto.PageCategoryReqDto) (*dto.PageDto, error) {
|
||||
func PageCategoryQuery(query *dto.PageCategoryReqDto) *dto.PageDto {
|
||||
d := dbquery.Category
|
||||
dq := d.Where()
|
||||
if query.Name != "" {
|
||||
@ -20,11 +20,11 @@ func PageCategoryQuery(query *dto.PageCategoryReqDto) (*dto.PageDto, error) {
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()})
|
||||
}
|
||||
return &dto.PageDto{Total: int(total), PageQueryDto: query.PageQueryDto, Records: records}, nil
|
||||
return &dto.PageDto{Total: int(total), PageQueryDto: query.PageQueryDto, Records: records}
|
||||
}
|
||||
|
||||
// 查询草稿列表
|
||||
func ListCategoryQuery(query *dto.CategoryReqDto) ([]*model.Category, error) {
|
||||
func ListCategoryQuery(query *dto.CategoryReqDto) []*model.Category {
|
||||
d := dbquery.Category
|
||||
dq := d.Where()
|
||||
if query.Name != "" {
|
||||
@ -34,11 +34,11 @@ func ListCategoryQuery(query *dto.CategoryReqDto) ([]*model.Category, error) {
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()})
|
||||
}
|
||||
return records, nil
|
||||
return records
|
||||
}
|
||||
|
||||
// 创建草稿
|
||||
func CreateCategory(cd *dto.CategoryDto) (*model.Category, error) {
|
||||
func CreateCategory(cd *dto.CategoryDto) *model.Category {
|
||||
if err := checkCategoryInfo(cd.Name, cd.Code, 0); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()})
|
||||
}
|
||||
@ -53,7 +53,11 @@ func CreateCategory(cd *dto.CategoryDto) (*model.Category, error) {
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()})
|
||||
}
|
||||
return dbquery.Category.Where(dbquery.Category.Name.Eq(cd.Name)).Order(dbquery.Category.CreatedAt).Debug().First()
|
||||
data, err := dbquery.Category.Where(dbquery.Category.Name.Eq(cd.Name)).Order(dbquery.Category.CreatedAt).Debug().First()
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()})
|
||||
}
|
||||
return data
|
||||
}
|
||||
|
||||
func QueryCategory(id int32) *model.Category {
|
||||
|
@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
// 查询草稿列表
|
||||
func PageDraftingQuery(query *dto.PageDraftingReqDto) (*dto.PageDto, error) {
|
||||
func PageDraftingQuery(query *dto.PageDraftingReqDto) *dto.PageDto {
|
||||
d := dbquery.Drafting
|
||||
dq := d.Where()
|
||||
if query.Name != "" {
|
||||
@ -20,10 +20,10 @@ func PageDraftingQuery(query *dto.PageDraftingReqDto) (*dto.PageDto, error) {
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()})
|
||||
}
|
||||
return &dto.PageDto{Total: int(total), PageQueryDto: query.PageQueryDto, Records: records}, nil
|
||||
return &dto.PageDto{Total: int(total), PageQueryDto: query.PageQueryDto, Records: records}
|
||||
}
|
||||
|
||||
func ListDraftingQuery(query *dto.ListDraftingReqDto) ([]*model.Drafting, error) {
|
||||
func ListDraftingQuery(query *dto.ListDraftingReqDto) []*model.Drafting {
|
||||
d := dbquery.Drafting
|
||||
dq := d.Where()
|
||||
if query.Type != 0 {
|
||||
@ -33,11 +33,11 @@ func ListDraftingQuery(query *dto.ListDraftingReqDto) ([]*model.Drafting, error)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()})
|
||||
}
|
||||
return records, nil
|
||||
return records
|
||||
}
|
||||
|
||||
// 创建草稿
|
||||
func CreateDrafting(createId int32, dd *dto.DraftingDto) (*model.Drafting, error) {
|
||||
func CreateDrafting(createId int32, dd *dto.DraftingDto) *model.Drafting {
|
||||
if err := checkDraftingInfo(dd.Name); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()})
|
||||
}
|
||||
@ -54,16 +54,20 @@ func CreateDrafting(createId int32, dd *dto.DraftingDto) (*model.Drafting, error
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()})
|
||||
}
|
||||
return dbquery.Drafting.Where(
|
||||
data, err := dbquery.Drafting.Where(
|
||||
dbquery.Drafting.Name.Eq(dd.Name),
|
||||
dbquery.Drafting.CreatorID.Eq(createId),
|
||||
).Order(dbquery.Drafting.CreatedAt).Debug().First()
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()})
|
||||
}
|
||||
return data
|
||||
}
|
||||
|
||||
// 另存为
|
||||
func SaveAsDrafting(createId int32, oldId int32, dd *dto.DraftingDto) (*model.Drafting, error) {
|
||||
func SaveAsDrafting(createId int32, oldId int32, dd *dto.DraftingDto) *model.Drafting {
|
||||
if err := checkDraftingInfo(dd.Name); err != nil {
|
||||
return nil, err
|
||||
return nil
|
||||
}
|
||||
oldD, err := dbquery.Drafting.Where(dbquery.Drafting.ID.Eq(oldId)).Debug().First()
|
||||
if oldD == nil || err != nil {
|
||||
@ -81,10 +85,14 @@ func SaveAsDrafting(createId int32, oldId int32, dd *dto.DraftingDto) (*model.Dr
|
||||
if err = dbquery.Drafting.Save(&newD); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()})
|
||||
}
|
||||
return dbquery.Drafting.Where(
|
||||
data, err := dbquery.Drafting.Where(
|
||||
dbquery.Drafting.Name.Eq(dd.Name),
|
||||
dbquery.Drafting.CreatorID.Eq(createId),
|
||||
).Order(dbquery.Drafting.CreatedAt).Debug().First()
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()})
|
||||
}
|
||||
return data
|
||||
}
|
||||
|
||||
func QueryDrafting(id int32) *model.Drafting {
|
||||
|
@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
// 查询项目列表
|
||||
func PageProjectQuery(query *dto.PageProjectReqDto) (*dto.PageDto, error) {
|
||||
func PageProjectQuery(query *dto.PageProjectReqDto) *dto.PageDto {
|
||||
d := dbquery.Project
|
||||
dq := d.Where()
|
||||
if query.Name != "" {
|
||||
@ -23,11 +23,11 @@ func PageProjectQuery(query *dto.PageProjectReqDto) (*dto.PageDto, error) {
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()})
|
||||
}
|
||||
return &dto.PageDto{Total: int(total), PageQueryDto: query.PageQueryDto, Records: records}, nil
|
||||
return &dto.PageDto{Total: int(total), PageQueryDto: query.PageQueryDto, Records: records}
|
||||
}
|
||||
|
||||
// 查询项目列表
|
||||
func ListProjectQuery(query *dto.ProjectReqDto) ([]*model.Project, error) {
|
||||
func ListProjectQuery(query *dto.ProjectReqDto) []*model.Project {
|
||||
d := dbquery.Project
|
||||
dq := d.Where()
|
||||
if query.Name != "" {
|
||||
@ -40,11 +40,11 @@ func ListProjectQuery(query *dto.ProjectReqDto) ([]*model.Project, error) {
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()})
|
||||
}
|
||||
return records, nil
|
||||
return records
|
||||
}
|
||||
|
||||
// 创建草稿
|
||||
func CreateProject(pd *dto.ProjectDto) (*model.Project, error) {
|
||||
func CreateProject(pd *dto.ProjectDto) *model.Project {
|
||||
if err := checkProjectInfo(pd.Code, 0); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()})
|
||||
}
|
||||
@ -59,7 +59,11 @@ func CreateProject(pd *dto.ProjectDto) (*model.Project, error) {
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()})
|
||||
}
|
||||
return p.Where(p.Name.Eq(pd.Name)).Order(p.CreatedAt).Debug().First()
|
||||
data, err := p.Where(p.Name.Eq(pd.Name)).Order(p.CreatedAt).Debug().First()
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()})
|
||||
}
|
||||
return data
|
||||
}
|
||||
|
||||
func QueryProject(id int32) *model.Project {
|
||||
|
82
service/projectRunConfig.go
Normal file
82
service/projectRunConfig.go
Normal file
@ -0,0 +1,82 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"joylink.club/bj-rtsts-server/db/dbquery"
|
||||
"joylink.club/bj-rtsts-server/db/model"
|
||||
"joylink.club/bj-rtsts-server/dto"
|
||||
"joylink.club/bj-rtsts-server/sys_error"
|
||||
)
|
||||
|
||||
// 查询项目运行环境列表带分页
|
||||
func PageProjectRunConfigQuery(query *dto.PageProjectRunConfigReqDto) *dto.PageDto {
|
||||
d := dbquery.ProjectRunConfig
|
||||
dq := d.Where()
|
||||
if query.Name != "" {
|
||||
dq = dq.Where(d.Name.Like(fmt.Sprintf("%%%s%%", query.Name)))
|
||||
}
|
||||
records, total, err := dq.Debug().Omit(d.ConfigContent).FindByPage(query.Offset(), query.Size)
|
||||
if err != nil {
|
||||
panic(sys_error.New("查询失败,数据库错误请联系运维人员", err))
|
||||
}
|
||||
return &dto.PageDto{Total: int(total), PageQueryDto: query.PageQueryDto, Records: records}
|
||||
}
|
||||
|
||||
// 查询项目运行环境列表
|
||||
func ListProjectRunConfigQuery() []*dto.ProjectRunConfigDto {
|
||||
records, err := dbquery.ProjectRunConfig.Debug().Omit(dbquery.ProjectRunConfig.ConfigContent).Find()
|
||||
if err != nil {
|
||||
panic(sys_error.New("查询失败,数据库错误请联系运维人员", err))
|
||||
}
|
||||
return dto.ConvertToRunConfigFromSlice(records)
|
||||
}
|
||||
|
||||
// 创建项目运行环境
|
||||
func CreateProjectRunConfig(dd *dto.ProjectRunConfigReqDto) bool {
|
||||
d := model.ProjectRunConfig{
|
||||
Name: dd.Name,
|
||||
Description: dd.Description,
|
||||
ConfigContent: dd.ConfigContent,
|
||||
CreateTime: time.Now(),
|
||||
UpdateTime: time.Now(),
|
||||
}
|
||||
err := dbquery.ProjectRunConfig.Save(&d)
|
||||
if err != nil {
|
||||
panic(sys_error.New("保存失败,数据库错误请联系运维人员", err))
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// 查询项目运行环境
|
||||
func QueryProjectRunConfig(id int32) *dto.ProjectRunConfigDto {
|
||||
query, err := dbquery.ProjectRunConfig.Where(dbquery.ProjectRunConfig.ID.Eq(id)).Debug().First()
|
||||
if err != nil {
|
||||
panic(sys_error.New("查询失败,不存在此信息", err))
|
||||
}
|
||||
return dto.ConvertToRunConfigDto(query)
|
||||
}
|
||||
|
||||
// 更新项目运行环境
|
||||
func UpdateProjectRunConfig(id int32, dd *dto.ProjectRunConfigReqDto) bool {
|
||||
findOldQuery := dbquery.ProjectRunConfig
|
||||
oldD, err := findOldQuery.Where(findOldQuery.ID.Eq(id)).Debug().First()
|
||||
if oldD == nil || err != nil {
|
||||
panic(sys_error.New("保存失败,不存在此信息", err))
|
||||
}
|
||||
oldD.Name = dd.Name
|
||||
oldD.Description = dd.Description
|
||||
oldD.ConfigContent = dd.ConfigContent
|
||||
oldD.UpdateTime = time.Now()
|
||||
_, err2 := findOldQuery.Updates(oldD)
|
||||
if err2 != nil {
|
||||
panic(sys_error.New("保存失败,请联系维护人员", err2))
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// 删除项目运行环境
|
||||
func DeleteProjectRunConfigById(id int32) {
|
||||
dbquery.ProjectRunConfig.Debug().Where(dbquery.ProjectRunConfig.ID.Eq(id)).Delete()
|
||||
}
|
@ -53,8 +53,12 @@ func ListAllPublishedGi() ([]*model.PublishedGi, error) {
|
||||
return dbquery.PublishedGi.Debug().Where(dbquery.PublishedGi.Status.Eq(1)).Find()
|
||||
}
|
||||
|
||||
func GetPublishedGiById(id int) (*model.PublishedGi, error) {
|
||||
return dbquery.PublishedGi.Where(dbquery.PublishedGi.ID.Eq(int32(id))).Debug().First()
|
||||
func GetPublishedGiById(id int) *model.PublishedGi {
|
||||
data, err := dbquery.PublishedGi.Where(dbquery.PublishedGi.ID.Eq(int32(id))).Debug().First()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return data
|
||||
}
|
||||
|
||||
func PublishFormDraft(req *publishedGi.PublishReqDto, user *model.User) {
|
||||
@ -151,12 +155,16 @@ func QueryProjectPublishedGi(id int32) []*model.PublishedGi {
|
||||
return publishedGis
|
||||
}
|
||||
|
||||
func GetPublishedGiByName(param *publishedGi.PublishedGiSingleQueryDto) (*model.PublishedGi, error) {
|
||||
func GetPublishedGiByName(param *publishedGi.PublishedGiSingleQueryDto) *model.PublishedGi {
|
||||
where := dbquery.PublishedGi.
|
||||
Where(dbquery.PublishedGi.Name.Eq(param.Name)).
|
||||
Where(dbquery.PublishedGi.Status.Eq(1))
|
||||
if !param.Detail {
|
||||
where = where.Omit(dbquery.PublishedGi.Proto)
|
||||
}
|
||||
return where.Debug().First()
|
||||
data, err := where.Debug().First()
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()})
|
||||
}
|
||||
return data
|
||||
}
|
||||
|
@ -1,18 +0,0 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"google.golang.org/protobuf/proto"
|
||||
"joylink.club/bj-rtsts-server/ats/verify/protos/graphicData"
|
||||
"joylink.club/bj-rtsts-server/dto"
|
||||
)
|
||||
|
||||
// 查询地图数据
|
||||
func QueryRtssGraphicStorage(mapId int32) *graphicData.RtssGraphicStorage {
|
||||
publishdata, err := GetPublishedGiById(int(mapId))
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()})
|
||||
}
|
||||
graphicStorage := &graphicData.RtssGraphicStorage{}
|
||||
proto.Unmarshal(publishdata.Proto, graphicStorage)
|
||||
return graphicStorage
|
||||
}
|
@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
// 查询列车型号信息列表
|
||||
func PageTrainModelQuery(query *dto.PageTrainManageReqDto) (*dto.PageDto, error) {
|
||||
func PageTrainModelQuery(query *dto.PageTrainManageReqDto) *dto.PageDto {
|
||||
d := dbquery.TrainModel
|
||||
dq := d.Where()
|
||||
if query.Name != "" {
|
||||
@ -20,11 +20,11 @@ func PageTrainModelQuery(query *dto.PageTrainManageReqDto) (*dto.PageDto, error)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()})
|
||||
}
|
||||
return &dto.PageDto{Total: int(total), PageQueryDto: query.PageQueryDto, Records: records}, nil
|
||||
return &dto.PageDto{Total: int(total), PageQueryDto: query.PageQueryDto, Records: records}
|
||||
}
|
||||
|
||||
// 查询列车型号信息列表
|
||||
func ListTrainModelQuery(query *dto.TrainManageReqDto) ([]*model.TrainModel, error) {
|
||||
func ListTrainModelQuery(query *dto.TrainManageReqDto) []*model.TrainModel {
|
||||
d := dbquery.TrainModel
|
||||
dq := d.Where()
|
||||
if query.Name != "" {
|
||||
@ -34,11 +34,11 @@ func ListTrainModelQuery(query *dto.TrainManageReqDto) ([]*model.TrainModel, err
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()})
|
||||
}
|
||||
return records, nil
|
||||
return records
|
||||
}
|
||||
|
||||
// 创建列车型号信息
|
||||
func CreateTrainModel(td *dto.TrainModelDto) (*model.TrainModel, error) {
|
||||
func CreateTrainModel(td *dto.TrainModelDto) *model.TrainModel {
|
||||
if err := checkTrainModel(td.Name, 0); err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()})
|
||||
}
|
||||
@ -52,7 +52,11 @@ func CreateTrainModel(td *dto.TrainModelDto) (*model.TrainModel, error) {
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()})
|
||||
}
|
||||
return dt.Where(dt.Name.Eq(td.Name)).Order(dt.CreatedAt).Debug().First()
|
||||
data, err2 := dt.Where(dt.Name.Eq(td.Name)).Order(dt.CreatedAt).Debug().First()
|
||||
if err2 != nil {
|
||||
panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err2.Error()})
|
||||
}
|
||||
return data
|
||||
}
|
||||
|
||||
// 查询列车型号信息
|
||||
@ -90,7 +94,7 @@ func DeleteTrainModelById(id int) {
|
||||
}
|
||||
|
||||
// 查询列车尺寸信息列表
|
||||
func PageTrainSizeQuery(query *dto.PageTrainManageReqDto) (*dto.PageDto, error) {
|
||||
func PageTrainSizeQuery(query *dto.PageTrainManageReqDto) *dto.PageDto {
|
||||
d := dbquery.TrainSize
|
||||
dq := d.Where()
|
||||
if query.Name != "" {
|
||||
@ -100,11 +104,11 @@ func PageTrainSizeQuery(query *dto.PageTrainManageReqDto) (*dto.PageDto, error)
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()})
|
||||
}
|
||||
return &dto.PageDto{Total: int(total), PageQueryDto: query.PageQueryDto, Records: records}, nil
|
||||
return &dto.PageDto{Total: int(total), PageQueryDto: query.PageQueryDto, Records: records}
|
||||
}
|
||||
|
||||
// 查询列车尺寸信息列表
|
||||
func ListTrainSizeQuery(query *dto.TrainManageReqDto) ([]*model.TrainSize, error) {
|
||||
func ListTrainSizeQuery(query *dto.TrainManageReqDto) []*model.TrainSize {
|
||||
d := dbquery.TrainSize
|
||||
dq := d.Where()
|
||||
if query.Name != "" {
|
||||
@ -114,11 +118,11 @@ func ListTrainSizeQuery(query *dto.TrainManageReqDto) ([]*model.TrainSize, error
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()})
|
||||
}
|
||||
return records, nil
|
||||
return records
|
||||
}
|
||||
|
||||
// 创建列车尺寸信息
|
||||
func CreateTrainSize(td *dto.TrainSizeDto) (*model.TrainSize, error) {
|
||||
func CreateTrainSize(td *dto.TrainSizeDto) *model.TrainSize {
|
||||
d := model.TrainSize{
|
||||
Name: td.Name,
|
||||
CarriageLength: td.CarriageLength,
|
||||
@ -130,7 +134,11 @@ func CreateTrainSize(td *dto.TrainSizeDto) (*model.TrainSize, error) {
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()})
|
||||
}
|
||||
return dt.Where(dt.Name.Eq(td.Name)).Order(dt.Name).Debug().First()
|
||||
data, err := dt.Where(dt.Name.Eq(td.Name)).Order(dt.Name).Debug().First()
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()})
|
||||
}
|
||||
return data
|
||||
}
|
||||
|
||||
// 查询列车尺寸信息
|
||||
@ -185,7 +193,7 @@ func QueryProjectTrainSize(id int32) []*model.TrainSize {
|
||||
}
|
||||
|
||||
// 查询列车轮径信息列表
|
||||
func PageTrainWheelDiameterQuery(query *dto.PageTrainManageReqDto) (*dto.PageDto, error) {
|
||||
func PageTrainWheelDiameterQuery(query *dto.PageTrainManageReqDto) *dto.PageDto {
|
||||
d := dbquery.TrainWheelDiameter
|
||||
dq := d.Where()
|
||||
if query.Name != "" {
|
||||
@ -195,11 +203,11 @@ func PageTrainWheelDiameterQuery(query *dto.PageTrainManageReqDto) (*dto.PageDto
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()})
|
||||
}
|
||||
return &dto.PageDto{Total: int(total), PageQueryDto: query.PageQueryDto, Records: records}, nil
|
||||
return &dto.PageDto{Total: int(total), PageQueryDto: query.PageQueryDto, Records: records}
|
||||
}
|
||||
|
||||
// 查询列车轮径信息列表
|
||||
func ListTrainWheelDiameterQuery(query *dto.TrainManageReqDto) ([]*model.TrainWheelDiameter, error) {
|
||||
func ListTrainWheelDiameterQuery(query *dto.TrainManageReqDto) []*model.TrainWheelDiameter {
|
||||
d := dbquery.TrainWheelDiameter
|
||||
dq := d.Where()
|
||||
if query.Name != "" {
|
||||
@ -209,11 +217,11 @@ func ListTrainWheelDiameterQuery(query *dto.TrainManageReqDto) ([]*model.TrainWh
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()})
|
||||
}
|
||||
return records, nil
|
||||
return records
|
||||
}
|
||||
|
||||
// 创建列车轮径信息
|
||||
func CreateTrainWheelDiameter(twd *dto.TrainWheelDiameterDto) (*model.TrainWheelDiameter, error) {
|
||||
func CreateTrainWheelDiameter(twd *dto.TrainWheelDiameterDto) *model.TrainWheelDiameter {
|
||||
d := model.TrainWheelDiameter{
|
||||
Name: twd.Name,
|
||||
Diameter: twd.Diameter,
|
||||
@ -227,7 +235,11 @@ func CreateTrainWheelDiameter(twd *dto.TrainWheelDiameterDto) (*model.TrainWheel
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()})
|
||||
}
|
||||
return dt.Where(dt.Name.Eq(twd.Name)).Order(dt.Name).Debug().First()
|
||||
data, err := dt.Where(dt.Name.Eq(twd.Name)).Order(dt.Name).Debug().First()
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()})
|
||||
}
|
||||
return data
|
||||
}
|
||||
|
||||
// 查询列车轮径信息
|
||||
|
120
third_party/interlock/interlock.go
vendored
Normal file
120
third_party/interlock/interlock.go
vendored
Normal file
@ -0,0 +1,120 @@
|
||||
package interlock
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"log/slog"
|
||||
"runtime/debug"
|
||||
"time"
|
||||
|
||||
"joylink.club/bj-rtsts-server/config"
|
||||
"joylink.club/bj-rtsts-server/third_party/message"
|
||||
"joylink.club/bj-rtsts-server/third_party/udp"
|
||||
)
|
||||
|
||||
// 联锁代理通信接口
|
||||
type InterlockMessageManager interface {
|
||||
CollectRelayInfo() *message.InterlockSendMsgPkg
|
||||
HandleDriverInfo(b []byte)
|
||||
}
|
||||
|
||||
// 联锁接口
|
||||
type InterlockProxy interface {
|
||||
// 启动联锁消息功能
|
||||
Start(manager InterlockMessageManager)
|
||||
// 停止联锁消息功能
|
||||
Stop()
|
||||
// 发送联锁采集消息
|
||||
SendCollectMessage(b []byte)
|
||||
}
|
||||
|
||||
var _default InterlockProxy
|
||||
|
||||
func Default() InterlockProxy {
|
||||
if !config.Config.Interlock.Open { // TODO
|
||||
panic("联锁接口模块未开启")
|
||||
}
|
||||
return _default
|
||||
}
|
||||
|
||||
type interlockProxy struct {
|
||||
driveInfoUdpServer udp.UdpServer
|
||||
sendCollectUdpClient udp.UdpClient
|
||||
|
||||
manager InterlockMessageManager
|
||||
collectInfoTaskCancel context.CancelFunc
|
||||
}
|
||||
|
||||
// 驱动信息进行转发
|
||||
func (d *interlockProxy) handleDriverInfo(b []byte) {
|
||||
handler := d.manager
|
||||
if handler != nil {
|
||||
handler.HandleDriverInfo(b)
|
||||
}
|
||||
}
|
||||
|
||||
func (d *interlockProxy) Start(manager InterlockMessageManager) {
|
||||
if manager == nil {
|
||||
panic("启动联锁消息服务错误: InterlockMessageManager不能为nil")
|
||||
}
|
||||
if d.manager != nil {
|
||||
panic("启动联锁消息服务错误: 存在正在运行的任务")
|
||||
}
|
||||
d.manager = manager
|
||||
ctx, cancle := context.WithCancel(context.Background())
|
||||
go d.collectInfoStateTask(ctx)
|
||||
d.collectInfoTaskCancel = cancle
|
||||
}
|
||||
|
||||
const (
|
||||
// 采集电路状态发送间隔,单位ms
|
||||
InterlockMessageSendInterval = 50
|
||||
)
|
||||
|
||||
// 定时发送采集电路状态任务
|
||||
func (d *interlockProxy) collectInfoStateTask(ctx context.Context) {
|
||||
defer func() {
|
||||
if err := recover(); err != nil {
|
||||
slog.Error("定时发送道岔状态任务异常", "error", err, "stack", string(debug.Stack()))
|
||||
debug.PrintStack()
|
||||
}
|
||||
}()
|
||||
for {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return
|
||||
default:
|
||||
}
|
||||
collectInfoStates := d.manager.CollectRelayInfo()
|
||||
d.sendCollectUdpClient.SendMsg(collectInfoStates)
|
||||
time.Sleep(time.Millisecond * InterlockMessageSendInterval)
|
||||
}
|
||||
}
|
||||
|
||||
func (d *interlockProxy) Stop() {
|
||||
if d.collectInfoTaskCancel != nil {
|
||||
d.collectInfoTaskCancel()
|
||||
d.manager = nil
|
||||
}
|
||||
}
|
||||
|
||||
func (d *interlockProxy) SendCollectMessage(b []byte) {
|
||||
d.sendCollectUdpClient.Send(b)
|
||||
}
|
||||
|
||||
func newInterlockProxy() *interlockProxy {
|
||||
d := &interlockProxy{
|
||||
sendCollectUdpClient: udp.NewClient(fmt.Sprintf("%v:%v", config.Config.Interlock.Ip, config.Config.Interlock.RemotePort)),
|
||||
}
|
||||
d.driveInfoUdpServer = udp.NewServer(fmt.Sprintf(":%d", config.Config.Interlock.LocalPort), d.handleDriverInfo)
|
||||
d.driveInfoUdpServer.Listen()
|
||||
return d
|
||||
}
|
||||
|
||||
func Init() {
|
||||
if !config.Config.Interlock.Open { // TODO
|
||||
return
|
||||
}
|
||||
slog.Info("初始化联锁接口模块")
|
||||
_default = newInterlockProxy()
|
||||
}
|
140
third_party/message/interlock.go
vendored
Normal file
140
third_party/message/interlock.go
vendored
Normal file
@ -0,0 +1,140 @@
|
||||
package message
|
||||
|
||||
import "fmt"
|
||||
|
||||
// 消息包头解析
|
||||
type InterlockMsgPkgHeader struct {
|
||||
Header1 byte //包头1 1个字节
|
||||
Header2 byte //包头2 1个字节
|
||||
TypeCode uint8 //类型码 1个字节 0x02
|
||||
SerialNumber uint8 //序列号 1个字节 序列号0~255
|
||||
Reserve1 byte //预留 1个字节
|
||||
Reserve2 byte //预留 1个字节
|
||||
}
|
||||
|
||||
func (h *InterlockMsgPkgHeader) Encode() []byte {
|
||||
return []byte{h.Header1, h.Header2, h.TypeCode, h.SerialNumber, h.Reserve1, h.Reserve2}
|
||||
}
|
||||
|
||||
func (h *InterlockMsgPkgHeader) Decode(buf []byte) error {
|
||||
if len(buf) < 6 {
|
||||
return fmt.Errorf("数据少于6个字节")
|
||||
}
|
||||
h.Header1 = buf[0]
|
||||
h.Header2 = buf[1]
|
||||
h.TypeCode = buf[2]
|
||||
h.SerialNumber = buf[3]
|
||||
h.Reserve1 = buf[4]
|
||||
h.Reserve2 = buf[5]
|
||||
return nil
|
||||
}
|
||||
|
||||
// 消息包尾解析
|
||||
type InterlockMsgPkgTail struct {
|
||||
Tail []byte // 包尾2个字节
|
||||
}
|
||||
|
||||
func (t *InterlockMsgPkgTail) Encode() []byte {
|
||||
if len(t.Tail) == 0 {
|
||||
return make([]byte, 2)
|
||||
}
|
||||
return t.Tail
|
||||
}
|
||||
|
||||
func (t *InterlockMsgPkgTail) Decode(buf []byte) error {
|
||||
if len(buf) < 2 {
|
||||
return fmt.Errorf("数据少于2个字节")
|
||||
}
|
||||
t.Tail = buf[len(buf)-2:]
|
||||
return nil
|
||||
}
|
||||
|
||||
// 发送给联锁的采集数据
|
||||
type InterlockSendMsgPkg struct {
|
||||
Header *InterlockMsgPkgHeader // 包头
|
||||
Info []bool // 发给联锁的状态数据
|
||||
Tail *InterlockMsgPkgTail // 包尾
|
||||
}
|
||||
|
||||
var boolsToByteArrLen int = 8
|
||||
|
||||
func (m *InterlockSendMsgPkg) Encode() []byte {
|
||||
var data []byte
|
||||
data = append(data, m.Header.Encode()...)
|
||||
for index, length, cycles := 0, len(m.Info), len(m.Info)/boolsToByteArrLen; index < cycles; index++ {
|
||||
startIndex := index * boolsToByteArrLen
|
||||
toByteArr := [8]bool{}
|
||||
for i := 0; i < boolsToByteArrLen && startIndex < length; i++ {
|
||||
startIndex = startIndex + i
|
||||
toByteArr[i] = m.Info[startIndex+i]
|
||||
}
|
||||
data = append(data, boolsToByte(toByteArr))
|
||||
}
|
||||
data = append(data, m.Tail.Encode()...)
|
||||
return data
|
||||
}
|
||||
|
||||
// bool数组转byte
|
||||
func boolsToByte(flags [8]bool) byte {
|
||||
var result uint8
|
||||
for _, b := range flags {
|
||||
result <<= 1
|
||||
if b {
|
||||
result |= 1
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
// 收到联锁发来的驱动数据
|
||||
type InterlockReceiveMsgPkg struct {
|
||||
toagent_len int32
|
||||
et_out_num int32
|
||||
tcc_output_len int32
|
||||
Header *InterlockMsgPkgHeader // 包头
|
||||
SyncZone []bool // 同步区状态
|
||||
DriveInfo []bool // 驱动数据
|
||||
TccInfo []bool // 应答器报文
|
||||
Tail *InterlockMsgPkgTail // 包尾
|
||||
}
|
||||
|
||||
// ET_OUT_NUM、TOAGENTLEN、TCC_OUTPUT_LEN(应答器数量*131)的具体数值取决于数据配置。
|
||||
func NewInterlockReceiveMsgPkg(tlen, etLen, tccLen int32) *InterlockReceiveMsgPkg {
|
||||
return &InterlockReceiveMsgPkg{
|
||||
toagent_len: tlen,
|
||||
et_out_num: etLen,
|
||||
tcc_output_len: tccLen,
|
||||
Header: &InterlockMsgPkgHeader{},
|
||||
Tail: &InterlockMsgPkgTail{},
|
||||
}
|
||||
}
|
||||
|
||||
func (t *InterlockReceiveMsgPkg) Decode(buf []byte) error {
|
||||
var preIndex, lastIndex int32 = 0, 6
|
||||
// 包头
|
||||
t.Header.Decode(buf[preIndex:lastIndex])
|
||||
// 同步区状态
|
||||
preIndex = lastIndex
|
||||
lastIndex = lastIndex + t.toagent_len
|
||||
t.parseByte(t.SyncZone, buf, preIndex, lastIndex)
|
||||
// 驱动数据
|
||||
preIndex = lastIndex
|
||||
lastIndex = lastIndex + t.et_out_num
|
||||
t.parseByte(t.DriveInfo, buf, preIndex, lastIndex)
|
||||
// 应答器报文
|
||||
preIndex = lastIndex
|
||||
lastIndex = lastIndex + t.tcc_output_len
|
||||
t.parseByte(t.TccInfo, buf, preIndex, lastIndex)
|
||||
// 包尾
|
||||
t.Tail.Decode(buf)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (t *InterlockReceiveMsgPkg) parseByte(r []bool, buf []byte, start, end int32) {
|
||||
for i := start; i < end; i++ {
|
||||
b := buf[i]
|
||||
for bit := 7; bit >= 0; bit-- {
|
||||
r = append(r, (b&(1<<bit)) != 0)
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user