|
@@ -5,6 +5,7 @@ import (
|
|
|
beeLogger "github.com/beego/bee/v2/logger"
|
|
|
"github.com/beego/beego/v2/server/web"
|
|
|
"github.com/rdlucklib/rdluck_tools/cache"
|
|
|
+ "strconv"
|
|
|
)
|
|
|
|
|
|
var (
|
|
@@ -29,16 +30,29 @@ var (
|
|
|
DesKey string
|
|
|
APPNAME string
|
|
|
EmailSendToUsers string
|
|
|
+ JhGnAppKey string
|
|
|
+)
|
|
|
+
|
|
|
+
|
|
|
+var (
|
|
|
+ ES_URL string
|
|
|
+ ES_USERNAME string
|
|
|
+ ES_PASSWORD string
|
|
|
)
|
|
|
|
|
|
|
|
|
var (
|
|
|
|
|
|
- EDB_LIB_URL string
|
|
|
+ EDB_LIB_URL string
|
|
|
+ APP_EDB_LIB_NAME_EN string
|
|
|
+ EDB_LIB_Md5_KEY string
|
|
|
|
|
|
|
|
|
SendWxTemplateMsgUrl string
|
|
|
|
|
|
+
|
|
|
+ SendTemplateMsgAuthorization string
|
|
|
+
|
|
|
|
|
|
HandleVideoDecibelUrl string
|
|
|
|
|
@@ -53,16 +67,28 @@ var (
|
|
|
|
|
|
|
|
|
EnPolicyReportUrl string
|
|
|
+
|
|
|
+
|
|
|
+ GoogleTranslateUrl string
|
|
|
+
|
|
|
+
|
|
|
+ AlarmMsgUrl string
|
|
|
+
|
|
|
+
|
|
|
+ ChatUrl string
|
|
|
)
|
|
|
|
|
|
|
|
|
var (
|
|
|
WxId string
|
|
|
- WxAppId string
|
|
|
- WxAppSecret string
|
|
|
+ WxAppId string
|
|
|
+ WxAppSecret string
|
|
|
TemplateIdByProduct string
|
|
|
|
|
|
- WxYbAppId string
|
|
|
+ WxYbAppId string
|
|
|
+ WxYbId string
|
|
|
+ WxYbAppSecret string
|
|
|
+ WxYbPlatform int
|
|
|
)
|
|
|
|
|
|
|
|
@@ -75,17 +101,6 @@ var (
|
|
|
EsSemanticAnalysisDocIndexName string
|
|
|
)
|
|
|
|
|
|
-
|
|
|
-var (
|
|
|
- Bucketname string
|
|
|
- Endpoint string
|
|
|
- Imghost string
|
|
|
- UploadDir string
|
|
|
- Upload_Audio_Dir string
|
|
|
- AccessKeyId string
|
|
|
- AccessKeySecret string
|
|
|
-)
|
|
|
-
|
|
|
|
|
|
var (
|
|
|
XfSTATUS_FIRST_FRAME = 0
|
|
@@ -101,6 +116,45 @@ var (
|
|
|
XfVcn string
|
|
|
)
|
|
|
|
|
|
+
|
|
|
+var (
|
|
|
+ Bucketname string
|
|
|
+ Endpoint string
|
|
|
+ Imghost string
|
|
|
+ UploadDir string
|
|
|
+ Upload_Audio_Dir string
|
|
|
+ AccessKeyId string
|
|
|
+ AccessKeySecret string
|
|
|
+)
|
|
|
+
|
|
|
+
|
|
|
+var (
|
|
|
+ RegionId string
|
|
|
+ RoleArn string
|
|
|
+ RoleSessionName string
|
|
|
+ RAMAccessKeyId string
|
|
|
+ RAMAccessKeySecret string
|
|
|
+ STSTokenCacheKey string
|
|
|
+)
|
|
|
+
|
|
|
+
|
|
|
+var (
|
|
|
+ AliyunEmailAccountName string
|
|
|
+ AliyunEmailAccessKeyId string
|
|
|
+ AliyunEmailAccessKeySecret string
|
|
|
+ AliyunEmailReplyAddress string
|
|
|
+ AliyunEmailReplyAddressAlias string
|
|
|
+)
|
|
|
+
|
|
|
+
|
|
|
+var (
|
|
|
+ TencentSDKSecretId string
|
|
|
+ TencentSDKSecretKey string
|
|
|
+
|
|
|
+ TencentEmailFromEmailAddress string
|
|
|
+ TencentEmailTemplateID uint64
|
|
|
+)
|
|
|
+
|
|
|
|
|
|
var LibreOfficePath string
|
|
|
|
|
@@ -171,40 +225,79 @@ func init() {
|
|
|
|
|
|
|
|
|
DesKey = config["des_key"]
|
|
|
+
|
|
|
|
|
|
EmailSendToUsers = config["email_send_to_users"]
|
|
|
|
|
|
+
|
|
|
+ JhGnAppKey = config["jh_gn_app_key"]
|
|
|
+
|
|
|
|
|
|
Ppt2ImageUrl = config["ppt2_image_url"]
|
|
|
|
|
|
|
|
|
STATIC_DIR = config["static_dir"]
|
|
|
|
|
|
- EDB_LIB_URL = config["edb_lib_url"]
|
|
|
+
|
|
|
+ {
|
|
|
+
|
|
|
+ EDB_LIB_URL = config["edb_lib_url"]
|
|
|
+ APP_EDB_LIB_NAME_EN = config["app_edb_lib_name_en"]
|
|
|
+ EDB_LIB_Md5_KEY = config["edb_lib_md5_key"]
|
|
|
+
|
|
|
+
|
|
|
+ SendWxTemplateMsgUrl = config["send_wx_template_msg_url"]
|
|
|
|
|
|
-
|
|
|
- SendWxTemplateMsgUrl = config["send_wx_template_msg_url"]
|
|
|
+
|
|
|
+ SendTemplateMsgAuthorization = config["send_template_msg_authorization"]
|
|
|
|
|
|
-
|
|
|
- HandleVideoDecibelUrl = config["handle_video_decibel_url"]
|
|
|
+
|
|
|
+ HandleVideoDecibelUrl = config["handle_video_decibel_url"]
|
|
|
|
|
|
-
|
|
|
- HongzeOpenApiHost = config["hongze_open_api_host"]
|
|
|
+
|
|
|
+ HongzeOpenApiHost = config["hongze_open_api_host"]
|
|
|
|
|
|
-
|
|
|
- EnglishShareUrl = config["english_share_url"]
|
|
|
+
|
|
|
+ EnglishShareUrl = config["english_share_url"]
|
|
|
|
|
|
-
|
|
|
- EnPolicyReportUrl = config["en_policy_report_url"]
|
|
|
+
|
|
|
+ EnPolicyReportUrl = config["en_policy_report_url"]
|
|
|
+
|
|
|
+
|
|
|
+ GoogleTranslateUrl = config["google_translate_url"]
|
|
|
+
|
|
|
+
|
|
|
+ AlarmMsgUrl = config["alarm_msg_url"]
|
|
|
+
|
|
|
+
|
|
|
+ ChatUrl = config["chat_url"]
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ {
|
|
|
+ ES_URL = config["es_url"]
|
|
|
+ ES_USERNAME = config["es_username"]
|
|
|
+ ES_PASSWORD = config["es_password"]
|
|
|
+ }
|
|
|
|
|
|
|
|
|
{
|
|
|
- WxYbAppId = config["wx_yb_appid"]
|
|
|
WxAppId = config["wx_appid"]
|
|
|
WxAppSecret = config["wx_app_secret"]
|
|
|
WxId = config["wx_id"]
|
|
|
|
|
|
TemplateIdByProduct = config["template_id_by_product"]
|
|
|
+
|
|
|
+ WxYbAppId = config["wx_yb_appid"]
|
|
|
+ WxYbId = config["wx_yb_id"]
|
|
|
+ WxYbAppSecret = config["wx_yb_app_secret"]
|
|
|
+ wxYbPlatformStr := config["wx_yb_platform"]
|
|
|
+ if wxYbPlatformStr != `` {
|
|
|
+ WxYbPlatform, err = strconv.Atoi(wxYbPlatformStr)
|
|
|
+ if err != nil {
|
|
|
+ panic(any("配置文件读取wx_yb_platform错误 " + err.Error()))
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|
|
@@ -218,6 +311,41 @@ func init() {
|
|
|
AccessKeySecret = config["access_key_secret"]
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ {
|
|
|
+ RegionId = config["region_id"]
|
|
|
+ RoleArn = config["role_arn"]
|
|
|
+ RoleSessionName = config["role_session_name"]
|
|
|
+ RAMAccessKeyId = config["ram_access_key_id"]
|
|
|
+ RAMAccessKeySecret = config["ram_access_key_secret"]
|
|
|
+ STSTokenCacheKey = config["sts_token_cache_key"]
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ {
|
|
|
+ AliyunEmailAccountName = config["aliyun_email_account_name"]
|
|
|
+ AliyunEmailAccessKeyId = config["aliyun_email_access_key_id"]
|
|
|
+ AliyunEmailAccessKeySecret = config["aliyun_email_access_key_secret"]
|
|
|
+ AliyunEmailReplyAddress = config["aliyun_email_reply_address"]
|
|
|
+ AliyunEmailReplyAddressAlias = config["aliyun_email_reply_address_alias"]
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ {
|
|
|
+ TencentSDKSecretId = config["tencent_sdk_secret_id"]
|
|
|
+ TencentSDKSecretKey = config["tencent_sdk_secret_key"]
|
|
|
+ TencentEmailFromEmailAddress = config["tencent_email_from_email_address"]
|
|
|
+
|
|
|
+ tencentEmailTemplateIDtr := config["tencent_email_template_id"]
|
|
|
+ if tencentEmailTemplateIDtr != `` {
|
|
|
+ tmpTencentEmailTemplateID, err := strconv.Atoi(tencentEmailTemplateIDtr)
|
|
|
+ if err != nil {
|
|
|
+ panic(any("配置文件读取tencent_email_template_id错误 " + err.Error()))
|
|
|
+ }
|
|
|
+ TencentEmailTemplateID = uint64(tmpTencentEmailTemplateID)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
{
|
|
|
|