當前位置: 首頁>>代碼示例>>Golang>>正文


Golang Event.ApiEnv方法代碼示例

本文整理匯總了Golang中github.com/shopgun/matilde/events/event.Event.ApiEnv方法的典型用法代碼示例。如果您正苦於以下問題:Golang Event.ApiEnv方法的具體用法?Golang Event.ApiEnv怎麽用?Golang Event.ApiEnv使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在github.com/shopgun/matilde/events/event.Event的用法示例。


在下文中一共展示了Event.ApiEnv方法的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: CleanDealerView

// NOTE recent events have dealer_id instead of dealer
func CleanDealerView(
	db db.Connector,
	in *event.Event) (out clean.Dealer_view, err Errors) {
	out = clean.Dealer_view{
		Api_env:                  in.ApiEnv(),
		App_id:                   in.App_id.Value,
		App_groups:               in.AppGroups(db),
		Client_addr:              in.Ipv4Ipv6(in.IP),
		Client_app_version:       in.ApiAppVersion(),
		Client_user_agent:        in.User_agent,
		Dealer_id:                in.Dealer.Value,
		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,
		Query_string:             in.Query_string,
		Request_geohash:          in.Geohash(),
		Request_latitude:         in.Latitude(),
		Request_longitude:        in.Longitude(),
		Request_radius:           in.Location.ReqRadius,
		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,
	}
	err = eventChecker(in, out)
	return out, err
}
開發者ID:jlouis,項目名稱:go-watcher,代碼行數:30,代碼來源:cleaners.go

示例2: CleanCatalogPushFetch

func CleanCatalogPushFetch(
	db db.Connector,
	in *event.Event) (out clean.Catalog_push_fetch, err Errors) {

	out = clean.Catalog_push_fetch{
		Api_Build:          in.Api_build,
		Api_Version:        in.Api,
		Api_env:            in.ApiEnv(),
		App_id:             in.App_id.Value,
		App_groups:         in.AppGroups(db),
		Catalogs:           in.Catalogs.GetArray(),
		Client_addr:        in.Ipv4Ipv6(in.IP),
		Client_app_version: in.ApiAppVersion(),
		Client_user_agent:  in.User_agent,
		Dealers:            in.GetDealers(),
		Is_archive_user:    in.Is_archive_user.Value,
		Is_dealer_admin:    in.Is_Dealer_admin.Value,
		Push_type:          in.Push_type,
		Query_string:       in.Query_string,
		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,
	}
	err = eventChecker(in, out)
	return out, err
}
開發者ID:jlouis,項目名稱:go-watcher,代碼行數:28,代碼來源:cleaners.go

示例3: CleanDealerUnFav

func CleanDealerUnFav(
	// NOTE recent events have dealer_id instead of dealer
	db db.Connector,
	in *event.Event) (out clean.Dealer_unfavorite, err Errors) {
	out = clean.Dealer_unfavorite{
		Api_env:            in.ApiEnv(),
		App_id:             in.App_id.Value,
		App_groups:         in.AppGroups(db),
		Client_addr:        in.Ipv4Ipv6(in.IP),
		Client_app_version: in.ApiAppVersion(),
		Client_user_agent:  in.User_agent,
		Dealer_id:          in.Dealerid.Value,
		Is_archive_user:    in.Is_archive_user.Value,
		Is_dealer_admin:    in.Is_Dealer_admin.Value,
		Is_uuid_ephemeral:  in.Is_uuid_ephemeral.Value,
		Query_string:       in.Query_string,
		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,
	}
	err = eventChecker(in, out)
	return out, err
}
開發者ID:jlouis,項目名稱:go-watcher,代碼行數:25,代碼來源:cleaners.go

示例4: CleanCatalogPages

func CleanCatalogPages(
	db db.Connector,
	in *event.Event) (out clean.Catalog_pages, err Errors) {

	out = clean.Catalog_pages{
		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,
		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,
		Query_string:             in.Query_string,
		Publish:                  in.PublishTimeStamp(db),
		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,
	}
	err = eventChecker(in, out)
	return out, err
}
開發者ID:jlouis,項目名稱:go-watcher,代碼行數:32,代碼來源:cleaners.go

示例5: CleanUserCreate

func CleanUserCreate(
	db db.Connector,
	in *event.Event) (out clean.User_create, err Errors) {

	out = clean.User_create{
		Api_Build:          in.Api_build,
		Api_Version:        in.Api,
		Api_env:            in.ApiEnv(),
		App_id:             in.App_id.Value,
		App_groups:         in.AppGroups(db),
		Birthyear:          in.BYear.Value64,
		Client_addr:        in.Ipv4Ipv6(in.IP),
		Client_app_version: in.ApiAppVersion(),
		Client_user_agent:  in.User_agent,
		Email:              in.Email,
		User_gender:        in.GetGender(db),
		Is_archive_user:    in.Is_archive_user.Value,
		Is_dealer_admin:    in.Is_Dealer_admin.Value,
		Is_uuid_ephemeral:  in.Is_uuid_ephemeral.Value,
		Locale:             in.Locale,
		Name:               in.Name,
		Query_string:       in.Query_string,
		Server_addr:        in.Ipv4Ipv6(in.Server_ip),
		Timestamp:          in.Times.Timestamp(),
		Type:               in.Type(),
		User_id:            in.User.User_id.Value,
		Uuid:               in.User.Uuid.Value,
	}
	err = eventChecker(in, out)
	return out, err
}
開發者ID:jlouis,項目名稱:go-watcher,代碼行數:31,代碼來源:cleaners.go

示例6: CleanCatalogList

func CleanCatalogList(
	db db.Connector,
	in *event.Event) (out clean.Catalog_list, err Errors) {

	out = clean.Catalog_list{
		Api_env:                  in.ApiEnv(),
		App_id:                   in.App_id.Value,
		App_groups:               in.AppGroups(db),
		Catalogs:                 in.Catalogs.GetArray(),
		Client_addr:              in.Ipv4Ipv6(in.IP),
		Client_app_version:       in.ApiAppVersion(),
		Client_user_agent:        in.User_agent,
		Dealers:                  in.GetDealers(),
		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, Query_string: in.Query_string,
		Limit:             in.Limit,
		Offset:            in.Offset,
		Request_geohash:   in.Geohash(),
		Request_latitude:  in.Latitude(),
		Request_longitude: in.Longitude(),
		Request_radius:    in.Location.ReqRadius,
		Server_addr:       in.Ipv4Ipv6(in.Server_ip),
		Stores:            in.Stores.GetArray(),
		TimeRange:         in.Times.Range,
		Timestamp:         in.Times.Timestamp(),
		Type:              in.Type(),
		Typeof:            in.Typeof.Value,
		User_id:           in.User.Id.Value,
		Uuid:              in.User.Uuid.Value,
	}
	err = eventChecker(in, out)
	return out, err
}
開發者ID:jlouis,項目名稱:go-watcher,代碼行數:35,代碼來源:cleaners.go

示例7: CleanUserLogout

func CleanUserLogout(
	db db.Connector,
	in *event.Event) (out clean.User_logout, err Errors) {

	out = clean.User_logout{
		Api_Build:          in.Api_build,
		Api_Version:        in.Api,
		Api_env:            in.ApiEnv(),
		App_id:             in.App_id.Value,
		App_groups:         in.AppGroups(db),
		Client_addr:        in.Ipv4Ipv6(in.IP),
		Client_app_version: in.ApiAppVersion(),
		Client_user_agent:  in.User_agent,
		Email:              in.Email,
		Is_archive_user:    in.Is_archive_user.Value,
		Is_dealer_admin:    in.Is_Dealer_admin.Value,
		Is_uuid_ephemeral:  in.Is_uuid_ephemeral.Value,
		Query_string:       in.Query_string,
		Server_addr:        in.Ipv4Ipv6(in.Server_ip),
		Session_type:       in.Typeof.Value,
		Timestamp:          in.Times.Timestamp(),
		Type:               in.Type(),
		User_id:            in.User.User_id.Value,
		Uuid:               in.User.Uuid.Value,
	}
	err = eventChecker(in, out)
	return out, err
}
開發者ID:jlouis,項目名稱:go-watcher,代碼行數:28,代碼來源:cleaners.go

示例8: CleanShopShareAdd

func CleanShopShareAdd(
	db db.Connector,
	in *event.Event) (out clean.Shoppingshare_add, err Errors) {
	out = clean.Shoppingshare_add{
		Api_Build:                in.Api_build,
		Api_Version:              in.Api,
		Api_env:                  in.ApiEnv(),
		App_id:                   in.App_id.Value,
		App_groups:               in.AppGroups(db),
		Client_addr:              in.Ipv4Ipv6(in.IP),
		Client_app_version:       in.ApiAppVersion(),
		Client_user_agent:        in.User_agent,
		Is_user_defined_location: in.Location.GeoCoded(),
		Is_Dealer_admin:          in.Is_Dealer_admin.Value,
		Is_archive_user:          in.Is_archive_user.Value,
		Is_uuid_ephemeral:        in.Is_uuid_ephemeral.Value,
		Query_string:             in.Query_string,
		Request_geohash:          in.Geohash(),
		Request_latitude:         in.Latitude(),
		Request_longitude:        in.Longitude(),
		Server_addr:              in.Ipv4Ipv6(in.Server_ip),
		Shopping_list:            in.Shop_list.Value,
		Timestamp:                in.Times.Timestamp(),
		Type:                     in.Type(),
		User_id:                  in.User.Id.Value,
		Uuid:                     in.Uuid.Value,
	}
	err = eventChecker(in, out)
	return out, err
}
開發者ID:jlouis,項目名稱:go-watcher,代碼行數:30,代碼來源:cleaners.go

示例9: CleanOfferReferral

func CleanOfferReferral(
	db db.Connector,
	in *event.Event) (out clean.Offer_Referral, err Errors) {

	out = clean.Offer_Referral{
		Api_env:            in.ApiEnv(),
		App_id:             in.App_id.Value,
		Client_addr:        in.Ipv4Ipv6(in.IP),
		App_groups:         in.AppGroups(db),
		Client_app_version: in.ApiAppVersion(),
		Client_user_agent:  in.User_agent,
		Dealer_id:          in.Dealer.Value,
		Is_archive_user:    in.Is_archive_user.Value,
		Is_dealer_admin:    in.Is_Dealer_admin.Value,
		Is_uuid_ephemeral:  in.Is_uuid_ephemeral.Value,
		Query_string:       in.Query_string,
		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,
	}
	err = eventChecker(in, out)
	return out, err
}
開發者ID:jlouis,項目名稱:go-watcher,代碼行數:25,代碼來源:cleaners.go

示例10: CleanCatalogPushSend

func CleanCatalogPushSend(
	db db.Connector,
	in *event.Event) (out clean.Catalog_push_send, err Errors) {

	out = clean.Catalog_push_send{
		Api_Build:   in.Api_build,
		Api_Version: in.Api,
		Api_env:     in.ApiEnv(),
		Catalogs:    in.Catalogs.GetArray(),
		Dealers:     in.GetDealers(),
		Endpoint_id: in.Endpoint_id.Value,
		Push_type:   in.Push_type,
		Timestamp:   in.Times.Timestamp(),
		Type:        in.Type(),
		User_id:     in.User.Id.Value,
		Uuid:        in.User.Uuid.Value,
	}
	err = eventChecker(in, out)
	return out, err
}
開發者ID:jlouis,項目名稱:go-watcher,代碼行數:20,代碼來源:cleaners.go

示例11: CleanOfferView

/*
  CleanScopeAciton converts the input go struct containing the raw but  with
  surely  correct types into the data we really want to keep Conversion errors
  hare logged inside each conversion action once the event is cleaned is
  checked for fatal missing fields
*/
func CleanOfferView(
	db db.Connector,
	in *event.Event) (out clean.Offer_View, err Errors) {

	out = clean.Offer_View{
		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.GetCatalogId(db),
		Client_addr:              in.Ipv4Ipv6(in.IP),
		Client_app_version:       in.ApiAppVersion(),
		Client_user_agent:        in.User_agent,
		Currency:                 event.CheckCurrency(in.Currency),
		Dealer_id:                in.Dealer.Value,
		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,
		Query_string:             in.Query_string,
		Offer_id:                 in.Offer.Value,
		Price:                    in.GetPrice(db),
		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_birth_year:          in.GetByear(db),
		User_gender:              in.GetGender(db),
		User_id:                  in.User.Id.Value,
		Uuid:                     in.User.Uuid.Value,
	}
	err = eventChecker(in, out)
	return out, err
}
開發者ID:jlouis,項目名稱:go-watcher,代碼行數:47,代碼來源:cleaners.go

示例12: CleanOfferSearch

func CleanOfferSearch(
	db db.Connector,
	in *event.Event) (out clean.Offer_Search, err Errors) {

	out = clean.Offer_Search{
		Api_Build:                in.Api_build,
		Api_Version:              in.Api,
		Api_env:                  in.ApiEnv(),
		App_id:                   in.App_id.Value,
		Client_addr:              in.Ipv4Ipv6(in.IP),
		App_groups:               in.AppGroups(db),
		Client_app_version:       in.ApiAppVersion(),
		Client_user_agent:        in.User_agent,
		Dealers:                  in.GetDealers(),
		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,
		Limit:                    in.Limit,
		Offers:                   in.Offers.GetArray(),
		Offset:                   in.Offset,
		Query:                    in.Query.Value,
		Query_string:             in.Query_string,
		Request_geohash:          in.Geohash(),
		Request_latitude:         in.Latitude(),
		Request_longitude:        in.Longitude(),
		Request_radius:           in.Location.ReqRadius,
		Results:                  in.Results.Value,
		Server_addr:              in.Ipv4Ipv6(in.Server_ip),
		Stores:                   in.Stores.GetArray(),
		Timestamp:                in.Times.Timestamp(),
		Type:                     in.Type(),
		User_birth_year:          in.GetByear(db),
		User_gender:              in.GetGender(db),
		User_id:                  in.User.Id.Value,
		Uuid:                     in.User.Uuid.Value,
	}
	err = eventChecker(in, out)
	return out, err
}
開發者ID:jlouis,項目名稱:go-watcher,代碼行數:40,代碼來源:cleaners.go

示例13: CleanUserVerify

func CleanUserVerify(
	db db.Connector,
	in *event.Event) (out clean.User_verify, err Errors) {

	out = clean.User_verify{
		Api_Build:         in.Api_build,
		Api_Version:       in.Api,
		Api_env:           in.ApiEnv(),
		Client_addr:       in.Ipv4Ipv6(in.IP),
		Client_user_agent: in.User_agent,
		Email:             in.Email,
		Is_archive_user:   in.Is_archive_user.Value,
		Is_dealer_admin:   in.Is_Dealer_admin.Value,
		Query_string:      in.Query_string,
		Server_addr:       in.Ipv4Ipv6(in.Server_ip),
		Timestamp:         in.Times.Timestamp(),
		Type:              in.Type(),
		User_id:           in.User.User_id.Value,
	}
	err = eventChecker(in, out)
	return out, err
}
開發者ID:jlouis,項目名稱:go-watcher,代碼行數:22,代碼來源:cleaners.go

示例14: CleanShopShareAccept

func CleanShopShareAccept(
	db db.Connector,
	in *event.Event) (out clean.Shoppingshare_accept, err Errors) {
	out = clean.Shoppingshare_accept{
		Api_Build:          in.Api_build,
		Api_Version:        in.Api,
		Api_env:            in.ApiEnv(),
		App_id:             in.App_id.Value,
		App_groups:         in.AppGroups(db),
		Client_addr:        in.Ipv4Ipv6(in.IP),
		Client_app_version: in.ApiAppVersion(),
		Client_user_agent:  in.User_agent,
		Query_string:       in.Query_string,
		Server_addr:        in.Ipv4Ipv6(in.Server_ip),
		Shopping_list:      in.Shop_list.Value,
		Timestamp:          in.Times.Timestamp(),
		Type:               in.Type(),
		User_id:            in.User.Id.Value,
	}
	err = eventChecker(in, out)
	return out, err
}
開發者ID:jlouis,項目名稱:go-watcher,代碼行數:22,代碼來源:cleaners.go


注:本文中的github.com/shopgun/matilde/events/event.Event.ApiEnv方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。