| | |
| | | import ( |
| | | "errors" |
| | | "strconv" |
| | | |
| | | "basic.com/pubsub/protomsg.git" |
| | | ) |
| | | |
| | | func DbPersoninfos( queryindex int, querynums int ) (dbpersoninfos []Baseinfo, err error){ |
| | | func DbPersoninfos( queryindex int, querynums int ) (dbpersoninfos []protomsg.Baseinfo, err error){ |
| | | point := strconv.Itoa(queryindex) |
| | | number := strconv.Itoa(querynums) |
| | | |
| | |
| | | ] |
| | | }` |
| | | |
| | | // 返回请求的buf |
| | | buf, err := GetDbinfo(dbinfoRequest ) |
| | | if err != nil { |
| | | return nil ,errors.New("http request get dbperson info is err!") |
| | | } |
| | | |
| | | // 返回 _source 数组 |
| | | sources, err := Sourcelist(buf) |
| | | if err != nil { |
| | | return nil,err |
| | | } |
| | | |
| | | // 返回所有查询的数据 |
| | | dbpersoninfos = Parsesources(sources) |
| | | return dbpersoninfos, nil |
| | | } |