43 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
		
		
			
		
	
	
			43 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
|  | // Code generated by goctl. DO NOT EDIT. | ||
|  | // goctl 1.7.2 | ||
|  | // Source: user.proto | ||
|  | 
 | ||
|  | package server | ||
|  | 
 | ||
|  | import ( | ||
|  | 	"context" | ||
|  | 
 | ||
|  | 	"tianyuan-api/apps/user/internal/logic/apirequestservice" | ||
|  | 	"tianyuan-api/apps/user/internal/svc" | ||
|  | 	"tianyuan-api/apps/user/user" | ||
|  | ) | ||
|  | 
 | ||
|  | type ApiRequestServiceServer struct { | ||
|  | 	svcCtx *svc.ServiceContext | ||
|  | 	user.UnimplementedApiRequestServiceServer | ||
|  | } | ||
|  | 
 | ||
|  | func NewApiRequestServiceServer(svcCtx *svc.ServiceContext) *ApiRequestServiceServer { | ||
|  | 	return &ApiRequestServiceServer{ | ||
|  | 		svcCtx: svcCtx, | ||
|  | 	} | ||
|  | } | ||
|  | 
 | ||
|  | // 添加API请求记录 | ||
|  | func (s *ApiRequestServiceServer) AddApiRequest(ctx context.Context, in *user.AddApiRequestRequest) (*user.AddApiRequestResponse, error) { | ||
|  | 	l := apirequestservicelogic.NewAddApiRequestLogic(ctx, s.svcCtx) | ||
|  | 	return l.AddApiRequest(in) | ||
|  | } | ||
|  | 
 | ||
|  | // 查询API请求记录 | ||
|  | func (s *ApiRequestServiceServer) GetApiRequests(ctx context.Context, in *user.GetApiRequestsRequest) (*user.GetApiRequestsResponse, error) { | ||
|  | 	l := apirequestservicelogic.NewGetApiRequestsLogic(ctx, s.svcCtx) | ||
|  | 	return l.GetApiRequests(in) | ||
|  | } | ||
|  | 
 | ||
|  | // 查询API请求记录ByTransactionId | ||
|  | func (s *ApiRequestServiceServer) GetApiRequestByTransactionId(ctx context.Context, in *user.GetApiRequestByTransactionIdRequest) (*user.GetApiRequestByTransactionIdResponse, error) { | ||
|  | 	l := apirequestservicelogic.NewGetApiRequestByTransactionIdLogic(ctx, s.svcCtx) | ||
|  | 	return l.GetApiRequestByTransactionId(in) | ||
|  | } |