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.
25 lines
453 B
25 lines
453 B
package logic
|
|
|
|
import (
|
|
"context"
|
|
"practice_Go/api/v1/ebooks"
|
|
"practice_Go/internal/dao"
|
|
ebook "practice_Go/internal/service"
|
|
)
|
|
|
|
type sEbooks struct{}
|
|
|
|
func init() {
|
|
ebook.RegisterEbooks(New())
|
|
}
|
|
func New() *sEbooks {
|
|
return &sEbooks{}
|
|
}
|
|
|
|
func (c *sEbooks) GetEbooksList(ctx context.Context, req *ebooks.GetEbooksListReq) (res ebooks.GetEbooksListRes, err error) {
|
|
err = dao.Ebooks.Ctx(ctx).Scan(&res.List)
|
|
if err != nil {
|
|
return
|
|
}
|
|
return
|
|
}
|