You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
559 B
32 lines
559 B
package logic
|
|
|
|
import (
|
|
"context"
|
|
|
|
"demo/internal/svc"
|
|
"demo/internal/types"
|
|
|
|
"github.com/zeromicro/go-zero/core/logx"
|
|
)
|
|
|
|
type PingLogic struct {
|
|
logx.Logger
|
|
ctx context.Context
|
|
svcCtx *svc.ServiceContext
|
|
}
|
|
|
|
func NewPingLogic(ctx context.Context, svcCtx *svc.ServiceContext) *PingLogic {
|
|
return &PingLogic{
|
|
Logger: logx.WithContext(ctx),
|
|
ctx: ctx,
|
|
svcCtx: svcCtx,
|
|
}
|
|
}
|
|
|
|
func (l *PingLogic) Ping() (resp *types.Response, err error) {
|
|
// todo: add your logic here and delete this line
|
|
|
|
return &types.Response{
|
|
Message: "Pong",
|
|
}, nil
|
|
}
|
|
|