1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//
// Default configuration and default values:
//


/// Default log file:
pub const DEFAULT_LOG_FILE: &str = "krecik.log";

/// Default Notification name:
pub const DEFAULT_SLACK_NAME: &str = "Krecik";

/// Default Notification failure icon:
pub const DEFAULT_SLACK_FAILURE_ICON: &str = ":error:";

/// Default Notification success icon:
pub const DEFAULT_SLACK_SUCCESS_ICON: &str = ":white_check_mark:";

/// Default failure notification color:
pub const DEFAULT_SLACK_FAILURE_COLOR: &str = "#ff1111";

/// Default success notification color:
pub const DEFAULT_SLACK_SUCCESS_COLOR: &str = "#00ff00";

/// Check timeout in seconds
pub const CHECK_TIMEOUT: u64 = 10;

/// Check connection timeout in seconds
pub const CHECK_CONNECTION_TIMEOUT: u64 = 15;

/// Check max connect attempts
pub const CHECK_MAX_CONNECTIONS: u32 = 10;

/// Check max redirections
pub const CHECK_MAX_REDIRECTIONS: u32 = 10;

/// Minimum SSL certificate validity in days
pub const CHECK_MINIMUM_DAYS_OF_TLSCERT_VALIDITY: i32 = 14;

/// Default successful HTTP code: 200
pub const CHECK_DEFAULT_SUCCESSFUL_HTTP_CODE: u32 = 200;

/// Default minimum length of HTTP content
pub const CHECK_HTTP_MINIMUM_LENGHT: usize = 128;

/// Default page content expectation:
pub const CHECK_DEFAULT_CONTENT_EXPECTATION: &str = "body";

/// Checks directory:
pub const CHECKS_DIR: &str = "checks";

/// Remote checks directory:
pub const REMOTE_CHECKS_DIR: &str = "remotes";

/// Tests directory:
pub const TESTS_DIR: &str = "tests";

/// Default Web proto:
pub const CHECK_DEFAULT_PROTOCOL: &str = "https://";