33 lines
759 B
Go
33 lines
759 B
Go
package models
|
|
|
|
import (
|
|
"penahub.gitlab.yandexcloud.net/external/treasurer/pkg/mongo"
|
|
)
|
|
|
|
type Config struct {
|
|
HTTP ConfigurationHTTP
|
|
GRPC ConfigurationGRPC
|
|
Service ServiceConfiguration
|
|
Database mongo.Configuration
|
|
}
|
|
|
|
type ConfigurationHTTP struct {
|
|
Host string `env:"HTTP_HOST,default=localhost"`
|
|
Port string `env:"HTTP_PORT,default=8080"`
|
|
Domen string `env:"HTTP_DOMEN,required"`
|
|
}
|
|
|
|
type ConfigurationGRPC struct {
|
|
Host string `env:"GRPC_HOST,default=0.0.0.0"`
|
|
Port string `env:"GRPC_PORT,default=8081"`
|
|
}
|
|
|
|
type ServiceConfiguration struct {
|
|
YoomomeyConfiguration YoomomeyConfiguration
|
|
}
|
|
|
|
type YoomomeyConfiguration struct {
|
|
StoreID string `env:"YOOMONEY_STORE_ID,required"`
|
|
SecretKey string `env:"YOOMONEY_SECRET_KEY,required"`
|
|
}
|