示例#1
0
func CleanCatalogPageview(
	db db.Connector,
	in *event.Event) (out clean.Catalog_pageview, err Errors) {

	out = clean.Catalog_pageview{
		Api_Build:                in.Api_build,
		Api_Version:              in.Api,
		Api_env:                  in.ApiEnv(),
		App_id:                   in.App_id.Value,
		App_groups:               in.AppGroups(db),
		Catalog_id:               in.Catalog.Value,
		Client_addr:              in.Ipv4Ipv6(in.IP),
		Client_app_version:       in.ApiAppVersion(),
		Client_user_agent:        in.User_agent,
		Dealer_id:                in.Dealer.Value,
		Duration:                 in.UDuration(),
		Expires:                  in.Expires(db),
		Is_archive_user:          in.Is_archive_user.Value,
		Is_dealer_admin:          in.Is_Dealer_admin.Value,
		Is_user_defined_location: in.Location.GeoCoded(),
		Is_uuid_ephemeral:        in.Is_uuid_ephemeral.Value,
		Orientation:              in.Orientation.Value,
		Pages:                    in.Pages.GetArray(),
		Query_string:             in.Query_string,
		Publish:                  in.PublishTimeStamp(db),
		Request_geohash:          in.Geohash(),
		Request_latitude:         in.Latitude(),
		Request_longitude:        in.Longitude(),
		Request_radius:           in.Location.ReqRadius,
		Run_from:                 in.RunFrom(db),
		Server_addr:              in.Ipv4Ipv6(in.Server_ip),
		Timestamp:                in.Times.Timestamp(),
		Type:                     in.Type(),
		User_id:                  in.User.Id.Value,
		Uuid:                     in.User.Uuid.Value,
		View_session:             in.View_session.Value,
	}
	err = eventChecker(in, out)
	return out, err
}