package vidtonesearcher import ( "91porn-server/app/service/searcher" "go.mongodb.org/mongo-driver/bson" ) // M M type M = bson.M // A A type A = bson.A type VideoRes = searcher.VideoRes type Resp struct { List []VideoRes `json:"list"` Theme string `json:"theme"` PlayCount *int64 `json:"playCount,omitempty"` PayCount *int64 `json:"payCount,omitempty"` HasNext bool `json:"hasNext"` } type Result struct { dat *Resp } const MaxVideoCount = 400 func (*Result) Types() searcher.ResultTypes { return searcher.VidToneSearchResult } func (r *Result) Data() interface{} { return r.dat } func (r *Result) Count() int64 { if r.dat == nil { return 0 } return 1 } func (r *Result) HasNext() bool { if r.dat == nil { return false } return r.dat.HasNext }