Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidVATNumberFormat is returned when given VAT Number is in a invalid format ErrInvalidVATNumberFormat = errors.New("vat: invalid VAT number format") // ErrServiceUnreachable is returned when we cannot connect to VIES VAT Service ErrServiceUnreachable = errors.New("vat: VIES service is unreachable") // ErrVIESInvalidInput is returned based on VIES response ErrVIESInvalidInput = errors.New("vat: VAT number is invalid") // ErrVIESGlobalMaxConcurrentRequest is returned based on VIES response ErrVIESGlobalMaxConcurrentRequest = errors.New("vat: the maximum number of global concurrent requests has been reached, try again later") // ErrVIESMSMaxConcurrentRequest is returned based on VIES response ErrVIESMSMaxConcurrentRequest = errors.New("vat: the maximum number of concurrent requests for this member state has been reached, try again later") ErrVIESServiceUnavailable = errors.New("vat: an error was encountered either at the network level or the web application level, try again later") ErrVIESMSUnavailable = errors.New("vat: the application at the member state is not replying or not available, try again later") // ErrVIESTimeout is returned based on VIES response ErrVIESTimeout = errors.New("vat: the application did not receive a reply within the allocated time period, try again later") )
View Source
var DefaultClient = &http.Client{ Timeout: 10 * time.Second, Transport: &http.Transport{ DisableKeepAlives: true, }, }
DefaultClient is the HTTP Client used to communicate with VIES
Functions ¶
func ValidateNumberFormat ¶
ValidateNumberFormat returns true if given
Types ¶
Click to show internal directories.
Click to hide internal directories.