Add missing GRPC data field (#412)

* feat(grpc): add support for data field in request body

* docs: update Readme with embedmd
This commit is contained in:
H
2019-05-21 08:10:32 +02:00
committed by Bo-Yi Wu
parent 33cddfa421
commit 201413967c
7 changed files with 183 additions and 1700 deletions

View File

@@ -2,6 +2,7 @@ package main
import (
"context"
structpb "github.com/golang/protobuf/ptypes/struct"
"log"
"github.com/appleboy/gorush/rpc/proto"
@@ -36,6 +37,16 @@ func main() {
LocKey: "Test loc key",
LocArgs: []string{"test", "test"},
},
Data: &structpb.Struct{
Fields: map[string]*structpb.Value{
"key1": {
Kind: &structpb.Value_StringValue{StringValue: "welcome"},
},
"key2": {
Kind: &structpb.Value_NumberValue{NumberValue: 2},
},
},
},
})
if err != nil {
log.Fatalf("could not greet: %v", err)