Documentation ¶
Index ¶
- func BuildRequestBody(route *dal.IngressRoute, r *http.Request, sch *schema.Schema) ([]byte, error)
- func GetIngressRoute(routes []dal.IngressRoute, method string, path string) (*dal.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)
- func ValidateCallBody(body []byte, verb *schema.Verb, sch *schema.Schema) error
- type HTTPResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildRequestBody ¶ added in v0.117.0
BuildRequestBody extracts the HttpRequest body from an HTTP request.
func GetIngressRoute ¶
func GetIngressRoute(routes []dal.IngressRoute, method string, path string) (*dal.IngressRoute, error)
func Handle ¶ added in v0.139.1
func Handle( startTime time.Time, sch *schema.Schema, requestKey model.RequestKey, routes []dal.IngressRoute, w http.ResponseWriter, r *http.Request, 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.