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

Function httpContext

http/codegen/service_data.go:2932–2935  ·  view source on GitHub ↗

httpContext returns a context for attributes of types used to marshal and unmarshal HTTP requests and responses. pkg is the package name where the body type exists scope is the named scope request if true indicates that the type is a request type, else response type svr if true indicates that th

(scope *codegen.NameScope, request, svr bool)

Source from the content-addressed store, hash-verified

2930//
2931// svr if true indicates that the type is a server type, else client type
2932func httpContext(scope *codegen.NameScope, request, svr bool) *codegen.AttributeContext {
2933 marshal := !request && svr || request && !svr
2934 return codegen.NewAttributeContext(!marshal, false, marshal, "", scope)
2935}
2936
2937// serviceContext returns an attribute context for service types.
2938func serviceContext(pkg string, scope *codegen.NameScope) *codegen.AttributeContext {

Callers 8

analyzeMethod · 0.85
buildPayloadDataMethod · 0.85
buildResponsesMethod · 0.85
buildErrorsDataMethod · 0.85
buildRequestBodyTypeMethod · 0.85
buildResponseBodyTypeMethod · 0.85
attributeTypeDataMethod · 0.85
initWebSocketDataMethod · 0.85

Calls 1

NewAttributeContextFunction · 0.92

Tested by

no test coverage detected