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