OSDN Git Service

add
authorHAOYUatHZ <haoyu@protonmail.com>
Fri, 2 Aug 2019 03:07:12 +0000 (11:07 +0800)
committerHAOYUatHZ <haoyu@protonmail.com>
Fri, 2 Aug 2019 03:07:12 +0000 (11:07 +0800)
toolbar/precog/config/config.go

index ee67f7b..08307fe 100644 (file)
@@ -34,9 +34,10 @@ func NewConfigWithPath(path string) *Config {
 }
 
 type Config struct {
-       Policy      Policy             `json:"policy"`
        MySQLConfig common.MySQLConfig `json:"mysql"`
+       Policy      Policy             `json:"policy"`
        Nodes       []Node             `json:"nodes"`
+       API         API                `json:"api"`
 }
 
 type Policy struct {
@@ -48,3 +49,9 @@ type Node struct {
        HostPort string       `json:"host_port"`
        PubKey   chainkd.XPub `json:"pubkey"`
 }
+
+type API struct {
+       HostPort      bool   `json:"host_port"`
+       AccessToken   string `json:"access_token"`
+       IsReleaseMode bool   `json:"is_release_mode"`
+}