address

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_address_proto protoreflect.FileDescriptor

Functions

func NewAddressEndpoints

func NewAddressEndpoints() []*api.Endpoint

func RegisterAddressHandler

func RegisterAddressHandler(s server.Server, hdlr AddressHandler, opts ...server.HandlerOption) error

Types

type AddressHandler

type AddressHandler interface {
	LookupPostcode(context.Context, *LookupPostcodeRequest, *LookupPostcodeResponse) error
}

type AddressService

type AddressService interface {
	LookupPostcode(ctx context.Context, in *LookupPostcodeRequest, opts ...client.CallOption) (*LookupPostcodeResponse, error)
}

func NewAddressService

func NewAddressService(name string, c client.Client) AddressService

type LookupPostcodeRequest

type LookupPostcodeRequest struct {

	// UK postcode e.g SW1A 2AA
	Postcode string `protobuf:"bytes,1,opt,name=postcode,proto3" json:"postcode,omitempty"`
	// contains filtered or unexported fields
}

Lookup a list of UK addresses by postcode

func (*LookupPostcodeRequest) Descriptor deprecated

func (*LookupPostcodeRequest) Descriptor() ([]byte, []int)

Deprecated: Use LookupPostcodeRequest.ProtoReflect.Descriptor instead.

func (*LookupPostcodeRequest) GetPostcode

func (x *LookupPostcodeRequest) GetPostcode() string

func (*LookupPostcodeRequest) ProtoMessage

func (*LookupPostcodeRequest) ProtoMessage()

func (*LookupPostcodeRequest) ProtoReflect

func (x *LookupPostcodeRequest) ProtoReflect() protoreflect.Message

func (*LookupPostcodeRequest) Reset

func (x *LookupPostcodeRequest) Reset()

func (*LookupPostcodeRequest) String

func (x *LookupPostcodeRequest) String() string

type LookupPostcodeResponse

type LookupPostcodeResponse struct {
	Addresses []*Record `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"`
	// contains filtered or unexported fields
}

func (*LookupPostcodeResponse) Descriptor deprecated

func (*LookupPostcodeResponse) Descriptor() ([]byte, []int)

Deprecated: Use LookupPostcodeResponse.ProtoReflect.Descriptor instead.

func (*LookupPostcodeResponse) GetAddresses

func (x *LookupPostcodeResponse) GetAddresses() []*Record

func (*LookupPostcodeResponse) ProtoMessage

func (*LookupPostcodeResponse) ProtoMessage()

func (*LookupPostcodeResponse) ProtoReflect

func (x *LookupPostcodeResponse) ProtoReflect() protoreflect.Message

func (*LookupPostcodeResponse) Reset

func (x *LookupPostcodeResponse) Reset()

func (*LookupPostcodeResponse) String

func (x *LookupPostcodeResponse) String() string

type Record

type Record struct {

	// line one of address
	LineOne string `protobuf:"bytes,1,opt,name=line_one,json=lineOne,proto3" json:"line_one,omitempty"`
	// line two of address
	LineTwo string `protobuf:"bytes,2,opt,name=line_two,json=lineTwo,proto3" json:"line_two,omitempty"`
	// the complete address
	Summary string `protobuf:"bytes,3,opt,name=summary,proto3" json:"summary,omitempty"`
	// organisation if present
	Organisation string `protobuf:"bytes,4,opt,name=organisation,proto3" json:"organisation,omitempty"`
	// build name
	BuildingName string `protobuf:"bytes,5,opt,name=building_name,json=buildingName,proto3" json:"building_name,omitempty"`
	// the premise
	Premise string `protobuf:"bytes,6,opt,name=premise,proto3" json:"premise,omitempty"`
	// street name
	Street string `protobuf:"bytes,7,opt,name=street,proto3" json:"street,omitempty"`
	// dependent locality
	Locality string `protobuf:"bytes,8,opt,name=locality,proto3" json:"locality,omitempty"`
	// post town
	Town string `protobuf:"bytes,9,opt,name=town,proto3" json:"town,omitempty"`
	// the county
	County string `protobuf:"bytes,10,opt,name=county,proto3" json:"county,omitempty"`
	// the postcode
	Postcode string `protobuf:"bytes,11,opt,name=postcode,proto3" json:"postcode,omitempty"`
	// contains filtered or unexported fields
}

func (*Record) Descriptor deprecated

func (*Record) Descriptor() ([]byte, []int)

Deprecated: Use Record.ProtoReflect.Descriptor instead.

func (*Record) GetBuildingName

func (x *Record) GetBuildingName() string

func (*Record) GetCounty

func (x *Record) GetCounty() string

func (*Record) GetLineOne

func (x *Record) GetLineOne() string

func (*Record) GetLineTwo

func (x *Record) GetLineTwo() string

func (*Record) GetLocality

func (x *Record) GetLocality() string

func (*Record) GetOrganisation

func (x *Record) GetOrganisation() string

func (*Record) GetPostcode

func (x *Record) GetPostcode() string

func (*Record) GetPremise

func (x *Record) GetPremise() string

func (*Record) GetStreet

func (x *Record) GetStreet() string

func (*Record) GetSummary

func (x *Record) GetSummary() string

func (*Record) GetTown

func (x *Record) GetTown() string

func (*Record) ProtoMessage

func (*Record) ProtoMessage()

func (*Record) ProtoReflect

func (x *Record) ProtoReflect() protoreflect.Message

func (*Record) Reset

func (x *Record) Reset()

func (*Record) String

func (x *Record) String() string

Jump to

Keyboard shortcuts

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