Documentation ¶
Index ¶
Constants ¶
View Source
const ( CountriesEndpoint = "http://apilayer.net/api/countries" ValidateEndpoint = "http://apilayer.net/api/validate" )
Variables ¶
View Source
var EnvNumverifyAccessKey = "NUMVERIFY_ACCESS_KEY"
View Source
var MultiLimit = 0 // test limit to gracefully exit process early.
Functions ¶
Types ¶
type Client ¶
type Client struct {
AccessKey string
}
type MultiResults ¶
MultiResults is designed to handle large volumes of requests.
func GetWriteValidationMulti ¶
func GetWriteValidationMulti(client *Client, requestNumbers, skipNumbers []string, filenameBase string, logAt, fileAt uint) MultiResults
func NewMultiResults ¶
func NewMultiResults() MultiResults
func ReadFilesMultiResults ¶ added in v0.0.2
func ReadFilesMultiResults(dir string, rxPattern string) (MultiResults, error)
func (*MultiResults) AddResponses ¶
func (mr *MultiResults) AddResponses(resps map[string]*Response)
func (*MultiResults) Inflate ¶
func (mr *MultiResults) Inflate()
func (*MultiResults) NumbersSuccess ¶
func (mr *MultiResults) NumbersSuccess() []string
func (*MultiResults) Write ¶
func (mr *MultiResults) Write(filename string) error
type Params ¶
type Params struct { AccessKey string `url:"access_key" json:"access_key,omitempty"` Number string `url:"number" json:"number,omitempty"` CountryCode string `url:"country_code" json:"country_code,omitempty"` Format int `url:"format" json:"format,omitempty"` Callback string `url:"callback" json:"callback,omitempty"` }
Params is the request query parameters for the API. AccessKey is added by the client and is not needed per-request.
func (*Params) MapStringSlice ¶ added in v0.0.3
type Response ¶
type Response struct { StatusCode int Body string ClientErr error Success *ResponseSuccess Failure *ResponseError Time time.Time }
type ResponseError ¶
type ResponseSuccess ¶
type ResponseSuccess struct { Valid bool `json:"valid,omitempty"` Number string `json:"number,omitempty"` LocalFormat string `json:"local_format,omitempty"` InternationalFormat string `json:"international_format,omitempty"` CountryPrefix string `json:"country_prefix,omitempty"` CountryCode string `json:"country_code,omitempty"` CountryName string `json:"country_name,omitempty"` Location string `json:"location,omitempty"` Carrier string `json:"carrier,omitempty"` LineType string `json:"line_type,omitempty"` }
Click to show internal directories.
Click to hide internal directories.