greetlogic.go 604 B

12345678910111213141516171819202122232425262728293031
  1. package logic
  2. import (
  3. "context"
  4. "net/http"
  5. "dag-jupyter/internal/svc"
  6. "dag-jupyter/internal/types"
  7. "github.com/zeromicro/go-zero/core/logx"
  8. )
  9. type GreetLogic struct {
  10. logx.Logger
  11. ctx context.Context
  12. svcCtx *svc.ServiceContext
  13. }
  14. func NewGreetLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GreetLogic {
  15. return &GreetLogic{
  16. Logger: logx.WithContext(ctx),
  17. ctx: ctx,
  18. svcCtx: svcCtx,
  19. }
  20. }
  21. func (l *GreetLogic) Greet() (resp *types.Response, err error) {
  22. // todo: add your logic here and delete this line
  23. return &types.Response{Data: "pong!", Code: http.StatusOK}, nil
  24. }