• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Golang model.WithConfigStructure函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Golang中github.com/corestoreio/csfw/config/model.WithConfigStructure函数的典型用法代码示例。如果您正苦于以下问题:Golang WithConfigStructure函数的具体用法?Golang WithConfigStructure怎么用?Golang WithConfigStructure使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了WithConfigStructure函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。

示例1: init

func (pp *PkgBackend) init(cfgStruct element.SectionSlice) *PkgBackend {
	pp.Lock()
	defer pp.Unlock()
	pp.DevJsSessionStorageLogging = model.NewBool(`dev/js/session_storage_logging`, model.WithConfigStructure(cfgStruct))
	pp.DevJsSessionStorageKey = model.NewStr(`dev/js/session_storage_key`, model.WithConfigStructure(cfgStruct))

	return pp
}
开发者ID:joao-parana,项目名称:csfw,代码行数:8,代码来源:config_ui_backend.go


示例2: init

func (pp *PkgBackend) init(cfgStruct element.SectionSlice) *PkgBackend {
	pp.Lock()
	defer pp.Unlock()
	pp.SalesGiftOptionsAllowOrder = model.NewBool(`sales/gift_options/allow_order`, model.WithConfigStructure(cfgStruct))
	pp.SalesGiftOptionsAllowItems = model.NewBool(`sales/gift_options/allow_items`, model.WithConfigStructure(cfgStruct))

	return pp
}
开发者ID:joao-parana,项目名称:csfw,代码行数:8,代码来源:config_giftmessage_backend.go


示例3: init

func (pp *PkgBackend) init(cfgStruct element.SectionSlice) *PkgBackend {
	pp.Lock()
	defer pp.Unlock()
	pp.GoogleAnalyticsActive = model.NewBool(`google/analytics/active`, model.WithConfigStructure(cfgStruct))
	pp.GoogleAnalyticsAccount = model.NewStr(`google/analytics/account`, model.WithConfigStructure(cfgStruct))

	return pp
}
开发者ID:joao-parana,项目名称:csfw,代码行数:8,代码来源:config_googleanalytics_backend.go


示例4: init

func (pp *PkgBackend) init(cfgStruct element.SectionSlice) *PkgBackend {
	pp.Lock()
	defer pp.Unlock()
	pp.CatalogSearchEngine = model.NewStr(`catalog/search/engine`, model.WithConfigStructure(cfgStruct))
	pp.CatalogSearchSearchType = model.NewStr(`catalog/search/search_type`, model.WithConfigStructure(cfgStruct))

	return pp
}
开发者ID:joao-parana,项目名称:csfw,代码行数:8,代码来源:config_search_backend.go


示例5: init

func (pp *PkgBackend) init(cfgStruct element.SectionSlice) *PkgBackend {
	pp.Lock()
	defer pp.Unlock()
	pp.ContactContactEnabled = model.NewBool(`contact/contact/enabled`, model.WithConfigStructure(cfgStruct))
	pp.ContactEmailRecipientEmail = model.NewStr(`contact/email/recipient_email`, model.WithConfigStructure(cfgStruct))
	pp.ContactEmailSenderEmailIdentity = model.NewStr(`contact/email/sender_email_identity`, model.WithConfigStructure(cfgStruct))
	pp.ContactEmailEmailTemplate = model.NewStr(`contact/email/email_template`, model.WithConfigStructure(cfgStruct))

	return pp
}
开发者ID:joao-parana,项目名称:csfw,代码行数:10,代码来源:config_contact_backend.go


示例6: init

func (pp *PkgBackend) init(cfgStruct element.SectionSlice) *PkgBackend {
	pp.Lock()
	defer pp.Unlock()
	pp.CatalogSeoCategoryUrlSuffix = model.NewStr(`catalog/seo/category_url_suffix`, model.WithConfigStructure(cfgStruct))
	pp.CatalogSeoProductUrlSuffix = model.NewStr(`catalog/seo/product_url_suffix`, model.WithConfigStructure(cfgStruct))
	pp.CatalogSeoProductUseCategories = model.NewBool(`catalog/seo/product_use_categories`, model.WithConfigStructure(cfgStruct))
	pp.CatalogSeoSaveRewritesHistory = model.NewBool(`catalog/seo/save_rewrites_history`, model.WithConfigStructure(cfgStruct))

	return pp
}
开发者ID:joao-parana,项目名称:csfw,代码行数:10,代码来源:config_catalogurlrewrite_backend.go


示例7: init

func (pp *PkgBackend) init(cfgStruct element.SectionSlice) *PkgBackend {
	pp.Lock()
	defer pp.Unlock()
	pp.CatalogSeoSearchTerms = model.NewBool(`catalog/seo/search_terms`, model.WithConfigStructure(cfgStruct))
	pp.CatalogSearchEngine = model.NewStr(`catalog/search/engine`, model.WithConfigStructure(cfgStruct))
	pp.CatalogSearchMinQueryLength = model.NewStr(`catalog/search/min_query_length`, model.WithConfigStructure(cfgStruct))
	pp.CatalogSearchMaxQueryLength = model.NewStr(`catalog/search/max_query_length`, model.WithConfigStructure(cfgStruct))

	return pp
}
开发者ID:joao-parana,项目名称:csfw,代码行数:10,代码来源:config_catalogsearch_backend.go


示例8: init

func (pp *PkgBackend) init(cfgStruct element.SectionSlice) *PkgBackend {
	pp.Lock()
	defer pp.Unlock()
	pp.SalesMsrpEnabled = model.NewBool(`sales/msrp/enabled`, model.WithConfigStructure(cfgStruct))
	pp.SalesMsrpDisplayPriceType = model.NewStr(`sales/msrp/display_price_type`, model.WithConfigStructure(cfgStruct))
	pp.SalesMsrpExplanationMessage = model.NewStr(`sales/msrp/explanation_message`, model.WithConfigStructure(cfgStruct))
	pp.SalesMsrpExplanationMessageWhatsThis = model.NewStr(`sales/msrp/explanation_message_whats_this`, model.WithConfigStructure(cfgStruct))

	return pp
}
开发者ID:joao-parana,项目名称:csfw,代码行数:10,代码来源:config_msrp_backend.go


示例9: init

func (pp *PkgBackend) init(cfgStruct element.SectionSlice) *PkgBackend {
	pp.Lock()
	defer pp.Unlock()
	pp.OauthCleanupCleanupProbability = model.NewStr(`oauth/cleanup/cleanup_probability`, model.WithConfigStructure(cfgStruct))
	pp.OauthCleanupExpirationPeriod = model.NewStr(`oauth/cleanup/expiration_period`, model.WithConfigStructure(cfgStruct))
	pp.OauthConsumerExpirationPeriod = model.NewStr(`oauth/consumer/expiration_period`, model.WithConfigStructure(cfgStruct))
	pp.OauthConsumerPostMaxredirects = model.NewStr(`oauth/consumer/post_maxredirects`, model.WithConfigStructure(cfgStruct))
	pp.OauthConsumerPostTimeout = model.NewStr(`oauth/consumer/post_timeout`, model.WithConfigStructure(cfgStruct))

	return pp
}
开发者ID:joao-parana,项目名称:csfw,代码行数:11,代码来源:config_integration_backend.go


示例10: init

func (pp *PkgBackend) init(cfgStruct element.SectionSlice) *PkgBackend {
	pp.Lock()
	defer pp.Unlock()
	pp.SystemBackupEnabled = model.NewBool(`system/backup/enabled`, model.WithConfigStructure(cfgStruct))
	pp.SystemBackupType = model.NewStr(`system/backup/type`, model.WithConfigStructure(cfgStruct))
	pp.SystemBackupTime = model.NewStr(`system/backup/time`, model.WithConfigStructure(cfgStruct))
	pp.SystemBackupFrequency = model.NewStr(`system/backup/frequency`, model.WithConfigStructure(cfgStruct))
	pp.SystemBackupMaintenance = model.NewBool(`system/backup/maintenance`, model.WithConfigStructure(cfgStruct))

	return pp
}
开发者ID:joao-parana,项目名称:csfw,代码行数:11,代码来源:config_backup_backend.go


示例11: init

func (pp *PkgBackend) init(cfgStruct element.SectionSlice) *PkgBackend {
	pp.Lock()
	defer pp.Unlock()
	pp.CatalogRecentlyProductsScope = model.NewStr(`catalog/recently_products/scope`, model.WithConfigStructure(cfgStruct))
	pp.CatalogRecentlyProductsViewedCount = model.NewStr(`catalog/recently_products/viewed_count`, model.WithConfigStructure(cfgStruct))
	pp.CatalogRecentlyProductsComparedCount = model.NewStr(`catalog/recently_products/compared_count`, model.WithConfigStructure(cfgStruct))
	pp.ReportsDashboardYtdStart = model.NewStr(`reports/dashboard/ytd_start`, model.WithConfigStructure(cfgStruct))
	pp.ReportsDashboardMtdStart = model.NewStr(`reports/dashboard/mtd_start`, model.WithConfigStructure(cfgStruct))

	return pp
}
开发者ID:joao-parana,项目名称:csfw,代码行数:11,代码来源:config_reports_backend.go


示例12: init

func (pp *PkgBackend) init(cfgStruct element.SectionSlice) *PkgBackend {
	pp.Lock()
	defer pp.Unlock()
	pp.WebCookieCookieLifetime = model.NewStr(`web/cookie/cookie_lifetime`, model.WithConfigStructure(cfgStruct))
	pp.WebCookieCookiePath = model.NewStr(`web/cookie/cookie_path`, model.WithConfigStructure(cfgStruct))
	pp.WebCookieCookieDomain = model.NewStr(`web/cookie/cookie_domain`, model.WithConfigStructure(cfgStruct))
	pp.WebCookieCookieHttponly = model.NewBool(`web/cookie/cookie_httponly`, model.WithConfigStructure(cfgStruct))
	pp.WebCookieCookieRestriction = model.NewBool(`web/cookie/cookie_restriction`, model.WithConfigStructure(cfgStruct))

	return pp
}
开发者ID:joao-parana,项目名称:csfw,代码行数:11,代码来源:config_cookie_backend.go


示例13: init

func (pp *PkgBackend) init(cfgStruct element.SectionSlice) *PkgBackend {
	pp.Lock()
	defer pp.Unlock()
	pp.PersistentOptionsEnabled = model.NewBool(`persistent/options/enabled`, model.WithConfigStructure(cfgStruct))
	pp.PersistentOptionsLifetime = model.NewStr(`persistent/options/lifetime`, model.WithConfigStructure(cfgStruct))
	pp.PersistentOptionsRememberEnabled = model.NewBool(`persistent/options/remember_enabled`, model.WithConfigStructure(cfgStruct))
	pp.PersistentOptionsRememberDefault = model.NewBool(`persistent/options/remember_default`, model.WithConfigStructure(cfgStruct))
	pp.PersistentOptionsLogoutClear = model.NewBool(`persistent/options/logout_clear`, model.WithConfigStructure(cfgStruct))
	pp.PersistentOptionsShoppingCart = model.NewBool(`persistent/options/shopping_cart`, model.WithConfigStructure(cfgStruct))

	return pp
}
开发者ID:joao-parana,项目名称:csfw,代码行数:12,代码来源:config_persistent_backend.go


示例14: init

func (pp *PkgBackend) init(cfgStruct element.SectionSlice) *PkgBackend {
	pp.Lock()
	defer pp.Unlock()
	pp.CatalogDownloadableOrderItemStatus = model.NewStr(`catalog/downloadable/order_item_status`, model.WithConfigStructure(cfgStruct))
	pp.CatalogDownloadableDownloadsNumber = model.NewStr(`catalog/downloadable/downloads_number`, model.WithConfigStructure(cfgStruct))
	pp.CatalogDownloadableShareable = model.NewBool(`catalog/downloadable/shareable`, model.WithConfigStructure(cfgStruct))
	pp.CatalogDownloadableSamplesTitle = model.NewStr(`catalog/downloadable/samples_title`, model.WithConfigStructure(cfgStruct))
	pp.CatalogDownloadableLinksTitle = model.NewStr(`catalog/downloadable/links_title`, model.WithConfigStructure(cfgStruct))
	pp.CatalogDownloadableLinksTargetNewWindow = model.NewBool(`catalog/downloadable/links_target_new_window`, model.WithConfigStructure(cfgStruct))
	pp.CatalogDownloadableContentDisposition = model.NewStr(`catalog/downloadable/content_disposition`, model.WithConfigStructure(cfgStruct))
	pp.CatalogDownloadableDisableGuestCheckout = model.NewBool(`catalog/downloadable/disable_guest_checkout`, model.WithConfigStructure(cfgStruct))

	return pp
}
开发者ID:joao-parana,项目名称:csfw,代码行数:14,代码来源:config_downloadable_backend.go


示例15: init

func (pp *PkgBackend) init(cfgStruct element.SectionSlice) *PkgBackend {
	pp.Lock()
	defer pp.Unlock()
	pp.NewrelicreportingGeneralEnable = model.NewBool(`newrelicreporting/general/enable`, model.WithConfigStructure(cfgStruct))
	pp.NewrelicreportingGeneralApiUrl = model.NewStr(`newrelicreporting/general/api_url`, model.WithConfigStructure(cfgStruct))
	pp.NewrelicreportingGeneralInsightsApiUrl = model.NewStr(`newrelicreporting/general/insights_api_url`, model.WithConfigStructure(cfgStruct))
	pp.NewrelicreportingGeneralAccountId = model.NewStr(`newrelicreporting/general/account_id`, model.WithConfigStructure(cfgStruct))
	pp.NewrelicreportingGeneralAppId = model.NewStr(`newrelicreporting/general/app_id`, model.WithConfigStructure(cfgStruct))
	pp.NewrelicreportingGeneralApi = model.NewStr(`newrelicreporting/general/api`, model.WithConfigStructure(cfgStruct))
	pp.NewrelicreportingGeneralInsightsInsertKey = model.NewStr(`newrelicreporting/general/insights_insert_key`, model.WithConfigStructure(cfgStruct))
	pp.NewrelicreportingGeneralAppName = model.NewStr(`newrelicreporting/general/app_name`, model.WithConfigStructure(cfgStruct))
	pp.NewrelicreportingCronEnableCron = model.NewBool(`newrelicreporting/cron/enable_cron`, model.WithConfigStructure(cfgStruct))

	return pp
}
开发者ID:joao-parana,项目名称:csfw,代码行数:15,代码来源:config_newrelicreporting_backend.go


示例16: init

func (pp *PkgBackend) init(cfgStruct element.SectionSlice) *PkgBackend {
	pp.Lock()
	defer pp.Unlock()
	pp.WebapiSoapCharset = model.NewStr(`webapi/soap/charset`, model.WithConfigStructure(cfgStruct))

	return pp
}
开发者ID:joao-parana,项目名称:csfw,代码行数:7,代码来源:config_webapi_backend.go


示例17: init

func (pp *PkgBackend) init(cfgStruct element.SectionSlice) *PkgBackend {
	pp.Lock()
	defer pp.Unlock()
	pp.RssConfigActive = model.NewBool(`rss/config/active`, model.WithConfigStructure(cfgStruct))

	return pp
}
开发者ID:joao-parana,项目名称:csfw,代码行数:7,代码来源:config_rss_backend.go


示例18: init

func (pp *PkgBackend) init(cfgStruct element.SectionSlice) *PkgBackend {
	pp.Lock()
	defer pp.Unlock()
	pp.DevJsTranslateStrategy = model.NewStr(`dev/js/translate_strategy`, model.WithConfigStructure(cfgStruct))

	return pp
}
开发者ID:joao-parana,项目名称:csfw,代码行数:7,代码来源:config_translation_backend.go


示例19: init

func (pp *PkgBackend) init(cfgStruct element.SectionSlice) *PkgBackend {
	pp.Lock()
	defer pp.Unlock()
	pp.CatalogReviewAllowGuest = model.NewBool(`catalog/review/allow_guest`, model.WithConfigStructure(cfgStruct))

	return pp
}
开发者ID:joao-parana,项目名称:csfw,代码行数:7,代码来源:config_review_backend.go


示例20: TestStringCSV

func TestStringCSV(t *testing.T) {
	t.Parallel()
	wantPath := scope.StrDefault.FQPathInt64(0, "web/cors/exposed_headers")
	b := model.NewStringCSV(
		"web/cors/exposed_headers",
		model.WithConfigStructure(configStructure),
		model.WithSourceByString(
			"Content-Type", "Content Type", "X-CoreStore-ID", "CoreStore Microservice ID",
		),
	)

	assert.NotEmpty(t, b.Options())

	assert.Exactly(t, []string{"Content-Type", "X-CoreStore-ID"}, b.Get(config.NewMockGetter().NewScoped(0, 0, 0)))

	assert.Exactly(t, []string{"Content-Application", "X-Gopher"}, b.Get(config.NewMockGetter(
		config.WithMockValues(config.MockPV{
			wantPath: "Content-Application,X-Gopher",
		}),
	).NewScoped(0, 0, 0)))

	mw := &config.MockWrite{}
	b.Source.Merge(source.NewByString("a", "a", "b", "b", "c", "c"))

	assert.NoError(t, b.Write(mw, []string{"a", "b", "c"}, scope.DefaultID, 0))
	assert.Exactly(t, wantPath, mw.ArgPath)
	assert.Exactly(t, "a,b,c", mw.ArgValue.(string))
}
开发者ID:joao-parana,项目名称:csfw,代码行数:28,代码来源:slices_test.go



注:本文中的github.com/corestoreio/csfw/config/model.WithConfigStructure函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Golang scope.MockCode函数代码示例发布时间:2022-05-23
下一篇:
Golang model.NewStr函数代码示例发布时间:2022-05-23
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap