Documentation ¶
Index ¶
- Variables
- func RegisterVehicleServiceServer(s grpc.ServiceRegistrar, srv VehicleServiceServer)
- type NumberRequest
- type Result
- type UnimplementedVehicleServiceServer
- type UnsafeVehicleServiceServer
- type VINRequest
- type Vehicle
- func (*Vehicle) Descriptor() ([]byte, []int)deprecated
- func (x *Vehicle) GetBrand() string
- func (x *Vehicle) GetFirstRegDate() *common.Date
- func (x *Vehicle) GetModel() string
- func (x *Vehicle) GetOperations() []*operation.Record
- func (x *Vehicle) GetRegistrations() []*registration.Record
- func (x *Vehicle) GetVin() string
- func (x *Vehicle) GetYear() int32
- func (*Vehicle) ProtoMessage()
- func (x *Vehicle) ProtoReflect() protoreflect.Message
- func (x *Vehicle) Reset()
- func (x *Vehicle) String() string
- type VehicleServiceClient
- type VehicleServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_proto_core_vehicle_proto protoreflect.FileDescriptor
var VehicleService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "core.VehicleService", HandlerType: (*VehicleServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "FindByNumber", Handler: _VehicleService_FindByNumber_Handler, }, { MethodName: "FindByVIN", Handler: _VehicleService_FindByVIN_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/core/vehicle.proto", }
VehicleService_ServiceDesc is the grpc.ServiceDesc for VehicleService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterVehicleServiceServer ¶
func RegisterVehicleServiceServer(s grpc.ServiceRegistrar, srv VehicleServiceServer)
Types ¶
type NumberRequest ¶ added in v0.0.5
type NumberRequest struct { Number string `protobuf:"bytes,1,opt,name=number,proto3" json:"number,omitempty"` // contains filtered or unexported fields }
func (*NumberRequest) Descriptor
deprecated
added in
v0.0.5
func (*NumberRequest) Descriptor() ([]byte, []int)
Deprecated: Use NumberRequest.ProtoReflect.Descriptor instead.
func (*NumberRequest) GetNumber ¶ added in v0.0.5
func (x *NumberRequest) GetNumber() string
func (*NumberRequest) ProtoMessage ¶ added in v0.0.5
func (*NumberRequest) ProtoMessage()
func (*NumberRequest) ProtoReflect ¶ added in v0.0.5
func (x *NumberRequest) ProtoReflect() protoreflect.Message
func (*NumberRequest) Reset ¶ added in v0.0.5
func (x *NumberRequest) Reset()
func (*NumberRequest) String ¶ added in v0.0.5
func (x *NumberRequest) String() string
type Result ¶ added in v0.0.5
type Result struct { Vehicles []*Vehicle `protobuf:"bytes,1,rep,name=vehicles,proto3" json:"vehicles,omitempty"` // contains filtered or unexported fields }
func (*Result) Descriptor
deprecated
added in
v0.0.5
func (*Result) GetVehicles ¶ added in v0.0.5
func (*Result) ProtoMessage ¶ added in v0.0.5
func (*Result) ProtoMessage()
func (*Result) ProtoReflect ¶ added in v0.0.5
func (x *Result) ProtoReflect() protoreflect.Message
type UnimplementedVehicleServiceServer ¶
type UnimplementedVehicleServiceServer struct { }
UnimplementedVehicleServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedVehicleServiceServer) FindByNumber ¶
func (UnimplementedVehicleServiceServer) FindByNumber(context.Context, *NumberRequest) (*Result, error)
func (UnimplementedVehicleServiceServer) FindByVIN ¶ added in v0.0.5
func (UnimplementedVehicleServiceServer) FindByVIN(context.Context, *VINRequest) (*Result, error)
type UnsafeVehicleServiceServer ¶ added in v0.0.6
type UnsafeVehicleServiceServer interface {
// contains filtered or unexported methods
}
UnsafeVehicleServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to VehicleServiceServer will result in compilation errors.
type VINRequest ¶ added in v0.0.5
type VINRequest struct { Vin string `protobuf:"bytes,1,opt,name=vin,proto3" json:"vin,omitempty"` // contains filtered or unexported fields }
func (*VINRequest) Descriptor
deprecated
added in
v0.0.5
func (*VINRequest) Descriptor() ([]byte, []int)
Deprecated: Use VINRequest.ProtoReflect.Descriptor instead.
func (*VINRequest) GetVin ¶ added in v0.0.5
func (x *VINRequest) GetVin() string
func (*VINRequest) ProtoMessage ¶ added in v0.0.5
func (*VINRequest) ProtoMessage()
func (*VINRequest) ProtoReflect ¶ added in v0.0.5
func (x *VINRequest) ProtoReflect() protoreflect.Message
func (*VINRequest) Reset ¶ added in v0.0.5
func (x *VINRequest) Reset()
func (*VINRequest) String ¶ added in v0.0.5
func (x *VINRequest) String() string
type Vehicle ¶
type Vehicle struct { Vin string `protobuf:"bytes,1,opt,name=vin,proto3" json:"vin,omitempty"` FirstRegDate *common.Date `protobuf:"bytes,2,opt,name=first_reg_date,json=firstRegDate,proto3" json:"first_reg_date,omitempty"` Brand string `protobuf:"bytes,3,opt,name=brand,proto3" json:"brand,omitempty"` Model string `protobuf:"bytes,4,opt,name=model,proto3" json:"model,omitempty"` Year int32 `protobuf:"varint,5,opt,name=year,proto3" json:"year,omitempty"` Registrations []*registration.Record `protobuf:"bytes,6,rep,name=registrations,proto3" json:"registrations,omitempty"` Operations []*operation.Record `protobuf:"bytes,7,rep,name=operations,proto3" json:"operations,omitempty"` // contains filtered or unexported fields }
func (*Vehicle) Descriptor
deprecated
func (*Vehicle) GetFirstRegDate ¶ added in v0.0.5
func (*Vehicle) GetOperations ¶ added in v0.0.5
func (*Vehicle) GetRegistrations ¶ added in v0.0.5
func (x *Vehicle) GetRegistrations() []*registration.Record
func (*Vehicle) ProtoMessage ¶
func (*Vehicle) ProtoMessage()
func (*Vehicle) ProtoReflect ¶
func (x *Vehicle) ProtoReflect() protoreflect.Message
type VehicleServiceClient ¶
type VehicleServiceClient interface { FindByNumber(ctx context.Context, in *NumberRequest, opts ...grpc.CallOption) (*Result, error) FindByVIN(ctx context.Context, in *VINRequest, opts ...grpc.CallOption) (*Result, error) }
VehicleServiceClient is the client API for VehicleService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewVehicleServiceClient ¶
func NewVehicleServiceClient(cc grpc.ClientConnInterface) VehicleServiceClient
type VehicleServiceServer ¶
type VehicleServiceServer interface { FindByNumber(context.Context, *NumberRequest) (*Result, error) FindByVIN(context.Context, *VINRequest) (*Result, error) // contains filtered or unexported methods }
VehicleServiceServer is the server API for VehicleService service. All implementations must embed UnimplementedVehicleServiceServer for forward compatibility