From 44e92defb4b946637daf847df292ce735fd7c0ca Mon Sep 17 00:00:00 2001 From: liujiandao <274878379@qq.com> Date: 星期三, 17 四月 2024 15:44:49 +0800 Subject: [PATCH] 修改 --- conf/config.go | 29 +++++++++++++++++++++-------- 1 files changed, 21 insertions(+), 8 deletions(-) diff --git a/conf/config.go b/conf/config.go index 8f14bb5..c9887c0 100644 --- a/conf/config.go +++ b/conf/config.go @@ -23,14 +23,15 @@ type ( webConf struct { - Host string // 鏈満ip鍦板潃 - Port string // 绔彛鍙� - NodeId string // 涓昏处鎴风敤鎴峰悕 - OssType string // 瀵硅薄瀛樺偍绫诲瀷 - JWTSecret string - FileServer string //鏂囦欢鏈嶅姟鍣ㄥ湴鍧� - ServerId string //鏈嶅姟ID - GrpcPort string //grpc绔彛鍙� + Host string // 鏈満ip鍦板潃 + Port string // 绔彛鍙� + NodeId string // 涓昏处鎴风敤鎴峰悕 + OssType string // 瀵硅薄瀛樺偍绫诲瀷 + JWTSecret string + FileServer string //鏂囦欢鏈嶅姟鍣ㄥ湴鍧� + ServerId string //鏈嶅姟ID + GrpcPort string //grpc绔彛鍙� + CompanyName string //鍏徃鍚� } localConf struct { @@ -42,6 +43,15 @@ CrmAddr string //crm鏈嶅姟grpc鍦板潃 SrmAddr string //srm鏈嶅姟grpc鍦板潃 } + + fileTemplateConf struct { + InputSelfmadeAddr string //鍏ュ簱鑷埗鍗曟ā鐗堝湴鍧� + } + + dingTalkConf struct { + AlarmKey string + AlarmUrl string + } ) var ( @@ -51,6 +61,7 @@ LocalConf = &localConf{} Viper *viper.Viper GrpcServerConf = &grpcServerConf{} + DingTalkConf = &dingTalkConf{} ) func Init() error { @@ -112,6 +123,7 @@ _ = v.UnmarshalKey("db", DbConf) _ = v.UnmarshalKey("local", LocalConf) _ = v.UnmarshalKey("grpcServer", GrpcServerConf) + _ = v.UnmarshalKey("dingTalk", DingTalkConf) showConfig() } @@ -122,5 +134,6 @@ log.Printf(" DbConf: %+v", DbConf) log.Printf(" LocalConf: %+v", LocalConf) log.Printf(" GrpcServerConf: %+v", GrpcServerConf) + log.Printf(" DingTalkConf: %+v", DingTalkConf) log.Println("......................................................") } -- Gitblit v1.8.0