Merge pull request #136 from dapr/requests

Split the requests and responses for input/output bindings
This commit is contained in:
Shalabh Mohan Shrivastava 2019-11-21 18:30:56 -08:00 committed by GitHub
commit a6e7b3031a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 6 deletions

12
bindings/requests.go Normal file
View File

@ -0,0 +1,12 @@
// ------------------------------------------------------------
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
// ------------------------------------------------------------
package bindings
// WriteRequest is the object given to an dapr output binding
type WriteRequest struct {
Data []byte `json:"data"`
Metadata map[string]string `json:"metadata"`
}

View File

@ -15,12 +15,6 @@ type ReadResponse struct {
Metadata map[string]string `json:"metadata"`
}
// WriteRequest is the object given to an dapr output binding
type WriteRequest struct {
Data []byte `json:"data"`
Metadata map[string]string `json:"metadata"`
}
// AppResponse is the object describing the response from user code after a bindings event
type AppResponse struct {
Data interface{} `json:"data"`