package
Version:
v0.0.0-...-99fda48
Opens a new window with list of versions in this module.
Published: Jun 5, 2024
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Config struct {
Env string `yaml:"env"`
AccessTokenTtl time.Duration `env-required:"true" yaml:"access_token_ttl"`
RefreshTokenTtl time.Duration `env-required:"true" yaml:"refresh_token_ttl"`
Postgres Postgres `env-required:"true" yaml:"postgres"`
GRPC Grpc `env-required:"true" yaml:"grpc"`
}
MustLoad loads config from .env and yaml file
envPath is ".env" by default
type Grpc struct {
Host string `env-required:"true" yaml:"host"`
Port int `env-required:"true" yaml:"port"`
Timeout time.Duration `env-required:"true" yaml:"timeout"`
}
type Postgres struct {
Host string `env-required:"true" env:"PG_HOST"`
Port int `env-required:"true" env:"PG_PORT"`
User string `env-required:"true" env:"PG_USER"`
Password string `env-required:"true" env:"PG_PASS"`
Database string `env-required:"true" env:"PG_DBNAME"`
SSLMode string `env-required:"true" env:"PG_SSLMODE"`
DSNTemplate string
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.