APIExpr contains the global properties for an API expression.
| 9 | type ( |
| 10 | // APIExpr contains the global properties for an API expression. |
| 11 | APIExpr struct { |
| 12 | // DSLFunc contains the DSL used to initialize the expression. |
| 13 | eval.DSLFunc |
| 14 | // Name of API |
| 15 | Name string |
| 16 | // Title of API |
| 17 | Title string |
| 18 | // Description of API |
| 19 | Description string |
| 20 | // Version is the version of the API described by this DSL. |
| 21 | Version string |
| 22 | // Servers lists the API hosts. |
| 23 | Servers []*ServerExpr |
| 24 | // TermsOfService describes or links to the service terms of API. |
| 25 | TermsOfService string |
| 26 | // Contact provides the API users with contact information. |
| 27 | Contact *ContactExpr |
| 28 | // License describes the API license. |
| 29 | License *LicenseExpr |
| 30 | // Docs points to the API external documentation. |
| 31 | Docs *DocsExpr |
| 32 | // Meta is a list of key/value pairs. |
| 33 | Meta MetaExpr |
| 34 | // Requirements contains the security requirements that apply to |
| 35 | // all the API service methods. One requirement is composed of |
| 36 | // potentially multiple schemes. Incoming requests must validate |
| 37 | // at least one requirement to be authorized. |
| 38 | Requirements []*SecurityExpr |
| 39 | // ClientInterceptors is the list of API client interceptors. |
| 40 | ClientInterceptors []*InterceptorExpr |
| 41 | // ServerInterceptors is the list of API server interceptors. |
| 42 | ServerInterceptors []*InterceptorExpr |
| 43 | // HTTP contains the HTTP specific API level expressions. |
| 44 | HTTP *HTTPExpr |
| 45 | // GRPC contains the gRPC specific API level expressions. |
| 46 | GRPC *GRPCExpr |
| 47 | // JSONRPC contains the JSON-RPC specific API level expressions. |
| 48 | JSONRPC *JSONRPCExpr |
| 49 | |
| 50 | // random generator used to build examples for the API types. |
| 51 | ExampleGenerator *ExampleGenerator |
| 52 | } |
| 53 | |
| 54 | // ContactExpr contains the API contact information. |
| 55 | ContactExpr struct { |
nothing calls this directly
no outgoing calls
no test coverage detected