youtu_grpc/app/auth_service/internal/server/auth_service_server.go
2025-02-07 15:18:26 +08:00

39 lines
1.2 KiB
Go

// Code generated by goctl. DO NOT EDIT.
// goctl 1.7.6
// Source: auth_service.proto
package server
import (
"context"
auth_service2 "gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/auth_service/auth_service"
logic2 "gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/auth_service/internal/logic"
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/auth_service/internal/svc"
)
type AuthServiceServer struct {
svcCtx *svc.ServiceContext
auth_service2.UnimplementedAuthServiceServer
}
func NewAuthServiceServer(svcCtx *svc.ServiceContext) *AuthServiceServer {
return &AuthServiceServer{
svcCtx: svcCtx,
}
}
func (s *AuthServiceServer) Ping(ctx context.Context, in *auth_service2.Request) (*auth_service2.Response, error) {
l := logic2.NewPingLogic(ctx, s.svcCtx)
return l.Ping(in)
}
func (s *AuthServiceServer) Code2Session(ctx context.Context, in *auth_service2.Code2SessionRequest) (*auth_service2.Code2SessionResponse, error) {
l := logic2.NewCode2SessionLogic(ctx, s.svcCtx)
return l.Code2Session(in)
}
func (s *AuthServiceServer) GetAccessToken(ctx context.Context, in *auth_service2.GetAccessTokenRequest) (*auth_service2.GetAccessTokenResponse, error) {
l := logic2.NewGetAccessTokenLogic(ctx, s.svcCtx)
return l.GetAccessToken(in)
}