Something went wrong. Try again.
ocaml
Something went wrong. Try again.
2.0 kB · 85 lines
OCaml
at pp-ast
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586(* * SPDX-FileCopyrightText: 2026 The Forester Project Contributors * * SPDX-License-Identifier: GPL-3.0-or-later *)
open Forester_coreopen Forester_compileropen Forester_frontend
module T := Typesmodule EP := Eio.Pathmodule P := Pure_htmlmodule H := Pure_html.HTMLmodule Hx := Pure_html.Hx
type env := Html_client.env
type 'a request = {route: 'a; request: Http.Request.t; body: Cohttp_eio.Body.t}
type response = Cohttp_eio.Server.response
val serve : env:< net : [> [> `Generic] Eio.Net.ty] Eio.Net.t ; .. > -> route:'a -> port:int -> ('a request -> response) -> unit
val respond_string : ?headers:Http.Header.t -> status:Http.Status.t -> body:string -> unit -> response
val respond_html : status:Http.Status.t -> Pure_html.node -> response
val respond_json : ?status:Http.Status.t -> body:Yojson.Safe.t -> response
val theme_dir : env:< fs : ([> Eio__.Fs.dir_ty] as 'a) EP.t ; .. > -> config:Forester_core.Config.t -> 'a EP.t option
val mimetype_of_extension : string -> stringval mimetype : Router.static -> string
val static_handler : env:< fs : [> Eio__.Fs.dir_ty] EP.t ; .. > -> config:Config.t -> Router.static -> response
val asset_mimetype : T.asset -> string
val respond_asset : T.asset -> response
val tree_handler : forest:Forest.t -> request_headers:Http.Header.t -> href:URI.t -> response
val respond_tree : forest:Forest.t -> request_headers:Http.Header.t -> Router.Scope.t -> string -> response
val not_found : response
val query_handler : env:env -> request_headers:Http.Header.t -> response
val respond_config : forest:Forest.t -> Http.Header.t -> [> Eio.Flow.source_ty] Eio.Flow.source -> response
val respond_index : forest:Forest.t -> request_headers:Http.Header.t -> response
val respond_version : forest:Forest.t -> Uri.t -> response
val respond_diagnostics : forest:Forest.t -> Uri.t -> response
val respond_search : forest:Forest.t -> Uri.t -> response