-
Notifications
You must be signed in to change notification settings - Fork 17
/
flags.go
74 lines (66 loc) · 1.61 KB
/
flags.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
package main
import (
"github.com/urfave/cli/v2"
)
var indexerFlag = &cli.StringFlag{
Name: "indexer",
Usage: "Host or host:port of indexer to use",
Aliases: []string{"i"},
Required: true,
}
var addrFlag = &cli.StringSliceFlag{
Name: "addr",
Usage: `Provider address as multiaddr string, example: "/ip4/127.0.0.1/tcp/3103"`,
Aliases: []string{"a"},
Required: true,
}
var (
metadataFlagValue string
metadataFlag = &cli.StringFlag{
Name: "metadata",
Usage: "Base64 encoded metadata bytes.",
Aliases: []string{"m"},
Required: false,
Destination: &metadataFlagValue,
}
)
var (
keyFlagValue string
keyFlag = &cli.StringFlag{
Name: "key",
Usage: "Base64 encoded lookup key to associate with imported CAR.",
Aliases: []string{"k"},
Required: false,
Destination: &keyFlagValue,
}
)
var (
carPathFlagValue string
carPathFlag = &cli.StringFlag{
Name: "input",
Aliases: []string{"i"},
Usage: "Path to the CAR file to import",
Destination: &carPathFlagValue,
Required: true,
}
)
var (
optionalCarPathFlagValue string
optionalCarPathFlag = &cli.StringFlag{
Name: "input",
Aliases: []string{"i"},
Usage: "The CAR file path.",
Destination: &optionalCarPathFlagValue,
}
)
var (
adminAPIFlagValue string
adminAPIFlag = &cli.StringFlag{
Name: "listen-admin",
Usage: "Admin HTTP API listen address",
Aliases: []string{"l"},
EnvVars: []string{"PROVIDER_LISTEN_ADMIN"},
Value: "http://localhost:3102",
Destination: &adminAPIFlagValue,
}
)