place

package
v0.951.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	Line1      string `json:"line1"`
	Line2      string `json:"line2"`
	Line3      string `json:"line3"`
	TownOrCity string `json:"town"`
	Postcode   string `json:"postcode"`
	Country    string `json:"country"`
}

func (Address) Encode

func (a Address) Encode() string

func (Address) Lines

func (a Address) Lines() []string

func (Address) String

func (a Address) String() string

type BadRequestError

type BadRequestError struct {
	Statuscode int    `json:"statuscode"`
	Message    string `json:"message"`
}

func (BadRequestError) Error

func (b BadRequestError) Error() string

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(baseUrl, apiKey string, httpClient Doer) *Client

func (*Client) LookupPostcode

func (c *Client) LookupPostcode(ctx context.Context, postcode string) ([]Address, error)

type Doer

type Doer interface {
	Do(*http.Request) (*http.Response, error)
}

type ResultSet

type ResultSet struct {
	AddressDetails addressDetails `json:"DPA"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL