Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterAggregatorServer(s grpc.ServiceRegistrar, srv AggregatorServer)
- type AggregateRequest
- func (*AggregateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AggregateRequest) GetObuID() int32
- func (x *AggregateRequest) GetUnix() int64
- func (x *AggregateRequest) GetValue() float64
- func (*AggregateRequest) ProtoMessage()
- func (x *AggregateRequest) ProtoReflect() protoreflect.Message
- func (x *AggregateRequest) Reset()
- func (x *AggregateRequest) String() string
- type AggregatorClient
- type AggregatorServer
- type Distance
- type GetInvoiceRequest
- type GetInvoiceResponse
- func (*GetInvoiceResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetInvoiceResponse) GetObuID() int32
- func (x *GetInvoiceResponse) GetTotalAmount() float64
- func (x *GetInvoiceResponse) GetTotalDistance() float64
- func (*GetInvoiceResponse) ProtoMessage()
- func (x *GetInvoiceResponse) ProtoReflect() protoreflect.Message
- func (x *GetInvoiceResponse) Reset()
- func (x *GetInvoiceResponse) String() string
- type Invoice
- type None
- type OBUData
- type UnimplementedAggregatorServer
- type UnsafeAggregatorServer
Constants ¶
const ( Aggregator_Aggregate_FullMethodName = "/Aggregator/Aggregate" Aggregator_GetInvoice_FullMethodName = "/Aggregator/GetInvoice" )
Variables ¶
var Aggregator_ServiceDesc = grpc.ServiceDesc{ ServiceName: "Aggregator", HandlerType: (*AggregatorServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Aggregate", Handler: _Aggregator_Aggregate_Handler, }, { MethodName: "GetInvoice", Handler: _Aggregator_GetInvoice_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "types/ptypes.proto", }
Aggregator_ServiceDesc is the grpc.ServiceDesc for Aggregator service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_types_ptypes_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAggregatorServer ¶
func RegisterAggregatorServer(s grpc.ServiceRegistrar, srv AggregatorServer)
Types ¶
type AggregateRequest ¶
type AggregateRequest struct { ObuID int32 `protobuf:"varint,1,opt,name=ObuID,proto3" json:"ObuID,omitempty"` Value float64 `protobuf:"fixed64,2,opt,name=Value,proto3" json:"Value,omitempty"` Unix int64 `protobuf:"varint,3,opt,name=Unix,proto3" json:"Unix,omitempty"` // contains filtered or unexported fields }
func (*AggregateRequest) Descriptor
deprecated
func (*AggregateRequest) Descriptor() ([]byte, []int)
Deprecated: Use AggregateRequest.ProtoReflect.Descriptor instead.
func (*AggregateRequest) GetObuID ¶
func (x *AggregateRequest) GetObuID() int32
func (*AggregateRequest) GetUnix ¶
func (x *AggregateRequest) GetUnix() int64
func (*AggregateRequest) GetValue ¶
func (x *AggregateRequest) GetValue() float64
func (*AggregateRequest) ProtoMessage ¶
func (*AggregateRequest) ProtoMessage()
func (*AggregateRequest) ProtoReflect ¶
func (x *AggregateRequest) ProtoReflect() protoreflect.Message
func (*AggregateRequest) Reset ¶
func (x *AggregateRequest) Reset()
func (*AggregateRequest) String ¶
func (x *AggregateRequest) String() string
type AggregatorClient ¶
type AggregatorClient interface { Aggregate(ctx context.Context, in *AggregateRequest, opts ...grpc.CallOption) (*None, error) GetInvoice(ctx context.Context, in *GetInvoiceRequest, opts ...grpc.CallOption) (*GetInvoiceResponse, error) }
AggregatorClient is the client API for Aggregator 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 NewAggregatorClient ¶
func NewAggregatorClient(cc grpc.ClientConnInterface) AggregatorClient
type AggregatorServer ¶
type AggregatorServer interface { Aggregate(context.Context, *AggregateRequest) (*None, error) GetInvoice(context.Context, *GetInvoiceRequest) (*GetInvoiceResponse, error) // contains filtered or unexported methods }
AggregatorServer is the server API for Aggregator service. All implementations must embed UnimplementedAggregatorServer for forward compatibility
type GetInvoiceRequest ¶
type GetInvoiceRequest struct { ObuID int32 `protobuf:"varint,1,opt,name=ObuID,proto3" json:"ObuID,omitempty"` // contains filtered or unexported fields }
func (*GetInvoiceRequest) Descriptor
deprecated
func (*GetInvoiceRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetInvoiceRequest.ProtoReflect.Descriptor instead.
func (*GetInvoiceRequest) GetObuID ¶
func (x *GetInvoiceRequest) GetObuID() int32
func (*GetInvoiceRequest) ProtoMessage ¶
func (*GetInvoiceRequest) ProtoMessage()
func (*GetInvoiceRequest) ProtoReflect ¶
func (x *GetInvoiceRequest) ProtoReflect() protoreflect.Message
func (*GetInvoiceRequest) Reset ¶
func (x *GetInvoiceRequest) Reset()
func (*GetInvoiceRequest) String ¶
func (x *GetInvoiceRequest) String() string
type GetInvoiceResponse ¶
type GetInvoiceResponse struct { ObuID int32 `protobuf:"varint,1,opt,name=ObuID,proto3" json:"ObuID,omitempty"` TotalDistance float64 `protobuf:"fixed64,2,opt,name=TotalDistance,proto3" json:"TotalDistance,omitempty"` TotalAmount float64 `protobuf:"fixed64,3,opt,name=TotalAmount,proto3" json:"TotalAmount,omitempty"` // contains filtered or unexported fields }
func (*GetInvoiceResponse) Descriptor
deprecated
func (*GetInvoiceResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetInvoiceResponse.ProtoReflect.Descriptor instead.
func (*GetInvoiceResponse) GetObuID ¶
func (x *GetInvoiceResponse) GetObuID() int32
func (*GetInvoiceResponse) GetTotalAmount ¶
func (x *GetInvoiceResponse) GetTotalAmount() float64
func (*GetInvoiceResponse) GetTotalDistance ¶
func (x *GetInvoiceResponse) GetTotalDistance() float64
func (*GetInvoiceResponse) ProtoMessage ¶
func (*GetInvoiceResponse) ProtoMessage()
func (*GetInvoiceResponse) ProtoReflect ¶
func (x *GetInvoiceResponse) ProtoReflect() protoreflect.Message
func (*GetInvoiceResponse) Reset ¶
func (x *GetInvoiceResponse) Reset()
func (*GetInvoiceResponse) String ¶
func (x *GetInvoiceResponse) String() string
type None ¶
type None struct {
// contains filtered or unexported fields
}
func (*None) Descriptor
deprecated
func (*None) ProtoMessage ¶
func (*None) ProtoMessage()
func (*None) ProtoReflect ¶
func (x *None) ProtoReflect() protoreflect.Message
type UnimplementedAggregatorServer ¶
type UnimplementedAggregatorServer struct { }
UnimplementedAggregatorServer must be embedded to have forward compatible implementations.
func (UnimplementedAggregatorServer) Aggregate ¶
func (UnimplementedAggregatorServer) Aggregate(context.Context, *AggregateRequest) (*None, error)
func (UnimplementedAggregatorServer) GetInvoice ¶
func (UnimplementedAggregatorServer) GetInvoice(context.Context, *GetInvoiceRequest) (*GetInvoiceResponse, error)
type UnsafeAggregatorServer ¶
type UnsafeAggregatorServer interface {
// contains filtered or unexported methods
}
UnsafeAggregatorServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AggregatorServer will result in compilation errors.