HTTPServiceExpr describes a HTTP service. It defines both a result type and a set of endpoints that can be executed through HTTP requests. HTTPServiceExpr embeds a ServiceExpr and adds HTTP specific properties.
| 15 | // requests. HTTPServiceExpr embeds a ServiceExpr and adds HTTP specific |
| 16 | // properties. |
| 17 | HTTPServiceExpr struct { |
| 18 | eval.DSLFunc |
| 19 | // Root is the root HTTP expression. |
| 20 | Root *HTTPExpr |
| 21 | // ServiceExpr is the service expression that backs this |
| 22 | // service. |
| 23 | ServiceExpr *ServiceExpr |
| 24 | // Common URL prefixes to all service endpoint HTTP requests |
| 25 | Paths []string |
| 26 | // Params defines the HTTP request path and query parameters |
| 27 | // common to all the service endpoints. |
| 28 | Params *MappedAttributeExpr |
| 29 | // Headers defines the HTTP request headers common to all the |
| 30 | // service endpoints. |
| 31 | Headers *MappedAttributeExpr |
| 32 | // Cookies defines the HTTP request cookies common to all the |
| 33 | // service endpoints. |
| 34 | Cookies *MappedAttributeExpr |
| 35 | // Name of parent service if any |
| 36 | ParentName string |
| 37 | // Endpoint with canonical service path |
| 38 | CanonicalEndpointName string |
| 39 | // HTTPEndpoints is the list of service endpoints. |
| 40 | HTTPEndpoints []*HTTPEndpointExpr |
| 41 | // HTTPErrors lists HTTP errors that apply to all endpoints. |
| 42 | HTTPErrors []*HTTPErrorExpr |
| 43 | // FileServers is the list of static asset serving endpoints |
| 44 | FileServers []*HTTPFileServerExpr |
| 45 | // SSE defines the Server-Sent Events configuration for all streaming endpoints |
| 46 | // in this service. If nil, streaming endpoints use WebSockets by default. |
| 47 | SSE *HTTPSSEExpr |
| 48 | // JSONRPCRoute is the route used for all JSON-RPC endpoints in this service. |
| 49 | // Only applicable to JSON-RPC services. |
| 50 | JSONRPCRoute *RouteExpr |
| 51 | // Meta is a set of key/value pairs with semantic that is |
| 52 | // specific to each generator. |
| 53 | Meta MetaExpr |
| 54 | } |
| 55 | ) |
| 56 | |
| 57 | // Name of service (service) |
nothing calls this directly
no outgoing calls
no test coverage detected