28 lines
1013 B
C#
28 lines
1013 B
C#
using Dlhis.Middle.Apis.Handlers;
|
|
using Dlhis.Middle.Request;
|
|
using Dlhis.Middle.Response;
|
|
using Kurisu.AspNetCore.UnifyResultAndValidation;
|
|
using Kurisu.RemoteCall.Attributes;
|
|
|
|
namespace Dlhis.Middle.Apis;
|
|
|
|
[EnableRemoteClient(Name = "face-service", BaseUrl = "${BaseUrl}", PolicyHandler = typeof(ClientHandler))]
|
|
public interface ICommonApi
|
|
{
|
|
[Post("/api/user/oauth2/clientgrant")]
|
|
public Task<DefaultApiResult<TokenResponse>> AuthAsync(object request);
|
|
|
|
[Auth(TokenHandler = typeof(FaceBearerTokenHandler))]
|
|
[Get("/api/common/SysData/download")]
|
|
public Task<DefaultApiResult<List<T>>> DownloadAsync<T>(string factory, string tableName);
|
|
}
|
|
|
|
//HealthzClientHandler
|
|
|
|
[EnableRemoteClient(Name = "face-service", BaseUrl = "${BaseUrl}", PolicyHandler = typeof(HealthzClientHandler))]
|
|
public interface IHealthzApi
|
|
{
|
|
[Auth(TokenHandler = typeof(FaceBearerTokenHandler))]
|
|
[Post("/api/common/middles/healthz")]
|
|
public Task<DefaultApiResult> CheckHealthAsync(HealthCheckRequest request);
|
|
} |