Documentation ¶
Index ¶
- Variables
- func RegisterVehicleServer(s grpc.ServiceRegistrar, srv VehicleServer)
- type NewReply
- type NewRequest
- func (*NewRequest) Descriptor() ([]byte, []int)deprecated
- func (x *NewRequest) GetConfig() map[string]string
- func (x *NewRequest) GetToken() string
- func (x *NewRequest) GetType() string
- func (*NewRequest) ProtoMessage()
- func (x *NewRequest) ProtoReflect() protoreflect.Message
- func (x *NewRequest) Reset()
- func (x *NewRequest) String() string
- type SoCReply
- type SoCRequest
- type UnimplementedVehicleServer
- type UnsafeVehicleServer
- type VehicleClient
- type VehicleServer
Constants ¶
This section is empty.
Variables ¶
var File_proto_vehicle_proto protoreflect.FileDescriptor
var Vehicle_ServiceDesc = grpc.ServiceDesc{ ServiceName: "Vehicle", HandlerType: (*VehicleServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "New", Handler: _Vehicle_New_Handler, }, { MethodName: "SoC", Handler: _Vehicle_SoC_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/vehicle.proto", }
Vehicle_ServiceDesc is the grpc.ServiceDesc for Vehicle service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterVehicleServer ¶
func RegisterVehicleServer(s grpc.ServiceRegistrar, srv VehicleServer)
Types ¶
type NewReply ¶
type NewReply struct { VehicleId int64 `protobuf:"varint,1,opt,name=vehicle_id,json=vehicleId,proto3" json:"vehicle_id,omitempty"` // contains filtered or unexported fields }
func (*NewReply) Descriptor
deprecated
func (*NewReply) GetVehicleId ¶
func (*NewReply) ProtoMessage ¶
func (*NewReply) ProtoMessage()
func (*NewReply) ProtoReflect ¶
func (x *NewReply) ProtoReflect() protoreflect.Message
type NewRequest ¶
type NewRequest struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` Config map[string]string `` /* 153-byte string literal not displayed */ // contains filtered or unexported fields }
func (*NewRequest) Descriptor
deprecated
func (*NewRequest) Descriptor() ([]byte, []int)
Deprecated: Use NewRequest.ProtoReflect.Descriptor instead.
func (*NewRequest) GetConfig ¶
func (x *NewRequest) GetConfig() map[string]string
func (*NewRequest) GetToken ¶
func (x *NewRequest) GetToken() string
func (*NewRequest) GetType ¶
func (x *NewRequest) GetType() string
func (*NewRequest) ProtoMessage ¶
func (*NewRequest) ProtoMessage()
func (*NewRequest) ProtoReflect ¶
func (x *NewRequest) ProtoReflect() protoreflect.Message
func (*NewRequest) Reset ¶
func (x *NewRequest) Reset()
func (*NewRequest) String ¶
func (x *NewRequest) String() string
type SoCReply ¶
type SoCReply struct { Soc float64 `protobuf:"fixed64,1,opt,name=soc,proto3" json:"soc,omitempty"` // contains filtered or unexported fields }
func (*SoCReply) Descriptor
deprecated
func (*SoCReply) ProtoMessage ¶
func (*SoCReply) ProtoMessage()
func (*SoCReply) ProtoReflect ¶
func (x *SoCReply) ProtoReflect() protoreflect.Message
type SoCRequest ¶
type SoCRequest struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` VehicleId int64 `protobuf:"varint,2,opt,name=vehicle_id,json=vehicleId,proto3" json:"vehicle_id,omitempty"` // contains filtered or unexported fields }
func (*SoCRequest) Descriptor
deprecated
func (*SoCRequest) Descriptor() ([]byte, []int)
Deprecated: Use SoCRequest.ProtoReflect.Descriptor instead.
func (*SoCRequest) GetToken ¶
func (x *SoCRequest) GetToken() string
func (*SoCRequest) GetVehicleId ¶
func (x *SoCRequest) GetVehicleId() int64
func (*SoCRequest) ProtoMessage ¶
func (*SoCRequest) ProtoMessage()
func (*SoCRequest) ProtoReflect ¶
func (x *SoCRequest) ProtoReflect() protoreflect.Message
func (*SoCRequest) Reset ¶
func (x *SoCRequest) Reset()
func (*SoCRequest) String ¶
func (x *SoCRequest) String() string
type UnimplementedVehicleServer ¶
type UnimplementedVehicleServer struct { }
UnimplementedVehicleServer must be embedded to have forward compatible implementations.
func (UnimplementedVehicleServer) New ¶
func (UnimplementedVehicleServer) New(context.Context, *NewRequest) (*NewReply, error)
func (UnimplementedVehicleServer) SoC ¶
func (UnimplementedVehicleServer) SoC(context.Context, *SoCRequest) (*SoCReply, error)
type UnsafeVehicleServer ¶
type UnsafeVehicleServer interface {
// contains filtered or unexported methods
}
UnsafeVehicleServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to VehicleServer will result in compilation errors.
type VehicleClient ¶
type VehicleClient interface { New(ctx context.Context, in *NewRequest, opts ...grpc.CallOption) (*NewReply, error) SoC(ctx context.Context, in *SoCRequest, opts ...grpc.CallOption) (*SoCReply, error) }
VehicleClient is the client API for Vehicle 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 NewVehicleClient ¶
func NewVehicleClient(cc grpc.ClientConnInterface) VehicleClient
type VehicleServer ¶
type VehicleServer interface { New(context.Context, *NewRequest) (*NewReply, error) SoC(context.Context, *SoCRequest) (*SoCReply, error) // contains filtered or unexported methods }
VehicleServer is the server API for Vehicle service. All implementations must embed UnimplementedVehicleServer for forward compatibility