using System.Collections.Generic;
using Sers.Core.Module.Rpc;
using Sers.Gover.Base;
using Sers.Gover.Base.Model;
using Sers.SersLoader;
using Sers.SersLoader.ApiDesc.Attribute.Valid;
using Vit.Core.Util.ComponentModel.Api;
using Vit.Core.Util.ComponentModel.Data;
using Vit.Core.Util.ComponentModel.Model;
namespace Sers.Gover.Controllers.ApiControllers
{
[SsStationName("_gover_")]
public class ServiceStationController : IApiController
{
///
/// 获取所有ServiceStation
///
///
[SsRoute("serviceStation/getAll")]
[SsCallerSource(ECallerSource.Internal)]
//[CallFromGover]
[SsName("获取所有ServiceStation")]
public ApiReturn> GetAll()
{
return new ApiReturn> { data = GoverApiCenterService.Instance.ServiceStation_GetAll() };
}
///
/// 暂停指定的服务站点
///
///
[SsRoute("serviceStation/pause")]
[SsCallerSource(ECallerSource.Internal)]
//[CallFromGover]
[SsName("暂停指定的服务站点")]
public ApiReturn Pause(string connKey)
{
return new ApiReturn { success = GoverApiCenterService.Instance.ServiceStation_Pause(connKey) };
}
///
/// 启用指定的服务站点
///
///
[SsRoute("serviceStation/start")]
[SsCallerSource(ECallerSource.Internal)]
//[CallFromGover]
[SsName("启用指定的服务站点")]
public ApiReturn Start(string connKey)
{
return new ApiReturn { success = GoverApiCenterService.Instance.ServiceStation_Start(connKey) };
}
///
/// 启用指定的服务站点
///
///
[SsRoute("serviceStation/stop")]
[SsCallerSource(ECallerSource.Internal)]
//[CallFromGover]
[SsName("启用指定的服务站点")]
public ApiReturn Stop(string connKey)
{
return new ApiReturn { success = GoverApiCenterService.Instance.ServiceStation_Stop(connKey) };
}
}
}