1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
| package esutil
|
| import(
| "testing"
| "fmt"
| "encoding/json"
| )
|
| func TestEsReq(t *testing.T){
| requstbody, err := json.Marshal(map[string]interface{}{
| "content":"v2.0.0",
| "collection": "0",
| })
| if err != nil {
| fmt.Println("json parse error ", err)
| return
|
| }
|
| EsReq("PUT","http://192.168.1.203:9200/personaction/perVideoAction/fcddbddf-4580-43f3-b79a-32343c823df2?pretty", requstbody)
| }
|
| func TestGetDbinfo(t *testing.T){
| dbinfos, err := DbPersoninfos(0,10)
| if err != nil {
| fmt.Println(err)
| return
| }
| fmt.Println(dbinfos)
| }
|
|