package
Version:
v0.0.0-...-5e1236a
Opens a new window with list of versions in this module.
Published: Dec 5, 2023
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type App struct {
Name string `env-required:"true" yaml:"name" env:"APP_NAME"`
Version string `env-required:"true" yaml:"version" env:"APP_VERSION"`
}
type Auth struct {
AccessTokenPrivateKey string `env-required:"false" yaml:"access_token_private_key" env:"ACCESS_TOKEN_PRIVATE_KEY"`
AccessTokenPublicKey string `env-required:"false" yaml:"access_token_public_key" env:"ACCESS_TOKEN_PUBLIC_KEY"`
AccessTokenMaxAge string `env-required:"false" yaml:"access_token_max_age" env:"ACCESS_TOKEN_MAX_AGE"`
}
type CartConfig struct {
App `yaml:"app"`
GRPC `yaml:"grpc"`
Redis `yaml:"redis"`
PG `yaml:"postgres"`
CartTaskWorker `yaml:"worker"`
Log `yaml:"logger"`
}
type CartTaskWorker struct {
CartTTL string `env-required:"false" yaml:"cart_ttl" env:"CART_TTL"`
Interval string `env-required:"false" yaml:"cart_task_worker_interval" env:"CART_TASK_WORKER_INTERVAL"`
}
Creates a new config entity after reading the configuration values
from the YAML file and environment variables.
type GRPC struct {
Port uint32 `env-required:"true" yaml:"port" env:"GRPC_PORT"`
Host string `env-required:"true" yaml:"host" env:"HOST"`
}
type GatewayConfig struct {
App `yaml:"app"`
GRPC `yaml:"grpc"`
HTTP `yaml:"http"`
Auth `yaml:"auth"`
Log `yaml:"logger"`
}
type HTTP struct {
Port uint32 `env-required:"true" yaml:"port" env:"HTTP_PORT"`
Host string `env-required:"true" yaml:"host" env:"HOST"`
}
type Log struct {
Level string `env-required:"true" yaml:"log_level" env:"LOG_LEVEL"`
}
type OrderConfig struct {
App `yaml:"app"`
GRPC `yaml:"grpc"`
PG `yaml:"postgres"`
Log `yaml:"logger"`
}
type PG struct {
Dialect string `env-requered:"true" yaml:"dialect" env:"DIALECT"`
URL string `env-required:"true" yaml:"pg_url" env:"PG_URL"`
PoolMax int `env-required:"true" yaml:"pool_max" env:"PG_POOL_MAX"`
}
type ProductConfig struct {
App `yaml:"app"`
GRPC `yaml:"grpc"`
Redis `yaml:"redis"`
PG `yaml:"postgres"`
Log `yaml:"logger"`
}
type Redis struct {
Url string `env-required:"true" yaml:"redis_url" env:"REDIS_URL"`
}
type UserConfig struct {
App `yaml:"app"`
GRPC `yaml:"grpc"`
PG `yaml:"postgres"`
Log `yaml:"logger"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.