Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Env RuntimeEnv `toml:"env"` PostgresURI string `toml:"postgres_uri"` RedisURI string `toml:"redis_uri"` MigrationFiles string `toml:"migration_files"` Server struct { Proto string `toml:"proto"` Domain string `toml:"domain"` APIDomain string `toml:"api_domain"` Port int `toml:"port"` Host string `toml:"host"` } `toml:"server"` Mail struct { PrivateKey string `toml:"private_key"` PublicKey string `toml:"public_key"` Domain string `toml:"domain"` } `toml:"mail"` RateLimit struct { HTTPHeader string `toml:"http_header"` QueryLimit int `toml:"query_limit"` QueryResetTime int `toml:"query_reset_time"` MutLimit int `toml:"mut_limit"` MutResetTime int `toml:"mut_reset_time"` Cost struct { CreateUser int `toml:"create_user"` PubThread int `toml:"pub_thread"` PubPost int `toml:"pub_post"` } `toml:"cost"` } `toml:"rate_limit"` // contains filtered or unexported fields }
type RuntimeEnv ¶
type RuntimeEnv string
const ( DevEnv RuntimeEnv = "dev" TestEnv RuntimeEnv = "test" ProdEnv RuntimeEnv = "prod" )
func GetEnv ¶
func GetEnv() RuntimeEnv
Click to show internal directories.
Click to hide internal directories.