shortenlogic.go 485 B

1234567891011121314151617181920212223242526
  1. package logic
  2. import (
  3. "context"
  4. "shorturl/api/internal/svc"
  5. "shorturl/api/internal/types"
  6. "github.com/tal-tech/go-zero/core/logx"
  7. )
  8. type ShortenLogic struct {
  9. ctx context.Context
  10. logx.Logger
  11. }
  12. func NewShortenLogic(ctx context.Context, svcCtx *svc.ServiceContext) ShortenLogic {
  13. return ShortenLogic{
  14. ctx: ctx,
  15. Logger: logx.WithContext(ctx),
  16. }
  17. }
  18. func (l *ShortenLogic) Shorten(req types.ShortenReq) (*types.ShortenResp, error) {
  19. return &types.ShortenResp{}, nil
  20. }