Files
go-zero/example/shorturl/api/internal/logic/shortenlogic.go

29 lines
534 B
Go
Raw Normal View History

2020-09-01 16:04:39 +08:00
package logic
import (
"context"
"shorturl/api/internal/svc"
"shorturl/api/internal/types"
"github.com/tal-tech/go-zero/core/logx"
)
type ShortenLogic struct {
2020-09-03 08:34:11 +08:00
svcCtx *svc.ServiceContext
ctx context.Context
2020-09-01 16:04:39 +08:00
logx.Logger
}
func NewShortenLogic(ctx context.Context, svcCtx *svc.ServiceContext) ShortenLogic {
return ShortenLogic{
2020-09-03 08:34:11 +08:00
svcCtx: svcCtx,
2020-09-01 16:04:39 +08:00
ctx: ctx,
Logger: logx.WithContext(ctx),
}
}
func (l *ShortenLogic) Shorten(req types.ShortenReq) (*types.ShortenResp, error) {
return &types.ShortenResp{}, nil
}