Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var TestEmails = map[string]string{
"0123456": "info+test@martinisecurity.com",
"0123111": "denis@martinisecurity.com",
"0123222": "ryan+test@martinisecurity.com",
"0123333": "hayk.baluyan@gmail.com",
"0123013": "mihail@peculiarventures.com",
"0123014": "sergey.diachenco@peculiarventures.com",
"0123015": "ilya@peculiarventures.com",
}
TestEmails specifies mapping for test FRN
var TestIDs = map[uint64]bool{ 123456: true, 123111: true, 123222: true, 123333: true, 123013: true, 123014: true, 123015: true, }
TestIDs specifies IDs for testing
Functions ¶
func CanonicalString ¶
CanonicalString returns canonical string value with extra \n and \t removed
Types ¶
type APIClient ¶
type APIClient interface { GetFiler499Results(filerID string) (*Filer499Results, error) GetContactResults(frn string) (*ContactResults, error) }
APIClient for FCC related API calls
type AgentForServiceOfProcess ¶
type AgentForServiceOfProcess struct { XMLName xml.Name `xml:"Agent_for_Service_Of_Process"` DCAgent string `xml:"dc_agent"` DCAgentTelephone string `xml:"dc_agent_telephone"` DCAgentFax string `xml:"dc_agent_fax"` DCAgentEmail string `xml:"dc_agent_email"` DCAgentAddress DCAgentAddress `xml:"dc_agent_address"` }
AgentForServiceOfProcess struct
type ContactResults ¶
type ContactResults struct { FRN string `json:"frn"` RegistrationDate string `json:"registration_date"` LastUpdated string `json:"last_updated"` BusinessName string `json:"business_name"` BusinessType string `json:"business_type"` ContactOrganization string `json:"contact_organization"` ContactPosition string `json:"contact_position"` ContactName string `json:"contact_name"` ContactAddress string `json:"contact_address"` ContactEmail string `json:"contact_email"` ContactPhone string `json:"contact_phone"` ContactFax string `json:"contact_fax"` }
ContactResults struct
func ParseContactDataFromHTML ¶
func ParseContactDataFromHTML(b []byte) (*ContactResults, error)
ParseContactDataFromHTML parses data from HTML returned by https://apps.fcc.gov/coresWeb/searchDetail.do?frn=<fnr>
type CustomerInquiriesAdress ¶
type CustomerInquiriesAdress struct { XMLName xml.Name `xml:"customer_inquiries_address"` AddressLine string `xml:"address_line"` City string `xml:"city"` State string `xml:"state"` ZipCode string `xml:"zip_code"` }
CustomerInquiriesAdress struct
type DCAgentAddress ¶
type DCAgentAddress struct { XMLName xml.Name `xml:"dc_agent_address"` AddressLines []string `xml:"address_line"` City string `xml:"city"` State string `xml:"state"` ZipCode string `xml:"zip_code"` }
DCAgentAddress struct
type FCDate ¶
FCDate struct is custom implementation of date to be able to parse yyyy-mm-dd formal FCC API returns dates in yyyy-mm-dd format that default golang XML decoder does not recognize
func (*FCDate) UnmarshalXML ¶
UnmarshalXML is needed to support unmarshalling for custom date formats
type Filer ¶
type Filer struct { XMLName xml.Name `xml:"Filer"` Form499ID string `xml:"Form_499_ID"` FilerIDInfo FilerIDInfo `xml:"Filer_ID_Info"` AgentForServiceOfProcess AgentForServiceOfProcess `xml:"Agent_for_Service_Of_Process"` FCCRegistrationInformation RegistrationInformation `xml:"FCC_Registration_information"` JurisdictionStates []string `xml:"jurisdiction_state"` }
Filer struct
type Filer499Results ¶
type Filer499Results struct { XMLName xml.Name `xml:"Filer499QueryResults"` Filers []Filer `xml:"Filer"` }
Filer499Results struct
func ParseFilerDataFromXML ¶
func ParseFilerDataFromXML(b []byte) (*Filer499Results, error)
ParseFilerDataFromXML parses data from XML returned by https://apps.fcc.gov/cgb/form499/499results.cfm?FilerID=<fillerID>&XML=TRUE&operational=1
type FilerIDInfo ¶
type FilerIDInfo struct { XMLName xml.Name `xml:"Filer_ID_Info"` RegistrationCurrentAsOf FCDate `xml:"Registration_Current_as_of"` StartDate FCDate `xml:"start_date"` USFContributor string `xml:"USF_Contributor"` LegalName string `xml:"Legal_Name"` PrincipalCommunicationsType string `xml:"Principal_Communications_Type"` HoldingCompany string `xml:"holding_company"` FRN string `xml:"FRN"` HQAddress HQAdress `xml:"hq_address"` CustomerInquiriesAdress CustomerInquiriesAdress `xml:"customer_inquiries_address"` CustomerInquiriesTelephone string `xml:"Customer_Inquiries_telephone"` OtherTradeNames []string `xml:"other_trade_name"` }
FilerIDInfo struct
type HQAdress ¶
type HQAdress struct { XMLName xml.Name `xml:"hq_address"` AddressLine string `xml:"address_line"` City string `xml:"city"` State string `xml:"state"` ZipCode string `xml:"zip_code"` }
HQAdress struct
type RegistrationInformation ¶
type RegistrationInformation struct { XMLName xml.Name `xml:"FCC_Registration_information"` ChiefExecutiveOfficer string `xml:"Chief_Executive_Officer"` ChairmanOrSeniorOfficer string `xml:"Chairman_or_Senior_Officer"` PresidentOrSeniorOfficer string `xml:"President_or_Senior_Officer"` }
RegistrationInformation struct