| | |
| | | |
| | | var Server = &server{} |
| | | |
| | | type weedfs struct { |
| | | Ip string `mapstructure: "ip"` |
| | | UploadPort int `mapstructure: "uploadport"` |
| | | VisitPort int `mapstructure: "visitport"` |
| | | } |
| | | |
| | | var WeedFs = &weedfs{} |
| | | |
| | | type database struct { |
| | | Drive string `mapstructure:"drive"` |
| | | Name string `mapstructure:"name"` |
| | | FilePath string `mapstructure:"filepath"` |
| | | } |
| | | |
| | | // wp add es 索引 以及 IP port |
| | | type esinfo struct { |
| | | Masterip string `mapstructure:"masterip"` |
| | | Httpport string `mapstructure:"httpport"` |
| | | Shards string `mapstructure:"shards"` |
| | | EsIndex esindexlist `mapstructure:"index"` |
| | | } |
| | |
| | | var SoPath = &sopath{} |
| | | |
| | | var EsInfo = &esinfo{} |
| | | |
| | | var DBconf = &database{} |
| | | |
| | | type facedetect struct { |
| | | Ip string `mapstructure:"Ip"` |
| | |
| | | } |
| | | viper.UnmarshalKey("es", EsInfo) |
| | | viper.UnmarshalKey("server", Server) |
| | | viper.UnmarshalKey("database", DBconf) |
| | | viper.UnmarshalKey("weedfs", WeedFs) |
| | | viper.UnmarshalKey("sopath",SoPath) |
| | | viper.UnmarshalKey("facedetect", FaceDetectSet) |
| | | viper.UnmarshalKey("dbpersoncompare",DbPersonCompInfo) |