Files
51dj_server/app/service/searcher/vidhotsearcher/result.go
T
2026-10-08 16:50:13 +08:00

41 lines
612 B
Go

package vidhotsearcher
import "91jd-server/app/service/searcher"
type VideoRes = searcher.VideoRes
type RichVidRes = searcher.RichVidRes
type ResultType = int
const (
Video ResultType = iota
RichVido
)
type Result struct {
dat []VideoRes
richDat []RichVidRes
typ ResultType
hasNext bool
}
func (*Result) Types() searcher.ResultTypes {
return searcher.VidPCountSearchResult
}
func (r *Result) Data() interface{} {
if r.typ == Video {
return r.dat
}
return r.richDat
}
func (r *Result) Count() int64 {
return int64(len(r.dat))
}
func (r *Result) HasNext() bool {
return r.hasNext
}