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

Function MapParams

dsl/http.go:762–780  ·  view source on GitHub ↗

MapParams describes the query string parameters in a HTTP request. MapParams must appear in a Method HTTP expression to map the query string parameters with the Method's Payload. MapParams accepts one optional argument which specifes the Payload attribute to which the query string parameters must

(args ...any)

Source from the content-addressed store, hash-verified

760// })
761// })
762func MapParams(args ...any) {
763 if len(args) > 1 {
764 eval.TooManyArgError()
765 return
766 }
767 e, ok := eval.Current().(*expr.HTTPEndpointExpr)
768 if !ok {
769 eval.IncompatibleDSL()
770 return
771 }
772 var mapName string
773 if len(args) > 0 {
774 mapName, ok = args[0].(string)
775 if !ok {
776 eval.InvalidArgError("string", args[0])
777 }
778 }
779 e.MapQueryParams = &mapName
780}
781
782// MultipartRequest indicates that HTTP requests made to the method use
783// MIME multipart encoding as defined in RFC 2046.

Callers 4

payload_dsls.goFile · 0.85
operations.goFile · 0.85
TestInvalidArgErrorFunction · 0.85
TestTooManyArgErrorFunction · 0.85

Calls 4

TooManyArgErrorFunction · 0.92
CurrentFunction · 0.92
IncompatibleDSLFunction · 0.92
InvalidArgErrorFunction · 0.92

Tested by 2

TestInvalidArgErrorFunction · 0.68
TestTooManyArgErrorFunction · 0.68