37 lines
1.3 KiB
Go
37 lines
1.3 KiB
Go
package api
|
|
|
|
import (
|
|
mwa "github.com/tech/sendico/server/interface/middleware"
|
|
fsc "github.com/tech/sendico/server/interface/services/fileservice/config"
|
|
)
|
|
|
|
type Config struct {
|
|
Mw *mwa.Config `yaml:"middleware"`
|
|
Storage *fsc.Config `yaml:"storage"`
|
|
ChainGateway *ChainGatewayConfig `yaml:"chain_gateway"`
|
|
Ledger *LedgerConfig `yaml:"ledger"`
|
|
}
|
|
|
|
type ChainGatewayConfig struct {
|
|
Address string `yaml:"address"`
|
|
AddressEnv string `yaml:"address_env"`
|
|
DialTimeoutSeconds int `yaml:"dial_timeout_seconds"`
|
|
CallTimeoutSeconds int `yaml:"call_timeout_seconds"`
|
|
Insecure bool `yaml:"insecure"`
|
|
DefaultAsset ChainGatewayAssetConfig `yaml:"default_asset"`
|
|
}
|
|
|
|
type ChainGatewayAssetConfig struct {
|
|
Chain string `yaml:"chain"`
|
|
TokenSymbol string `yaml:"token_symbol"`
|
|
ContractAddress string `yaml:"contract_address"`
|
|
}
|
|
|
|
type LedgerConfig struct {
|
|
Address string `yaml:"address"`
|
|
AddressEnv string `yaml:"address_env"`
|
|
DialTimeoutSeconds int `yaml:"dial_timeout_seconds"`
|
|
CallTimeoutSeconds int `yaml:"call_timeout_seconds"`
|
|
Insecure bool `yaml:"insecure"`
|
|
}
|