diff --git a/.gitignore b/.gitignore index dd14b6e..546ee5b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ .dub docs.json __dummy.html -docs/ /mirage-config mirage-config.so mirage-config.dylib diff --git a/docs/css/style.min.css b/docs/css/style.min.css new file mode 100644 index 0000000..46d57c3 --- /dev/null +++ b/docs/css/style.min.css @@ -0,0 +1,3 @@ +/*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}.container{position:relative;width:100%;max-width:960px;margin:0 auto;padding:0 20px;box-sizing:border-box}.column,.columns{width:100%;float:left;box-sizing:border-box}@media(min-width:400px){.container{width:85%;padding:0}}@media(min-width:550px){.container{width:80%}.column,.columns{margin-left:4%}.column:first-child,.columns:first-child{margin-left:0}.one.column,.one.columns{width:4.66666666667%}.two.columns{width:13.3333333333%}.three.columns{width:22%}.four.columns{width:30.6666666667%}.five.columns{width:39.3333333333%}.six.columns{width:48%}.seven.columns{width:56.6666666667%}.eight.columns{width:65.3333333333%}.nine.columns{width:74.0%}.ten.columns{width:82.6666666667%}.eleven.columns{width:91.3333333333%}.twelve.columns{width:100%;margin-left:0}.one-third.column{width:30.6666666667%}.two-thirds.column{width:65.3333333333%}.one-half.column{width:48%}.offset-by-one.column,.offset-by-one.columns{margin-left:8.66666666667%}.offset-by-two.column,.offset-by-two.columns{margin-left:17.3333333333%}.offset-by-three.column,.offset-by-three.columns{margin-left:26%}.offset-by-four.column,.offset-by-four.columns{margin-left:34.6666666667%}.offset-by-five.column,.offset-by-five.columns{margin-left:43.3333333333%}.offset-by-six.column,.offset-by-six.columns{margin-left:52%}.offset-by-seven.column,.offset-by-seven.columns{margin-left:60.6666666667%}.offset-by-eight.column,.offset-by-eight.columns{margin-left:69.3333333333%}.offset-by-nine.column,.offset-by-nine.columns{margin-left:78.0%}.offset-by-ten.column,.offset-by-ten.columns{margin-left:86.6666666667%}.offset-by-eleven.column,.offset-by-eleven.columns{margin-left:95.3333333333%}.offset-by-one-third.column,.offset-by-one-third.columns{margin-left:34.6666666667%}.offset-by-two-thirds.column,.offset-by-two-thirds.columns{margin-left:69.3333333333%}.offset-by-one-half.column,.offset-by-one-half.columns{margin-left:52%}}html{font-size:62.5%}body{font-size:1.5em;line-height:1.6;font-weight:400;font-family:"Raleway","HelveticaNeue","Helvetica Neue",Helvetica,Arial,sans-serif;color:#222}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:2rem;font-weight:300}h1{font-size:4.0rem;line-height:1.2;letter-spacing:-.1rem}h2{font-size:3.6rem;line-height:1.25;letter-spacing:-.1rem}h3{font-size:3.0rem;line-height:1.3;letter-spacing:-.1rem}h4{font-size:2.4rem;line-height:1.35;letter-spacing:-.08rem}h5{font-size:1.8rem;line-height:1.5;letter-spacing:-.05rem}h6{font-size:1.5rem;line-height:1.6;letter-spacing:0}@media(min-width:550px){h1{font-size:5.0rem}h2{font-size:4.2rem}h3{font-size:3.6rem}h4{font-size:3.0rem}h5{font-size:2.4rem}h6{font-size:1.5rem}}p{margin-top:0}a{color:#1eaedb}a:hover{color:#0fa0ce}.button,button,input[type="submit"],input[type="reset"],input[type="button"]{display:inline-block;height:38px;padding:0 30px;color:#555;text-align:center;font-size:11px;font-weight:600;line-height:38px;letter-spacing:.1rem;text-transform:uppercase;text-decoration:none;white-space:nowrap;background-color:transparent;border-radius:4px;border:1px solid #bbb;cursor:pointer;box-sizing:border-box}.button:hover,button:hover,input[type="submit"]:hover,input[type="reset"]:hover,input[type="button"]:hover,.button:focus,button:focus,input[type="submit"]:focus,input[type="reset"]:focus,input[type="button"]:focus{color:#333;border-color:#888;outline:0}.button.button-primary,button.button-primary,input[type="submit"].button-primary,input[type="reset"].button-primary,input[type="button"].button-primary{color:#FFF;background-color:#33c3f0;border-color:#33c3f0} +.button.button-primary:hover,button.button-primary:hover,input[type="submit"].button-primary:hover,input[type="reset"].button-primary:hover,input[type="button"].button-primary:hover,.button.button-primary:focus,button.button-primary:focus,input[type="submit"].button-primary:focus,input[type="reset"].button-primary:focus,input[type="button"].button-primary:focus{color:#FFF;background-color:#1eaedb;border-color:#1eaedb}input[type="email"],input[type="number"],input[type="search"],input[type="text"],input[type="tel"],input[type="url"],input[type="password"],textarea,select{height:38px;padding:6px 10px;background-color:#fff;border:1px solid #d1d1d1;border-radius:4px;box-shadow:none;box-sizing:border-box}input[type="email"],input[type="number"],input[type="search"],input[type="text"],input[type="tel"],input[type="url"],input[type="password"],textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none}textarea{min-height:65px;padding-top:6px;padding-bottom:6px}input[type="email"]:focus,input[type="number"]:focus,input[type="search"]:focus,input[type="text"]:focus,input[type="tel"]:focus,input[type="url"]:focus,input[type="password"]:focus,textarea:focus,select:focus{border:1px solid #33c3f0;outline:0}label,legend{display:block;margin-bottom:.5rem;font-weight:600}fieldset{padding:0;border-width:0}input[type="checkbox"],input[type="radio"]{display:inline}label>.label-body{display:inline-block;margin-left:.5rem;font-weight:normal}ul{list-style:circle inside}ol{list-style:decimal inside}ol,ul{padding-left:0;margin-top:0}ul ul,ul ol,ol ol,ol ul{margin:1.5rem 0 1.5rem 3rem;font-size:90%}li{margin-bottom:1rem}code{padding:.2rem .5rem;margin:0 .2rem;font-size:90%;white-space:nowrap;background:#f1f1f1;border:1px solid #e1e1e1;border-radius:4px}pre>code{display:block;padding:1rem 1.5rem;white-space:pre;overflow-x:auto}th,td{padding:12px 15px;text-align:left;border-bottom:1px solid #e1e1e1}th:first-child,td:first-child{padding-left:0}th:last-child,td:last-child{padding-right:0}button,.button{margin-bottom:1rem}input,textarea,select,fieldset{margin-bottom:1.5rem}pre,blockquote,dl,figure,table,p,ul,ol,form{margin-bottom:2.5rem}.u-full-width{width:100%;box-sizing:border-box}.u-max-full-width{max-width:100%;box-sizing:border-box}.u-pull-right{float:right}.u-pull-left{float:left}hr{margin-top:3rem;margin-bottom:3.5rem;border-width:0;border-top:1px solid #e1e1e1}.container:after,.row:after,.u-cf{content:"";display:table;clear:both}.pln{color:#4d4d4c}@media screen{.spc{color:#606}.str{color:#718c00}.kwd{color:#8959a8}.com{color:#8e908c}.typ{color:#4271ae}.lit{color:#f5871f}.pun{color:#4d4d4c}.opn{color:#4d4d4c}.clo{color:#4d4d4c}.tag{color:#c82829}.atn{color:#f5871f}.atv{color:#3e999f}.dec{color:#f5871f}.var{color:#c82829}.fun{color:#4271ae}}@media print,projection{.spc{color:#606}.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}ol.linenums{margin-top:0;margin-bottom:0}@font-face{font-family:'Raleway';font-style:normal;font-weight:normal;src:local('Raleway'),url(../fonts/raleway-regular.woff) format('woff')}@font-face{font-family:'fontello';font-style:normal;font-weight:normal;src:url(../fonts/fontello.woff) format('woff')}a{text-decoration:none}ul.tree-view li{list-style-type:none}#main-nav{background:#343131}body{position:absolute;display:flex}#main-nav,#main-contents{padding:2em 1em 0 1em;box-sizing:border-box;display:flex;flex-direction:column;justify-content:space-between}@media(max-width:750px){body{min-width:100%;flex-direction:column}}@media(min-width:750px){body{min-height:100%}#main-nav{min-width:15em}}p#main-nav-footer{margin-bottom:0;text-align:right}section{margin-top:1em}div#symbolSearchPane{position:relative;max-width:13em}input#symbolSearch,ul#symbolSearchResults{box-sizing:border-box;width:100%}input#symbolSearch.with_results{border-radius:0;border-top-left-radius:4px;border-top-right-radius:4px}ul#symbolSearchResults{font-size:.85em;background-color:white;border:1px solid #aaa;border-bottom-left-radius:4px;border-bottom-right-radius:4px;box-sizing:border-box;position:absolute;top:38px;left:0;z-index:2}ul#symbolSearchResults>li{list-style-type:none;padding-left:10px;margin-bottom:0}ul.searchResults.symbolList>li{list-style-type:none}ul.searchResults.symbolList>li>h5{margin-bottom:0}div#license-info,p#main-nav-footer{font-variant:small-caps;font-size:.75em}div#license-info>p{display:inline}div#license-info>p:not(:first-child)::before{content:" | "}nav#main-nav ul.tree-view a,nav#main-nav ul.tree-view li,p#main-nav-footer a,p#main-nav-footer{color:#b3b3b3}ul.tree-view div.package:before{font-family:"fontello";speak:none;margin-right:.3em}ul.tree-view li.collapsed>div.package:before{content:'\e800'}ul.tree-view li:not(.collapsed)>div.package:before{content:'\e801'} +ul.tree-view div.selected>a{color:white!important}div.prototype>code{display:block;padding:1rem 1.5rem}#main-contents{width:100%}.prototype{max-width:fit-content} diff --git a/docs/file_hashes.json b/docs/file_hashes.json new file mode 100644 index 0000000..556b6ae --- /dev/null +++ b/docs/file_hashes.json @@ -0,0 +1 @@ +{"mirage\\java\\loadJavaProperties.html":"3CFB11333EED6108332D9CD224713225","mirage\\java\\JavaPropertiesFactory.parseConfig.html":"7D499617F49F848BD7C4C2DFED47317A","mirage\\config\\SubstituteEnvironmentVariables.html":"363CDE300F2C363095DEAACD1794591E","mirage\\config\\SubstituteConfigVariables.html":"DC1AA3901EFBFA70804043EED478F84B","mirage\\config\\ConfigCreationException.html":"8A3502A9D94F6B1B50B184460655BF82","mirage\\json.html":"0C5EEB2E81199B95457E2F6929F1D7D7","mirage\\config\\ConfigPathNotFoundException.html":"9EDE0DF8D61260E8E3C7ACD4A9A40BC6","mirage\\json\\loadJsonConfig.html":"F52125B328BCC409E485B85D4F858B68","mirage\\json\\parseJsonConfig.html":"677D3E59D2991BB2B394C1E4460CEB82","mirage\\java.html":"8034CDC674527F61443A662554C9F89A","mirage\\config\\PathParseException.html":"43C5D15980EA97E0B9667751B08096F2","mirage\\java\\JavaPropertiesFactory.html":"7E16C638D80689922EC8567ED470C0FA","mirage\\config\\ConfigFactory.parseConfig.html":"D8CF3B738A4BDEE8CC82ED0BBAFE3337","mirage\\config\\ConfigFactory.loadFile.html":"14032712C1F7B5F6E02832AF0D3CD17F","mirage\\config\\ConfigNode.html":"4B55A2D7047031068C722360E5D094E7","mirage\\config\\ArrayNode.html":"E3B94306051791B22AB1BF50087F97FA","mirage\\config\\ObjectNode.html":"7B0AD2303C0B6F7B4F15FC3583F32318","mirage\\json\\JsonConfigFactory.html":"B5135F783DC880D1B209347CF99AF37F","mirage\\config\\ConfigDictionary.set.html":"F24F485FA9502315F265FE1306D4DDAB","mirage\\config\\ConfigFactory.html":"11858B67D8FA24642C70462F51D599E4","sitemap.xml":"373867A581E2C882A8180864112DDF02","index.html":"8D84495B941A7CE322883F7DF09C4D77","mirage\\config\\ConfigDictionary.get.html":"DE33737B0DB3460F513D2A81442382BB","symbols.js":"B5572FB75F19E2D3AA53D193EAAF71FD","mirage\\java\\parseJavaProperties.html":"B51432D0C5B2E1E11DC82CE108275712","mirage\\json\\JsonConfigFactory.parseJson.html":"05749B35FD8D0D99BDB794F20A19A202","mirage\\config\\ConfigDictionary.html":"F7F2D064BE54A54F0211BA840D3E6E1F","mirage\\config\\ConfigReadException.html":"DEC45E3788EC5824C38EB60AA51F42C2","mirage\\config\\ConfigDictionary.getConfig.html":"A49B86FAFC8DF95CAD8DE34D5BF91588","mirage.html":"6086E13195053C9A596A09E992F414FF","mirage\\config.html":"C91969C8EE9AAE237E7B6E7380D4EED7","mirage\\json\\JsonConfigFactory.parseConfig.html":"80D0185E3FC7C6EF33E17583F2C918B5","mirage\\config\\ValueNode.html":"66538106380060D5C0810FF79FB192C4"} \ No newline at end of file diff --git a/docs/fonts/fontello.woff b/docs/fonts/fontello.woff new file mode 100644 index 0000000..98ffb3b Binary files /dev/null and b/docs/fonts/fontello.woff differ diff --git a/docs/fonts/raleway-regular.woff b/docs/fonts/raleway-regular.woff new file mode 100644 index 0000000..e130a83 Binary files /dev/null and b/docs/fonts/raleway-regular.woff differ diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..f0e17b0 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,104 @@ + + + + + + API documentation + + + + +
+ +
+
+

API documentation

+ + + + + + + + + + + + + + + + + + + + + +
ModuleDescription
+ mirage.config + + Base utilities for working with configurations. + +
+ mirage.java + + Utilities for loading Java properties files. + +
+ mirage.json + + Utilities for loading JSON configurations. + +
+ mirage + + +
+
+ +
+ + \ No newline at end of file diff --git a/docs/js/script.min.js b/docs/js/script.min.js new file mode 100644 index 0000000..e9ebac6 --- /dev/null +++ b/docs/js/script.min.js @@ -0,0 +1,13 @@ +var searchCounter,lastSearchString +function setupDdox(){for(var e=document.querySelectorAll(".tree-view .package"),t=0;tr.length?1:a.lengthi.length?1:lt&&((p=document.createElement("li")).innerHTML="…"+(n.length-100)+" additional results",y("symbolSearchResults").appendChild(p)),n.length&&(y("symbolSearchResults").style.display="initial",y("symbolSearch").classList.add("with_results"))}function f(e){for(var t=e.length-1;0<=t;t--)for(o in m)if(e[t].length>=m[o].length&&e[t].substr(0,m[o].length)==m[o])return e.length-1-t +return e.length}}searchCounter=0,lastSearchString="" diff --git a/docs/mirage.html b/docs/mirage.html new file mode 100644 index 0000000..1da4d43 --- /dev/null +++ b/docs/mirage.html @@ -0,0 +1,75 @@ + + + + + + Module mirage + + + + +
+ +
+
+

Module mirage

+
+
+
+
+

Mike Bierlee, m.bierlee@lostmoment.com +

+ +

2022 Mike Bierlee +

+ +

This software is licensed under the terms of the MIT license. + The full terms of the license can be found in the LICENSE file. +

+ +
+
+
+ + \ No newline at end of file diff --git a/docs/mirage/config.html b/docs/mirage/config.html new file mode 100644 index 0000000..1c6aadc --- /dev/null +++ b/docs/mirage/config.html @@ -0,0 +1,219 @@ + + + + + + Module mirage.config + + + + +
+ +
+
+

Module mirage.config

Base utilities for working with configurations. +

+ +
+
+

Interfaces

+ + + + + + + + + +
NameDescription
+ + ConfigNode + + The configuration tree is made up of specific types of ConfigNodes. + Used as generic type for ConfigFactory and ConfigDictionary. +
+
+
+

Classes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
+ + ArrayNode + + A configuration item that is an array. +
+ + ConfigCreationException + + Used by ConfigFactory instances when loading or parsing configuration fails. +
+ + ConfigDictionary + + A ConfigDictionary contains the configuration tree and facilities to get values from that tree. +
+ + ConfigFactory + + The base class used by configuration factories for specific file types. +
+ + ConfigPathNotFoundException + + Used by ConfigDictionary when the supplied path does not exist. +
+ + ConfigReadException + + Used by the ConfigDictionary when something goes wrong when reading configuration. +
+ + ObjectNode + + A configuration item that is an object. +
+ + PathParseException + + Used by ConfigDictionary when there is something wrong with the path when calling ConfigDictionary.get() +
+ + ValueNode + + A configuration item that is any sort of primitive value (strings, numbers or null). +
+
+
+

Aliases

+ + + + + + + + + + + + + + + +
NameTypeDescription
+ + SubstituteConfigVariables + + + std.typecons.Flag!("SubstituteConfigVariables") + Used in a ConfigDictionary to enable to disable config path substitution. +
+ + SubstituteEnvironmentVariables + + + std.typecons.Flag!("SubstituteEnvironmentVariables") + Used in a ConfigDictionary to enable to disable environment variable substitution. +
+
+
+
+
+

Mike Bierlee, m.bierlee@lostmoment.com +

+ +

2022 Mike Bierlee +

+ +

This software is licensed under the terms of the MIT license. + The full terms of the license can be found in the LICENSE file. +

+ +
+
+
+ + \ No newline at end of file diff --git a/docs/mirage/config/ArrayNode.html b/docs/mirage/config/ArrayNode.html new file mode 100644 index 0000000..3aa3b48 --- /dev/null +++ b/docs/mirage/config/ArrayNode.html @@ -0,0 +1,89 @@ + + + + + + Class ArrayNode + + + + +
+ +
+
+

Class ArrayNode

A configuration item that is an array. +

+
+ +
+ class ArrayNode +
  : ConfigNode + ; +
+
+
+

Contains other ConfigNodes as children. +

+
+ + +
+
+
+

Mike Bierlee, m.bierlee@lostmoment.com +

+ +

2022 Mike Bierlee +

+ +

This software is licensed under the terms of the MIT license. + The full terms of the license can be found in the LICENSE file. +

+ +
+
+
+ + \ No newline at end of file diff --git a/docs/mirage/config/ConfigCreationException.html b/docs/mirage/config/ConfigCreationException.html new file mode 100644 index 0000000..2ce1879 --- /dev/null +++ b/docs/mirage/config/ConfigCreationException.html @@ -0,0 +1,86 @@ + + + + + + Class ConfigCreationException + + + + +
+ +
+
+

Class ConfigCreationException

Used by ConfigFactory instances when loading or parsing configuration fails. +

+
+ +
+ class ConfigCreationException +
  : object.Exception + ; +
+
+
+ + +
+
+
+

Mike Bierlee, m.bierlee@lostmoment.com +

+ +

2022 Mike Bierlee +

+ +

This software is licensed under the terms of the MIT license. + The full terms of the license can be found in the LICENSE file. +

+ +
+
+
+ + \ No newline at end of file diff --git a/docs/mirage/config/ConfigDictionary.get.html b/docs/mirage/config/ConfigDictionary.get.html new file mode 100644 index 0000000..a3ca704 --- /dev/null +++ b/docs/mirage/config/ConfigDictionary.get.html @@ -0,0 +1,202 @@ + + + + + + ConfigDictionary.get - multiple declarations + + + + +
+ +
+
+

ConfigDictionary.get - multiple declarations

+

Function ConfigDictionary.get

Get values from the configuration using config path notation. +

+
+ +
+ string get + ( +
+   string configPath, +
+   string defaultValue = null +
+ ); +
+
+
+
+ +

Parameters

+ + + +
NameDescription
configPath Path to the wanted config value. The path is separated by dots, e.g. "server.public.hostname". + Values from arrays can be selected by brackets, for example: "server[3].hostname.ports[0]". + When the config is just a value, for example just a string, it can be fetched by just specifying "." as path. + Although the path should be universally the same over all types of config files, some might not lend to this structure, + and have a more specific way of retrieving data from the config. See the examples and specific config factories for + more details.
defaultValue (Optional) Value to return when the given configPath is invalid. When not supplied a ConfigPathNotFoundException exception is thrown.
+
+

Throws

+

ConfigReadException when something goes wrong reading the config. + ConfigPathNotFoundException when the given path does not exist in the config. +

+
+

Returns

+

The value at the path in the configuration. To convert it use get!T(). +

+
+

Function ConfigDictionary.get

Get values from the configuration and attempts to convert them to the specified type. +

+
+ +
+ ConvertToType get(ConvertToType) + ( +
+   string configPath +
+ ); +
+
+
+
+ +

Parameters

+ + +
NameDescription
configPath Path to the wanted config value. See get().
+
+

Throws

+

ConfigReadException when something goes wrong reading the config. + ConfigPathNotFoundException when the given path does not exist in the config. +

+
+

Returns

+

The value at the path in the configuration. +

+
+

See Also

+

get +

+
+

Function ConfigDictionary.get

Get values from the configuration and attempts to convert them to the specified type. +

+
+ +
+ ConvertToType get(ConvertToType) + ( +
+   string configPath, +
+   ConvertToType defaultValue +
+ ); +
+
+
+
+ +

Parameters

+ + + +
NameDescription
configPath Path to the wanted config value. See get().
defaultValue (Optional) Value to return when the given configPath is invalid. When not supplied a ConfigPathNotFoundException exception is thrown.
+
+

Throws

+

ConfigReadException when something goes wrong reading the config. + ConfigPathNotFoundException when the given path does not exist in the config. +

+
+

Returns

+

The value at the path in the configuration. +

+
+

See Also

+

get +

+
+ +
+
+
+

Mike Bierlee, m.bierlee@lostmoment.com +

+ +

2022 Mike Bierlee +

+ +

This software is licensed under the terms of the MIT license. + The full terms of the license can be found in the LICENSE file. +

+ +
+
+
+ + \ No newline at end of file diff --git a/docs/mirage/config/ConfigDictionary.getConfig.html b/docs/mirage/config/ConfigDictionary.getConfig.html new file mode 100644 index 0000000..0a9a47d --- /dev/null +++ b/docs/mirage/config/ConfigDictionary.getConfig.html @@ -0,0 +1,102 @@ + + + + + + Function ConfigDictionary.getConfig + + + + +
+ +
+
+

Function ConfigDictionary.getConfig

Fetch a sub-section of the config as another config. +

+
+ +
+ ConfigDictionary getConfig + ( +
+   string configPath +
+ ); +
+
+
+

Commonly used for example to fetch further configuration from arrays, e.g.: getConfig("http.servers[3]") + which then returns the rest of the config at that path. +

+
+ +

Parameters

+ + +
NameDescription
configPath Path to the wanted config. See get().
+
+

Returns

+

A sub-section of the configuration. +

+
+ +
+
+
+

Mike Bierlee, m.bierlee@lostmoment.com +

+ +

2022 Mike Bierlee +

+ +

This software is licensed under the terms of the MIT license. + The full terms of the license can be found in the LICENSE file. +

+ +
+
+
+ + \ No newline at end of file diff --git a/docs/mirage/config/ConfigDictionary.html b/docs/mirage/config/ConfigDictionary.html new file mode 100644 index 0000000..15151d5 --- /dev/null +++ b/docs/mirage/config/ConfigDictionary.html @@ -0,0 +1,143 @@ + + + + + + Class ConfigDictionary + + + + +
+ +
+
+

Class ConfigDictionary

A ConfigDictionary contains the configuration tree and facilities to get values from that tree. +

+
+ +
+ class ConfigDictionary + ; +
+
+
+ +

Methods

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
+ + get + + (configPath, defaultValue) + Get values from the configuration using config path notation. +
+ + get + + (configPath) + Get values from the configuration and attempts to convert them to the specified type. +
+ + get + + (configPath, defaultValue) + Get values from the configuration and attempts to convert them to the specified type. +
+ + getConfig + + (configPath) + Fetch a sub-section of the config as another config. +
+ + set + + (configPath, value) + Assign a value at the given path. +
+
+ +
+
+
+

Mike Bierlee, m.bierlee@lostmoment.com +

+ +

2022 Mike Bierlee +

+ +

This software is licensed under the terms of the MIT license. + The full terms of the license can be found in the LICENSE file. +

+ +
+
+
+ + \ No newline at end of file diff --git a/docs/mirage/config/ConfigDictionary.set.html b/docs/mirage/config/ConfigDictionary.set.html new file mode 100644 index 0000000..6e48c11 --- /dev/null +++ b/docs/mirage/config/ConfigDictionary.set.html @@ -0,0 +1,98 @@ + + + + + + Function ConfigDictionary.set + + + + +
+ +
+
+

Function ConfigDictionary.set

Assign a value at the given path. +

+
+ +
+ void set + ( +
+   string configPath, +
+   string value +
+ ); +
+
+
+
+ +

Parameters

+ + + +
NameDescription
configPath Path where to assign the value to. If the path does not exist, it will be created.
value Value to set at path.
+
+ +
+
+
+

Mike Bierlee, m.bierlee@lostmoment.com +

+ +

2022 Mike Bierlee +

+ +

This software is licensed under the terms of the MIT license. + The full terms of the license can be found in the LICENSE file. +

+ +
+
+
+ + \ No newline at end of file diff --git a/docs/mirage/config/ConfigFactory.html b/docs/mirage/config/ConfigFactory.html new file mode 100644 index 0000000..86cc8dd --- /dev/null +++ b/docs/mirage/config/ConfigFactory.html @@ -0,0 +1,113 @@ + + + + + + Class ConfigFactory + + + + +
+ +
+
+

Class ConfigFactory

The base class used by configuration factories for specific file types. +

+
+ +
+ class ConfigFactory + ; +
+
+
+ +

Methods

+ + + + + + + + + + + + + +
NameDescription
+ + loadFile + + (path) + Loads a configuration from the specified path from disk. +
+ + parseConfig + + (contents) + Parse configuration from the given string. +
+
+ +
+
+
+

Mike Bierlee, m.bierlee@lostmoment.com +

+ +

2022 Mike Bierlee +

+ +

This software is licensed under the terms of the MIT license. + The full terms of the license can be found in the LICENSE file. +

+ +
+
+
+ + \ No newline at end of file diff --git a/docs/mirage/config/ConfigFactory.loadFile.html b/docs/mirage/config/ConfigFactory.loadFile.html new file mode 100644 index 0000000..3919540 --- /dev/null +++ b/docs/mirage/config/ConfigFactory.loadFile.html @@ -0,0 +1,99 @@ + + + + + + Function ConfigFactory.loadFile + + + + +
+ +
+
+

Function ConfigFactory.loadFile

Loads a configuration from the specified path from disk. +

+
+ +
+ ConfigDictionary loadFile + ( +
+   string path +
+ ); +
+
+
+
+ +

Parameters

+ + +
NameDescription
path Path to file. OS dependent, but UNIX paths are generally working.
+
+

Returns

+

The parsed configuration. +

+
+ +
+
+
+

Mike Bierlee, m.bierlee@lostmoment.com +

+ +

2022 Mike Bierlee +

+ +

This software is licensed under the terms of the MIT license. + The full terms of the license can be found in the LICENSE file. +

+ +
+
+
+ + \ No newline at end of file diff --git a/docs/mirage/config/ConfigFactory.parseConfig.html b/docs/mirage/config/ConfigFactory.parseConfig.html new file mode 100644 index 0000000..919c1c4 --- /dev/null +++ b/docs/mirage/config/ConfigFactory.parseConfig.html @@ -0,0 +1,99 @@ + + + + + + Function ConfigFactory.parseConfig + + + + +
+ +
+
+

Function ConfigFactory.parseConfig

Parse configuration from the given string. +

+
+ +
+ ConfigDictionary parseConfig + ( +
+   string contents +
+ ); +
+
+
+
+ +

Parameters

+ + +
NameDescription
contents Text contents of the config to be parsed.
+
+

Returns

+

The parsed configuration. +

+
+ +
+
+
+

Mike Bierlee, m.bierlee@lostmoment.com +

+ +

2022 Mike Bierlee +

+ +

This software is licensed under the terms of the MIT license. + The full terms of the license can be found in the LICENSE file. +

+ +
+
+
+ + \ No newline at end of file diff --git a/docs/mirage/config/ConfigNode.html b/docs/mirage/config/ConfigNode.html new file mode 100644 index 0000000..c5a7045 --- /dev/null +++ b/docs/mirage/config/ConfigNode.html @@ -0,0 +1,86 @@ + + + + + + Interface ConfigNode + + + + +
+ +
+
+

Interface ConfigNode

The configuration tree is made up of specific types of ConfigNodes. + Used as generic type for ConfigFactory and ConfigDictionary. +

+
+ +
+ interface ConfigNode + ; +
+
+
+ + +
+
+
+

Mike Bierlee, m.bierlee@lostmoment.com +

+ +

2022 Mike Bierlee +

+ +

This software is licensed under the terms of the MIT license. + The full terms of the license can be found in the LICENSE file. +

+ +
+
+
+ + \ No newline at end of file diff --git a/docs/mirage/config/ConfigPathNotFoundException.html b/docs/mirage/config/ConfigPathNotFoundException.html new file mode 100644 index 0000000..802a24b --- /dev/null +++ b/docs/mirage/config/ConfigPathNotFoundException.html @@ -0,0 +1,86 @@ + + + + + + Class ConfigPathNotFoundException + + + + +
+ +
+
+

Class ConfigPathNotFoundException

Used by ConfigDictionary when the supplied path does not exist. +

+
+ +
+ class ConfigPathNotFoundException +
  : object.Exception + ; +
+
+
+ + +
+
+
+

Mike Bierlee, m.bierlee@lostmoment.com +

+ +

2022 Mike Bierlee +

+ +

This software is licensed under the terms of the MIT license. + The full terms of the license can be found in the LICENSE file. +

+ +
+
+
+ + \ No newline at end of file diff --git a/docs/mirage/config/ConfigReadException.html b/docs/mirage/config/ConfigReadException.html new file mode 100644 index 0000000..eb69800 --- /dev/null +++ b/docs/mirage/config/ConfigReadException.html @@ -0,0 +1,86 @@ + + + + + + Class ConfigReadException + + + + +
+ +
+
+

Class ConfigReadException

Used by the ConfigDictionary when something goes wrong when reading configuration. +

+
+ +
+ class ConfigReadException +
  : object.Exception + ; +
+
+
+ + +
+
+
+

Mike Bierlee, m.bierlee@lostmoment.com +

+ +

2022 Mike Bierlee +

+ +

This software is licensed under the terms of the MIT license. + The full terms of the license can be found in the LICENSE file. +

+ +
+
+
+ + \ No newline at end of file diff --git a/docs/mirage/config/ObjectNode.html b/docs/mirage/config/ObjectNode.html new file mode 100644 index 0000000..7edc527 --- /dev/null +++ b/docs/mirage/config/ObjectNode.html @@ -0,0 +1,89 @@ + + + + + + Class ObjectNode + + + + +
+ +
+
+

Class ObjectNode

A configuration item that is an object. +

+
+ +
+ class ObjectNode +
  : ConfigNode + ; +
+
+
+

ObjectNodes contain a node dictionary that points to other ConfigNodes. +

+
+ + +
+
+
+

Mike Bierlee, m.bierlee@lostmoment.com +

+ +

2022 Mike Bierlee +

+ +

This software is licensed under the terms of the MIT license. + The full terms of the license can be found in the LICENSE file. +

+ +
+
+
+ + \ No newline at end of file diff --git a/docs/mirage/config/PathParseException.html b/docs/mirage/config/PathParseException.html new file mode 100644 index 0000000..2914d90 --- /dev/null +++ b/docs/mirage/config/PathParseException.html @@ -0,0 +1,86 @@ + + + + + + Class PathParseException + + + + +
+ +
+
+

Class PathParseException

Used by ConfigDictionary when there is something wrong with the path when calling ConfigDictionary.get() +

+
+ +
+ class PathParseException +
  : object.Exception + ; +
+
+
+ + +
+
+
+

Mike Bierlee, m.bierlee@lostmoment.com +

+ +

2022 Mike Bierlee +

+ +

This software is licensed under the terms of the MIT license. + The full terms of the license can be found in the LICENSE file. +

+ +
+
+
+ + \ No newline at end of file diff --git a/docs/mirage/config/SubstituteConfigVariables.html b/docs/mirage/config/SubstituteConfigVariables.html new file mode 100644 index 0000000..23a143e --- /dev/null +++ b/docs/mirage/config/SubstituteConfigVariables.html @@ -0,0 +1,85 @@ + + + + + + Alias SubstituteConfigVariables + + + + +
+ +
+
+

Alias SubstituteConfigVariables

Used in a ConfigDictionary to enable to disable config path substitution. +

+
+ +
+ alias SubstituteConfigVariables + = std.typecons.Flag!("SubstituteConfigVariables"); +
+
+
+ + +
+
+
+

Mike Bierlee, m.bierlee@lostmoment.com +

+ +

2022 Mike Bierlee +

+ +

This software is licensed under the terms of the MIT license. + The full terms of the license can be found in the LICENSE file. +

+ +
+
+
+ + \ No newline at end of file diff --git a/docs/mirage/config/SubstituteEnvironmentVariables.html b/docs/mirage/config/SubstituteEnvironmentVariables.html new file mode 100644 index 0000000..0ea1165 --- /dev/null +++ b/docs/mirage/config/SubstituteEnvironmentVariables.html @@ -0,0 +1,85 @@ + + + + + + Alias SubstituteEnvironmentVariables + + + + +
+ +
+
+

Alias SubstituteEnvironmentVariables

Used in a ConfigDictionary to enable to disable environment variable substitution. +

+
+ +
+ alias SubstituteEnvironmentVariables + = std.typecons.Flag!("SubstituteEnvironmentVariables"); +
+
+
+ + +
+
+
+

Mike Bierlee, m.bierlee@lostmoment.com +

+ +

2022 Mike Bierlee +

+ +

This software is licensed under the terms of the MIT license. + The full terms of the license can be found in the LICENSE file. +

+ +
+
+
+ + \ No newline at end of file diff --git a/docs/mirage/config/ValueNode.html b/docs/mirage/config/ValueNode.html new file mode 100644 index 0000000..51bfdc8 --- /dev/null +++ b/docs/mirage/config/ValueNode.html @@ -0,0 +1,86 @@ + + + + + + Class ValueNode + + + + +
+ +
+
+

Class ValueNode

A configuration item that is any sort of primitive value (strings, numbers or null). +

+
+ +
+ class ValueNode +
  : ConfigNode + ; +
+
+
+ + +
+
+
+

Mike Bierlee, m.bierlee@lostmoment.com +

+ +

2022 Mike Bierlee +

+ +

This software is licensed under the terms of the MIT license. + The full terms of the license can be found in the LICENSE file. +

+ +
+
+
+ + \ No newline at end of file diff --git a/docs/mirage/java.html b/docs/mirage/java.html new file mode 100644 index 0000000..f942dd1 --- /dev/null +++ b/docs/mirage/java.html @@ -0,0 +1,122 @@ + + + + + + Module mirage.java + + + + +
+ +
+
+

Module mirage.java

Utilities for loading Java properties files. +

+ +
+
+

Functions

+ + + + + + + + + + + + + +
NameDescription
+ + loadJavaProperties(filePath) + + Load a Java properties file from disk. +
+ + parseJavaProperties(properties) + + Parse Java properties from the given Java properties string. +
+
+
+

Classes

+ + + + + + + + + +
NameDescription
+ + JavaPropertiesFactory + + Creates configuration files from Java properties. +
+
+
+
+
+

Mike Bierlee, m.bierlee@lostmoment.com +

+ +

2022 Mike Bierlee +

+ +

This software is licensed under the terms of the MIT license. + The full terms of the license can be found in the LICENSE file. +

+ +
+
+
+ + \ No newline at end of file diff --git a/docs/mirage/java/JavaPropertiesFactory.html b/docs/mirage/java/JavaPropertiesFactory.html new file mode 100644 index 0000000..ad4562a --- /dev/null +++ b/docs/mirage/java/JavaPropertiesFactory.html @@ -0,0 +1,114 @@ + + + + + + Class JavaPropertiesFactory + + + + +
+ +
+
+

Class JavaPropertiesFactory

Creates configuration files from Java properties. +

+
+ +
+ class JavaPropertiesFactory +
  : ConfigFactory + ; +
+
+
+ +

Methods

+ + + + + + + + + + + + + +
NameDescription
+ + parseConfig + + (contents) + Parse configuration from the given Java properties string. +
+ + loadFile + + (path) + Loads a configuration from the specified path from disk. +
+
+ +
+
+
+

Mike Bierlee, m.bierlee@lostmoment.com +

+ +

2022 Mike Bierlee +

+ +

This software is licensed under the terms of the MIT license. + The full terms of the license can be found in the LICENSE file. +

+ +
+
+
+ + \ No newline at end of file diff --git a/docs/mirage/java/JavaPropertiesFactory.parseConfig.html b/docs/mirage/java/JavaPropertiesFactory.parseConfig.html new file mode 100644 index 0000000..dbfc10b --- /dev/null +++ b/docs/mirage/java/JavaPropertiesFactory.parseConfig.html @@ -0,0 +1,99 @@ + + + + + + Function JavaPropertiesFactory.parseConfig + + + + +
+ +
+
+

Function JavaPropertiesFactory.parseConfig

Parse configuration from the given Java properties string. +

+
+ +
+ override ConfigDictionary parseConfig + ( +
+   string contents +
+ ); +
+
+
+
+ +

Parameters

+ + +
NameDescription
contents Text contents of the config to be parsed.
+
+

Returns

+

The parsed configuration. +

+
+ +
+
+
+

Mike Bierlee, m.bierlee@lostmoment.com +

+ +

2022 Mike Bierlee +

+ +

This software is licensed under the terms of the MIT license. + The full terms of the license can be found in the LICENSE file. +

+ +
+
+
+ + \ No newline at end of file diff --git a/docs/mirage/java/loadJavaProperties.html b/docs/mirage/java/loadJavaProperties.html new file mode 100644 index 0000000..4d0a593 --- /dev/null +++ b/docs/mirage/java/loadJavaProperties.html @@ -0,0 +1,99 @@ + + + + + + Function loadJavaProperties + + + + +
+ +
+
+

Function loadJavaProperties

Load a Java properties file from disk. +

+
+ +
+ ConfigDictionary loadJavaProperties + ( +
+   const(string) filePath +
+ ); +
+
+
+
+ +

Parameters

+ + +
NameDescription
filePath Path to the Java properties file.
+
+

Returns

+

The loaded configuration. +

+
+ +
+
+
+

Mike Bierlee, m.bierlee@lostmoment.com +

+ +

2022 Mike Bierlee +

+ +

This software is licensed under the terms of the MIT license. + The full terms of the license can be found in the LICENSE file. +

+ +
+
+
+ + \ No newline at end of file diff --git a/docs/mirage/java/parseJavaProperties.html b/docs/mirage/java/parseJavaProperties.html new file mode 100644 index 0000000..ccd39e1 --- /dev/null +++ b/docs/mirage/java/parseJavaProperties.html @@ -0,0 +1,99 @@ + + + + + + Function parseJavaProperties + + + + +
+ +
+
+

Function parseJavaProperties

Parse Java properties from the given Java properties string. +

+
+ +
+ ConfigDictionary parseJavaProperties + ( +
+   const(string) properties +
+ ); +
+
+
+
+ +

Parameters

+ + +
NameDescription
properties Text contents of the config to be parsed.
+
+

Returns

+

The parsed configuration. +

+
+ +
+
+
+

Mike Bierlee, m.bierlee@lostmoment.com +

+ +

2022 Mike Bierlee +

+ +

This software is licensed under the terms of the MIT license. + The full terms of the license can be found in the LICENSE file. +

+ +
+
+
+ + \ No newline at end of file diff --git a/docs/mirage/json.html b/docs/mirage/json.html new file mode 100644 index 0000000..d39de5c --- /dev/null +++ b/docs/mirage/json.html @@ -0,0 +1,131 @@ + + + + + + Module mirage.json + + + + +
+ +
+
+

Module mirage.json

Utilities for loading JSON configurations. +

+ +
+
+

Functions

+ + + + + + + + + + + + + + + + + +
NameDescription
+ + loadJsonConfig(filePath) + + Load a JSON configuration file from disk. +
+ + parseJsonConfig(json) + + Parse JSON config from the given JSON string. +
+ + parseJsonConfig(json) + + Parse JSON config from the given JSONValue. +
+
+
+

Classes

+ + + + + + + + + +
NameDescription
+ + JsonConfigFactory + + Creates configuration dictionaries from JSONs. +
+
+
+
+
+

Mike Bierlee, m.bierlee@lostmoment.com +

+ +

2022 Mike Bierlee +

+ +

This software is licensed under the terms of the MIT license. + The full terms of the license can be found in the LICENSE file. +

+ +
+
+
+ + \ No newline at end of file diff --git a/docs/mirage/json/JsonConfigFactory.html b/docs/mirage/json/JsonConfigFactory.html new file mode 100644 index 0000000..5817081 --- /dev/null +++ b/docs/mirage/json/JsonConfigFactory.html @@ -0,0 +1,134 @@ + + + + + + Class JsonConfigFactory + + + + +
+ +
+
+

Class JsonConfigFactory

Creates configuration dictionaries from JSONs. +

+
+ +
+ class JsonConfigFactory +
  : ConfigFactory + ; +
+
+
+ +

Methods

+ + + + + + + + + + + + + + + + + + + + + +
NameDescription
+ + parseConfig + + (contents) + Parse configuration from the given JSON string. +
+ + parseJson + + (json) + Parse configuration from a JSONValue tree. +
+ + parseJson + + (json) + Alias for parseConfig +
+ + loadFile + + (path) + Loads a configuration from the specified path from disk. +
+
+ +
+
+
+

Mike Bierlee, m.bierlee@lostmoment.com +

+ +

2022 Mike Bierlee +

+ +

This software is licensed under the terms of the MIT license. + The full terms of the license can be found in the LICENSE file. +

+ +
+
+
+ + \ No newline at end of file diff --git a/docs/mirage/json/JsonConfigFactory.parseConfig.html b/docs/mirage/json/JsonConfigFactory.parseConfig.html new file mode 100644 index 0000000..34d66e8 --- /dev/null +++ b/docs/mirage/json/JsonConfigFactory.parseConfig.html @@ -0,0 +1,99 @@ + + + + + + Function JsonConfigFactory.parseConfig + + + + +
+ +
+
+

Function JsonConfigFactory.parseConfig

Parse configuration from the given JSON string. +

+
+ +
+ override ConfigDictionary parseConfig + ( +
+   string contents +
+ ); +
+
+
+
+ +

Parameters

+ + +
NameDescription
contents Text contents of the config to be parsed.
+
+

Returns

+

The parsed configuration. +

+
+ +
+
+
+

Mike Bierlee, m.bierlee@lostmoment.com +

+ +

2022 Mike Bierlee +

+ +

This software is licensed under the terms of the MIT license. + The full terms of the license can be found in the LICENSE file. +

+ +
+
+
+ + \ No newline at end of file diff --git a/docs/mirage/json/JsonConfigFactory.parseJson.html b/docs/mirage/json/JsonConfigFactory.parseJson.html new file mode 100644 index 0000000..b1f09ec --- /dev/null +++ b/docs/mirage/json/JsonConfigFactory.parseJson.html @@ -0,0 +1,142 @@ + + + + + + JsonConfigFactory.parseJson - multiple declarations + + + + +
+ +
+
+

JsonConfigFactory.parseJson - multiple declarations

+

Function JsonConfigFactory.parseJson

Parse configuration from a JSONValue tree. +

+
+ +
+ ConfigDictionary parseJson + ( +
+   std.json.JSONValue json +
+ ); +
+
+
+
+ +

Parameters

+ + +
NameDescription
json JSONValue config to be parsed.
+
+

Returns

+

The parsed configuration. +

+
+

Function JsonConfigFactory.parseJson

Alias for parseConfig +

+
+ +
+ ConfigDictionary parseJson + ( +
+   string json +
+ ); +
+
+
+
+ +

Parameters

+ + +
NameDescription
json Text contents of the config to be parsed.
+
+

Returns

+

The parsed configuration. +

+
+

See Also

+

parseConfig +

+
+ +
+
+
+

Mike Bierlee, m.bierlee@lostmoment.com +

+ +

2022 Mike Bierlee +

+ +

This software is licensed under the terms of the MIT license. + The full terms of the license can be found in the LICENSE file. +

+ +
+
+
+ + \ No newline at end of file diff --git a/docs/mirage/json/loadJsonConfig.html b/docs/mirage/json/loadJsonConfig.html new file mode 100644 index 0000000..0eaccec --- /dev/null +++ b/docs/mirage/json/loadJsonConfig.html @@ -0,0 +1,99 @@ + + + + + + Function loadJsonConfig + + + + +
+ +
+
+

Function loadJsonConfig

Load a JSON configuration file from disk. +

+
+ +
+ ConfigDictionary loadJsonConfig + ( +
+   const(string) filePath +
+ ); +
+
+
+
+ +

Parameters

+ + +
NameDescription
filePath Path to the JSON configuration file.
+
+

Returns

+

The loaded configuration. +

+
+ +
+
+
+

Mike Bierlee, m.bierlee@lostmoment.com +

+ +

2022 Mike Bierlee +

+ +

This software is licensed under the terms of the MIT license. + The full terms of the license can be found in the LICENSE file. +

+ +
+
+
+ + \ No newline at end of file diff --git a/docs/mirage/json/parseJsonConfig.html b/docs/mirage/json/parseJsonConfig.html new file mode 100644 index 0000000..36bc909 --- /dev/null +++ b/docs/mirage/json/parseJsonConfig.html @@ -0,0 +1,138 @@ + + + + + + parseJsonConfig - multiple declarations + + + + +
+ +
+
+

parseJsonConfig - multiple declarations

+

Function parseJsonConfig

Parse JSON config from the given JSON string. +

+
+ +
+ ConfigDictionary parseJsonConfig + ( +
+   const(string) json +
+ ); +
+
+
+
+ +

Parameters

+ + +
NameDescription
json Text contents of the config to be parsed.
+
+

Returns

+

The parsed configuration. +

+
+

Function parseJsonConfig

Parse JSON config from the given JSONValue. +

+
+ +
+ ConfigDictionary parseJsonConfig + ( +
+   const(std.json.JSONValue) json +
+ ); +
+
+
+
+ +

Parameters

+ + +
NameDescription
json JSONValue config to be parsed.
+
+

Returns

+

The parsed configuration. +

+
+ +
+
+
+

Mike Bierlee, m.bierlee@lostmoment.com +

+ +

2022 Mike Bierlee +

+ +

This software is licensed under the terms of the MIT license. + The full terms of the license can be found in the LICENSE file. +

+ +
+
+
+ + \ No newline at end of file diff --git a/docs/sitemap.xml b/docs/sitemap.xml new file mode 100644 index 0000000..2e21407 --- /dev/null +++ b/docs/sitemap.xml @@ -0,0 +1,40 @@ + + +http://127.0.0.1/index.html +http://127.0.0.1/mirage/config.html +http://127.0.0.1/mirage/config/ArrayNode.html +http://127.0.0.1/mirage/config/ConfigCreationException.html +http://127.0.0.1/mirage/config/ConfigDictionary.html +http://127.0.0.1/mirage/config/ConfigDictionary.get.html +http://127.0.0.1/mirage/config/ConfigDictionary.get.html +http://127.0.0.1/mirage/config/ConfigDictionary.get.html +http://127.0.0.1/mirage/config/ConfigDictionary.getConfig.html +http://127.0.0.1/mirage/config/ConfigDictionary.set.html +http://127.0.0.1/mirage/config/ConfigFactory.html +http://127.0.0.1/mirage/config/ConfigFactory.loadFile.html +http://127.0.0.1/mirage/config/ConfigFactory.parseConfig.html +http://127.0.0.1/mirage/config/ConfigNode.html +http://127.0.0.1/mirage/config/ConfigPathNotFoundException.html +http://127.0.0.1/mirage/config/ConfigReadException.html +http://127.0.0.1/mirage/config/ObjectNode.html +http://127.0.0.1/mirage/config/PathParseException.html +http://127.0.0.1/mirage/config/SubstituteConfigVariables.html +http://127.0.0.1/mirage/config/SubstituteEnvironmentVariables.html +http://127.0.0.1/mirage/config/ValueNode.html +http://127.0.0.1/mirage/java.html +http://127.0.0.1/mirage/java/JavaPropertiesFactory.html +http://127.0.0.1/mirage/java/JavaPropertiesFactory.parseConfig.html +http://127.0.0.1/mirage/config/ConfigFactory.loadFile.html +http://127.0.0.1/mirage/java/loadJavaProperties.html +http://127.0.0.1/mirage/java/parseJavaProperties.html +http://127.0.0.1/mirage/json.html +http://127.0.0.1/mirage/json/JsonConfigFactory.html +http://127.0.0.1/mirage/json/JsonConfigFactory.parseConfig.html +http://127.0.0.1/mirage/json/JsonConfigFactory.parseJson.html +http://127.0.0.1/mirage/json/JsonConfigFactory.parseJson.html +http://127.0.0.1/mirage/config/ConfigFactory.loadFile.html +http://127.0.0.1/mirage/json/loadJsonConfig.html +http://127.0.0.1/mirage/json/parseJsonConfig.html +http://127.0.0.1/mirage/json/parseJsonConfig.html +http://127.0.0.1/mirage.html + diff --git a/docs/symbols.js b/docs/symbols.js new file mode 100644 index 0000000..df2d904 --- /dev/null +++ b/docs/symbols.js @@ -0,0 +1,33 @@ +// symbol index generated by DDOX - do not edit +var symbols = [ +{name: 'mirage.config', kind: "module", path: './mirage/config.html', attributes: []}, +{name: 'mirage.config.ArrayNode', kind: "classdeclaration", path: './mirage/config/ArrayNode.html', attributes: []}, +{name: 'mirage.config.ConfigCreationException', kind: "classdeclaration", path: './mirage/config/ConfigCreationException.html', attributes: []}, +{name: 'mirage.config.ConfigDictionary', kind: "classdeclaration", path: './mirage/config/ConfigDictionary.html', attributes: []}, +{name: 'mirage.config.ConfigDictionary.get', kind: "functiondeclaration", path: './mirage/config/ConfigDictionary.get.html', attributes: []}, +{name: 'mirage.config.ConfigDictionary.getConfig', kind: "functiondeclaration", path: './mirage/config/ConfigDictionary.getConfig.html', attributes: []}, +{name: 'mirage.config.ConfigDictionary.set', kind: "functiondeclaration", path: './mirage/config/ConfigDictionary.set.html', attributes: []}, +{name: 'mirage.config.ConfigFactory', kind: "classdeclaration", path: './mirage/config/ConfigFactory.html', attributes: []}, +{name: 'mirage.config.ConfigFactory.loadFile', kind: "functiondeclaration", path: './mirage/config/ConfigFactory.loadFile.html', attributes: []}, +{name: 'mirage.config.ConfigFactory.parseConfig', kind: "functiondeclaration", path: './mirage/config/ConfigFactory.parseConfig.html', attributes: []}, +{name: 'mirage.config.ConfigNode', kind: "interfacedeclaration", path: './mirage/config/ConfigNode.html', attributes: []}, +{name: 'mirage.config.ConfigPathNotFoundException', kind: "classdeclaration", path: './mirage/config/ConfigPathNotFoundException.html', attributes: []}, +{name: 'mirage.config.ConfigReadException', kind: "classdeclaration", path: './mirage/config/ConfigReadException.html', attributes: []}, +{name: 'mirage.config.ObjectNode', kind: "classdeclaration", path: './mirage/config/ObjectNode.html', attributes: []}, +{name: 'mirage.config.PathParseException', kind: "classdeclaration", path: './mirage/config/PathParseException.html', attributes: []}, +{name: 'mirage.config.SubstituteConfigVariables', kind: "aliasdeclaration", path: './mirage/config/SubstituteConfigVariables.html', attributes: []}, +{name: 'mirage.config.SubstituteEnvironmentVariables', kind: "aliasdeclaration", path: './mirage/config/SubstituteEnvironmentVariables.html', attributes: []}, +{name: 'mirage.config.ValueNode', kind: "classdeclaration", path: './mirage/config/ValueNode.html', attributes: []}, +{name: 'mirage.java', kind: "module", path: './mirage/java.html', attributes: []}, +{name: 'mirage.java.JavaPropertiesFactory', kind: "classdeclaration", path: './mirage/java/JavaPropertiesFactory.html', attributes: []}, +{name: 'mirage.java.JavaPropertiesFactory.parseConfig', kind: "functiondeclaration", path: './mirage/java/JavaPropertiesFactory.parseConfig.html', attributes: ["override"]}, +{name: 'mirage.java.loadJavaProperties', kind: "functiondeclaration", path: './mirage/java/loadJavaProperties.html', attributes: []}, +{name: 'mirage.java.parseJavaProperties', kind: "functiondeclaration", path: './mirage/java/parseJavaProperties.html', attributes: []}, +{name: 'mirage.json', kind: "module", path: './mirage/json.html', attributes: []}, +{name: 'mirage.json.JsonConfigFactory', kind: "classdeclaration", path: './mirage/json/JsonConfigFactory.html', attributes: []}, +{name: 'mirage.json.JsonConfigFactory.parseConfig', kind: "functiondeclaration", path: './mirage/json/JsonConfigFactory.parseConfig.html', attributes: ["override"]}, +{name: 'mirage.json.JsonConfigFactory.parseJson', kind: "functiondeclaration", path: './mirage/json/JsonConfigFactory.parseJson.html', attributes: []}, +{name: 'mirage.json.loadJsonConfig', kind: "functiondeclaration", path: './mirage/json/loadJsonConfig.html', attributes: []}, +{name: 'mirage.json.parseJsonConfig', kind: "functiondeclaration", path: './mirage/json/parseJsonConfig.html', attributes: []}, +{name: 'mirage', kind: "module", path: './mirage.html', attributes: []}, +]; diff --git a/source/mirage/java.d b/source/mirage/java.d index 9b66b0a..a9f4711 100644 --- a/source/mirage/java.d +++ b/source/mirage/java.d @@ -59,7 +59,7 @@ class JavaPropertiesFactory : ConfigFactory { * Parse Java properties from the given Java properties string. * Params: - * json = Text contents of the config to be parsed. + * properties = Text contents of the config to be parsed. * Returns: The parsed configuration. */ ConfigDictionary parseJavaProperties(const string properties) { diff --git a/source/mirage/json.d b/source/mirage/json.d index 33b5644..e870179 100644 --- a/source/mirage/json.d +++ b/source/mirage/json.d @@ -36,7 +36,7 @@ class JsonConfigFactory : ConfigFactory { * Parse configuration from a JSONValue tree. * * Params: - * contents = JSONValue config to be parsed. + * json = JSONValue config to be parsed. * Returns: The parsed configuration. */ ConfigDictionary parseJson(JSONValue json) { @@ -47,7 +47,7 @@ class JsonConfigFactory : ConfigFactory { * Alias for parseConfig * * Params: - * contents = Text contents of the config to be parsed. + * json = Text contents of the config to be parsed. * Returns: The parsed configuration. * See_Also: parseConfig */ @@ -111,7 +111,7 @@ ConfigDictionary parseJsonConfig(const string json) { * Parse JSON config from the given JSONValue. * * Params: - * contents = JSONValue config to be parsed. + * json = JSONValue config to be parsed. * Returns: The parsed configuration. */ ConfigDictionary parseJsonConfig(const JSONValue json) {