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
59
60
use std::path::Path;
use std::process::Command;
pub struct LoadCsvCommand {
    command: Command,
}

impl LoadCsvCommand {
    pub fn new(command: Command) -> Self {
        Self { command }
    }

    pub fn db_url<P: AsRef<Path>>(mut self, db_url: P) -> Self {
        self.command.arg("--db-url").arg(db_url.as_ref());
        self
    }

    pub fn funds<P: AsRef<Path>>(mut self, funds: P) -> Self {
        self.command.arg("--funds").arg(funds.as_ref());
        self
    }

    pub fn proposals<P: AsRef<Path>>(mut self, proposals: P) -> Self {
        self.command.arg("--proposals").arg(proposals.as_ref());
        self
    }

    pub fn voteplans<P: AsRef<Path>>(mut self, voteplans: P) -> Self {
        self.command.arg("--voteplans").arg(voteplans.as_ref());
        self
    }

    pub fn challenges<P: AsRef<Path>>(mut self, challenges: P) -> Self {
        self.command.arg("--challenges").arg(challenges.as_ref());
        self
    }

    pub fn advisor_reviews<P: AsRef<Path>>(mut self, reviews: P) -> Self {
        self.command.arg("--reviews").arg(reviews.as_ref());
        self
    }

    pub fn goals<P: AsRef<Path>>(mut self, goals: P) -> Self {
        self.command.arg("--goals").arg(goals.as_ref());
        self
    }

    pub fn proposals_voteplans<P: AsRef<Path>>(mut self, path: P) -> Self {
        self.command.arg("--proposals_voteplans").arg(path.as_ref());
        self
    }

    pub fn groups<P: AsRef<Path>>(mut self, path: P) -> Self {
        self.command.arg("--groups").arg(path.as_ref());
        self
    }

    pub fn build(self) -> Command {
        self.command
    }
}