[🚀] mapstructure

This commit is contained in:
2026-02-25 17:31:28 +08:00
parent e3b15844a4
commit ffcd09c89c
5 changed files with 62 additions and 75 deletions

View File

@@ -24,13 +24,13 @@ type Signer interface {
}
type Config struct {
SecretKey string `yaml:"secret_key" json:"secret_key"` // AES对称加密密钥
SignKey string `yaml:"sign_key" json:"sign_key"` // 签名密钥
PublicKey string `yaml:"public_key" json:"public_key"` // RSA公钥
PrivateKey string `yaml:"private_key" json:"private_key"` // RSA私钥
TimestampWindow time.Duration `yaml:"timestamp_window" json:"timestamp_window"` // 时间戳允许的时间窗口
EnableTimestamp bool `yaml:"enable_timestamp" json:"enable_timestamp"` // 是否启用时间戳验证
EnableSignature bool `yaml:"enable_signature" json:"enable_signature"` // 是否启用签名
SecretKey string `yaml:"secret_key" json:"secret_key" mapstructure:"secret_key"`
SignKey string `yaml:"sign_key" json:"sign_key" mapstructure:"sign_key"`
PublicKey string `yaml:"public_key" json:"public_key" mapstructure:"public_key"`
PrivateKey string `yaml:"private_key" json:"private_key" mapstructure:"private_key"`
TimestampWindow time.Duration `yaml:"timestamp_window" json:"timestamp_window" mapstructure:"timestamp_window"`
EnableTimestamp bool `yaml:"enable_timestamp" json:"enable_timestamp" mapstructure:"enable_timestamp"`
EnableSignature bool `yaml:"enable_signature" json:"enable_signature" mapstructure:"enable_signature"`
}
type EncryptedRequest struct {