Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterAvlDataStoreServer(s grpc.ServiceRegistrar, srv AvlDataStoreServer)
- func RegisterAvlReceiverServiceServer(s grpc.ServiceRegistrar, srv AvlReceiverServiceServer)
- type AvlDataStoreClient
- type AvlDataStoreServer
- type AvlReceiverServiceClient
- type AvlReceiverServiceServer
- type CustomAvlDataStoreClient
- func (c CustomAvlDataStoreClient) FetchDeviceModel(ctx context.Context, in *types.FetchDeviceModelRequest, ...) (*FetchDeviceModelResponse, error)
- func (c CustomAvlDataStoreClient) SaveDeviceResponse(ctx context.Context, in *types.DeviceResponse, opts ...grpc.CallOption) (*emptypb.Empty, error)
- func (c CustomAvlDataStoreClient) SaveDeviceStatus(ctx context.Context, in *types.DeviceStatus, opts ...grpc.CallOption) (*emptypb.Empty, error)
- func (c CustomAvlDataStoreClient) VerifyDevice(ctx context.Context, in *VerifyDeviceRequest, opts ...grpc.CallOption) (*VerifyDeviceReply, error)
- type FetchDeviceModelRequest
- func (*FetchDeviceModelRequest) Descriptor() ([]byte, []int)deprecated
- func (x *FetchDeviceModelRequest) GetImei() string
- func (*FetchDeviceModelRequest) ProtoMessage()
- func (x *FetchDeviceModelRequest) ProtoReflect() protoreflect.Message
- func (x *FetchDeviceModelRequest) Reset()
- func (x *FetchDeviceModelRequest) String() string
- type FetchDeviceModelResponse
- func (*FetchDeviceModelResponse) Descriptor() ([]byte, []int)deprecated
- func (x *FetchDeviceModelResponse) GetModel() string
- func (*FetchDeviceModelResponse) ProtoMessage()
- func (x *FetchDeviceModelResponse) ProtoReflect() protoreflect.Message
- func (x *FetchDeviceModelResponse) Reset()
- func (x *FetchDeviceModelResponse) String() string
- type JsonLinesStore
- type RemoteRpcStore
- type SendCommandRequestAVL
- func (*SendCommandRequestAVL) Descriptor() ([]byte, []int)deprecated
- func (x *SendCommandRequestAVL) GetCommand() string
- func (x *SendCommandRequestAVL) GetImei() string
- func (*SendCommandRequestAVL) ProtoMessage()
- func (x *SendCommandRequestAVL) ProtoReflect() protoreflect.Message
- func (x *SendCommandRequestAVL) Reset()
- func (x *SendCommandRequestAVL) String() string
- type SendCommandResponseAVL
- func (*SendCommandResponseAVL) Descriptor() ([]byte, []int)deprecated
- func (x *SendCommandResponseAVL) GetMessage() string
- func (x *SendCommandResponseAVL) GetSuccess() bool
- func (*SendCommandResponseAVL) ProtoMessage()
- func (x *SendCommandResponseAVL) ProtoReflect() protoreflect.Message
- func (x *SendCommandResponseAVL) Reset()
- func (x *SendCommandResponseAVL) String() string
- type Store
- type UnimplementedAvlDataStoreServer
- func (UnimplementedAvlDataStoreServer) FetchDeviceModel(context.Context, *FetchDeviceModelRequest) (*FetchDeviceModelResponse, error)
- func (UnimplementedAvlDataStoreServer) SaveDeviceStatus(context.Context, *types.DeviceStatus) (*emptypb.Empty, error)
- func (UnimplementedAvlDataStoreServer) SavedeviceResponse(context.Context, *types.DeviceResponse) (*emptypb.Empty, error)
- func (UnimplementedAvlDataStoreServer) VerifyDevice(context.Context, *VerifyDeviceRequest) (*VerifyDeviceReply, error)
- type UnimplementedAvlReceiverServiceServer
- type UnsafeAvlDataStoreServer
- type UnsafeAvlReceiverServiceServer
- type VerifyDeviceReply
- func (*VerifyDeviceReply) Descriptor() ([]byte, []int)deprecated
- func (x *VerifyDeviceReply) GetDeviceType() types.DeviceType
- func (x *VerifyDeviceReply) GetImei() string
- func (*VerifyDeviceReply) ProtoMessage()
- func (x *VerifyDeviceReply) ProtoReflect() protoreflect.Message
- func (x *VerifyDeviceReply) Reset()
- func (x *VerifyDeviceReply) String() string
- type VerifyDeviceRequest
- func (*VerifyDeviceRequest) Descriptor() ([]byte, []int)deprecated
- func (x *VerifyDeviceRequest) GetImei() string
- func (*VerifyDeviceRequest) ProtoMessage()
- func (x *VerifyDeviceRequest) ProtoReflect() protoreflect.Message
- func (x *VerifyDeviceRequest) Reset()
- func (x *VerifyDeviceRequest) String() string
Constants ¶
const ( AvlDataStore_VerifyDevice_FullMethodName = "/store.AvlDataStore/VerifyDevice" AvlDataStore_SaveDeviceStatus_FullMethodName = "/store.AvlDataStore/SaveDeviceStatus" AvlDataStore_SavedeviceResponse_FullMethodName = "/store.AvlDataStore/SavedeviceResponse" AvlDataStore_FetchDeviceModel_FullMethodName = "/store.AvlDataStore/FetchDeviceModel" )
const (
AvlReceiverService_SendCommand_FullMethodName = "/store.AvlReceiverService/SendCommand"
)
Variables ¶
var AvlDataStore_ServiceDesc = grpc.ServiceDesc{ ServiceName: "store.AvlDataStore", HandlerType: (*AvlDataStoreServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "VerifyDevice", Handler: _AvlDataStore_VerifyDevice_Handler, }, { MethodName: "SaveDeviceStatus", Handler: _AvlDataStore_SaveDeviceStatus_Handler, }, { MethodName: "SavedeviceResponse", Handler: _AvlDataStore_SavedeviceResponse_Handler, }, { MethodName: "FetchDeviceModel", Handler: _AvlDataStore_FetchDeviceModel_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "avl-data-store.proto", }
AvlDataStore_ServiceDesc is the grpc.ServiceDesc for AvlDataStore service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var AvlReceiverService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "store.AvlReceiverService", HandlerType: (*AvlReceiverServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SendCommand", Handler: _AvlReceiverService_SendCommand_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "avl-service.proto", }
AvlReceiverService_ServiceDesc is the grpc.ServiceDesc for AvlReceiverService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_avl_data_store_proto protoreflect.FileDescriptor
var File_avl_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAvlDataStoreServer ¶
func RegisterAvlDataStoreServer(s grpc.ServiceRegistrar, srv AvlDataStoreServer)
func RegisterAvlReceiverServiceServer ¶
func RegisterAvlReceiverServiceServer(s grpc.ServiceRegistrar, srv AvlReceiverServiceServer)
Types ¶
type AvlDataStoreClient ¶
type AvlDataStoreClient interface { VerifyDevice(ctx context.Context, in *VerifyDeviceRequest, opts ...grpc.CallOption) (*VerifyDeviceReply, error) SaveDeviceStatus(ctx context.Context, in *types.DeviceStatus, opts ...grpc.CallOption) (*emptypb.Empty, error) SavedeviceResponse(ctx context.Context, in *types.DeviceResponse, opts ...grpc.CallOption) (*emptypb.Empty, error) FetchDeviceModel(ctx context.Context, in *FetchDeviceModelRequest, opts ...grpc.CallOption) (*FetchDeviceModelResponse, error) }
AvlDataStoreClient is the client API for AvlDataStore 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 NewAvlDataStoreClient ¶
func NewAvlDataStoreClient(cc grpc.ClientConnInterface) AvlDataStoreClient
type AvlDataStoreServer ¶
type AvlDataStoreServer interface { VerifyDevice(context.Context, *VerifyDeviceRequest) (*VerifyDeviceReply, error) SaveDeviceStatus(context.Context, *types.DeviceStatus) (*emptypb.Empty, error) SavedeviceResponse(context.Context, *types.DeviceResponse) (*emptypb.Empty, error) FetchDeviceModel(context.Context, *FetchDeviceModelRequest) (*FetchDeviceModelResponse, error) // contains filtered or unexported methods }
AvlDataStoreServer is the server API for AvlDataStore service. All implementations must embed UnimplementedAvlDataStoreServer for forward compatibility.
type AvlReceiverServiceClient ¶
type AvlReceiverServiceClient interface {
SendCommand(ctx context.Context, in *SendCommandRequestAVL, opts ...grpc.CallOption) (*SendCommandResponseAVL, error)
}
AvlReceiverServiceClient is the client API for AvlReceiverService 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 NewAvlReceiverServiceClient ¶
func NewAvlReceiverServiceClient(cc grpc.ClientConnInterface) AvlReceiverServiceClient
type AvlReceiverServiceServer ¶
type AvlReceiverServiceServer interface { SendCommand(context.Context, *SendCommandRequestAVL) (*SendCommandResponseAVL, error) // contains filtered or unexported methods }
AvlReceiverServiceServer is the server API for AvlReceiverService service. All implementations must embed UnimplementedAvlReceiverServiceServer for forward compatibility.
type CustomAvlDataStoreClient ¶
type CustomAvlDataStoreClient struct {
// contains filtered or unexported fields
}
func NewCustomAvlDataStoreClient ¶
func NewCustomAvlDataStoreClient(cc grpc.ClientConnInterface) *CustomAvlDataStoreClient
func (CustomAvlDataStoreClient) FetchDeviceModel ¶
func (c CustomAvlDataStoreClient) FetchDeviceModel(ctx context.Context, in *types.FetchDeviceModelRequest, opts ...grpc.CallOption) (*FetchDeviceModelResponse, error)
func (CustomAvlDataStoreClient) SaveDeviceResponse ¶
func (c CustomAvlDataStoreClient) SaveDeviceResponse(ctx context.Context, in *types.DeviceResponse, opts ...grpc.CallOption) (*emptypb.Empty, error)
func (CustomAvlDataStoreClient) SaveDeviceStatus ¶
func (c CustomAvlDataStoreClient) SaveDeviceStatus(ctx context.Context, in *types.DeviceStatus, opts ...grpc.CallOption) (*emptypb.Empty, error)
func (CustomAvlDataStoreClient) VerifyDevice ¶
func (c CustomAvlDataStoreClient) VerifyDevice(ctx context.Context, in *VerifyDeviceRequest, opts ...grpc.CallOption) (*VerifyDeviceReply, error)
type FetchDeviceModelRequest ¶
type FetchDeviceModelRequest struct { Imei string `protobuf:"bytes,1,opt,name=imei,proto3" json:"imei,omitempty"` // contains filtered or unexported fields }
func (*FetchDeviceModelRequest) Descriptor
deprecated
func (*FetchDeviceModelRequest) Descriptor() ([]byte, []int)
Deprecated: Use FetchDeviceModelRequest.ProtoReflect.Descriptor instead.
func (*FetchDeviceModelRequest) GetImei ¶
func (x *FetchDeviceModelRequest) GetImei() string
func (*FetchDeviceModelRequest) ProtoMessage ¶
func (*FetchDeviceModelRequest) ProtoMessage()
func (*FetchDeviceModelRequest) ProtoReflect ¶
func (x *FetchDeviceModelRequest) ProtoReflect() protoreflect.Message
func (*FetchDeviceModelRequest) Reset ¶
func (x *FetchDeviceModelRequest) Reset()
func (*FetchDeviceModelRequest) String ¶
func (x *FetchDeviceModelRequest) String() string
type FetchDeviceModelResponse ¶
type FetchDeviceModelResponse struct { Model string `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"` // contains filtered or unexported fields }
func (*FetchDeviceModelResponse) Descriptor
deprecated
func (*FetchDeviceModelResponse) Descriptor() ([]byte, []int)
Deprecated: Use FetchDeviceModelResponse.ProtoReflect.Descriptor instead.
func (*FetchDeviceModelResponse) GetModel ¶
func (x *FetchDeviceModelResponse) GetModel() string
func (*FetchDeviceModelResponse) ProtoMessage ¶
func (*FetchDeviceModelResponse) ProtoMessage()
func (*FetchDeviceModelResponse) ProtoReflect ¶
func (x *FetchDeviceModelResponse) ProtoReflect() protoreflect.Message
func (*FetchDeviceModelResponse) Reset ¶
func (x *FetchDeviceModelResponse) Reset()
func (*FetchDeviceModelResponse) String ¶
func (x *FetchDeviceModelResponse) String() string
type JsonLinesStore ¶
type JsonLinesStore struct { File *os.File ProcessChan chan types.DeviceStatus ResponseChan chan types.DeviceResponse CloseChan chan bool DeviceID string }
func (*JsonLinesStore) GetCloseChan ¶
func (s *JsonLinesStore) GetCloseChan() chan bool
func (*JsonLinesStore) GetProcessChan ¶
func (s *JsonLinesStore) GetProcessChan() chan types.DeviceStatus
func (*JsonLinesStore) GetResponseChan ¶
func (s *JsonLinesStore) GetResponseChan() chan types.DeviceResponse
func (*JsonLinesStore) Process ¶
func (s *JsonLinesStore) Process()
func (*JsonLinesStore) Response ¶
func (s *JsonLinesStore) Response()
type RemoteRpcStore ¶
type RemoteRpcStore struct { ProcessChan chan types.DeviceStatus // TODO: change to a more specific type ResponseChan chan types.DeviceResponse CloseChan chan bool RemoteStoreClient CustomAvlDataStoreClient DeviceIdentifier string }
func (*RemoteRpcStore) GetCloseChan ¶
func (s *RemoteRpcStore) GetCloseChan() chan bool
func (*RemoteRpcStore) GetProcessChan ¶
func (s *RemoteRpcStore) GetProcessChan() chan types.DeviceStatus
func (*RemoteRpcStore) GetResponseChan ¶
func (s *RemoteRpcStore) GetResponseChan() chan types.DeviceResponse
func (*RemoteRpcStore) Process ¶
func (s *RemoteRpcStore) Process()
func (*RemoteRpcStore) Response ¶
func (s *RemoteRpcStore) Response()
type SendCommandRequestAVL ¶
type SendCommandRequestAVL struct { Imei string `protobuf:"bytes,1,opt,name=imei,proto3" json:"imei,omitempty"` Command string `protobuf:"bytes,2,opt,name=command,proto3" json:"command,omitempty"` // contains filtered or unexported fields }
func (*SendCommandRequestAVL) Descriptor
deprecated
func (*SendCommandRequestAVL) Descriptor() ([]byte, []int)
Deprecated: Use SendCommandRequestAVL.ProtoReflect.Descriptor instead.
func (*SendCommandRequestAVL) GetCommand ¶
func (x *SendCommandRequestAVL) GetCommand() string
func (*SendCommandRequestAVL) GetImei ¶
func (x *SendCommandRequestAVL) GetImei() string
func (*SendCommandRequestAVL) ProtoMessage ¶
func (*SendCommandRequestAVL) ProtoMessage()
func (*SendCommandRequestAVL) ProtoReflect ¶
func (x *SendCommandRequestAVL) ProtoReflect() protoreflect.Message
func (*SendCommandRequestAVL) Reset ¶
func (x *SendCommandRequestAVL) Reset()
func (*SendCommandRequestAVL) String ¶
func (x *SendCommandRequestAVL) String() string
type SendCommandResponseAVL ¶
type SendCommandResponseAVL struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*SendCommandResponseAVL) Descriptor
deprecated
func (*SendCommandResponseAVL) Descriptor() ([]byte, []int)
Deprecated: Use SendCommandResponseAVL.ProtoReflect.Descriptor instead.
func (*SendCommandResponseAVL) GetMessage ¶
func (x *SendCommandResponseAVL) GetMessage() string
func (*SendCommandResponseAVL) GetSuccess ¶
func (x *SendCommandResponseAVL) GetSuccess() bool
func (*SendCommandResponseAVL) ProtoMessage ¶
func (*SendCommandResponseAVL) ProtoMessage()
func (*SendCommandResponseAVL) ProtoReflect ¶
func (x *SendCommandResponseAVL) ProtoReflect() protoreflect.Message
func (*SendCommandResponseAVL) Reset ¶
func (x *SendCommandResponseAVL) Reset()
func (*SendCommandResponseAVL) String ¶
func (x *SendCommandResponseAVL) String() string
type Store ¶
type Store interface { Process() Response() GetProcessChan() chan types.DeviceStatus GetResponseChan() chan types.DeviceResponse GetCloseChan() chan bool }
type UnimplementedAvlDataStoreServer ¶
type UnimplementedAvlDataStoreServer struct{}
UnimplementedAvlDataStoreServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedAvlDataStoreServer) FetchDeviceModel ¶
func (UnimplementedAvlDataStoreServer) FetchDeviceModel(context.Context, *FetchDeviceModelRequest) (*FetchDeviceModelResponse, error)
func (UnimplementedAvlDataStoreServer) SaveDeviceStatus ¶
func (UnimplementedAvlDataStoreServer) SaveDeviceStatus(context.Context, *types.DeviceStatus) (*emptypb.Empty, error)
func (UnimplementedAvlDataStoreServer) SavedeviceResponse ¶
func (UnimplementedAvlDataStoreServer) SavedeviceResponse(context.Context, *types.DeviceResponse) (*emptypb.Empty, error)
func (UnimplementedAvlDataStoreServer) VerifyDevice ¶
func (UnimplementedAvlDataStoreServer) VerifyDevice(context.Context, *VerifyDeviceRequest) (*VerifyDeviceReply, error)
type UnimplementedAvlReceiverServiceServer ¶
type UnimplementedAvlReceiverServiceServer struct{}
UnimplementedAvlReceiverServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedAvlReceiverServiceServer) SendCommand ¶
func (UnimplementedAvlReceiverServiceServer) SendCommand(context.Context, *SendCommandRequestAVL) (*SendCommandResponseAVL, error)
type UnsafeAvlDataStoreServer ¶
type UnsafeAvlDataStoreServer interface {
// contains filtered or unexported methods
}
UnsafeAvlDataStoreServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AvlDataStoreServer will result in compilation errors.
type UnsafeAvlReceiverServiceServer ¶
type UnsafeAvlReceiverServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAvlReceiverServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AvlReceiverServiceServer will result in compilation errors.
type VerifyDeviceReply ¶
type VerifyDeviceReply struct { Imei string `protobuf:"bytes,1,opt,name=imei,proto3" json:"imei,omitempty"` DeviceType types.DeviceType `protobuf:"varint,2,opt,name=deviceType,proto3,enum=types.DeviceType" json:"deviceType,omitempty"` // contains filtered or unexported fields }
func (*VerifyDeviceReply) Descriptor
deprecated
func (*VerifyDeviceReply) Descriptor() ([]byte, []int)
Deprecated: Use VerifyDeviceReply.ProtoReflect.Descriptor instead.
func (*VerifyDeviceReply) GetDeviceType ¶
func (x *VerifyDeviceReply) GetDeviceType() types.DeviceType
func (*VerifyDeviceReply) GetImei ¶
func (x *VerifyDeviceReply) GetImei() string
func (*VerifyDeviceReply) ProtoMessage ¶
func (*VerifyDeviceReply) ProtoMessage()
func (*VerifyDeviceReply) ProtoReflect ¶
func (x *VerifyDeviceReply) ProtoReflect() protoreflect.Message
func (*VerifyDeviceReply) Reset ¶
func (x *VerifyDeviceReply) Reset()
func (*VerifyDeviceReply) String ¶
func (x *VerifyDeviceReply) String() string
type VerifyDeviceRequest ¶
type VerifyDeviceRequest struct { Imei string `protobuf:"bytes,1,opt,name=imei,proto3" json:"imei,omitempty"` // contains filtered or unexported fields }
func (*VerifyDeviceRequest) Descriptor
deprecated
func (*VerifyDeviceRequest) Descriptor() ([]byte, []int)
Deprecated: Use VerifyDeviceRequest.ProtoReflect.Descriptor instead.
func (*VerifyDeviceRequest) GetImei ¶
func (x *VerifyDeviceRequest) GetImei() string
func (*VerifyDeviceRequest) ProtoMessage ¶
func (*VerifyDeviceRequest) ProtoMessage()
func (*VerifyDeviceRequest) ProtoReflect ¶
func (x *VerifyDeviceRequest) ProtoReflect() protoreflect.Message
func (*VerifyDeviceRequest) Reset ¶
func (x *VerifyDeviceRequest) Reset()
func (*VerifyDeviceRequest) String ¶
func (x *VerifyDeviceRequest) String() string