You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
go-zero/example/shorturl/api/internal/logic/shortenlogic.go

29 lines
534 B
Go

package logic
import (
"context"
"shorturl/api/internal/svc"
"shorturl/api/internal/types"
"github.com/tal-tech/go-zero/core/logx"
)
type ShortenLogic struct {
logx.Logger
4 years ago
ctx context.Context
svcCtx *svc.ServiceContext
}
func NewShortenLogic(ctx context.Context, svcCtx *svc.ServiceContext) ShortenLogic {
return ShortenLogic{
Logger: logx.WithContext(ctx),
4 years ago
ctx: ctx,
svcCtx: svcCtx,
}
}
func (l *ShortenLogic) Shorten(req types.ShortenReq) (*types.ShortenResp, error) {
return &types.ShortenResp{}, nil
}