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

Struct MethodExpr

expr/method.go:15–53  ·  view source on GitHub ↗

MethodExpr defines a single method.

Source from the content-addressed store, hash-verified

13
14 // MethodExpr defines a single method.
15 MethodExpr struct {
16 // DSLFunc contains the DSL used to initialize the expression.
17 eval.DSLFunc
18 // Name of method.
19 Name string
20 // Description of method for consumption by humans.
21 Description string
22 // Docs points to the method external documentation if any.
23 Docs *DocsExpr
24 // Payload attribute
25 Payload *AttributeExpr
26 // Result attribute
27 Result *AttributeExpr
28 // Errors lists the error responses.
29 Errors []*ErrorExpr
30 // Requirements contains the security requirements for the
31 // method. One requirement is composed of potentially multiple
32 // schemes. Incoming requests must validate at least one
33 // requirement to be authorized.
34 Requirements []*SecurityExpr
35 // ClientInterceptors is the list of client interceptors.
36 ClientInterceptors []*InterceptorExpr
37 // ServerInterceptors is the list of server interceptors.
38 ServerInterceptors []*InterceptorExpr
39 // Service that owns method.
40 Service *ServiceExpr
41 // Meta is an arbitrary set of key/value pairs, see dsl.Meta
42 Meta MetaExpr
43 // Stream is the kind of stream (none, payload, result, or both)
44 // the method defines.
45 Stream StreamKind
46 // StreamingPayload is the payload sent across the stream.
47 StreamingPayload *AttributeExpr
48 // StreamingResult is the result sent across the stream when using SSE.
49 // When both Result and StreamingResult are defined with different types,
50 // the method supports content negotiation between standard HTTP responses
51 // (using Result) and SSE streams (using StreamingResult).
52 StreamingResult *AttributeExpr
53 }
54)
55
56const (

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected