(s *expr.HTTPServiceExpr, services *ServicesData)
| 197 | } |
| 198 | |
| 199 | func 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. |
| 216 | func mustDecodeRequest(e *EndpointData) bool { |
no test coverage detected