优化代码

This commit is contained in:
GoEdgeLab
2022-12-12 11:12:55 +08:00
parent e745ad6dfd
commit 24a7ec8f02
3 changed files with 9 additions and 6 deletions

View File

@@ -4,6 +4,7 @@ package nodes
import (
"github.com/TeaOSLab/EdgeAPI/internal/rpc/services"
"github.com/TeaOSLab/EdgeAPI/internal/rpc/services/clients"
"github.com/TeaOSLab/EdgeAPI/internal/rpc/services/users"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
"google.golang.org/grpc"
@@ -404,12 +405,12 @@ func (this *APINode) registerServices(server *grpc.Server) {
this.rest(instance)
}
{
var instance = this.serviceInstance(&services.FormalClientSystemService{}).(*services.FormalClientSystemService)
var instance = this.serviceInstance(&clients.FormalClientSystemService{}).(*clients.FormalClientSystemService)
pb.RegisterFormalClientSystemServiceServer(server, instance)
this.rest(instance)
}
{
var instance = this.serviceInstance(&services.FormalClientBrowserService{}).(*services.FormalClientBrowserService)
var instance = this.serviceInstance(&clients.FormalClientBrowserService{}).(*clients.FormalClientBrowserService)
pb.RegisterFormalClientBrowserServiceServer(server, instance)
this.rest(instance)
}

View File

@@ -1,18 +1,19 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
package services
package clients
import (
"context"
"github.com/TeaOSLab/EdgeAPI/internal/db/models"
"github.com/TeaOSLab/EdgeAPI/internal/errors"
"github.com/TeaOSLab/EdgeAPI/internal/rpc/services"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
"github.com/iwind/TeaGo/types"
)
// FormalClientBrowserService 浏览器信息库服务
type FormalClientBrowserService struct {
BaseService
services.BaseService
}
// CreateFormalClientBrowser 创建浏览器信息

View File

@@ -1,18 +1,19 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
package services
package clients
import (
"context"
"github.com/TeaOSLab/EdgeAPI/internal/db/models"
"github.com/TeaOSLab/EdgeAPI/internal/errors"
"github.com/TeaOSLab/EdgeAPI/internal/rpc/services"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
"github.com/iwind/TeaGo/types"
)
// FormalClientSystemService 操作系统信息库服务
type FormalClientSystemService struct {
BaseService
services.BaseService
}
// CreateFormalClientSystem 创建操作系统信息