package vidhotsearcher import "91porn-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 }