api/router/static: allow to specify body dst (#1486)

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2020-04-07 17:38:27 +03:00
committed by GitHub
parent aaee01b1a7
commit 6aaad7d63f
3 changed files with 37 additions and 2 deletions

View File

@@ -22,7 +22,7 @@ type Api interface {
String() string
}
type Options struct {}
type Options struct{}
type Option func(*Options) error
@@ -40,6 +40,10 @@ type Endpoint struct {
Method []string
// HTTP Path e.g /greeter. Expect POSIX regex
Path []string
// Body destination
// "*" or "" - top level message value
// "string" - inner message value
Body string
// Stream flag
Stream bool
}