This commit is contained in:
2025-07-20 20:53:26 +08:00
parent 83bf9aea7d
commit 8ad1d7288e
158 changed files with 18156 additions and 13188 deletions

View File

@@ -22,6 +22,7 @@ type Config struct {
Development DevelopmentConfig `mapstructure:"development"`
App AppConfig `mapstructure:"app"`
WechatWork WechatWorkConfig `mapstructure:"wechat_work"`
Esign EsignConfig `mapstructure:"esign"`
}
// ServerConfig HTTP服务器配置
@@ -210,3 +211,44 @@ type OCRConfig struct {
APIKey string `mapstructure:"api_key"`
SecretKey string `mapstructure:"secret_key"`
}
// EsignConfig e签宝配置
type EsignConfig struct {
AppID string `mapstructure:"app_id"` // 应用ID
AppSecret string `mapstructure:"app_secret"` // 应用密钥
ServerURL string `mapstructure:"server_url"` // 服务器URL
TemplateID string `mapstructure:"template_id"` // 模板ID
Contract ContractConfig `mapstructure:"contract"` // 合同配置
Auth AuthConfig `mapstructure:"auth"` // 认证配置
Sign SignConfig `mapstructure:"sign"` // 签署配置
Notify NotifyConfig `mapstructure:"notify"` // 通知配置
}
// ContractConfig 合同配置
type ContractConfig struct {
Name string `mapstructure:"name"` // 合同名称
ExpireDays int `mapstructure:"expire_days"` // 签署链接过期天数
RetryCount int `mapstructure:"retry_count"` // 重试次数
}
// AuthConfig 认证配置
type AuthConfig struct {
OrgAuthModes []string `mapstructure:"org_auth_modes"` // 机构可用认证模式
DefaultAuthMode string `mapstructure:"default_auth_mode"` // 默认认证模式
PsnAuthModes []string `mapstructure:"psn_auth_modes"` // 个人可用认证模式
WillingnessAuthModes []string `mapstructure:"willingness_auth_modes"` // 意愿认证模式
}
// SignConfig 签署配置
type SignConfig struct {
AutoFinish bool `mapstructure:"auto_finish"` // 是否自动完结
SignFieldStyle int `mapstructure:"sign_field_style"` // 签署区样式
ClientType string `mapstructure:"client_type"` // 客户端类型
}
// NotifyConfig 通知配置
type NotifyConfig struct {
Types string `mapstructure:"types"` // 通知类型
RedirectURL string `mapstructure:"redirect_url"` // 重定向URL
}