func (pp *PkgBackend) init(cfgStruct element.SectionSlice) *PkgBackend {
	pp.Lock()
	defer pp.Unlock()
	pp.PaymentAuthorizenetDirectpostActive = model.NewBool(`payment/authorizenet_directpost/active`, model.WithConfigStructure(cfgStruct))
	pp.PaymentAuthorizenetDirectpostPaymentAction = model.NewStr(`payment/authorizenet_directpost/payment_action`, model.WithConfigStructure(cfgStruct))
	pp.PaymentAuthorizenetDirectpostTitle = model.NewStr(`payment/authorizenet_directpost/title`, model.WithConfigStructure(cfgStruct))
	pp.PaymentAuthorizenetDirectpostLogin = model.NewStr(`payment/authorizenet_directpost/login`, model.WithConfigStructure(cfgStruct))
	pp.PaymentAuthorizenetDirectpostTransKey = model.NewStr(`payment/authorizenet_directpost/trans_key`, model.WithConfigStructure(cfgStruct))
	pp.PaymentAuthorizenetDirectpostTransMd5 = model.NewStr(`payment/authorizenet_directpost/trans_md5`, model.WithConfigStructure(cfgStruct))
	pp.PaymentAuthorizenetDirectpostOrderStatus = model.NewStr(`payment/authorizenet_directpost/order_status`, model.WithConfigStructure(cfgStruct))
	pp.PaymentAuthorizenetDirectpostTest = model.NewBool(`payment/authorizenet_directpost/test`, model.WithConfigStructure(cfgStruct))
	pp.PaymentAuthorizenetDirectpostCgiUrl = model.NewStr(`payment/authorizenet_directpost/cgi_url`, model.WithConfigStructure(cfgStruct))
	pp.PaymentAuthorizenetDirectpostCgiUrlTd = model.NewStr(`payment/authorizenet_directpost/cgi_url_td`, model.WithConfigStructure(cfgStruct))
	pp.PaymentAuthorizenetDirectpostCurrency = model.NewStr(`payment/authorizenet_directpost/currency`, model.WithConfigStructure(cfgStruct))
	pp.PaymentAuthorizenetDirectpostDebug = model.NewBool(`payment/authorizenet_directpost/debug`, model.WithConfigStructure(cfgStruct))
	pp.PaymentAuthorizenetDirectpostEmailCustomer = model.NewBool(`payment/authorizenet_directpost/email_customer`, model.WithConfigStructure(cfgStruct))
	pp.PaymentAuthorizenetDirectpostMerchantEmail = model.NewStr(`payment/authorizenet_directpost/merchant_email`, model.WithConfigStructure(cfgStruct))
	pp.PaymentAuthorizenetDirectpostCctypes = model.NewStringCSV(`payment/authorizenet_directpost/cctypes`, model.WithConfigStructure(cfgStruct))
	pp.PaymentAuthorizenetDirectpostUseccv = model.NewBool(`payment/authorizenet_directpost/useccv`, model.WithConfigStructure(cfgStruct))
	pp.PaymentAuthorizenetDirectpostAllowspecific = model.NewStr(`payment/authorizenet_directpost/allowspecific`, model.WithConfigStructure(cfgStruct))
	pp.PaymentAuthorizenetDirectpostSpecificcountry = model.NewStringCSV(`payment/authorizenet_directpost/specificcountry`, model.WithConfigStructure(cfgStruct))
	pp.PaymentAuthorizenetDirectpostMinOrderTotal = model.NewStr(`payment/authorizenet_directpost/min_order_total`, model.WithConfigStructure(cfgStruct))
	pp.PaymentAuthorizenetDirectpostMaxOrderTotal = model.NewStr(`payment/authorizenet_directpost/max_order_total`, model.WithConfigStructure(cfgStruct))
	pp.PaymentAuthorizenetDirectpostSortOrder = model.NewStr(`payment/authorizenet_directpost/sort_order`, model.WithConfigStructure(cfgStruct))

	return pp
}
Example #2
0
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))
}
Example #3
0
func (pp *PkgBackend) init(cfgStruct element.SectionSlice) *PkgBackend {
	pp.Lock()
	defer pp.Unlock()
	pp.CarriersUpsAccessLicenseNumber = model.NewStr(`carriers/ups/access_license_number`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUpsActive = model.NewBool(`carriers/ups/active`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUpsActiveRma = model.NewBool(`carriers/ups/active_rma`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUpsAllowedMethods = model.NewStringCSV(`carriers/ups/allowed_methods`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUpsShipmentRequesttype = model.NewStr(`carriers/ups/shipment_requesttype`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUpsContainer = model.NewStr(`carriers/ups/container`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUpsFreeShippingEnable = model.NewBool(`carriers/ups/free_shipping_enable`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUpsFreeShippingSubtotal = model.NewStr(`carriers/ups/free_shipping_subtotal`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUpsDestType = model.NewStr(`carriers/ups/dest_type`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUpsFreeMethod = model.NewStr(`carriers/ups/free_method`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUpsGatewayUrl = model.NewStr(`carriers/ups/gateway_url`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUpsGatewayXmlUrl = model.NewStr(`carriers/ups/gateway_xml_url`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUpsHandlingType = model.NewStr(`carriers/ups/handling_type`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUpsHandlingAction = model.NewStr(`carriers/ups/handling_action`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUpsHandlingFee = model.NewStr(`carriers/ups/handling_fee`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUpsMaxPackageWeight = model.NewStr(`carriers/ups/max_package_weight`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUpsMinPackageWeight = model.NewStr(`carriers/ups/min_package_weight`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUpsOriginShipment = model.NewStr(`carriers/ups/origin_shipment`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUpsPassword = model.NewStr(`carriers/ups/password`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUpsPickup = model.NewStr(`carriers/ups/pickup`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUpsSortOrder = model.NewStr(`carriers/ups/sort_order`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUpsTitle = model.NewStr(`carriers/ups/title`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUpsTrackingXmlUrl = model.NewStr(`carriers/ups/tracking_xml_url`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUpsType = model.NewStr(`carriers/ups/type`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUpsIsAccountLive = model.NewBool(`carriers/ups/is_account_live`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUpsUnitOfMeasure = model.NewStr(`carriers/ups/unit_of_measure`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUpsUsername = model.NewStr(`carriers/ups/username`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUpsNegotiatedActive = model.NewBool(`carriers/ups/negotiated_active`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUpsShipperNumber = model.NewStr(`carriers/ups/shipper_number`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUpsSallowspecific = model.NewStr(`carriers/ups/sallowspecific`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUpsSpecificcountry = model.NewStringCSV(`carriers/ups/specificcountry`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUpsShowmethod = model.NewBool(`carriers/ups/showmethod`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUpsSpecificerrmsg = model.NewStr(`carriers/ups/specificerrmsg`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUpsModeXml = model.NewStr(`carriers/ups/mode_xml`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUpsDebug = model.NewBool(`carriers/ups/debug`, model.WithConfigStructure(cfgStruct))

	return pp
}
func (pp *PkgBackend) init(cfgStruct element.SectionSlice) *PkgBackend {
	pp.Lock()
	defer pp.Unlock()
	pp.CarriersFlatrateActive = model.NewBool(`carriers/flatrate/active`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFlatrateName = model.NewStr(`carriers/flatrate/name`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFlatratePrice = model.NewStr(`carriers/flatrate/price`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFlatrateHandlingType = model.NewStr(`carriers/flatrate/handling_type`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFlatrateHandlingFee = model.NewStr(`carriers/flatrate/handling_fee`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFlatrateSortOrder = model.NewStr(`carriers/flatrate/sort_order`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFlatrateTitle = model.NewStr(`carriers/flatrate/title`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFlatrateType = model.NewStr(`carriers/flatrate/type`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFlatrateSallowspecific = model.NewStr(`carriers/flatrate/sallowspecific`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFlatrateSpecificcountry = model.NewStringCSV(`carriers/flatrate/specificcountry`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFlatrateShowmethod = model.NewBool(`carriers/flatrate/showmethod`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFlatrateSpecificerrmsg = model.NewStr(`carriers/flatrate/specificerrmsg`, model.WithConfigStructure(cfgStruct))
	pp.CarriersTablerateHandlingType = model.NewStr(`carriers/tablerate/handling_type`, model.WithConfigStructure(cfgStruct))
	pp.CarriersTablerateHandlingFee = model.NewStr(`carriers/tablerate/handling_fee`, model.WithConfigStructure(cfgStruct))
	pp.CarriersTablerateActive = model.NewBool(`carriers/tablerate/active`, model.WithConfigStructure(cfgStruct))
	pp.CarriersTablerateConditionName = model.NewStr(`carriers/tablerate/condition_name`, model.WithConfigStructure(cfgStruct))
	pp.CarriersTablerateIncludeVirtualPrice = model.NewBool(`carriers/tablerate/include_virtual_price`, model.WithConfigStructure(cfgStruct))
	pp.CarriersTablerateExport = model.NewStr(`carriers/tablerate/export`, model.WithConfigStructure(cfgStruct))
	pp.CarriersTablerateImport = model.NewStr(`carriers/tablerate/import`, model.WithConfigStructure(cfgStruct))
	pp.CarriersTablerateName = model.NewStr(`carriers/tablerate/name`, model.WithConfigStructure(cfgStruct))
	pp.CarriersTablerateSortOrder = model.NewStr(`carriers/tablerate/sort_order`, model.WithConfigStructure(cfgStruct))
	pp.CarriersTablerateTitle = model.NewStr(`carriers/tablerate/title`, model.WithConfigStructure(cfgStruct))
	pp.CarriersTablerateSallowspecific = model.NewStr(`carriers/tablerate/sallowspecific`, model.WithConfigStructure(cfgStruct))
	pp.CarriersTablerateSpecificcountry = model.NewStringCSV(`carriers/tablerate/specificcountry`, model.WithConfigStructure(cfgStruct))
	pp.CarriersTablerateShowmethod = model.NewBool(`carriers/tablerate/showmethod`, model.WithConfigStructure(cfgStruct))
	pp.CarriersTablerateSpecificerrmsg = model.NewStr(`carriers/tablerate/specificerrmsg`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFreeshippingActive = model.NewBool(`carriers/freeshipping/active`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFreeshippingFreeShippingSubtotal = model.NewStr(`carriers/freeshipping/free_shipping_subtotal`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFreeshippingName = model.NewStr(`carriers/freeshipping/name`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFreeshippingSortOrder = model.NewStr(`carriers/freeshipping/sort_order`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFreeshippingTitle = model.NewStr(`carriers/freeshipping/title`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFreeshippingSallowspecific = model.NewStr(`carriers/freeshipping/sallowspecific`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFreeshippingSpecificcountry = model.NewStringCSV(`carriers/freeshipping/specificcountry`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFreeshippingShowmethod = model.NewBool(`carriers/freeshipping/showmethod`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFreeshippingSpecificerrmsg = model.NewStr(`carriers/freeshipping/specificerrmsg`, model.WithConfigStructure(cfgStruct))

	return pp
}
Example #5
0
func (pp *PkgBackend) init(cfgStruct element.SectionSlice) *PkgBackend {
	pp.Lock()
	defer pp.Unlock()
	pp.CarriersDhlActive = model.NewBool(`carriers/dhl/active`, model.WithConfigStructure(cfgStruct))
	pp.CarriersDhlActiveRma = model.NewBool(`carriers/dhl/active_rma`, model.WithConfigStructure(cfgStruct))
	pp.CarriersDhlGatewayUrl = model.NewStr(`carriers/dhl/gateway_url`, model.WithConfigStructure(cfgStruct))
	pp.CarriersDhlTitle = model.NewStr(`carriers/dhl/title`, model.WithConfigStructure(cfgStruct))
	pp.CarriersDhlId = model.NewStr(`carriers/dhl/id`, model.WithConfigStructure(cfgStruct))
	pp.CarriersDhlPassword = model.NewStr(`carriers/dhl/password`, model.WithConfigStructure(cfgStruct))
	pp.CarriersDhlAccount = model.NewStr(`carriers/dhl/account`, model.WithConfigStructure(cfgStruct))
	pp.CarriersDhlContentType = model.NewStr(`carriers/dhl/content_type`, model.WithConfigStructure(cfgStruct))
	pp.CarriersDhlHandlingType = model.NewStr(`carriers/dhl/handling_type`, model.WithConfigStructure(cfgStruct))
	pp.CarriersDhlHandlingAction = model.NewStr(`carriers/dhl/handling_action`, model.WithConfigStructure(cfgStruct))
	pp.CarriersDhlHandlingFee = model.NewStr(`carriers/dhl/handling_fee`, model.WithConfigStructure(cfgStruct))
	pp.CarriersDhlDivideOrderWeight = model.NewBool(`carriers/dhl/divide_order_weight`, model.WithConfigStructure(cfgStruct))
	pp.CarriersDhlUnitOfMeasure = model.NewStr(`carriers/dhl/unit_of_measure`, model.WithConfigStructure(cfgStruct))
	pp.CarriersDhlSize = model.NewStr(`carriers/dhl/size`, model.WithConfigStructure(cfgStruct))
	pp.CarriersDhlHeight = model.NewStr(`carriers/dhl/height`, model.WithConfigStructure(cfgStruct))
	pp.CarriersDhlDepth = model.NewStr(`carriers/dhl/depth`, model.WithConfigStructure(cfgStruct))
	pp.CarriersDhlWidth = model.NewStr(`carriers/dhl/width`, model.WithConfigStructure(cfgStruct))
	pp.CarriersDhlDocMethods = model.NewStringCSV(`carriers/dhl/doc_methods`, model.WithConfigStructure(cfgStruct))
	pp.CarriersDhlNondocMethods = model.NewStringCSV(`carriers/dhl/nondoc_methods`, model.WithConfigStructure(cfgStruct))
	pp.CarriersDhlReadyTime = model.NewStr(`carriers/dhl/ready_time`, model.WithConfigStructure(cfgStruct))
	pp.CarriersDhlSpecificerrmsg = model.NewStr(`carriers/dhl/specificerrmsg`, model.WithConfigStructure(cfgStruct))
	pp.CarriersDhlFreeMethodDoc = model.NewStr(`carriers/dhl/free_method_doc`, model.WithConfigStructure(cfgStruct))
	pp.CarriersDhlFreeMethodNondoc = model.NewStr(`carriers/dhl/free_method_nondoc`, model.WithConfigStructure(cfgStruct))
	pp.CarriersDhlFreeShippingEnable = model.NewBool(`carriers/dhl/free_shipping_enable`, model.WithConfigStructure(cfgStruct))
	pp.CarriersDhlFreeShippingSubtotal = model.NewStr(`carriers/dhl/free_shipping_subtotal`, model.WithConfigStructure(cfgStruct))
	pp.CarriersDhlSallowspecific = model.NewStr(`carriers/dhl/sallowspecific`, model.WithConfigStructure(cfgStruct))
	pp.CarriersDhlSpecificcountry = model.NewStringCSV(`carriers/dhl/specificcountry`, model.WithConfigStructure(cfgStruct))
	pp.CarriersDhlShowmethod = model.NewBool(`carriers/dhl/showmethod`, model.WithConfigStructure(cfgStruct))
	pp.CarriersDhlSortOrder = model.NewStr(`carriers/dhl/sort_order`, model.WithConfigStructure(cfgStruct))
	pp.CarriersDhlDebug = model.NewBool(`carriers/dhl/debug`, model.WithConfigStructure(cfgStruct))

	return pp
}
Example #6
0
func (pp *PkgBackend) init(cfgStruct element.SectionSlice) *PkgBackend {
	pp.Lock()
	defer pp.Unlock()
	pp.CarriersUspsActive = model.NewBool(`carriers/usps/active`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUspsActiveRma = model.NewBool(`carriers/usps/active_rma`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUspsGatewayUrl = model.NewStr(`carriers/usps/gateway_url`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUspsGatewaySecureUrl = model.NewStr(`carriers/usps/gateway_secure_url`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUspsTitle = model.NewStr(`carriers/usps/title`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUspsUserid = model.NewStr(`carriers/usps/userid`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUspsPassword = model.NewStr(`carriers/usps/password`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUspsMode = model.NewStr(`carriers/usps/mode`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUspsShipmentRequesttype = model.NewStr(`carriers/usps/shipment_requesttype`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUspsContainer = model.NewStr(`carriers/usps/container`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUspsSize = model.NewStr(`carriers/usps/size`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUspsWidth = model.NewStr(`carriers/usps/width`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUspsLength = model.NewStr(`carriers/usps/length`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUspsHeight = model.NewStr(`carriers/usps/height`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUspsGirth = model.NewStr(`carriers/usps/girth`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUspsMachinable = model.NewStr(`carriers/usps/machinable`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUspsMaxPackageWeight = model.NewStr(`carriers/usps/max_package_weight`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUspsHandlingType = model.NewStr(`carriers/usps/handling_type`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUspsHandlingAction = model.NewStr(`carriers/usps/handling_action`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUspsHandlingFee = model.NewStr(`carriers/usps/handling_fee`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUspsAllowedMethods = model.NewStringCSV(`carriers/usps/allowed_methods`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUspsFreeMethod = model.NewStr(`carriers/usps/free_method`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUspsFreeShippingEnable = model.NewBool(`carriers/usps/free_shipping_enable`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUspsFreeShippingSubtotal = model.NewStr(`carriers/usps/free_shipping_subtotal`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUspsSpecificerrmsg = model.NewStr(`carriers/usps/specificerrmsg`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUspsSallowspecific = model.NewStr(`carriers/usps/sallowspecific`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUspsSpecificcountry = model.NewStringCSV(`carriers/usps/specificcountry`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUspsDebug = model.NewBool(`carriers/usps/debug`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUspsShowmethod = model.NewBool(`carriers/usps/showmethod`, model.WithConfigStructure(cfgStruct))
	pp.CarriersUspsSortOrder = model.NewStr(`carriers/usps/sort_order`, model.WithConfigStructure(cfgStruct))

	return pp
}
func (pp *PkgBackend) init(cfgStruct element.SectionSlice) *PkgBackend {
	pp.Lock()
	defer pp.Unlock()
	pp.AdminCaptchaEnable = model.NewBool(`admin/captcha/enable`, model.WithConfigStructure(cfgStruct))
	pp.AdminCaptchaFont = model.NewStr(`admin/captcha/font`, model.WithConfigStructure(cfgStruct))
	pp.AdminCaptchaForms = model.NewStringCSV(`admin/captcha/forms`, model.WithConfigStructure(cfgStruct))
	pp.AdminCaptchaMode = model.NewStr(`admin/captcha/mode`, model.WithConfigStructure(cfgStruct))
	pp.AdminCaptchaFailedAttemptsLogin = model.NewStr(`admin/captcha/failed_attempts_login`, model.WithConfigStructure(cfgStruct))
	pp.AdminCaptchaTimeout = model.NewStr(`admin/captcha/timeout`, model.WithConfigStructure(cfgStruct))
	pp.AdminCaptchaLength = model.NewStr(`admin/captcha/length`, model.WithConfigStructure(cfgStruct))
	pp.AdminCaptchaSymbols = model.NewStr(`admin/captcha/symbols`, model.WithConfigStructure(cfgStruct))
	pp.AdminCaptchaCaseSensitive = model.NewBool(`admin/captcha/case_sensitive`, model.WithConfigStructure(cfgStruct))
	pp.CustomerCaptchaEnable = model.NewBool(`customer/captcha/enable`, model.WithConfigStructure(cfgStruct))
	pp.CustomerCaptchaFont = model.NewStr(`customer/captcha/font`, model.WithConfigStructure(cfgStruct))
	pp.CustomerCaptchaForms = model.NewStringCSV(`customer/captcha/forms`, model.WithConfigStructure(cfgStruct))
	pp.CustomerCaptchaMode = model.NewStr(`customer/captcha/mode`, model.WithConfigStructure(cfgStruct))
	pp.CustomerCaptchaFailedAttemptsLogin = model.NewStr(`customer/captcha/failed_attempts_login`, model.WithConfigStructure(cfgStruct))
	pp.CustomerCaptchaTimeout = model.NewStr(`customer/captcha/timeout`, model.WithConfigStructure(cfgStruct))
	pp.CustomerCaptchaLength = model.NewStr(`customer/captcha/length`, model.WithConfigStructure(cfgStruct))
	pp.CustomerCaptchaSymbols = model.NewStr(`customer/captcha/symbols`, model.WithConfigStructure(cfgStruct))
	pp.CustomerCaptchaCaseSensitive = model.NewBool(`customer/captcha/case_sensitive`, model.WithConfigStructure(cfgStruct))

	return pp
}
Example #8
0
func (pp *PkgBackend) init(cfgStruct element.SectionSlice) *PkgBackend {
	pp.Lock()
	defer pp.Unlock()
	pp.CarriersFedexActive = model.NewBool(`carriers/fedex/active`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFedexActiveRma = model.NewBool(`carriers/fedex/active_rma`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFedexTitle = model.NewStr(`carriers/fedex/title`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFedexAccount = model.NewStr(`carriers/fedex/account`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFedexMeterNumber = model.NewStr(`carriers/fedex/meter_number`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFedexKey = model.NewStr(`carriers/fedex/key`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFedexPassword = model.NewStr(`carriers/fedex/password`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFedexSandboxMode = model.NewBool(`carriers/fedex/sandbox_mode`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFedexProductionWebservicesUrl = model.NewStr(`carriers/fedex/production_webservices_url`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFedexSandboxWebservicesUrl = model.NewStr(`carriers/fedex/sandbox_webservices_url`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFedexShipmentRequesttype = model.NewStr(`carriers/fedex/shipment_requesttype`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFedexPackaging = model.NewStr(`carriers/fedex/packaging`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFedexDropoff = model.NewStr(`carriers/fedex/dropoff`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFedexUnitOfMeasure = model.NewStr(`carriers/fedex/unit_of_measure`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFedexMaxPackageWeight = model.NewStr(`carriers/fedex/max_package_weight`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFedexHandlingType = model.NewStr(`carriers/fedex/handling_type`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFedexHandlingAction = model.NewStr(`carriers/fedex/handling_action`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFedexHandlingFee = model.NewStr(`carriers/fedex/handling_fee`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFedexResidenceDelivery = model.NewBool(`carriers/fedex/residence_delivery`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFedexAllowedMethods = model.NewStringCSV(`carriers/fedex/allowed_methods`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFedexSmartpostHubid = model.NewStr(`carriers/fedex/smartpost_hubid`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFedexFreeMethod = model.NewStr(`carriers/fedex/free_method`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFedexFreeShippingEnable = model.NewBool(`carriers/fedex/free_shipping_enable`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFedexFreeShippingSubtotal = model.NewStr(`carriers/fedex/free_shipping_subtotal`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFedexSpecificerrmsg = model.NewStr(`carriers/fedex/specificerrmsg`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFedexSallowspecific = model.NewStr(`carriers/fedex/sallowspecific`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFedexSpecificcountry = model.NewStringCSV(`carriers/fedex/specificcountry`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFedexDebug = model.NewBool(`carriers/fedex/debug`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFedexShowmethod = model.NewBool(`carriers/fedex/showmethod`, model.WithConfigStructure(cfgStruct))
	pp.CarriersFedexSortOrder = model.NewStr(`carriers/fedex/sort_order`, model.WithConfigStructure(cfgStruct))

	return pp
}