29 lines
636 B
Go
29 lines
636 B
Go
|
package logic
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
|
||
|
"gitea.youtukeji.com.cn/youtu/youtu_grpc/app/admin_service/admin_service"
|
||
|
"gitea.youtukeji.com.cn/youtu/youtu_grpc/app/admin_service/internal/svc"
|
||
|
|
||
|
"github.com/zeromicro/go-zero/core/logx"
|
||
|
)
|
||
|
|
||
|
type PingLogic struct {
|
||
|
ctx context.Context
|
||
|
svcCtx *svc.ServiceContext
|
||
|
logx.Logger
|
||
|
}
|
||
|
|
||
|
func NewPingLogic(ctx context.Context, svcCtx *svc.ServiceContext) *PingLogic {
|
||
|
return &PingLogic{
|
||
|
ctx: ctx,
|
||
|
svcCtx: svcCtx,
|
||
|
Logger: logx.WithContext(ctx),
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func (l *PingLogic) Ping(in *admin_service.Request) (*admin_service.Response, error) {
|
||
|
return &admin_service.Response{Pong: in.Ping}, nil
|
||
|
}
|