package ezresto

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type meth = [
  1. | `GET
  2. | `POST
  3. | `DELETE
  4. | `PUT
  5. | `PATCH
]
module Arg : sig ... end

Typed path argument.

module Path : sig ... end

Parametrized path to services.

module Query : sig ... end
type ('meth, 'params, 'query, 'input, 'output, 'error) service = ('meth, unit, 'params, 'query, 'input, 'output, 'error) Resto.MakeService(Resto_json.Encoding).service

Services.

val get_service : ?description:string -> query:'query Query.t -> output:'output Json_encoding.encoding -> error:'error Json_encoding.encoding -> 'params Path.t -> ([ `GET ], 'params, 'query, unit, 'output, 'error) service
val post_service : ?description:string -> query:'query Query.t -> input:'input Json_encoding.encoding -> output:'output Json_encoding.encoding -> error:'error Json_encoding.encoding -> 'params Path.t -> ([ `POST ], 'params, 'query, 'input, 'output, 'error) service
val delete_service : ?description:string -> query:'query Query.t -> output:'output Json_encoding.encoding -> error:'error Json_encoding.encoding -> 'params Path.t -> ([ `DELETE ], 'params, 'query, unit, 'output, 'error) service
val put_service : ?description:string -> query:'query Query.t -> input:'input Json_encoding.encoding -> output:'output Json_encoding.encoding -> error:'error Json_encoding.encoding -> 'params Path.t -> ([ `PUT ], 'params, 'query, 'input, 'output, 'error) service
val patch_service : ?description:string -> query:'query Query.t -> input:'input Json_encoding.encoding -> output:'output Json_encoding.encoding -> error:'error Json_encoding.encoding -> 'params Path.t -> ([ `PATCH ], 'params, 'query, 'input, 'output, 'error) service
type 'input input =
  1. | No_input : unit input
  2. | Input : 'input Json_encoding.encoding -> 'input input
type 'input request = {
  1. meth : meth;
  2. uri : Uri.t;
  3. input : 'input input;
}
val forge_request : ('meth, 'params, 'query, 'input, 'output, 'error) service -> ?base:Uri.t -> 'params -> 'query -> 'input request
val query : ('meth, 'params, 'query, 'input, 'output, 'error) service -> 'query Query.t
val input_encoding : ('meth, 'params, 'query, 'input, 'output, 'error) service -> 'input input
val output_encoding : ('meth, 'params, 'query, 'input, 'output, 'error) service -> 'output Json_encoding.encoding
val error_encoding : ('meth, 'params, 'query, 'input, 'output, 'error) service -> 'error Json_encoding.encoding
module Description = Resto.Description
type description_service = ([ `GET ], unit * string list, Description.request, unit, Json_schema.schema Description.directory, unit) service
val description_service : ?description:string -> unit Path.path -> description_service
OCaml

Innovation. Community. Security.