- Add Google Wire for compile-time dependency injection - Replace concrete service types with interfaces across handlers - Remove global state (DB, cache) in favor of constructor injection - Split monolithic files into focused modules: - config: separate files for each config domain - dto: converters split by domain (user, post, message, group) - cache: separate metrics.go and redis_cache.go - Introduce unified apperrors package with string-based error codes - Add transaction support with context-aware repository methods - Upgrade golang.org/x/crypto from 0.17.0 to 0.26.0
11 lines
282 B
Go
11 lines
282 B
Go
package config
|
|
|
|
import "time"
|
|
|
|
// JWTConfig JWT 配置
|
|
type JWTConfig struct {
|
|
Secret string `mapstructure:"secret"`
|
|
AccessTokenExpire time.Duration `mapstructure:"access_token_expire"`
|
|
RefreshTokenExpire time.Duration `mapstructure:"refresh_token_expire"`
|
|
}
|