-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfig.go
More file actions
29 lines (26 loc) · 1.06 KB
/
Copy pathconfig.go
File metadata and controls
29 lines (26 loc) · 1.06 KB
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
package config
var (
DefaultSecret = "secret"
DefaultHttpUrl = "http://localhost:8123"
DefaultListenAddress = "0.0.0.0:8123"
DefaultStaticFilePath = "./dist"
DefaultDbFilePath = "./db"
)
type Config struct {
GithubAccessToken string `long:"token" description:"github access token with full repo permissions" required:"true"`
Secret string `long:"secret" description:"webhook secret"`
HttpUrl string `long:"http-url" description:"http url for invoice delivery"`
ListenAddress string `long:"listen-address" description:"listen address"`
DbFilePath string `long:"db-filepath" description:"path to db file"`
StaticFilePath string `long:"static-filepath" description:"path to web files"`
LndConnect string `long:"lndconnect" description:"lndconnect string with admin permissions" required:"true"`
}
func DefaultConfig() *Config {
return &Config{
Secret: DefaultSecret,
HttpUrl: DefaultHttpUrl,
ListenAddress: DefaultListenAddress,
DbFilePath: DefaultDbFilePath,
StaticFilePath: DefaultStaticFilePath,
}
}