diff src/settings.sig @ 768:3b7e46790fa7

Path rewriting
author Adam Chlipala <adamc@hcoop.net>
date Sat, 02 May 2009 13:23:07 -0400
parents df09c95085f8
children efceae06df17
line wrap: on
line diff
--- a/src/settings.sig	Sat May 02 12:50:52 2009 -0400
+++ b/src/settings.sig	Sat May 02 13:23:07 2009 -0400
@@ -65,4 +65,15 @@
     val setJsFuncs : (ffi * string) list -> unit
     val jsFunc : ffi -> string option
 
+    datatype pattern_kind = Exact | Prefix
+    datatype action = Allow | Deny
+    type rule = { action : action, kind : pattern_kind, pattern : string }
+
+    datatype path_kind = Any | Url | Table | Sequence | View | Relation | Cookie | Style
+    type rewrite = { pkind : path_kind, kind : pattern_kind, from : string, to : string }
+
+    (* Rules for rewriting URLs from canonical forms *)
+    val setRewriteRules : rewrite list -> unit
+    val rewrite : path_kind -> string -> string
+
 end