-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmain.go
47 lines (38 loc) · 1.04 KB
/
main.go
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
package main
import (
"fmt"
"os"
cmd "github.com/application-research/delta-dm/cmd"
"github.com/application-research/delta-dm/core"
logging "github.com/ipfs/go-log/v2"
"github.com/urfave/cli/v2"
)
var (
log = logging.Logger("api")
)
var Commit string
var Version string
func main() {
var commands []*cli.Command
di := core.DeploymentInfo{
Commit: Commit,
Version: Version,
}
// commands
commands = append(commands, cmd.DaemonCmd(di)...)
commands = append(commands, cmd.WalletCmd()...)
commands = append(commands, cmd.ReplicationCmd()...)
commands = append(commands, cmd.ReplicationProfilesCmd()...)
commands = append(commands, cmd.ProviderCmd()...)
commands = append(commands, cmd.DatasetCmd()...)
commands = append(commands, cmd.ContentCmd()...)
app := &cli.App{
Commands: commands,
Usage: "An application to facilitate dataset dealmaking with storage providers",
Version: fmt.Sprintf("%s+git.%s\n", di.Version, di.Commit),
Flags: cmd.CLIConnectFlags,
}
if err := app.Run(os.Args); err != nil {
log.Fatal(err)
}
}