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.

15 lines
360 B

  1. package live
  2. import (
  3. "context"
  4. "practice_Go/api/live/v1"
  5. "practice_Go/internal/dao"
  6. "practice_Go/internal/model/entity"
  7. )
  8. func (c *ControllerV1) GetLive(ctx context.Context, req *v1.GetLiveReq) (res *v1.GetLiveRes, err error) {
  9. res = &v1.GetLiveRes{}
  10. err = dao.GoLives.Ctx(ctx).With(entity.GoUsers{}).OrderAsc("start_time").Scan(&res.List)
  11. return
  12. }