package config

type GRPC struct {
	Port             int    `mapstructure:"GRPC_PORT"`
	MdmAddress       string `mapstructure:"MDM_ADDRESS"`
	PaidOrderAddress string `mapstructure:"PAID_ORDER_ADDRESS"`
	PdfAddress       string `mapstructure:"PDF_ADDRESS"`
}

func (c *configImpl) GetGRPCConfig() GRPC {
	return c.systemConfig.GRPC
}

func (c *configImpl) setDefaultGRPCConfig() {
	c.viper.SetDefault("GRPC_PORT", "50000")
	c.viper.SetDefault("MDM_ADDRESS", "localhost:50002")
	c.viper.SetDefault("PAID_ORDER_ADDRESS", "localhost:50001")
	c.viper.SetDefault("PDF_ADDRESS", "localhost:50003")
}
