去掉无用代码
This commit is contained in:
@@ -1,47 +0,0 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
dto "cid/model/dto/app"
|
||||
service "cid/service/app"
|
||||
"context"
|
||||
|
||||
"gitea.com/red-future/common/beans"
|
||||
)
|
||||
|
||||
type applicationController struct{}
|
||||
|
||||
// Application 应用控制器
|
||||
var Application = new(applicationController)
|
||||
|
||||
// CreateApplication 创建应用
|
||||
func (c *applicationController) CreateApplication(ctx context.Context, req *dto.CreateApplicationReq) (res *dto.CreateApplicationRes, err error) {
|
||||
return service.Application.Create(ctx, req)
|
||||
}
|
||||
|
||||
// ListApplication 获取应用列表
|
||||
func (c *applicationController) ListApplication(ctx context.Context, req *dto.ListApplicationReq) (res *dto.ListApplicationRes, err error) {
|
||||
return service.Application.List(ctx, req)
|
||||
}
|
||||
|
||||
// GetApplication 获取应用详情
|
||||
func (c *applicationController) GetApplication(ctx context.Context, req *dto.GetApplicationReq) (res *dto.GetApplicationRes, err error) {
|
||||
return service.Application.GetOne(ctx, req)
|
||||
}
|
||||
|
||||
// UpdateApplication 更新应用
|
||||
func (c *applicationController) UpdateApplication(ctx context.Context, req *dto.UpdateApplicationReq) (res *beans.ResponseEmpty, err error) {
|
||||
err = service.Application.Update(ctx, req)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateApplicationStatus 更新应用状态
|
||||
func (c *applicationController) UpdateApplicationStatus(ctx context.Context, req *dto.UpdateApplicationStatusReq) (res *beans.ResponseEmpty, err error) {
|
||||
err = service.Application.UpdateStatus(ctx, req)
|
||||
return
|
||||
}
|
||||
|
||||
// DeleteApplication 删除应用
|
||||
func (c *applicationController) DeleteApplication(ctx context.Context, req *dto.DeleteApplicationReq) (res *beans.ResponseEmpty, err error) {
|
||||
err = service.Application.Delete(ctx, req)
|
||||
return
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package data
|
||||
|
||||
import (
|
||||
dto "cid/model/dto/data"
|
||||
service "cid/service/data"
|
||||
"context"
|
||||
|
||||
"gitea.com/red-future/common/beans"
|
||||
)
|
||||
|
||||
type apiInterfaceController struct{}
|
||||
|
||||
// ApiInterface 接口控制器
|
||||
var ApiInterface = new(apiInterfaceController)
|
||||
|
||||
// CreateApiInterface 创建接口
|
||||
func (c *apiInterfaceController) CreateApiInterface(ctx context.Context, req *dto.CreateApiInterfaceReq) (res *dto.CreateApiInterfaceRes, err error) {
|
||||
return service.ApiInterface.Create(ctx, req)
|
||||
}
|
||||
|
||||
// ListApiInterface 获取接口列表
|
||||
func (c *apiInterfaceController) ListApiInterface(ctx context.Context, req *dto.ListApiInterfaceReq) (res *dto.ListApiInterfaceRes, err error) {
|
||||
return service.ApiInterface.List(ctx, req)
|
||||
}
|
||||
|
||||
// GetApiInterface 获取接口详情
|
||||
func (c *apiInterfaceController) GetApiInterface(ctx context.Context, req *dto.GetApiInterfaceReq) (res *dto.GetApiInterfaceRes, err error) {
|
||||
return service.ApiInterface.GetOne(ctx, req)
|
||||
}
|
||||
|
||||
// UpdateApiInterface 更新接口
|
||||
func (c *apiInterfaceController) UpdateApiInterface(ctx context.Context, req *dto.UpdateApiInterfaceReq) (res *beans.ResponseEmpty, err error) {
|
||||
err = service.ApiInterface.Update(ctx, req)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateApiInterfaceStatus 更新接口状态
|
||||
func (c *apiInterfaceController) UpdateApiInterfaceStatus(ctx context.Context, req *dto.UpdateApiInterfaceStatusReq) (res *beans.ResponseEmpty, err error) {
|
||||
err = service.ApiInterface.UpdateStatus(ctx, req)
|
||||
return
|
||||
}
|
||||
|
||||
// DeleteApiInterface 删除接口
|
||||
func (c *apiInterfaceController) DeleteApiInterface(ctx context.Context, req *dto.DeleteApiInterfaceReq) (res *beans.ResponseEmpty, err error) {
|
||||
err = service.ApiInterface.Delete(ctx, req)
|
||||
return
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package data
|
||||
|
||||
import (
|
||||
dto "cid/model/dto/data"
|
||||
service "cid/service/data"
|
||||
"context"
|
||||
)
|
||||
|
||||
type dataFetchController struct{}
|
||||
|
||||
// DataFetch 数据获取控制器
|
||||
var DataFetch = new(dataFetchController)
|
||||
|
||||
// ExecuteDataFetch 执行数据获取
|
||||
func (c *dataFetchController) ExecuteDataFetch(ctx context.Context, req *dto.ExecuteDataFetchReq) (res *dto.ExecuteDataFetchRes, err error) {
|
||||
return service.DataFetch.Execute(ctx, req)
|
||||
}
|
||||
|
||||
// BatchExecuteDataFetch 批量执行数据获取
|
||||
func (c *dataFetchController) BatchExecuteDataFetch(ctx context.Context, req *dto.BatchExecuteDataFetchReq) (res *dto.BatchExecuteDataFetchRes, err error) {
|
||||
return service.DataFetch.BatchExecute(ctx, req)
|
||||
}
|
||||
|
||||
// ListDataFetchLog 获取数据获取日志列表
|
||||
func (c *dataFetchController) ListDataFetchLog(ctx context.Context, req *dto.ListDataFetchLogReq) (res *dto.ListDataFetchLogRes, err error) {
|
||||
return service.DataFetch.List(ctx, req)
|
||||
}
|
||||
|
||||
// GetDataFetchLog 获取数据获取日志详情
|
||||
func (c *dataFetchController) GetDataFetchLog(ctx context.Context, req *dto.GetDataFetchLogReq) (res *dto.GetDataFetchLogRes, err error) {
|
||||
return service.DataFetch.GetOne(ctx, req)
|
||||
}
|
||||
|
||||
// ReExecuteDataFetch 重新执行数据获取
|
||||
func (c *dataFetchController) ReExecuteDataFetch(ctx context.Context, req *dto.ReExecuteDataFetchReq) (res *dto.ReExecuteDataFetchRes, err error) {
|
||||
return service.DataFetch.ReExecute(ctx, req)
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package data
|
||||
|
||||
import (
|
||||
dto "cid/model/dto/data"
|
||||
service "cid/service/data"
|
||||
"context"
|
||||
|
||||
"gitea.com/red-future/common/beans"
|
||||
)
|
||||
|
||||
type platformController struct{}
|
||||
|
||||
// Platform 平台控制器
|
||||
var Platform = new(platformController)
|
||||
|
||||
// CreatePlatform 创建平台
|
||||
func (c *platformController) CreatePlatform(ctx context.Context, req *dto.CreatePlatformReq) (res *dto.CreatePlatformRes, err error) {
|
||||
return service.Platform.Create(ctx, req)
|
||||
}
|
||||
|
||||
// ListPlatform 获取平台列表
|
||||
func (c *platformController) ListPlatform(ctx context.Context, req *dto.ListPlatformReq) (res *dto.ListPlatformRes, err error) {
|
||||
return service.Platform.List(ctx, req)
|
||||
}
|
||||
|
||||
// GetPlatform 获取平台详情
|
||||
func (c *platformController) GetPlatform(ctx context.Context, req *dto.GetPlatformReq) (res *dto.GetPlatformRes, err error) {
|
||||
return service.Platform.GetOne(ctx, req)
|
||||
}
|
||||
|
||||
// UpdatePlatform 更新平台
|
||||
func (c *platformController) UpdatePlatform(ctx context.Context, req *dto.UpdatePlatformReq) (res *beans.ResponseEmpty, err error) {
|
||||
err = service.Platform.Update(ctx, req)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdatePlatformStatus 更新平台状态
|
||||
func (c *platformController) UpdatePlatformStatus(ctx context.Context, req *dto.UpdatePlatformStatusReq) (res *beans.ResponseEmpty, err error) {
|
||||
err = service.Platform.UpdateStatus(ctx, req)
|
||||
return
|
||||
}
|
||||
|
||||
// DeletePlatform 删除平台
|
||||
func (c *platformController) DeletePlatform(ctx context.Context, req *dto.DeletePlatformReq) (res *beans.ResponseEmpty, err error) {
|
||||
err = service.Platform.Delete(ctx, req)
|
||||
return
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
package mapping
|
||||
|
||||
import (
|
||||
dto "cid/model/dto/mapping"
|
||||
service "cid/service/mapping"
|
||||
"context"
|
||||
|
||||
"gitea.com/red-future/common/beans"
|
||||
)
|
||||
|
||||
type dataMappingController struct{}
|
||||
|
||||
// DataMapping 数据映射控制器
|
||||
var DataMapping = new(dataMappingController)
|
||||
|
||||
// CreateDataMapping 创建数据映射
|
||||
func (c *dataMappingController) CreateDataMapping(ctx context.Context, req *dto.CreateDataMappingReq) (res *dto.CreateDataMappingRes, err error) {
|
||||
return service.DataMapping.Create(ctx, req)
|
||||
}
|
||||
|
||||
// BatchCreateDataMappings 批量创建数据映射
|
||||
func (c *dataMappingController) BatchCreateDataMappings(ctx context.Context, req *dto.BatchCreateDataMappingReq) (res *dto.BatchCreateDataMappingRes, err error) {
|
||||
return service.DataMapping.BatchCreate(ctx, req)
|
||||
}
|
||||
|
||||
// ListDataMapping 获取数据映射列表
|
||||
func (c *dataMappingController) ListDataMapping(ctx context.Context, req *dto.ListDataMappingReq) (res *dto.ListDataMappingRes, err error) {
|
||||
return service.DataMapping.List(ctx, req)
|
||||
}
|
||||
|
||||
// GetDataMapping 获取数据映射详情
|
||||
func (c *dataMappingController) GetDataMapping(ctx context.Context, req *dto.GetDataMappingReq) (res *dto.GetDataMappingRes, err error) {
|
||||
return service.DataMapping.GetOne(ctx, req)
|
||||
}
|
||||
|
||||
// UpdateDataMapping 更新数据映射
|
||||
func (c *dataMappingController) UpdateDataMapping(ctx context.Context, req *dto.UpdateDataMappingReq) (res *beans.ResponseEmpty, err error) {
|
||||
err = service.DataMapping.Update(ctx, req)
|
||||
return
|
||||
}
|
||||
|
||||
// DeleteDataMapping 删除数据映射
|
||||
func (c *dataMappingController) DeleteDataMapping(ctx context.Context, req *dto.DeleteDataMappingReq) (res *beans.ResponseEmpty, err error) {
|
||||
err = service.DataMapping.Delete(ctx, req)
|
||||
return
|
||||
}
|
||||
|
||||
// ExecuteDataMapping 执行数据映射
|
||||
func (c *dataMappingController) ExecuteDataMapping(ctx context.Context, req *dto.ExecuteDataMappingReq) (res *dto.ExecuteDataMappingRes, err error) {
|
||||
return service.DataMapping.Execute(ctx, req)
|
||||
}
|
||||
Reference in New Issue
Block a user