Skip to content

Commit

Permalink
Configuration without config file
Browse files Browse the repository at this point in the history
  • Loading branch information
balat committed May 20, 2024
1 parent 7d5ae1a commit a6a01ff
Show file tree
Hide file tree
Showing 32 changed files with 449 additions and 291 deletions.
2 changes: 1 addition & 1 deletion .ocamlformat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=0.19.0
version=0.26.1
break-cases = fit
break-collection-expressions = fit-or-vertical
break-fun-decl = wrap
Expand Down
20 changes: 20 additions & 0 deletions ocsipersist-dbm-config.opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
opam-version: "2.0"
name: "ocsipersist-dbm-config"
version: "2.0.0"
authors: "The Ocsigen team <[email protected]>"
maintainer: "Jan Rochel <[email protected]>"
license: "LGPL-2.1-only with OCaml-LGPL-linking-exception"
synopsis: "Ocsigen Server configuration file extension for ocsipersist-dbm"
description: "Load this package from Ocsigen Server's configuration file if you want to use the DBM storage backend."

homepage: "https://github.com/ocsigen/ocsipersist"
bug-reports: "https://github.com/ocsigen/ocsipersist/issues"
dev-repo: "git+https://github.com/ocsigen/ocsipersist.git"
build: [ "dune" "build" "-p" name "-j" jobs ]

depends: [
"dune" {>= "2.9"}
"xml-light"
"ocsigenserver" {>= "3.0.0"}
"ocsipersist-dbm" {>= "2.0.0" & < "2.1.0"}
]
11 changes: 5 additions & 6 deletions ocsipersist-dbm.opam
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
opam-version: "2.0"
name: "ocsipersist-dbm"
version: "1.1.0"
version: "2.0.0"
authors: "The Ocsigen team <[email protected]>"
maintainer: "Jan Rochel <[email protected]>"
license: "LGPL-2.1-only with OCaml-LGPL-linking-exception"
synopsis: "Persistent key/value storage (for Ocsigen) using DBM"
description: "This library provides a DBM backend for the unified key/value storage frontend as defined in the ocsipersist package. Ocsipersist is used pervasively in Eliom/Ocsigen to handle sessions and references. It can be used as an extension for ocsigenserver or as a library."
synopsis: "Persistent key/value storage for OCaml using DBM"
description: "This library provides a DBM backend for the unified key/value storage frontend as defined in the ocsipersist package."

homepage: "https://github.com/ocsigen/ocsipersist"
bug-reports: "https://github.com/ocsigen/ocsipersist/issues"
Expand All @@ -16,8 +16,7 @@ depends: [
"dune" {>= "2.9"}
"lwt" {>= "4.2.0"}
"lwt_log"
"xml-light"
"ocsigenserver" {>= "3.0.0"}
"ocsipersist-lib" {>= "1.1.0" & < "1.2.0"}
"ocsipersist" {>= "2.0.0" & < "2.1.0"}
"ocsipersist-lib" {>= "2.0.0" & < "2.1.0"}
"dbm"
]
4 changes: 2 additions & 2 deletions ocsipersist-lib.opam
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
opam-version: "2.0"
name: "ocsipersist-lib"
version: "1.1.0"
version: "2.0.0"
authors: "The Ocsigen team <[email protected]>"
maintainer: "Jan Rochel <[email protected]>"
license: "LGPL-2.1-only with OCaml-LGPL-linking-exception"
synopsis: "Persistent key/value storage (for Ocsigen) - support library"
synopsis: "Persistent key/value storage for OCaml - support library"
description: "This library defines signatures and auxiliary tools for defining backends for the Ocsipersist frontent. Ocsipersist is used pervasively in Eliom/Ocsigen to handle sessions and references. It can be used as an extension for ocsigenserver or as a library. Implementations of the following backends currently exist: DBM, PostgreSQL, SQLite."

homepage: "https://github.com/ocsigen/ocsipersist"
Expand Down
20 changes: 20 additions & 0 deletions ocsipersist-pgsql-config.opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
opam-version: "2.0"
name: "ocsipersist-pgsql-config"
version: "2.0.0"
authors: "The Ocsigen team <[email protected]>"
maintainer: "Jan Rochel <[email protected]>"
license: "LGPL-2.1-only with OCaml-LGPL-linking-exception"
synopsis: "Ocsigen Server configuration file extension for ocsipersist-pgsql"
description: "Load this package from Ocsigen Server's configuration file if you want to use the PostgreSQL storage backend."

homepage: "https://github.com/ocsigen/ocsipersist"
bug-reports: "https://github.com/ocsigen/ocsipersist/issues"
dev-repo: "git+https://github.com/ocsigen/ocsipersist.git"
build: [ "dune" "build" "-p" name "-j" jobs ]

depends: [
"dune" {>= "2.9"}
"xml-light"
"ocsigenserver" {>= "3.0.0"}
"ocsipersist-pgsql" {>= "2.0.0" & < "2.1.0"}
]
11 changes: 5 additions & 6 deletions ocsipersist-pgsql.opam
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
opam-version: "2.0"
name: "ocsipersist-pgsql"
version: "1.1.0"
version: "2.0.0"
authors: "The Ocsigen team <[email protected]>"
maintainer: "Jan Rochel <[email protected]>"
license: "LGPL-2.1-only with OCaml-LGPL-linking-exception"
synopsis: "Persistent key/value storage (for Ocsigen) using PostgreSQL"
description: "This library provides a PostgreSQL backend for the unified key/value storage frontend as defined in the ocsipersist package. Ocsipersist is used pervasively in Eliom/Ocsigen to handle sessions and references. It can be used as an extension for ocsigenserver or as a library."
synopsis: "Persistent key/value storage for OCaml using PostgreSQL"
description: "This library provides a PostgreSQL backend for the unified key/value storage frontend as defined in the ocsipersist package."

homepage: "https://github.com/ocsigen/ocsipersist"
bug-reports: "https://github.com/ocsigen/ocsipersist/issues"
Expand All @@ -16,8 +16,7 @@ depends: [
"dune" {>= "2.9"}
"lwt" {>= "4.2.0"}
"lwt_log"
"xml-light"
"ocsigenserver" {>= "3.0.0"}
"ocsipersist-lib" {>= "1.1.0" & < "1.2.0"}
"ocsipersist" {>= "2.0.0" & < "2.1.0"}
"ocsipersist-lib" {>= "2.0.0" & < "2.1.0"}
"pgocaml"
]
20 changes: 20 additions & 0 deletions ocsipersist-sqlite-config.opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
opam-version: "2.0"
name: "ocsipersist-sqlite-config"
version: "2.0.0"
authors: "The Ocsigen team <[email protected]>"
maintainer: "Jan Rochel <[email protected]>"
license: "LGPL-2.1-only with OCaml-LGPL-linking-exception"
synopsis: "Ocsigen Server configuration file extension for ocsipersist-sqlite"
description: "Load this package from Ocsigen Server's configuration file if you want to use the SQLite storage backend."

homepage: "https://github.com/ocsigen/ocsipersist"
bug-reports: "https://github.com/ocsigen/ocsipersist/issues"
dev-repo: "git+https://github.com/ocsigen/ocsipersist.git"
build: [ "dune" "build" "-p" name "-j" jobs ]

depends: [
"dune" {>= "2.9"}
"xml-light"
"ocsigenserver" {>= "3.0.0"}
"ocsipersist-sqlite" {>= "2.0.0" & < "2.1.0"}
]
11 changes: 5 additions & 6 deletions ocsipersist-sqlite.opam
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
opam-version: "2.0"
name: "ocsipersist-sqlite"
version: "1.1.0"
version: "2.0.0"
authors: "The Ocsigen team <[email protected]>"
maintainer: "Jan Rochel <[email protected]>"
license: "LGPL-2.1-only with OCaml-LGPL-linking-exception"
synopsis: "Persistent key/value storage (for Ocsigen) using SQLite"
description: "This library provides a SQLite backend for the unified key/value storage frontend as defined in the ocsipersist package. Ocsipersist is used pervasively in Eliom/Ocsigen to handle sessions and references. It can be used as an extension for ocsigenserver or as a library."
synopsis: "Persistent key/value storage for OCaml using SQLite"
description: "This library provides a SQLite backend for the unified key/value storage frontend as defined in the ocsipersist package."

homepage: "https://github.com/ocsigen/ocsipersist"
bug-reports: "https://github.com/ocsigen/ocsipersist/issues"
Expand All @@ -16,8 +16,7 @@ depends: [
"dune" {>= "2.9"}
"lwt" {>= "4.2.0"}
"lwt_log"
"xml-light"
"ocsigenserver" {>= "3.0.0"}
"ocsipersist-lib" {>= "1.1.0" & < "1.2.0"}
"ocsipersist" {>= "2.0.0" & < "2.1.0"}
"ocsipersist-lib" {>= "2.0.0" & < "2.1.0"}
"sqlite3"
]
20 changes: 6 additions & 14 deletions ocsipersist.opam
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
opam-version: "2.0"
name: "ocsipersist"
version: "1.1.0"
version: "2.0.0"
authors: "The Ocsigen team <[email protected]>"
maintainer: "Jan Rochel <[email protected]>"
license: "LGPL-2.1-only with OCaml-LGPL-linking-exception"
synopsis: "Persistent key/value storage (for Ocsigen) using multiple backends"
synopsis: "Persistent key/value storage for OCaml using multiple backends"
description: "This is an virtual library defining a unified frontend for a number of key/value storage implementations. Ocsipersist is used pervasively in Eliom/Ocsigen to handle sessions and references. It can be used as an extension for ocsigenserver or as a library. Implementations of the following backends currently exist: DBM, PostgreSQL, SQLite."

homepage: "https://github.com/ocsigen/ocsipersist"
Expand All @@ -15,18 +15,10 @@ build: [ "dune" "build" "-p" name "-j" jobs ]
depends: [
"dune" {>= "2.9"}
"lwt" {>= "4.2.0"}
"ocsigenserver" {>= "3.0.0"}
"ocsipersist-lib" {>= "1.1.0" & < "1.2.0"}
"ocsipersist-lib" {>= "2.0.0" & < "3.0.0"}
]

depopts: [
"ocsipersist-dbm"
"ocsipersist-pgsql"
"ocsipersist-sqlite"
]

conflicts: [
"ocsipersist-dbm" {< "1.1.0" | >= "1.2.0"}
"ocsipersist-pgsql" {< "1.1.0" | >= "1.2.0"}
"ocsipersist-sqlite" {< "1.1.0" | >= "1.2.0"}
"ocsipersist-dbm" {< "2.0.0" | >= "2.1.0"}
"ocsipersist-pgsql" {< "2.0.0" | >= "2.1.0"}
"ocsipersist-sqlite" {< "2.0.0" | >= "2.1.0"}
]
19 changes: 9 additions & 10 deletions src/dbm/dune
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,16 @@

(library
(name ocsipersist_dbm)
(public_name ocsipersist.dbm)
(public_name ocsipersist-dbm)
(implements ocsipersist)
(modules ocsipersist)
(libraries
dbm
lwt_log
xml-light
ocsipersist_dbmtypes
ocsigenserver
ocsipersist_lib)
(optional))
(modules ocsipersist ocsipersist_settings)
(libraries dbm lwt_log ocsipersist_dbmtypes ocsipersist_lib))

(library
(name ocsipersist_dbm_config)
(public_name ocsipersist-dbm-config)
(modules ocsipersist_config)
(libraries xml-light ocsipersist_dbm ocsigenserver))

(executable
(public_name ocsidbm)
Expand Down
17 changes: 16 additions & 1 deletion src/dbm/index.mld
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
{0 ocsipersist-dbm}

The DBM backend uses a server process [ocsidbm].

{1 Using as a library}
For the API documentation see OPAM package [ocsipersist].

If you are not using Ocsigen Server, you can configure with
{[
Ocsipersist_settings.set_delay_loading
Ocsipersist_settings.set_store
Ocsipersist_settings.set_ocsidbm
Ocsipersist_settings.set_error_log_path
]}

{1 Using with Ocsigen Server: ocsipersist-dbm-config}

For the API documentation see OPAM package [ocsipersist].

Here we document the configuration options of the ocsigenserver extension.
All sub-tags of the [extension] tag are optional.

{[
<extension findlib-package="ocsipersist.dbm">
<extension findlib-package="ocsipersist.dbm.config">
<delayloading val="false"/>
<store dir="store"/>
<ocsidbm name="ocsidbm"/>
Expand Down
Loading

0 comments on commit a6a01ff

Please sign in to comment.