Files
Blog/app/internal/logic/pinglogic.go
2025-10-25 12:21:17 +08:00

32 lines
622 B
Go

package logic
import (
"context"
"git.cialloo.com/CiallooWeb/Blog/app/internal/svc"
"git.cialloo.com/CiallooWeb/Blog/app/internal/types"
"github.com/zeromicro/go-zero/core/logx"
)
type PingLogic struct {
logx.Logger
ctx context.Context
svcCtx *svc.ServiceContext
}
// Ping the server to check if it's alive
func NewPingLogic(ctx context.Context, svcCtx *svc.ServiceContext) *PingLogic {
return &PingLogic{
Logger: logx.WithContext(ctx),
ctx: ctx,
svcCtx: svcCtx,
}
}
func (l *PingLogic) Ping(req *types.PingReq) (resp *types.PingResp, err error) {
return &types.PingResp{
OK: true,
}, nil
}