func NewJsPut() *JsPut { var jp = &JsPut{} jp.kf = dbfactory.NewKVFile(fmt.Sprintf("./%s.txt", convert.ToString(time.Now().Unix()))) jp.putTags = make(map[string]map[string]int) jp.initArea() jp.initPutAdverts() jp.initPutTags("TAGS_3*", "tb_", "mg_") jp.initPutTags("TAGS_5*", "url_", "") return jp }
func NewZjPut() *ZjPut { var zj = &ZjPut{} zj.kf = dbfactory.NewKVFile(fmt.Sprintf("./%s.txt", convert.ToString(time.Now().Unix()))) zj.putTags = make(map[string]map[string]int) zj.Timestamp = timestamp.GetHourTimestamp(-1) zj.initPutAdverts() zj.initPutTags("TAGS_3*", "tb_phone_", "mg_phone_") zj.initPutTags("TAGS_5*", "url_phone_", "") return zj }
func NewShPut() *ShPut { var sh = &ShPut{} sh.kf = dbfactory.NewKVFile(fmt.Sprintf("./%s.txt", convert.ToString(time.Now().Unix()))) sh.putTags = make(map[string]map[string]int) sh.Timestamp = timestamp.GetDayTimestamp(-1) sh.initPutAdverts() sh.initPutTags("TAGS_3*", "tb_", "mg_") sh.initPutTags("TAGS_5*", "url_", "") log.Warn(sh.putAdverts) return sh }
func NewCookiePut() *CookiePut { var zj = &CookiePut{} zj.kf = dbfactory.NewKVFile(fmt.Sprintf("./%s.txt", convert.ToString(time.Now().Unix()))) zj.putTags = make(map[string]map[string]int) zj.Timestamp = timestamp.GetHourTimestamp(-1) zj.initPutAdverts() zj.initPutTags("TAGS_5*", "cookie_", "") log.Info(zj.putAdverts) log.Info(zj.putTags) return zj }