MCPcopy Create free account
hub / github.com/goadesign/goa / bidirectionalStreamingWithViewsDSL

Function bidirectionalStreamingWithViewsDSL

http/codegen/websocket_golden_test.go:359–396  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

357}
358
359func bidirectionalStreamingWithViewsDSL() {
360 var Request = Type("Request", func() {
361 Attribute("id", String)
362 Attribute("data", String)
363 Required("id", "data")
364 })
365
366 var Response = ResultType("Response", func() {
367 Attributes(func() {
368 Attribute("id", String)
369 Attribute("result", String)
370 Attribute("metadata", func() {
371 Attribute("timestamp", Int64)
372 Attribute("source", String)
373 })
374 })
375 Required("id", "result")
376 View("default", func() {
377 Attribute("id")
378 Attribute("result")
379 Attribute("metadata")
380 })
381 View("minimal", func() {
382 Attribute("id")
383 Attribute("result")
384 })
385 })
386
387 Service("TestService", func() {
388 Method("BidirectionalWithViews", func() {
389 StreamingPayload(Request)
390 StreamingResult(Response)
391 HTTP(func() {
392 GET("/bidirectional/views")
393 })
394 })
395 })
396}
397
398func noPayloadStreamingDSL() {
399 Service("TestService", func() {

Callers

nothing calls this directly

Calls 12

AttributeFunction · 0.85
RequiredFunction · 0.85
ResultTypeFunction · 0.85
AttributesFunction · 0.85
ViewFunction · 0.85
MethodFunction · 0.85
StreamingPayloadFunction · 0.85
StreamingResultFunction · 0.85
GETFunction · 0.85
TypeTypeAlias · 0.50
ServiceFunction · 0.50
HTTPFunction · 0.50

Tested by

no test coverage detected