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

Function transTmplFuncs

http/codegen/server.go:199–213  ·  view source on GitHub ↗
(s *expr.HTTPServiceExpr, services *ServicesData)

Source from the content-addressed store, hash-verified

197}
198
199func transTmplFuncs(s *expr.HTTPServiceExpr, services *ServicesData) map[string]any {
200 return map[string]any{
201 "goTypeRef": func(dt expr.DataType) string {
202 return services.ServicesData.Get(s.Name()).Scope.GoTypeRef(&expr.AttributeExpr{Type: dt})
203 },
204 "isAliased": func(dt expr.DataType) bool {
205 _, ok := dt.(expr.UserType)
206 return ok
207 },
208 "conversionData": conversionData,
209 "headerConversionData": headerConversionData,
210 "printValue": printValue,
211 "viewedServerBody": viewedServerBody,
212 }
213}
214
215// mustDecodeRequest returns true if the Payload type is not empty.
216func mustDecodeRequest(e *EndpointData) bool {

Callers 1

ServerEncodeDecodeFileFunction · 0.70

Calls 3

GoTypeRefMethod · 0.80
NameMethod · 0.65
GetMethod · 0.45

Tested by

no test coverage detected