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
use crate::section::PasswordRef;
use crate::section::BackendModifier;
use crate::section::AddressRef;

#[derive(Debug)]
pub enum Line<'input> {
    Server {
        name: &'input str,
        addr: AddressRef<'input>,
        option: Option<&'input str>,
        comment: Option<&'input str>,
    },
    Option {
        keyword: &'input str,
        value: Option<&'input str>,
        comment: Option<&'input str>,
    },
    Bind {
        addr: AddressRef<'input>,
        value: Option<&'input str>,
        comment: Option<&'input str>,
    },
    Acl {
        name: &'input str,
        rule: Option<&'input str>,
        comment: Option<&'input str>,
    },
    Backend {
        name: &'input str,
        modifier: Option<BackendModifier>,
        condition: Option<&'input str>,
        comment: Option<&'input str>,
    },
    /// This usually refers to a haproxy user group however if it is in the global section of a
    /// config it is the systemuser haproxy will try to run as after starting up.
    Group {
        name: &'input str,
        users: Vec<&'input str>,
        comment: Option<&'input str>,
    },
    User {
        name: &'input str,
        password: PasswordRef<'input>,
        groups: Vec<&'input str>,
        comment: Option<&'input str>,
    },
    /// A global paramater describing the system user haproxy should run as
    SysUser {
        name: &'input str,
    },
    Config {
        key: &'input str,
        value: Option<&'input str>,
        comment: Option<&'input str>,
    },
    Comment(&'input str),
    Blank,
}