Documentation ¶
Index ¶
Constants ¶
View Source
const ( ErrInternal errors.Error = 0xFFDA<<8 + iota ErrMissingRequiredField ErrBadCountryValueType )
Errors returned by workers.
View Source
const UndefinedCountry = "ZZ"
UndefinedCountry is default country code. This means that a country is not defined.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Field string Timeout uint64 // in milliseconds. // In a url template there should be an pattern {{ip}}. // Pattern {{ip}} will be replaced by a ip address of the agent. URLTemplate string }
Config is the configuration for obtaining a country code.
type ServerMock ¶
ServerMock it is mock for processing a request for country detection.
func NewServerMock ¶
func NewServerMock(field, result string) *ServerMock
NewServerMock creates new ServerMock.
Click to show internal directories.
Click to hide internal directories.