store

package
v0.0.0-...-c6ca42b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2024 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
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"
)
View Source
const (
	AvlReceiverService_SendCommand_FullMethodName = "/store.AvlReceiverService/SendCommand"
)

Variables

View Source
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)

View Source
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)

View Source
var File_avl_data_store_proto protoreflect.FileDescriptor
View Source
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.

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.

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 (CustomAvlDataStoreClient) FetchDeviceModel

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

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) SaveDeviceStatus

func (UnimplementedAvlDataStoreServer) SavedeviceResponse

func (UnimplementedAvlDataStoreServer) VerifyDevice

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL