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
430 B

1 month ago
  1. package service
  2. import (
  3. "context"
  4. "practice_Go/api/v1/live_streams"
  5. )
  6. type (
  7. ILive interface {
  8. GetLiveList(ctx context.Context, req *live_streams.GetLiveListReq) (res live_streams.GetLiveListRes, err error)
  9. }
  10. )
  11. var (
  12. localLive ILive
  13. )
  14. func Live() ILive {
  15. if localLive == nil {
  16. panic("implement not found for interface IUser, forgot register?")
  17. }
  18. return localLive
  19. }
  20. func RegisterLives(i ILive) {
  21. localLive = i
  22. }