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

Function userTypeAttribute

grpc/codegen/service_data.go:911–920  ·  view source on GitHub ↗

userTypeAttribute returns the attribute of the given user type.

(ut expr.UserType)

Source from the content-addressed store, hash-verified

909
910// userTypeAttribute returns the attribute of the given user type.
911func userTypeAttribute(ut expr.UserType) *expr.AttributeExpr {
912 att := ut.Attribute()
913 if rt, ok := ut.(*expr.ResultTypeExpr); ok {
914 if a := unwrapAttr(expr.DupAtt(rt.Attribute())); expr.IsArray(a.Type) {
915 // result type collection
916 att = &expr.AttributeExpr{Type: expr.AsObject(rt)}
917 }
918 }
919 return att
920}
921
922// buildRequestConvertData builds the convert data for the server and client
923// requests.

Callers 3

collectMessagesFunction · 0.85
addValidationFunction · 0.85
collectValidationsRFunction · 0.85

Calls 5

DupAttFunction · 0.92
IsArrayFunction · 0.92
AsObjectFunction · 0.92
unwrapAttrFunction · 0.85
AttributeMethod · 0.65

Tested by

no test coverage detected