Skip to main content

rumtk_web/utils/
defaults.rs

1/*
2 * rumtk attempts to implement HL7 and medical protocols for interoperability in medicine.
3 * This toolkit aims to be reliable, simple, performant, and standards compliant.
4 * Copyright (C) 2025  Luis M. Santos, M.D. <lsantos@medicalmasses.com>
5 * Copyright (C) 2025  Ethan Dixon
6 * Copyright (C) 2025  MedicalMasses L.L.C. <contact@medicalmasses.com>
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20 */
21use crate::utils::ConstTextMap;
22use phf_macros::phf_ordered_map;
23/*
24   TextMap
25*/
26pub static DEFAULT_TEXT_MAP: ConstTextMap = phf_ordered_map!();
27
28/*
29   IP
30*/
31pub const DEFAULT_LOCAL_LISTENING_ADDRESS: &str = "127.0.0.1:3000";
32pub const DEFAULT_OUTBOUND_LISTENING_ADDRESS: &str = "0.0.0.0:3000";
33
34/*
35   Misc
36*/
37pub const DEFAULT_TEXT_ITEM: &str = "default";
38pub const DEFAULT_CONTACT_ITEM: &str = "company";
39pub const DEFAULT_NO_TEXT: &str = "";
40
41/*
42    Options
43*/
44pub const OPT_INVERTED_DIRECTION: &str = "inverted";
45
46/*
47   Params
48*/
49pub const PARAMS_ID: &str = "id";
50pub const PARAMS_TITLE: &str = "title";
51pub const PARAMS_TYPE: &str = "type";
52pub const PARAMS_CSS_CLASS: &str = "class";
53pub const PARAMS_SOCIAL_LIST: &str = "social_list";
54pub const PARAMS_ITEM: &str = "item";
55pub const PARAMS_INVERTED: &str = "inverted";
56pub const PARAMS_SECTION: &str = "section";
57pub const PARAMS_FUNCTION: &str = "function";
58pub const PARAMS_TARGET: &str = "target";
59pub const PARAMS_SIZE: &str = "size";
60pub const PARAMS_CONTENTS: &str = "contents";
61pub const PARAMS_MODULE: &str = "module";
62pub const PARAMS_ENDPOINT: &str = "endpoint";
63
64/*
65   CONF SECTIONS
66*/
67pub const SECTION_TEXT: &str = "text";
68pub const SECTION_PERSONNEL: &str = "personnel";
69pub const SECTION_CONTACT: &str = "contact";
70pub const SECTION_TITLES: &str = "titles";
71pub const SECTION_API: &str = "api";
72pub const SECTION_SOCIALS: &str = "socials";
73pub const SECTION_SERVICES: &str = "services";
74pub const SECTION_PRODUCTS: &str = "products";
75pub const SECTION_LINKS: &str = "links";
76pub const SECTION_MODULES: &str = "modules";
77pub const SECTION_ENDPOINTS: &str = "endpoints";
78pub const SECTION_ALT: &str = "alt";
79pub const SECTION_DEFAULT: &str = "default";
80
81/*
82   Content Types
83*/
84pub const CONTENT_TYPE_PDF: &str = "application/pdf";
85pub const CONTENT_TYPE_HTML: &str = "text/html";
86
87/*
88   Form Data Types
89*/
90pub const FORM_DATA_TYPE_PDF: &str = "pdf";
91pub const FORM_DATA_TYPE_HTML: &str = "html";
92pub const FORM_DATA_TYPE_MARKDOWN: &str = "markdown";
93pub const FORM_DATA_TYPE_DEFAULT: &str = "text";
94
95/*
96   LANGUAGES
97*/
98pub const LANG_EN: &str = "en";
99pub const LANG_ES: &str = "es";
100
101/*
102   Icon
103*/
104pub const DEFAULT_ICON_STYLE: &str = "fa-solid";
105
106/*
107   Robots.txt
108*/
109pub const DEFAULT_ROBOT_TXT: &str = r"
110User-agent: *
111Disallow: /static/
112";
113
114/*
115   JS Module Types
116*/
117pub const DEFAULT_SCRIPT: &str = "default";
118pub const DEFAULT_SCRIPT_MODULE: &str = "module";
119pub const DEFAULT_SCRIPT_IMPORT: &str = "import";
120
121/*
122    Slices
123 */
124pub const DEFAULT_EMPTY_PARAMS: &[(&str, &str); 1] = &[("", "")];