converter

package
v0.0.0-...-7257806 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConverterQuery

type ConverterQuery struct {
	// Amount represents amount of money that should be converted to another currency.
	Amount float64

	// Currency represents target currency to which conversion should be applied.
	Currency string

	// Provider is a optional parameter that represents provider that should be used for conversion.
	Provider converter.ConverterProvider
}

ConverterQuery represents request query parameters(required and optional) used for conversion.

type ConverterService

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

ConverterService converts given amount of money in given currency to currencies supported by selected provider. By default FixerIO provider is used for conversion.

func NewConverterService

func NewConverterService() ConverterService

NewConverterService returns initialized ConverterService object

func (ConverterService) Handler

func (c ConverterService) Handler() *restful.WebService

Handler registers endpoints and returns handler for converter service

Jump to

Keyboard shortcuts

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