| | |
| | | CrmAddr string //crm服务grpc地址 |
| | | SrmAddr string //srm服务grpc地址 |
| | | } |
| | | |
| | | fileTemplateConf struct { |
| | | InputSelfmadeAddr string //入库自制单模版地址 |
| | | } |
| | | ) |
| | | |
| | | var ( |
| | | WebConf = &webConf{} |
| | | LogConf = &logx.Conf{} |
| | | DbConf = &mysqlx.Conf{} |
| | | LocalConf = &localConf{} |
| | | Viper *viper.Viper |
| | | GrpcServerConf = &grpcServerConf{} |
| | | WebConf = &webConf{} |
| | | LogConf = &logx.Conf{} |
| | | DbConf = &mysqlx.Conf{} |
| | | LocalConf = &localConf{} |
| | | Viper *viper.Viper |
| | | GrpcServerConf = &grpcServerConf{} |
| | | FileTemplateConf = &fileTemplateConf{} |
| | | ) |
| | | |
| | | func Init() error { |
| | |
| | | _ = v.UnmarshalKey("db", DbConf) |
| | | _ = v.UnmarshalKey("local", LocalConf) |
| | | _ = v.UnmarshalKey("grpcServer", GrpcServerConf) |
| | | _ = v.UnmarshalKey("fileTemplate", FileTemplateConf) |
| | | showConfig() |
| | | } |
| | | |
| | |
| | | log.Printf(" DbConf: %+v", DbConf) |
| | | log.Printf(" LocalConf: %+v", LocalConf) |
| | | log.Printf(" GrpcServerConf: %+v", GrpcServerConf) |
| | | log.Printf(" FileTemplateConf: %+v", FileTemplateConf) |
| | | log.Println("......................................................") |
| | | } |