-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from TRON-US/service-domains
BTFS-1011: Add Services for external services config
- Loading branch information
Showing
4 changed files
with
45 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package config | ||
|
||
import ( | ||
"reflect" | ||
) | ||
|
||
// MigrateConfig migrates config options to the latest known version | ||
// It may correct incompatible configs as well | ||
func MigrateConfig(cfg *Config) bool { | ||
emptyServices := Services{} | ||
if reflect.DeepEqual(cfg.Services, emptyServices) { | ||
cfg.Services = DefaultServicesConfig() | ||
return true | ||
} | ||
return false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package config | ||
|
||
type Services struct { | ||
StatusServerDomain string | ||
HubDomain string | ||
EscrowDomain string | ||
GuardDomain string | ||
|
||
EscrowPubKeys []string | ||
GuardPubKeys []string | ||
} |