Documentation
¶
Index ¶
- Variables
- func NewAddressEndpoints() []*api.Endpoint
- func RegisterAddressHandler(s server.Server, hdlr AddressHandler, opts ...server.HandlerOption) error
- type AddressHandler
- type AddressService
- type LookupPostcodeRequest
- func (*LookupPostcodeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LookupPostcodeRequest) GetPostcode() string
- func (*LookupPostcodeRequest) ProtoMessage()
- func (x *LookupPostcodeRequest) ProtoReflect() protoreflect.Message
- func (x *LookupPostcodeRequest) Reset()
- func (x *LookupPostcodeRequest) String() string
- type LookupPostcodeResponse
- func (*LookupPostcodeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *LookupPostcodeResponse) GetAddresses() []*Record
- func (*LookupPostcodeResponse) ProtoMessage()
- func (x *LookupPostcodeResponse) ProtoReflect() protoreflect.Message
- func (x *LookupPostcodeResponse) Reset()
- func (x *LookupPostcodeResponse) String() string
- type Record
- func (*Record) Descriptor() ([]byte, []int)deprecated
- func (x *Record) GetBuildingName() string
- func (x *Record) GetCounty() string
- func (x *Record) GetLineOne() string
- func (x *Record) GetLineTwo() string
- func (x *Record) GetLocality() string
- func (x *Record) GetOrganisation() string
- func (x *Record) GetPostcode() string
- func (x *Record) GetPremise() string
- func (x *Record) GetStreet() string
- func (x *Record) GetSummary() string
- func (x *Record) GetTown() string
- func (*Record) ProtoMessage()
- func (x *Record) ProtoReflect() protoreflect.Message
- func (x *Record) Reset()
- func (x *Record) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_proto_address_proto protoreflect.FileDescriptor
Functions ¶
func NewAddressEndpoints ¶
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) GetBuildingName ¶
func (*Record) GetLineOne ¶
func (*Record) GetLineTwo ¶
func (*Record) GetLocality ¶
func (*Record) GetOrganisation ¶
func (*Record) GetPostcode ¶
func (*Record) GetPremise ¶
func (*Record) GetSummary ¶
func (*Record) ProtoMessage ¶
func (*Record) ProtoMessage()
func (*Record) ProtoReflect ¶
func (x *Record) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.