Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Server ServerConfig `yaml:"server"` Logger Logger `yaml:"logger"` Postgres PostgresConfig `yaml:"postgres"` Redis RedisConfig `yaml:"redis"` Session SessionConfig `yaml:"session"` Cookie CookieConfig `yaml:"cookie"` }
Config
type CookieConfig ¶
type PostgresConfig ¶
type PostgresConfig struct { PostgresqlHost string `yaml:"PostgresqlHost"` PostgresqlPort string `yaml:"PostgresqlPort"` PostgresqlUser string `yaml:"PostgresqlUser"` PostgresqlPassword string `yaml:"PostgresqlPassword"` PostgresqlDbname string `yaml:"PostgresqlDbname"` PostgresqlSSLMode bool `yaml:"PostgresqlSSLMode"` PgDriver string `yaml:"PgDriver"` }
Postgresql config
type RedisConfig ¶
type RedisConfig struct { RedisAddr string `yaml:"RedisAddr"` RedisPassword string `yaml:"RedisPassword"` RedisDB string `yaml:"RedisDB"` RedisDefaultdb string `yaml:"RedisDefaultdb"` MinIdleConns int `yaml:"MinIdleConns"` PoolSize int `yaml:"PoolSize"` PoolTimeout int `yaml:"PoolTimeout"` Password string `yaml:"Password"` DB int `yaml:"DB"` }
type ServerConfig ¶
type ServerConfig struct { Port string `yaml:"Port"` Mode string `yaml:"Mode"` JwtSecretKey string `yaml:"JwtSecretKey"` CookieName string `yaml:"CookieName"` ReadTimeout int `yaml:"ReadTimeout"` WriteTimeout int `yaml:"WriteTimeout"` SSL bool `yaml:"SSL"` CtxDefaultTimeout int `yaml:"CtxDefaultTimeout"` CSRF bool `yaml:"CSRF"` }
Server config struct
type SessionConfig ¶
type SessionConfig struct { Prefix string `yaml:"Prefix"` Name string `yaml:"Name"` Expire int `yaml:"Expire"` }
Session Config
Click to show internal directories.
Click to hide internal directories.