{"modulePath":"github.com/micro/services","version":"v1.6.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package postcode\n\n## Variables\n\n```go\nvar File_proto_postcode_proto protoreflect.FileDescriptor\n```\n\n## Functions\n\n```go\nfunc NewPostcodeEndpoints() []*api.Endpoint\n```\n\n```go\nfunc RegisterPostcodeHandler(s server.Server, hdlr PostcodeHandler, opts ...server.HandlerOption) error\n```\n\n## Types\n\n```go\ntype LookupRequest struct {\n\n\t// UK postcode e.g SW1A 2AA\n\tPostcode string `protobuf:\"bytes,1,opt,name=postcode,proto3\" json:\"postcode,omitempty\"`\n\t// contains filtered or unexported fields\n}\n```\nLookup a postcode to retrieve the related region, county, etc\n\n```go\nfunc (*LookupRequest) Descriptor() ([]byte, []int)\n```\nDeprecated: Use LookupRequest.ProtoReflect.Descriptor instead.\n\n```go\nfunc (x *LookupRequest) GetPostcode() string\n```\n\n```go\nfunc (*LookupRequest) ProtoMessage()\n```\n\n```go\nfunc (x *LookupRequest) ProtoReflect() protoreflect.Message\n```\n\n```go\nfunc (x *LookupRequest) Reset()\n```\n\n```go\nfunc (x *LookupRequest) String() string\n```\n\n```go\ntype LookupResponse struct {\n\n\t// UK postcode e.g SW1A 2AA\n\tPostcode string `protobuf:\"bytes,1,opt,name=postcode,proto3\" json:\"postcode,omitempty\"`\n\t// country e.g United Kingdom\n\tCountry string `protobuf:\"bytes,2,opt,name=country,proto3\" json:\"country,omitempty\"`\n\t// related region e.g London\n\tRegion string `protobuf:\"bytes,3,opt,name=region,proto3\" json:\"region,omitempty\"`\n\t// e.g Westminster\n\tDistrict string `protobuf:\"bytes,4,opt,name=district,proto3\" json:\"district,omitempty\"`\n\t// e.g St James's\n\tWard string `protobuf:\"bytes,5,opt,name=ward,proto3\" json:\"ward,omitempty\"`\n\t// e.g 51.50354\n\tLatitude float64 `protobuf:\"fixed64,6,opt,name=latitude,proto3\" json:\"latitude,omitempty\"`\n\t// e.g -0.127695\n\tLongitude float64 `protobuf:\"fixed64,7,opt,name=longitude,proto3\" json:\"longitude,omitempty\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (*LookupResponse) Descriptor() ([]byte, []int)\n```\nDeprecated: Use LookupResponse.ProtoReflect.Descriptor instead.\n\n```go\nfunc (x *LookupResponse) GetCountry() string\n```\n\n```go\nfunc (x *LookupResponse) GetDistrict() string\n```\n\n```go\nfunc (x *LookupResponse) GetLatitude() float64\n```\n\n```go\nfunc (x *LookupResponse) GetLongitude() float64\n```\n\n```go\nfunc (x *LookupResponse) GetPostcode() string\n```\n\n```go\nfunc (x *LookupResponse) GetRegion() string\n```\n\n```go\nfunc (x *LookupResponse) GetWard() string\n```\n\n```go\nfunc (*LookupResponse) ProtoMessage()\n```\n\n```go\nfunc (x *LookupResponse) ProtoReflect() protoreflect.Message\n```\n\n```go\nfunc (x *LookupResponse) Reset()\n```\n\n```go\nfunc (x *LookupResponse) String() string\n```\n\n```go\ntype PostcodeHandler interface {\n\tLookup(context.Context, *LookupRequest, *LookupResponse) error\n\tRandom(context.Context, *RandomRequest, *RandomResponse) error\n\tValidate(context.Context, *ValidateRequest, *ValidateResponse) error\n}\n```\n\n```go\ntype PostcodeService interface {\n\tLookup(ctx context.Context, in *LookupRequest, opts ...client.CallOption) (*LookupResponse, error)\n\tRandom(ctx context.Context, in *RandomRequest, opts ...client.CallOption) (*RandomResponse, error)\n\tValidate(ctx context.Context, in *ValidateRequest, opts ...client.CallOption) (*ValidateResponse, error)\n}\n```\n\n```go\nfunc NewPostcodeService(name string, c client.Client) PostcodeService\n```\n\n```go\ntype RandomRequest struct {\n\t// contains filtered or unexported fields\n}\n```\nReturn a random postcode and its related info\n\n```go\nfunc (*RandomRequest) Descriptor() ([]byte, []int)\n```\nDeprecated: Use RandomRequest.ProtoReflect.Descriptor instead.\n\n```go\nfunc (*RandomRequest) ProtoMessage()\n```\n\n```go\nfunc (x *RandomRequest) ProtoReflect() protoreflect.Message\n```\n\n```go\nfunc (x *RandomRequest) Reset()\n```\n\n```go\nfunc (x *RandomRequest) String() string\n```\n\n```go\ntype RandomResponse struct {\n\n\t// UK postcode e.g SW1A 2AA\n\tPostcode string `protobuf:\"bytes,1,opt,name=postcode,proto3\" json:\"postcode,omitempty\"`\n\t// country e.g United Kingdom\n\tCountry string `protobuf:\"bytes,2,opt,name=country,proto3\" json:\"country,omitempty\"`\n\t// related region e.g London\n\tRegion string `protobuf:\"bytes,3,opt,name=region,proto3\" json:\"region,omitempty\"`\n\t// e.g Westminster\n\tDistrict string `protobuf:\"bytes,4,opt,name=district,proto3\" json:\"district,omitempty\"`\n\t// e.g St James's\n\tWard string `protobuf:\"bytes,5,opt,name=ward,proto3\" json:\"ward,omitempty\"`\n\t// e.g 51.50354\n\tLatitude float64 `protobuf:\"fixed64,6,opt,name=latitude,proto3\" json:\"latitude,omitempty\"`\n\t// e.g -0.127695\n\tLongitude float64 `protobuf:\"fixed64,7,opt,name=longitude,proto3\" json:\"longitude,omitempty\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (*RandomResponse) Descriptor() ([]byte, []int)\n```\nDeprecated: Use RandomResponse.ProtoReflect.Descriptor instead.\n\n```go\nfunc (x *RandomResponse) GetCountry() string\n```\n\n```go\nfunc (x *RandomResponse) GetDistrict() string\n```\n\n```go\nfunc (x *RandomResponse) GetLatitude() float64\n```\n\n```go\nfunc (x *RandomResponse) GetLongitude() float64\n```\n\n```go\nfunc (x *RandomResponse) GetPostcode() string\n```\n\n```go\nfunc (x *RandomResponse) GetRegion() string\n```\n\n```go\nfunc (x *RandomResponse) GetWard() string\n```\n\n```go\nfunc (*RandomResponse) ProtoMessage()\n```\n\n```go\nfunc (x *RandomResponse) ProtoReflect() protoreflect.Message\n```\n\n```go\nfunc (x *RandomResponse) Reset()\n```\n\n```go\nfunc (x *RandomResponse) String() string\n```\n\n```go\ntype ValidateRequest struct {\n\n\t// UK postcode e.g SW1A 2AA\n\tPostcode string `protobuf:\"bytes,1,opt,name=postcode,proto3\" json:\"postcode,omitempty\"`\n\t// contains filtered or unexported fields\n}\n```\nValidate a postcode. Should return valid: true or valid: false\n\n```go\nfunc (*ValidateRequest) Descriptor() ([]byte, []int)\n```\nDeprecated: Use ValidateRequest.ProtoReflect.Descriptor instead.\n\n```go\nfunc (x *ValidateRequest) GetPostcode() string\n```\n\n```go\nfunc (*ValidateRequest) ProtoMessage()\n```\n\n```go\nfunc (x *ValidateRequest) ProtoReflect() protoreflect.Message\n```\n\n```go\nfunc (x *ValidateRequest) Reset()\n```\n\n```go\nfunc (x *ValidateRequest) String() string\n```\n\n```go\ntype ValidateResponse struct {\n\tValid bool `protobuf:\"varint,1,opt,name=valid,proto3\" json:\"valid,omitempty\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (*ValidateResponse) Descriptor() ([]byte, []int)\n```\nDeprecated: Use ValidateResponse.ProtoReflect.Descriptor instead.\n\n```go\nfunc (x *ValidateResponse) GetValid() bool\n```\n\n```go\nfunc (*ValidateResponse) ProtoMessage()\n```\n\n```go\nfunc (x *ValidateResponse) ProtoReflect() protoreflect.Message\n```\n\n```go\nfunc (x *ValidateResponse) Reset()\n```\n\n```go\nfunc (x *ValidateResponse) String() string\n```\n\n","path":"github.com/micro/services/postcode/proto","name":"postcode","synopsis":"","isRedistributable":true}
