Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Arg

type Arg struct {
	Key   string
	Value interface{}
}

    Arg defaults argument.

    func (Arg) String

    func (a Arg) String() string

      String arg to string.

      func (Arg) Val

      func (a Arg) Val() interface{}

        Val gets valuet argument.

        type Currency

        type Currency struct {
        	Key    string
        	Value  interface{}
        	Format FormatCurrency
        	// ISO 3-letter ISO 4217
        	ISO string
        }

          Currency argument.

          func (Currency) String

          func (a Currency) String() string

            String gets string from currency.

            func (Currency) Val

            func (a Currency) Val() interface{}

              Val gets value currency.

              type CurrencyOption

              type CurrencyOption func(*Currency)

                CurrencyOption configures option.

                func WithCurrencyFormat

                func WithCurrencyFormat(format FormatCurrency) CurrencyOption

                  WithCurrencyFormat sets format currency.

                  func WithCurrencyISO

                  func WithCurrencyISO(iso string) CurrencyOption

                    WithCurrencyISO sets ISO 4217 code currecy.

                    type FormatCurrency

                    type FormatCurrency int

                      FormatCurrency types format.

                      const (
                      	CurrencyFormat FormatCurrency = iota
                      	CurrencyFormatSymbol
                      	CurrencyFormatISO
                      	CurrencyFormatNarrowSymbol
                      )

                        Currency format.

                        type FormatNumber

                        type FormatNumber int

                          FormatNumber format number.

                          const (
                          	NumberFormatUndefined FormatNumber = iota
                          	NumberFormatDecimal
                          	NumberFormatPercent
                          	NumberFormatPerMille
                          	NumberFormatEngineering
                          	NumberFormatScientific
                          )

                            format argument.

                            type Number

                            type Number struct {
                            	Key    string
                            	Value  interface{}
                            	Format FormatNumber
                            }

                              Number argument.

                              func (Number) Configure

                              func (n Number) Configure(opts ...NumberOption) Number

                                Configure number.

                                func (Number) String

                                func (n Number) String() string

                                  String number to string.

                                  func (Number) Val

                                  func (n Number) Val() interface{}

                                    Val gets number value.

                                    type NumberOption

                                    type NumberOption func(*Number)

                                      NumberOption configure number argument.

                                      func WithNumberFormat

                                      func WithNumberFormat(format FormatNumber) NumberOption

                                        WithNumberFormat sets format number.