Resto: minor renaming

This commit is contained in:
Grégoire Henry 2017-12-07 17:43:21 +01:00 committed by Benjamin Canou
parent 375ddd48dc
commit 34cca61f7b
30 changed files with 20 additions and 41 deletions

View File

@ -7,15 +7,15 @@
(* *)
(**************************************************************************)
type cors = RestoCohttp.cors = {
type cors = Resto_cohttp.Server.cors = {
allowed_headers : string list ;
allowed_origins : string list ;
}
include RestoDirectory
module Directory = RestoDirectory.MakeDirectory(RPC.Data)
include Resto_directory
module Directory = Resto_directory.Make(RPC.Data)
include RestoCohttp.Make(RPC.Data)(Logging.RPC)
include Resto_cohttp.Server.Make(RPC.Data)(Logging.RPC)
let json = {
name = "application/json" ;

View File

@ -9,8 +9,8 @@
module Directory :
(module type of struct include RestoDirectory.MakeDirectory(RPC.Data) end)
include (module type of struct include RestoDirectory end)
(module type of struct include Resto_directory.Make(RPC.Data) end)
include (module type of struct include Resto_directory end)
(** Typed RPC services: server implementation. *)

View File

@ -11,8 +11,8 @@
open Resto
open Lwt.Infix
open RestoDirectory
module Directory = RestoDirectory.MakeDirectory(RestoJson.Encoding)
open Resto_directory
module Directory = Resto_directory.Make(Resto_json.Encoding)
open Directory
module Answer = Answer

View File

@ -4,5 +4,4 @@
((name ezresto_directory)
(public_name ocplib-ezresto-directory)
(libraries (ocplib-ezresto ocplib-resto-directory))
(modules (EzRestoDirectory))
(wrapped false)))

View File

@ -1,6 +1,5 @@
version: "dev"
opam-version: "1.2"
name: "ocplib-resto-directory"
maintainer: "Grégoire Henry <gregoire.henry@tezos.com>"
authors: "Grégoire Henry <gregoire.henry@tezos.com>"
license: "LGPL-2.1-with-OCaml-exception"
@ -9,7 +8,6 @@ bug-reports: "https://github.com/OCamlPro/ocplib-resto/issues"
dev-repo: "git+https://github.com/OCamlPro/ocplib-resto"
build: [
[ "jbuilder" "subst" "-n" "ocplib-resto" ] {pinned}
[ "jbuilder" "build" "-p" name "-j" jobs ]
]
build-test: [

View File

@ -9,7 +9,7 @@
(**************************************************************************)
open EzServices
include EzRestoDirectory
include EzResto_directory
let rec repeat i json =
if i <= 0 then []

View File

@ -2,7 +2,6 @@
(executable
((name ezResto_test)
(modules (EzServices EzDirectory EzResto_test))
(libraries (ocplib-ezresto-directory lwt.unix))))
(alias

View File

@ -10,7 +10,7 @@
open Resto
module Service = Resto.MakeService(RestoJson.Encoding)
module Service = Resto.MakeService(Resto_json.Encoding)
open Service
type meth = [ `GET | `POST | `DELETE | `PUT | `PATCH ]

View File

@ -80,7 +80,7 @@ end
(** Services. *)
type ('meth, 'params, 'query, 'input, 'output, 'error) service =
('meth, unit, 'params, 'query, 'input, 'output, 'error) Resto.MakeService(RestoJson.Encoding).service
('meth, unit, 'params, 'query, 'input, 'output, 'error) Resto.MakeService(Resto_json.Encoding).service
val get_service:
?description: string ->

View File

@ -4,5 +4,4 @@
((name ezresto)
(public_name ocplib-ezresto)
(libraries (ocplib-resto-json))
(modules (EzResto))
(wrapped false)))

View File

@ -1,6 +1,5 @@
version: "dev"
opam-version: "1.2"
name: "ocplib-ezresto"
maintainer: "Grégoire Henry <gregoire.henry@tezos.com>"
authors: "Grégoire Henry <gregoire.henry@tezos.com>"
license: "LGPL-2.1-with-OCaml-exception"
@ -9,7 +8,6 @@ bug-reports: "https://github.com/OCamlPro/ocplib-resto/issues"
dev-repo: "git+https://github.com/OCamlPro/ocplib-resto"
build: [
[ "jbuilder" "subst" "-n" "ocplib-resto" ] {pinned}
[ "jbuilder" "build" "-p" name "-j" jobs ]
]
build-test: [

View File

@ -3,7 +3,5 @@
(library
((name resto_cohttp)
(public_name ocplib-resto-cohttp)
(libraries (ocplib-resto-directory cohttp-lwt-unix))
(modules (RestoCohttp))
(wrapped false)))
(libraries (ocplib-resto-directory cohttp-lwt-unix))))

View File

@ -1,6 +1,5 @@
version: "dev"
opam-version: "1.2"
name: "ocplib-resto-cohttp"
maintainer: "Grégoire Henry <gregoire.henry@tezos.com>"
authors: "Grégoire Henry <gregoire.henry@tezos.com>"
license: "LGPL-2.1-with-OCaml-exception"
@ -9,7 +8,6 @@ bug-reports: "https://github.com/OCamlPro/ocplib-resto/issues"
dev-repo: "git+https://github.com/OCamlPro/ocplib-resto"
build: [
[ "jbuilder" "subst" "-n" "ocplib-resto" ] {pinned}
[ "jbuilder" "build" "-p" name "-j" jobs ]
]
build-test: [

View File

@ -104,7 +104,7 @@ module Make (Encoding : Resto.ENCODING)(Log : LOGGING) = struct
open Cohttp
module Service = Resto.MakeService(Encoding)
module Directory = RestoDirectory.MakeDirectory(Encoding)
module Directory = Resto_directory.Make(Encoding)
type media_type = {
name: string ;
@ -158,7 +158,7 @@ module Make (Encoding : Resto.ENCODING)(Log : LOGGING) = struct
if not !running then
Lwt.return None
else
s.RestoDirectory.Answer.next () >|= function
s.Resto_directory.Answer.next () >|= function
| None -> None
| Some x -> Some (to_string x)) in
let shutdown () =

View File

@ -48,7 +48,7 @@ module Make (Encoding : Resto.ENCODING) (Log : LOGGING) : sig
?cors:cors ->
media_types:media_type list ->
Conduit_lwt_unix.server ->
unit RestoDirectory.MakeDirectory(Encoding).t ->
unit Resto_directory.Make(Encoding).t ->
server Lwt.t
(** Kill an RPC server. *)

View File

@ -4,6 +4,5 @@
((name resto_directory)
(public_name ocplib-resto-directory)
(libraries (lwt ocplib-resto))
(modules (RestoDirectory))
(wrapped false)))

View File

@ -1,6 +1,5 @@
version: "dev"
opam-version: "1.2"
name: "ocplib-resto-directory"
maintainer: "Grégoire Henry <gregoire.henry@tezos.com>"
authors: "Grégoire Henry <gregoire.henry@tezos.com>"
license: "LGPL-2.1-with-OCaml-exception"
@ -9,7 +8,6 @@ bug-reports: "https://github.com/OCamlPro/ocplib-resto/issues"
dev-repo: "git+https://github.com/OCamlPro/ocplib-resto"
build: [
[ "jbuilder" "subst" "-n" "ocplib-resto" ] {pinned}
[ "jbuilder" "build" "-p" name "-j" jobs ]
]
build-test: [

View File

@ -42,7 +42,7 @@ module Answer = struct
end
module MakeDirectory (Encoding : ENCODING) = struct
module Make (Encoding : ENCODING) = struct
module Service = Resto.MakeService(Encoding)

View File

@ -35,7 +35,7 @@ module Answer : sig
end
module MakeDirectory (Encoding : ENCODING) : sig
module Make (Encoding : ENCODING) : sig
module Service : (module type of (struct include Resto.MakeService(Encoding) end))

View File

@ -10,7 +10,7 @@
open Services
include RestoDirectory.MakeDirectory(RestoJson.Encoding)
include Resto_directory.Make(Resto_json.Encoding)
let rec repeat i json =
if i <= 0 then []

View File

@ -2,7 +2,6 @@
(executable
((name resto_test)
(modules (Services Directory Resto_test))
(libraries (ocplib-resto-directory ocplib-resto-json lwt.unix))))
(alias

View File

@ -10,7 +10,7 @@
open Services
open Directory
open RestoDirectory
open Resto_directory
open Lwt.Infix
let () =

View File

@ -9,7 +9,7 @@
(**************************************************************************)
open Resto
module Service = MakeService(RestoJson.Encoding)
module Service = MakeService(Resto_json.Encoding)
open Service
(** Shared part *)

View File

@ -4,5 +4,4 @@
((name resto_json)
(public_name ocplib-resto-json)
(libraries (ocplib-json-typed ocplib-json-typed.bson ocplib-resto))
(modules (RestoJson))
(wrapped false)))

View File

@ -1,6 +1,5 @@
version: "dev"
opam-version: "1.2"
name: "ocplib-resto-json"
maintainer: "Grégoire Henry <gregoire.henry@tezos.com>"
authors: "Grégoire Henry <gregoire.henry@tezos.com>"
license: "LGPL-2.1-with-OCaml-exception"
@ -9,7 +8,6 @@ bug-reports: "https://github.com/OCamlPro/ocplib-resto/issues"
dev-repo: "git+https://github.com/OCamlPro/ocplib-resto"
build: [
[ "jbuilder" "subst" "-n" "ocplib-resto" ] {pinned}
[ "jbuilder" "build" "-p" name "-j" jobs ]
]
build-test: [

View File

@ -3,6 +3,5 @@
(library
((name resto)
(public_name ocplib-resto)
(modules (Resto))
(flags (-w -30))
(wrapped false)))

View File

@ -1,6 +1,5 @@
version: "dev"
opam-version: "1.2"
name: "ocplib-resto"
maintainer: "Grégoire Henry <gregoire.henry@tezos.com>"
authors: "Grégoire Henry <gregoire.henry@tezos.com>"
license: "LGPL-2.1-with-OCaml-exception"
@ -9,7 +8,6 @@ bug-reports: "https://github.com/OCamlPro/ocplib-resto/issues"
dev-repo: "git+https://github.com/OCamlPro/ocplib-resto"
build: [
[ "jbuilder" "subst" "-n" "ocplib-resto" ] {pinned}
[ "jbuilder" "build" "-p" name "-j" jobs ]
]
build-test: [