调整项目结构
This commit is contained in:
parent
e13b3dfa8c
commit
bff8d04ddd
@ -3,11 +3,10 @@ package main
|
|||||||
import (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/auth_service/auth_service"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/auth_service/auth_service"
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/auth_service/internal/config"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/auth_service/internal/config"
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/auth_service/internal/server"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/auth_service/internal/server"
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/auth_service/internal/svc"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/auth_service/internal/svc"
|
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/core/conf"
|
"github.com/zeromicro/go-zero/core/conf"
|
||||||
"github.com/zeromicro/go-zero/core/service"
|
"github.com/zeromicro/go-zero/core/service"
|
@ -6,20 +6,19 @@ package auth_service_client
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
auth_service2 "gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/auth_service/auth_service"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/auth_service/auth_service"
|
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/zrpc"
|
"github.com/zeromicro/go-zero/zrpc"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
Code2SessionRequest = auth_service.Code2SessionRequest
|
Code2SessionRequest = auth_service2.Code2SessionRequest
|
||||||
Code2SessionResponse = auth_service.Code2SessionResponse
|
Code2SessionResponse = auth_service2.Code2SessionResponse
|
||||||
GetAccessTokenRequest = auth_service.GetAccessTokenRequest
|
GetAccessTokenRequest = auth_service2.GetAccessTokenRequest
|
||||||
GetAccessTokenResponse = auth_service.GetAccessTokenResponse
|
GetAccessTokenResponse = auth_service2.GetAccessTokenResponse
|
||||||
Request = auth_service.Request
|
Request = auth_service2.Request
|
||||||
Response = auth_service.Response
|
Response = auth_service2.Response
|
||||||
|
|
||||||
AuthService interface {
|
AuthService interface {
|
||||||
Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
|
Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
|
||||||
@ -39,16 +38,16 @@ func NewAuthService(cli zrpc.Client) AuthService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m *defaultAuthService) Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
|
func (m *defaultAuthService) Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
|
||||||
client := auth_service.NewAuthServiceClient(m.cli.Conn())
|
client := auth_service2.NewAuthServiceClient(m.cli.Conn())
|
||||||
return client.Ping(ctx, in, opts...)
|
return client.Ping(ctx, in, opts...)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *defaultAuthService) Code2Session(ctx context.Context, in *Code2SessionRequest, opts ...grpc.CallOption) (*Code2SessionResponse, error) {
|
func (m *defaultAuthService) Code2Session(ctx context.Context, in *Code2SessionRequest, opts ...grpc.CallOption) (*Code2SessionResponse, error) {
|
||||||
client := auth_service.NewAuthServiceClient(m.cli.Conn())
|
client := auth_service2.NewAuthServiceClient(m.cli.Conn())
|
||||||
return client.Code2Session(ctx, in, opts...)
|
return client.Code2Session(ctx, in, opts...)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *defaultAuthService) GetAccessToken(ctx context.Context, in *GetAccessTokenRequest, opts ...grpc.CallOption) (*GetAccessTokenResponse, error) {
|
func (m *defaultAuthService) GetAccessToken(ctx context.Context, in *GetAccessTokenRequest, opts ...grpc.CallOption) (*GetAccessTokenResponse, error) {
|
||||||
client := auth_service.NewAuthServiceClient(m.cli.Conn())
|
client := auth_service2.NewAuthServiceClient(m.cli.Conn())
|
||||||
return client.GetAccessToken(ctx, in, opts...)
|
return client.GetAccessToken(ctx, in, opts...)
|
||||||
}
|
}
|
@ -2,9 +2,8 @@ package logic
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/auth_service/auth_service"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/auth_service/auth_service"
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/auth_service/internal/svc"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/auth_service/internal/svc"
|
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
)
|
)
|
@ -2,9 +2,8 @@ package logic
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/auth_service/auth_service"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/auth_service/auth_service"
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/auth_service/internal/svc"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/auth_service/internal/svc"
|
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
)
|
)
|
@ -2,9 +2,8 @@ package logic
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/auth_service/auth_service"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/auth_service/auth_service"
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/auth_service/internal/svc"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/auth_service/internal/svc"
|
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
)
|
)
|
38
app/auth_service/internal/server/auth_service_server.go
Normal file
38
app/auth_service/internal/server/auth_service_server.go
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
// 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)
|
||||||
|
}
|
@ -2,14 +2,14 @@ package svc
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/auth_service/internal/config"
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/auth_service/internal/config"
|
||||||
cli "gitea.youtukeji.com.cn/xiabin/youtu_grpc/auth_service/pkg"
|
cli2 "gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/auth_service/pkg"
|
||||||
redisCache "github.com/silenceper/wechat/v2/cache"
|
redisCache "github.com/silenceper/wechat/v2/cache"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ServiceContext struct {
|
type ServiceContext struct {
|
||||||
Config config.Config
|
Config config.Config
|
||||||
Cli cli.Helper
|
Cli cli2.Helper
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewServiceContext(c config.Config) *ServiceContext {
|
func NewServiceContext(c config.Config) *ServiceContext {
|
||||||
@ -24,12 +24,12 @@ func (svc *ServiceContext) InitClient(c config.Config) {
|
|||||||
|
|
||||||
//配置小程序cli(抖音&微信)
|
//配置小程序cli(抖音&微信)
|
||||||
for _, v := range c.AppData {
|
for _, v := range c.AppData {
|
||||||
var c cli.DWClient
|
var c cli2.DWClient
|
||||||
switch v.Type {
|
switch v.Type {
|
||||||
case cli.DouyinClientType:
|
case cli2.DouyinClientType:
|
||||||
c = cli.NewDouYinApi(v.AppId, v.AppSecret, dwCache)
|
c = cli2.NewDouYinApi(v.AppId, v.AppSecret, dwCache)
|
||||||
case cli.WechatClientType:
|
case cli2.WechatClientType:
|
||||||
c = cli.NewWechatApi(v.AppId, v.AppSecret, dwCache)
|
c = cli2.NewWechatApi(v.AppId, v.AppSecret, dwCache)
|
||||||
default:
|
default:
|
||||||
continue
|
continue
|
||||||
}
|
}
|
@ -3,7 +3,7 @@ package cli
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
access_token "gitea.youtukeji.com.cn/xiabin/youtu_grpc/auth_service/pkg/douyin/access-token"
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/auth_service/pkg/douyin/access-token"
|
||||||
douyinopenapi "gitea.youtukeji.com.cn/youtu/openapi-helper/douyin"
|
douyinopenapi "gitea.youtukeji.com.cn/youtu/openapi-helper/douyin"
|
||||||
"github.com/silenceper/wechat/v2/cache"
|
"github.com/silenceper/wechat/v2/cache"
|
||||||
)
|
)
|
@ -3,11 +3,10 @@ package main
|
|||||||
import (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/douyin_ecpm_calculation_service/douyin_ecpm_calculation_service"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/douyin_ecpm_calculation_service/douyin_ecpm_calculation_service"
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/douyin_ecpm_calculation_service/internal/config"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/douyin_ecpm_calculation_service/internal/config"
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/douyin_ecpm_calculation_service/internal/server"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/douyin_ecpm_calculation_service/internal/server"
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/douyin_ecpm_calculation_service/internal/svc"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/douyin_ecpm_calculation_service/internal/svc"
|
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/core/conf"
|
"github.com/zeromicro/go-zero/core/conf"
|
||||||
"github.com/zeromicro/go-zero/core/service"
|
"github.com/zeromicro/go-zero/core/service"
|
@ -6,18 +6,17 @@ package douyin_ecpm_calculation_service_client
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
douyin_ecpm_calculation_service2 "gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/douyin_ecpm_calculation_service/douyin_ecpm_calculation_service"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/douyin_ecpm_calculation_service/douyin_ecpm_calculation_service"
|
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/zrpc"
|
"github.com/zeromicro/go-zero/zrpc"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
GetEcpmRequest = douyin_ecpm_calculation_service.GetEcpmRequest
|
GetEcpmRequest = douyin_ecpm_calculation_service2.GetEcpmRequest
|
||||||
GetEcpmResponse = douyin_ecpm_calculation_service.GetEcpmResponse
|
GetEcpmResponse = douyin_ecpm_calculation_service2.GetEcpmResponse
|
||||||
Request = douyin_ecpm_calculation_service.Request
|
Request = douyin_ecpm_calculation_service2.Request
|
||||||
Response = douyin_ecpm_calculation_service.Response
|
Response = douyin_ecpm_calculation_service2.Response
|
||||||
|
|
||||||
DouyinEcpmCalculationService interface {
|
DouyinEcpmCalculationService interface {
|
||||||
Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
|
Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
|
||||||
@ -36,11 +35,11 @@ func NewDouyinEcpmCalculationService(cli zrpc.Client) DouyinEcpmCalculationServi
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m *defaultDouyinEcpmCalculationService) Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
|
func (m *defaultDouyinEcpmCalculationService) Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
|
||||||
client := douyin_ecpm_calculation_service.NewDouyinEcpmCalculationServiceClient(m.cli.Conn())
|
client := douyin_ecpm_calculation_service2.NewDouyinEcpmCalculationServiceClient(m.cli.Conn())
|
||||||
return client.Ping(ctx, in, opts...)
|
return client.Ping(ctx, in, opts...)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *defaultDouyinEcpmCalculationService) GetEcpm(ctx context.Context, in *GetEcpmRequest, opts ...grpc.CallOption) (*GetEcpmResponse, error) {
|
func (m *defaultDouyinEcpmCalculationService) GetEcpm(ctx context.Context, in *GetEcpmRequest, opts ...grpc.CallOption) (*GetEcpmResponse, error) {
|
||||||
client := douyin_ecpm_calculation_service.NewDouyinEcpmCalculationServiceClient(m.cli.Conn())
|
client := douyin_ecpm_calculation_service2.NewDouyinEcpmCalculationServiceClient(m.cli.Conn())
|
||||||
return client.GetEcpm(ctx, in, opts...)
|
return client.GetEcpm(ctx, in, opts...)
|
||||||
}
|
}
|
@ -5,15 +5,14 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/auth_service/auth_service"
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/auth_service/auth_service"
|
||||||
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/douyin_ecpm_calculation_service/douyin_ecpm_calculation_service"
|
||||||
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/douyin_ecpm_calculation_service/internal/svc"
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/douyin_ecpm_calculation_service/douyin_ecpm_calculation_service"
|
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/douyin_ecpm_calculation_service/internal/svc"
|
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
)
|
)
|
||||||
|
|
@ -2,9 +2,8 @@ package logic
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/douyin_ecpm_calculation_service/douyin_ecpm_calculation_service"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/douyin_ecpm_calculation_service/douyin_ecpm_calculation_service"
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/douyin_ecpm_calculation_service/internal/svc"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/douyin_ecpm_calculation_service/internal/svc"
|
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
)
|
)
|
@ -0,0 +1,33 @@
|
|||||||
|
// Code generated by goctl. DO NOT EDIT.
|
||||||
|
// goctl 1.7.6
|
||||||
|
// Source: douyin_ecpm_calculation_service.proto
|
||||||
|
|
||||||
|
package server
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
douyin_ecpm_calculation_service2 "gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/douyin_ecpm_calculation_service/douyin_ecpm_calculation_service"
|
||||||
|
logic2 "gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/douyin_ecpm_calculation_service/internal/logic"
|
||||||
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/douyin_ecpm_calculation_service/internal/svc"
|
||||||
|
)
|
||||||
|
|
||||||
|
type DouyinEcpmCalculationServiceServer struct {
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
douyin_ecpm_calculation_service2.UnimplementedDouyinEcpmCalculationServiceServer
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewDouyinEcpmCalculationServiceServer(svcCtx *svc.ServiceContext) *DouyinEcpmCalculationServiceServer {
|
||||||
|
return &DouyinEcpmCalculationServiceServer{
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *DouyinEcpmCalculationServiceServer) Ping(ctx context.Context, in *douyin_ecpm_calculation_service2.Request) (*douyin_ecpm_calculation_service2.Response, error) {
|
||||||
|
l := logic2.NewPingLogic(ctx, s.svcCtx)
|
||||||
|
return l.Ping(in)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *DouyinEcpmCalculationServiceServer) GetEcpm(ctx context.Context, in *douyin_ecpm_calculation_service2.GetEcpmRequest) (*douyin_ecpm_calculation_service2.GetEcpmResponse, error) {
|
||||||
|
l := logic2.NewGetEcpmLogic(ctx, s.svcCtx)
|
||||||
|
return l.GetEcpm(in)
|
||||||
|
}
|
@ -2,8 +2,8 @@ package svc
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/auth_service/auth_service"
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/auth_service/auth_service"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/douyin_ecpm_calculation_service/internal/config"
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/douyin_ecpm_calculation_service/internal/config"
|
||||||
"github.com/zeromicro/go-zero/core/conf"
|
"github.com/zeromicro/go-zero/core/conf"
|
||||||
"github.com/zeromicro/go-zero/core/discov"
|
"github.com/zeromicro/go-zero/core/discov"
|
||||||
"github.com/zeromicro/go-zero/zrpc"
|
"github.com/zeromicro/go-zero/zrpc"
|
@ -2,9 +2,8 @@ package logic
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/ranking_management/internal/svc"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/ranking_management/internal/svc"
|
ranking_management2 "gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/ranking_management/ranking_management"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/ranking_management/ranking_management"
|
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
)
|
)
|
||||||
@ -23,7 +22,7 @@ func NewGetRankingListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Ge
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l *GetRankingListLogic) GetRankingList(in *ranking_management.PageRequest, stream ranking_management.RankingManagement_GetRankingListServer) error {
|
func (l *GetRankingListLogic) GetRankingList(in *ranking_management2.PageRequest, stream ranking_management2.RankingManagement_GetRankingListServer) error {
|
||||||
// todo: add your logic here and delete this line
|
// todo: add your logic here and delete this line
|
||||||
|
|
||||||
return nil
|
return nil
|
@ -2,9 +2,8 @@ package logic
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/ranking_management/internal/svc"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/ranking_management/internal/svc"
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/ranking_management/ranking_management"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/ranking_management/ranking_management"
|
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
)
|
)
|
@ -2,9 +2,8 @@ package logic
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/ranking_management/internal/svc"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/ranking_management/internal/svc"
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/ranking_management/ranking_management"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/ranking_management/ranking_management"
|
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
)
|
)
|
@ -0,0 +1,38 @@
|
|||||||
|
// Code generated by goctl. DO NOT EDIT.
|
||||||
|
// goctl 1.7.6
|
||||||
|
// Source: ranking_management.proto
|
||||||
|
|
||||||
|
package server
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
logic2 "gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/ranking_management/internal/logic"
|
||||||
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/ranking_management/internal/svc"
|
||||||
|
ranking_management2 "gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/ranking_management/ranking_management"
|
||||||
|
)
|
||||||
|
|
||||||
|
type RankingManagementServer struct {
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
ranking_management2.UnimplementedRankingManagementServer
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewRankingManagementServer(svcCtx *svc.ServiceContext) *RankingManagementServer {
|
||||||
|
return &RankingManagementServer{
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *RankingManagementServer) Ping(ctx context.Context, in *ranking_management2.Request) (*ranking_management2.Response, error) {
|
||||||
|
l := logic2.NewPingLogic(ctx, s.svcCtx)
|
||||||
|
return l.Ping(in)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *RankingManagementServer) SetUserGameScore(ctx context.Context, in *ranking_management2.SetUserGameScoreRequest) (*ranking_management2.BaseResult, error) {
|
||||||
|
l := logic2.NewSetUserGameScoreLogic(ctx, s.svcCtx)
|
||||||
|
return l.SetUserGameScore(in)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *RankingManagementServer) GetRankingList(in *ranking_management2.PageRequest, stream ranking_management2.RankingManagement_GetRankingListServer) error {
|
||||||
|
l := logic2.NewGetRankingListLogic(stream.Context(), s.svcCtx)
|
||||||
|
return l.GetRankingList(in, stream)
|
||||||
|
}
|
@ -1,6 +1,8 @@
|
|||||||
package svc
|
package svc
|
||||||
|
|
||||||
import "gitea.youtukeji.com.cn/xiabin/youtu_grpc/user_management/internal/config"
|
import (
|
||||||
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/ranking_management/internal/config"
|
||||||
|
)
|
||||||
|
|
||||||
type ServiceContext struct {
|
type ServiceContext struct {
|
||||||
Config config.Config
|
Config config.Config
|
@ -3,11 +3,10 @@ package main
|
|||||||
import (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/ranking_management/internal/config"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/ranking_management/internal/config"
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/ranking_management/internal/server"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/ranking_management/internal/server"
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/ranking_management/internal/svc"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/ranking_management/internal/svc"
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/ranking_management/ranking_management"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/ranking_management/ranking_management"
|
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/core/conf"
|
"github.com/zeromicro/go-zero/core/conf"
|
||||||
"github.com/zeromicro/go-zero/core/service"
|
"github.com/zeromicro/go-zero/core/service"
|
@ -6,25 +6,24 @@ package ranking_management_client
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
ranking_management2 "gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/ranking_management/ranking_management"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/ranking_management/ranking_management"
|
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/zrpc"
|
"github.com/zeromicro/go-zero/zrpc"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
BaseResult = ranking_management.BaseResult
|
BaseResult = ranking_management2.BaseResult
|
||||||
PageRequest = ranking_management.PageRequest
|
PageRequest = ranking_management2.PageRequest
|
||||||
RankingData = ranking_management.RankingData
|
RankingData = ranking_management2.RankingData
|
||||||
Request = ranking_management.Request
|
Request = ranking_management2.Request
|
||||||
Response = ranking_management.Response
|
Response = ranking_management2.Response
|
||||||
SetUserGameScoreRequest = ranking_management.SetUserGameScoreRequest
|
SetUserGameScoreRequest = ranking_management2.SetUserGameScoreRequest
|
||||||
|
|
||||||
RankingManagement interface {
|
RankingManagement interface {
|
||||||
Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
|
Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
|
||||||
SetUserGameScore(ctx context.Context, in *SetUserGameScoreRequest, opts ...grpc.CallOption) (*BaseResult, error)
|
SetUserGameScore(ctx context.Context, in *SetUserGameScoreRequest, opts ...grpc.CallOption) (*BaseResult, error)
|
||||||
GetRankingList(ctx context.Context, in *PageRequest, opts ...grpc.CallOption) (ranking_management.RankingManagement_GetRankingListClient, error)
|
GetRankingList(ctx context.Context, in *PageRequest, opts ...grpc.CallOption) (ranking_management2.RankingManagement_GetRankingListClient, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultRankingManagement struct {
|
defaultRankingManagement struct {
|
||||||
@ -39,16 +38,16 @@ func NewRankingManagement(cli zrpc.Client) RankingManagement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m *defaultRankingManagement) Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
|
func (m *defaultRankingManagement) Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
|
||||||
client := ranking_management.NewRankingManagementClient(m.cli.Conn())
|
client := ranking_management2.NewRankingManagementClient(m.cli.Conn())
|
||||||
return client.Ping(ctx, in, opts...)
|
return client.Ping(ctx, in, opts...)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *defaultRankingManagement) SetUserGameScore(ctx context.Context, in *SetUserGameScoreRequest, opts ...grpc.CallOption) (*BaseResult, error) {
|
func (m *defaultRankingManagement) SetUserGameScore(ctx context.Context, in *SetUserGameScoreRequest, opts ...grpc.CallOption) (*BaseResult, error) {
|
||||||
client := ranking_management.NewRankingManagementClient(m.cli.Conn())
|
client := ranking_management2.NewRankingManagementClient(m.cli.Conn())
|
||||||
return client.SetUserGameScore(ctx, in, opts...)
|
return client.SetUserGameScore(ctx, in, opts...)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *defaultRankingManagement) GetRankingList(ctx context.Context, in *PageRequest, opts ...grpc.CallOption) (ranking_management.RankingManagement_GetRankingListClient, error) {
|
func (m *defaultRankingManagement) GetRankingList(ctx context.Context, in *PageRequest, opts ...grpc.CallOption) (ranking_management2.RankingManagement_GetRankingListClient, error) {
|
||||||
client := ranking_management.NewRankingManagementClient(m.cli.Conn())
|
client := ranking_management2.NewRankingManagementClient(m.cli.Conn())
|
||||||
return client.GetRankingList(ctx, in, opts...)
|
return client.GetRankingList(ctx, in, opts...)
|
||||||
}
|
}
|
@ -2,9 +2,8 @@ package logic
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/user_management/internal/svc"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/user_management/internal/svc"
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/user_management/user_management"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/user_management/user_management"
|
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
)
|
)
|
@ -2,9 +2,8 @@ package logic
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/user_management/internal/svc"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/user_management/internal/svc"
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/user_management/user_management"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/user_management/user_management"
|
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
)
|
)
|
@ -0,0 +1,33 @@
|
|||||||
|
// Code generated by goctl. DO NOT EDIT.
|
||||||
|
// goctl 1.7.6
|
||||||
|
// Source: user_management.proto
|
||||||
|
|
||||||
|
package server
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
logic2 "gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/user_management/internal/logic"
|
||||||
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/user_management/internal/svc"
|
||||||
|
user_management2 "gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/user_management/user_management"
|
||||||
|
)
|
||||||
|
|
||||||
|
type UserManagementServer struct {
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
user_management2.UnimplementedUserManagementServer
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewUserManagementServer(svcCtx *svc.ServiceContext) *UserManagementServer {
|
||||||
|
return &UserManagementServer{
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *UserManagementServer) Ping(ctx context.Context, in *user_management2.Request) (*user_management2.Response, error) {
|
||||||
|
l := logic2.NewPingLogic(ctx, s.svcCtx)
|
||||||
|
return l.Ping(in)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *UserManagementServer) SetAppAccount(ctx context.Context, in *user_management2.SetAppUserRequest) (*user_management2.Response, error) {
|
||||||
|
l := logic2.NewSetAppAccountLogic(ctx, s.svcCtx)
|
||||||
|
return l.SetAppAccount(in)
|
||||||
|
}
|
@ -1,6 +1,8 @@
|
|||||||
package svc
|
package svc
|
||||||
|
|
||||||
import "gitea.youtukeji.com.cn/xiabin/youtu_grpc/ranking_management/internal/config"
|
import (
|
||||||
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/user_management/internal/config"
|
||||||
|
)
|
||||||
|
|
||||||
type ServiceContext struct {
|
type ServiceContext struct {
|
||||||
Config config.Config
|
Config config.Config
|
@ -3,11 +3,10 @@ package main
|
|||||||
import (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/user_management/internal/config"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/user_management/internal/config"
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/user_management/internal/server"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/user_management/internal/server"
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/user_management/internal/svc"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/user_management/internal/svc"
|
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/user_management/user_management"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/user_management/user_management"
|
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/core/conf"
|
"github.com/zeromicro/go-zero/core/conf"
|
||||||
"github.com/zeromicro/go-zero/core/service"
|
"github.com/zeromicro/go-zero/core/service"
|
@ -6,17 +6,16 @@ package user_management_client
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
user_management2 "gitea.youtukeji.com.cn/xiabin/youtu_grpc/app/user_management/user_management"
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/user_management/user_management"
|
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/zrpc"
|
"github.com/zeromicro/go-zero/zrpc"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
Request = user_management.Request
|
Request = user_management2.Request
|
||||||
Response = user_management.Response
|
Response = user_management2.Response
|
||||||
SetAppUserRequest = user_management.SetAppUserRequest
|
SetAppUserRequest = user_management2.SetAppUserRequest
|
||||||
|
|
||||||
UserManagement interface {
|
UserManagement interface {
|
||||||
Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
|
Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
|
||||||
@ -35,11 +34,11 @@ func NewUserManagement(cli zrpc.Client) UserManagement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m *defaultUserManagement) Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
|
func (m *defaultUserManagement) Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
|
||||||
client := user_management.NewUserManagementClient(m.cli.Conn())
|
client := user_management2.NewUserManagementClient(m.cli.Conn())
|
||||||
return client.Ping(ctx, in, opts...)
|
return client.Ping(ctx, in, opts...)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *defaultUserManagement) SetAppAccount(ctx context.Context, in *SetAppUserRequest, opts ...grpc.CallOption) (*Response, error) {
|
func (m *defaultUserManagement) SetAppAccount(ctx context.Context, in *SetAppUserRequest, opts ...grpc.CallOption) (*Response, error) {
|
||||||
client := user_management.NewUserManagementClient(m.cli.Conn())
|
client := user_management2.NewUserManagementClient(m.cli.Conn())
|
||||||
return client.SetAppAccount(ctx, in, opts...)
|
return client.SetAppAccount(ctx, in, opts...)
|
||||||
}
|
}
|
@ -1,39 +0,0 @@
|
|||||||
// 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)
|
|
||||||
}
|
|
@ -1,34 +0,0 @@
|
|||||||
// Code generated by goctl. DO NOT EDIT.
|
|
||||||
// goctl 1.7.6
|
|
||||||
// Source: douyin_ecpm_calculation_service.proto
|
|
||||||
|
|
||||||
package server
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/douyin_ecpm_calculation_service/douyin_ecpm_calculation_service"
|
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/douyin_ecpm_calculation_service/internal/logic"
|
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/douyin_ecpm_calculation_service/internal/svc"
|
|
||||||
)
|
|
||||||
|
|
||||||
type DouyinEcpmCalculationServiceServer struct {
|
|
||||||
svcCtx *svc.ServiceContext
|
|
||||||
douyin_ecpm_calculation_service.UnimplementedDouyinEcpmCalculationServiceServer
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewDouyinEcpmCalculationServiceServer(svcCtx *svc.ServiceContext) *DouyinEcpmCalculationServiceServer {
|
|
||||||
return &DouyinEcpmCalculationServiceServer{
|
|
||||||
svcCtx: svcCtx,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *DouyinEcpmCalculationServiceServer) Ping(ctx context.Context, in *douyin_ecpm_calculation_service.Request) (*douyin_ecpm_calculation_service.Response, error) {
|
|
||||||
l := logic.NewPingLogic(ctx, s.svcCtx)
|
|
||||||
return l.Ping(in)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *DouyinEcpmCalculationServiceServer) GetEcpm(ctx context.Context, in *douyin_ecpm_calculation_service.GetEcpmRequest) (*douyin_ecpm_calculation_service.GetEcpmResponse, error) {
|
|
||||||
l := logic.NewGetEcpmLogic(ctx, s.svcCtx)
|
|
||||||
return l.GetEcpm(in)
|
|
||||||
}
|
|
@ -1,39 +0,0 @@
|
|||||||
// Code generated by goctl. DO NOT EDIT.
|
|
||||||
// goctl 1.7.6
|
|
||||||
// Source: ranking_management.proto
|
|
||||||
|
|
||||||
package server
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/ranking_management/internal/logic"
|
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/ranking_management/internal/svc"
|
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/ranking_management/ranking_management"
|
|
||||||
)
|
|
||||||
|
|
||||||
type RankingManagementServer struct {
|
|
||||||
svcCtx *svc.ServiceContext
|
|
||||||
ranking_management.UnimplementedRankingManagementServer
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewRankingManagementServer(svcCtx *svc.ServiceContext) *RankingManagementServer {
|
|
||||||
return &RankingManagementServer{
|
|
||||||
svcCtx: svcCtx,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *RankingManagementServer) Ping(ctx context.Context, in *ranking_management.Request) (*ranking_management.Response, error) {
|
|
||||||
l := logic.NewPingLogic(ctx, s.svcCtx)
|
|
||||||
return l.Ping(in)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *RankingManagementServer) SetUserGameScore(ctx context.Context, in *ranking_management.SetUserGameScoreRequest) (*ranking_management.BaseResult, error) {
|
|
||||||
l := logic.NewSetUserGameScoreLogic(ctx, s.svcCtx)
|
|
||||||
return l.SetUserGameScore(in)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *RankingManagementServer) GetRankingList(in *ranking_management.PageRequest, stream ranking_management.RankingManagement_GetRankingListServer) error {
|
|
||||||
l := logic.NewGetRankingListLogic(stream.Context(), s.svcCtx)
|
|
||||||
return l.GetRankingList(in, stream)
|
|
||||||
}
|
|
@ -1,34 +0,0 @@
|
|||||||
// Code generated by goctl. DO NOT EDIT.
|
|
||||||
// goctl 1.7.6
|
|
||||||
// Source: user_management.proto
|
|
||||||
|
|
||||||
package server
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/user_management/internal/logic"
|
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/user_management/internal/svc"
|
|
||||||
"gitea.youtukeji.com.cn/xiabin/youtu_grpc/user_management/user_management"
|
|
||||||
)
|
|
||||||
|
|
||||||
type UserManagementServer struct {
|
|
||||||
svcCtx *svc.ServiceContext
|
|
||||||
user_management.UnimplementedUserManagementServer
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewUserManagementServer(svcCtx *svc.ServiceContext) *UserManagementServer {
|
|
||||||
return &UserManagementServer{
|
|
||||||
svcCtx: svcCtx,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *UserManagementServer) Ping(ctx context.Context, in *user_management.Request) (*user_management.Response, error) {
|
|
||||||
l := logic.NewPingLogic(ctx, s.svcCtx)
|
|
||||||
return l.Ping(in)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *UserManagementServer) SetAppAccount(ctx context.Context, in *user_management.SetAppUserRequest) (*user_management.Response, error) {
|
|
||||||
l := logic.NewSetAppAccountLogic(ctx, s.svcCtx)
|
|
||||||
return l.SetAppAccount(in)
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user