directory

package
v0.0.0-...-d4f462a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2015 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package directory provides features for currencies, currency rates, conversion of prices to a specified currency format, countries and regions.

Index

Constants

View Source
const (
	PathSystemCurrencyInstalled = "system/currency/installed"

	// PathCurrencyBase defines the app base currency code
	PathCurrencyBase    = "currency/options/base"
	PathCurrencyDefault = "currency/options/default"
	PathCurrencyAllow   = "currency/options/allow"

	// PathOptionalZipCountries lists ISO2 country codes which have optional Zip/Postal pre-configured
	PathOptionalZipCountries = "general/country/optional_zip_countries"
	// PathStatesRequired lists countries, for which state is required. No default values.
	PathStatesRequired = "general/region/state_required"
	// PathDisplayAllStates detects whether or not display the state for the country, if it is not required
	PathDisplayAllStates = "general/region/display_all"
	PathDefaultCountry   = "general/country/default"
	PathDefaultLocale    = "general/locale/code"
	PathDefaultTimezone  = "general/locale/timezone"
)

Variables

View Source
var PackageConfiguration config.SectionSlice

PackageConfiguration contains the main configuration

View Source
var TableCollection csdb.TableStructureSlice

TableCollection handles all tables and its columns. init() in generated Go file will set the value.

Functions

func BaseCurrencyCode

func BaseCurrencyCode(cr config.Reader) (language.Currency, error)

BaseCurrencyCode retrieves application base currency code

func DefaultCountry

func DefaultCountry(cr config.Reader, r config.ScopeIDer) string

DefaultCountry returns the country code. Store argument is optional.

func ShowNonRequiredState

func ShowNonRequiredState(cr config.Reader, r config.ScopeIDer) bool

ShowNonRequiredState

Types

type Country

type Country struct {
}

type Region

type Region struct {
}

type SourceCurrencyAll

type SourceCurrencyAll struct {
	// contains filtered or unexported fields
}

SourceCurrencyAll used in Path: `system/currency/installed`,

func NewSourceCurrencyAll

func NewSourceCurrencyAll(mc ...config.ModelConstructor) *SourceCurrencyAll

NewSourceCurrencyAll creates a new option for all currencies. If one argument of the ModelConstructor has been provided you may skip the calling of Construct().

func (*SourceCurrencyAll) Construct

func (sca *SourceCurrencyAll) Construct(mc config.ModelConstructor) error

Construct sets the necessary options

func (*SourceCurrencyAll) Options

func (sca *SourceCurrencyAll) Options() config.ValueLabelSlice

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL