Documentation
¶
Index ¶
Constants ¶
View Source
const SourceHMTreasury = "HM TREASURY"
Variables ¶
View Source
var SearchRequestDOBFormat = regexp.MustCompile(`^\d{4}(?:-\d{2}-\d{2}$)?`)
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { *jsonclient.Client // contains filtered or unexported fields }
func (*Client) Search ¶
func (c *Client) Search(ctx context.Context, req *SearchRequest) (res *SearchResponse, err error)
Search queries the API with options for Name, Sources and Date of Birth
type SearchRequest ¶
func (SearchRequest) URLValues ¶
func (r SearchRequest) URLValues() url.Values
type SearchResponse ¶
type SearchResponse struct { Count int `json:"count"` Next *string `json:"next"` Previous *string `json:"previous"` Results []*SearchResponseResult `json:"results"` }
func (*SearchResponse) HasMatches ¶
func (r *SearchResponse) HasMatches() bool
type SearchResponseResult ¶
type SearchResponseResult struct { Name string `json:"name" bson:"name"` Source string `json:"source" bson:"source"` EntityNumber int `json:"entity_number" bson:"entity_number"` Type string `json:"type" bson:"type"` StartDate string `json:"start_date" bson:"start_date"` Addresses []string `json:"addresses,omitempty" bson:"addresses,omitempty"` Remarks *string `json:"remarks,omitempty" bson:"remarks,omitempty"` Nationalities []string `json:"nationalities,omitempty" bson:"nationalities,omitempty"` DatesOfBirth []string `json:"dates_of_birth,omitempty" bson:"dates_of_birth,omitempty"` PlacesOfBirth []string `json:"places_of_birth,omitempty" bson:"places_of_birth,omitempty"` Regime *string `json:"regime,omitempty" bson:"regime,omitempty"` NINumbers []string `json:"ni_numbers,omitempty" bson:"ni_numbers,omitempty"` }
Click to show internal directories.
Click to hide internal directories.