| 1 | submodule "/pliant/storage/database.pli" | |
| 2 | module "/pliant/language/type/text/str8.pli" | |
| 3 | ||
| 4 | public | |
| 5 | ||
| 6 | type SiteArea | |
| 7 | field Str path | |
| 8 | field Str read | |
| 9 | field Str write | |
| 10 | field Str root | |
| 11 | field Str style | |
| 12 | field Str style_options | |
| 13 | field Str forward | |
| 14 | ||
| 15 | type Site | |
| 16 | field Str computer | |
| 17 | field Str ip ; field Int port <- undefined | |
| 18 | field Str forward | |
| 19 | field Str protocol from_ip | |
| 20 | field Str public_key | |
| 21 | field Str abstract docurl | |
| 22 | field Str root <- "/" | |
| 23 | field Str style <- "/pliant/protocol/http/style/default.style" | |
| 24 | field Str style_options | |
| 25 | field Str default <- "/pliant/protocol/http/default.html" | |
| 26 | field Set:SiteArea area # key is path in the site | |
| 27 | ||
| 28 | type SiteDatabase | |
| 29 | field Set:Site site | |
| 30 | ||
| 31 | ||
| 32 | type SiteSessionKey | |
| 33 | field Str8 key | |
| 34 | field DateTime timestamp | |
| 35 | ||
| 36 | type SiteSecret | |
| 37 | field Str private_key | |
| 38 | field Set:SiteSessionKey session | |
| 39 | ||
| 40 | type SiteSecretDatabase | |
| 41 | field Set:SiteSecret site | |
| 42 | field Str8 sign_secret cipher_secret | |
| 43 | field Str8 sign_secret2 cipher_secret2 | |
| 44 | ||
| 45 | ||
| 46 | (gvar Database:SiteDatabase site_database) load "security:/site.pdb" log "security:/site.log" mount "/pliant/site" | |
| 47 | gvar (Data Set:Site) site :> site_database:data:site | |
| 48 | (gvar Database:SiteSecretDatabase site_secret_database) load "security:/site_secret.pdb" | |
| 49 | ||