Documentation ¶
Index ¶
- Constants
- Variables
- type Carrier
- type Client
- type MultiResults
- func (mr *MultiResults) AddResponses(resps map[string]*NumberInfo)
- func (mr *MultiResults) Canonical() (gophonenumbers.NumberSet, error)
- func (mr *MultiResults) GetNumberInfo(e164Number string) (*NumberInfo, error)
- func (mr *MultiResults) Inflate()
- func (mr *MultiResults) NumbersSuccess() []string
- func (mr *MultiResults) Write(filename string) error
- type NumberInfo
- type Params
Constants ¶
View Source
const (
LookupEndpoint = "https://lookups.twilio.com/v1/PhoneNumbers/"
)
Variables ¶
View Source
var ( EnvTwilioAccountSid = "TWILIO_ACCOUNT_SID" EnvTwilioAuthToken = "TWILIO_AUTH_TOKEN" // #nosec G101 )
View Source
var MultiLimit = 0 // test limit to gracefully exit process early.
Functions ¶
This section is empty.
Types ¶
type Carrier ¶
type Carrier struct { MobileCountryCode string `json:"mobile_country_code,omitempty"` MobileNetworkCode string `json:"mobile_network_code,omitempty"` Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` ErrorCode string `json:"error_code,omitempty"` }
func (*Carrier) Canonical ¶ added in v0.2.0
func (car *Carrier) Canonical() gophonenumbers.CarrierNumberInfo
type MultiResults ¶
type MultiResults struct { CountsByStatusCode map[string]int Responses map[string]*NumberInfo }
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 NewMultiResultsFiles ¶
func NewMultiResultsFiles(dir string, rxPattern string) (MultiResults, error)
func (*MultiResults) AddResponses ¶
func (mr *MultiResults) AddResponses(resps map[string]*NumberInfo)
func (*MultiResults) Canonical ¶ added in v0.2.0
func (mr *MultiResults) Canonical() (gophonenumbers.NumberSet, error)
func (*MultiResults) GetNumberInfo ¶ added in v0.0.2
func (mr *MultiResults) GetNumberInfo(e164Number string) (*NumberInfo, error)
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 NumberInfo ¶
type NumberInfo struct { CallerName map[string]string `json:"caller_name,omitempty"` CountryCode string `json:"country_code,omitempty"` PhoneNumber string `json:"phone_number,omitempty"` NationalFormat string `json:"national_format,omitempty"` URL string `json:"url,omitempty"` Carrier Carrier `json:"carrier,omitempty"` APIResponseInfo httputilmore.ResponseInfo `json:"api_response_info,omitempty"` }
func (*NumberInfo) Canonical ¶ added in v0.2.0
func (num *NumberInfo) Canonical() (gophonenumbers.Number, error)
Click to show internal directories.
Click to hide internal directories.