Upstream sync

This commit is contained in:
Senad Uka
2023-09-21 11:59:08 +02:00
parent f4dcb823c4
commit c2d6923375
12 changed files with 1247 additions and 89 deletions

View File

@@ -39,6 +39,12 @@ func Load() error {
HostName: getEnv("NOVATECH_DATABASE_ADDRESS", "localhost"),
Port: getEnv("NOVATECH_DATABASE_PORT", " "),
},
Blockchain: Blockchain{
NetworkEndpoint: getEnv("NOVATECH_BLOCKCHAIN_NETWORK_ENDPOINT", ""),
ContractAddress: getEnv("NOVATECH_BLOCKCHAIN_CONTRACT_ADDRESS", ""),
WalletAddress: getEnv("NOVATECH_BLOCKCHAIN_WALLET_ADDRESS", ""),
WalletPrivateKey: getEnv("NOVATECH_BLOCKCHAIN_WALLET_PRIVATE_KEY", ""),
},
}
return nil

View File

@@ -5,6 +5,7 @@ type Config struct {
Service Service
AdminService Service
Database Database
Blockchain Blockchain
}
// Service contains configuration for service
@@ -15,6 +16,14 @@ type Service struct {
BlockchainSecret string
}
// Blockchain contains configuration for blockchain
type Blockchain struct {
NetworkEndpoint string
ContractAddress string
WalletAddress string
WalletPrivateKey string
}
// Database configuration
type Database struct {
UserName string