Documentation ¶
Index ¶
- func BuildRequestBody(route *model.IngressRoute, r *http.Request, sch *schema.Schema) ([]byte, error)
- func GetIngressRoute(routes []model.IngressRoute, method string, path string) (*model.IngressRoute, error)
- func Handle(startTime time.Time, sch *schema.Schema, requestKey model.RequestKey, ...)
- func ResponseForVerb(sch *schema.Schema, verb *schema.Verb, response HTTPResponse) ([]byte, http.Header, error)
- type HTTPResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildRequestBody ¶ added in v0.117.0
func BuildRequestBody(route *model.IngressRoute, r *http.Request, sch *schema.Schema) ([]byte, error)
BuildRequestBody extracts the HttpRequest body from an HTTP request.
func GetIngressRoute ¶
func GetIngressRoute(routes []model.IngressRoute, method string, path string) (*model.IngressRoute, error)
func Handle ¶ added in v0.139.1
func Handle( startTime time.Time, sch *schema.Schema, requestKey model.RequestKey, routes []dalmodel.IngressRoute, w http.ResponseWriter, r *http.Request, timelineService *timeline.Service, call func(context.Context, *connect.Request[ftlv1.CallRequest], optional.Option[model.RequestKey], optional.Option[model.RequestKey], string) (*connect.Response[ftlv1.CallResponse], error), )
Handle HTTP ingress routes.
Types ¶
type HTTPResponse ¶ added in v0.122.0
type HTTPResponse struct { Status int `json:"status,omitempty"` Headers map[string][]string `json:"headers,omitempty"` Body json.RawMessage `json:"body,omitempty"` Error json.RawMessage `json:"error,omitempty"` }
HTTPResponse mirrors builtins.HttpResponse.
Click to show internal directories.
Click to hide internal directories.