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.

27 lines
433 B

  1. package service
  2. import (
  3. "context"
  4. "practice_Go/api/v1/ebooks"
  5. )
  6. type (
  7. IEbooks interface {
  8. GetEbooksList(ctx context.Context, req *ebooks.GetEbooksListReq) (res ebooks.GetEbooksListRes, err error)
  9. }
  10. )
  11. var (
  12. localBooks IEbooks
  13. )
  14. func Ebooks() IEbooks {
  15. if localBooks == nil {
  16. panic("implement not found for interface IUser, forgot register?")
  17. }
  18. return localBooks
  19. }
  20. func RegisterEbooks(i IEbooks) {
  21. localBooks = i
  22. }