haproxy_config/line/
owned.rs

1use crate::config::{Address, Password};
2use crate::section::BackendModifier;
3
4#[derive(Debug)]
5pub enum Line {
6    Server {
7        name: String,
8        addr: Address,
9        option: Option<String>,
10        comment: Option<String>,
11    },
12    Option {
13        keyword: String,
14        value: Option<String>,
15        comment: Option<String>,
16    },
17    Bind {
18        addr: Address,
19        value: Option<String>,
20        comment: Option<String>,
21    },
22    Acl {
23        name: String,
24        rule: Option<String>,
25        comment: Option<String>,
26    },
27    Backend {
28        name: String,
29        modifier: Option<BackendModifier>,
30        condition: Option<String>,
31        comment: Option<String>,
32    },
33    /// This usually refers to a haproxy user group however if it is in the global section of a
34    /// config it is the systemuser haproxy will try to run as after starting up.
35    Group {
36        name: String,
37        users: Vec<String>,
38        comment: Option<String>,
39    },
40    User {
41        name: String,
42        password: Password,
43        groups: Vec<String>,
44        comment: Option<String>,
45    },
46    /// A global paramater describing the system user haproxy should run as
47    SysUser {
48        name: String,
49    },
50    Config {
51        key: String,
52        value: Option<String>,
53        comment: Option<String>,
54    },
55    Comment(String),
56    Blank,
57}