Documentation ¶
Index ¶
- Variables
- func RegisterCounterServiceServer(s grpc.ServiceRegistrar, srv CounterServiceServer)
- type CounterEventRequest
- func (*CounterEventRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CounterEventRequest) GetChatId() int64
- func (x *CounterEventRequest) GetMessageId() int64
- func (x *CounterEventRequest) GetUserId() int64
- func (*CounterEventRequest) ProtoMessage()
- func (x *CounterEventRequest) ProtoReflect() protoreflect.Message
- func (x *CounterEventRequest) Reset()
- func (x *CounterEventRequest) String() string
- type CounterEventResponse
- type CounterServiceClient
- type CounterServiceServer
- type UnimplementedCounterServiceServer
- func (UnimplementedCounterServiceServer) CompensateMessageRead(context.Context, *CounterEventRequest) (*CounterEventResponse, error)
- func (UnimplementedCounterServiceServer) CompensateNewMessage(context.Context, *CounterEventRequest) (*CounterEventResponse, error)
- func (UnimplementedCounterServiceServer) MessageRead(context.Context, *CounterEventRequest) (*CounterEventResponse, error)
- func (UnimplementedCounterServiceServer) NewMessage(context.Context, *CounterEventRequest) (*CounterEventResponse, error)
- type UnsafeCounterServiceServer
Constants ¶
This section is empty.
Variables ¶
var CounterService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "counter_api.CounterService", HandlerType: (*CounterServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "NewMessage", Handler: _CounterService_NewMessage_Handler, }, { MethodName: "MessageRead", Handler: _CounterService_MessageRead_Handler, }, { MethodName: "CompensateNewMessage", Handler: _CounterService_CompensateNewMessage_Handler, }, { MethodName: "CompensateMessageRead", Handler: _CounterService_CompensateMessageRead_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "counter.proto", }
CounterService_ServiceDesc is the grpc.ServiceDesc for CounterService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_counter_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCounterServiceServer ¶
func RegisterCounterServiceServer(s grpc.ServiceRegistrar, srv CounterServiceServer)
Types ¶
type CounterEventRequest ¶
type CounterEventRequest struct { UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` MessageId int64 `protobuf:"varint,2,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` ChatId int64 `protobuf:"varint,3,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"` // contains filtered or unexported fields }
MVP
func (*CounterEventRequest) Descriptor
deprecated
func (*CounterEventRequest) Descriptor() ([]byte, []int)
Deprecated: Use CounterEventRequest.ProtoReflect.Descriptor instead.
func (*CounterEventRequest) GetChatId ¶
func (x *CounterEventRequest) GetChatId() int64
func (*CounterEventRequest) GetMessageId ¶
func (x *CounterEventRequest) GetMessageId() int64
func (*CounterEventRequest) GetUserId ¶
func (x *CounterEventRequest) GetUserId() int64
func (*CounterEventRequest) ProtoMessage ¶
func (*CounterEventRequest) ProtoMessage()
func (*CounterEventRequest) ProtoReflect ¶
func (x *CounterEventRequest) ProtoReflect() protoreflect.Message
func (*CounterEventRequest) Reset ¶
func (x *CounterEventRequest) Reset()
func (*CounterEventRequest) String ¶
func (x *CounterEventRequest) String() string
type CounterEventResponse ¶
type CounterEventResponse struct {
// contains filtered or unexported fields
}
func (*CounterEventResponse) Descriptor
deprecated
func (*CounterEventResponse) Descriptor() ([]byte, []int)
Deprecated: Use CounterEventResponse.ProtoReflect.Descriptor instead.
func (*CounterEventResponse) ProtoMessage ¶
func (*CounterEventResponse) ProtoMessage()
func (*CounterEventResponse) ProtoReflect ¶
func (x *CounterEventResponse) ProtoReflect() protoreflect.Message
func (*CounterEventResponse) Reset ¶
func (x *CounterEventResponse) Reset()
func (*CounterEventResponse) String ¶
func (x *CounterEventResponse) String() string
type CounterServiceClient ¶
type CounterServiceClient interface { NewMessage(ctx context.Context, in *CounterEventRequest, opts ...grpc.CallOption) (*CounterEventResponse, error) MessageRead(ctx context.Context, in *CounterEventRequest, opts ...grpc.CallOption) (*CounterEventResponse, error) CompensateNewMessage(ctx context.Context, in *CounterEventRequest, opts ...grpc.CallOption) (*CounterEventResponse, error) CompensateMessageRead(ctx context.Context, in *CounterEventRequest, opts ...grpc.CallOption) (*CounterEventResponse, error) }
CounterServiceClient is the client API for CounterService 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 NewCounterServiceClient ¶
func NewCounterServiceClient(cc grpc.ClientConnInterface) CounterServiceClient
type CounterServiceServer ¶
type CounterServiceServer interface { NewMessage(context.Context, *CounterEventRequest) (*CounterEventResponse, error) MessageRead(context.Context, *CounterEventRequest) (*CounterEventResponse, error) CompensateNewMessage(context.Context, *CounterEventRequest) (*CounterEventResponse, error) CompensateMessageRead(context.Context, *CounterEventRequest) (*CounterEventResponse, error) // contains filtered or unexported methods }
CounterServiceServer is the server API for CounterService service. All implementations must embed UnimplementedCounterServiceServer for forward compatibility
type UnimplementedCounterServiceServer ¶
type UnimplementedCounterServiceServer struct { }
UnimplementedCounterServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedCounterServiceServer) CompensateMessageRead ¶
func (UnimplementedCounterServiceServer) CompensateMessageRead(context.Context, *CounterEventRequest) (*CounterEventResponse, error)
func (UnimplementedCounterServiceServer) CompensateNewMessage ¶
func (UnimplementedCounterServiceServer) CompensateNewMessage(context.Context, *CounterEventRequest) (*CounterEventResponse, error)
func (UnimplementedCounterServiceServer) MessageRead ¶
func (UnimplementedCounterServiceServer) MessageRead(context.Context, *CounterEventRequest) (*CounterEventResponse, error)
func (UnimplementedCounterServiceServer) NewMessage ¶
func (UnimplementedCounterServiceServer) NewMessage(context.Context, *CounterEventRequest) (*CounterEventResponse, error)
type UnsafeCounterServiceServer ¶
type UnsafeCounterServiceServer interface {
// contains filtered or unexported methods
}
UnsafeCounterServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CounterServiceServer will result in compilation errors.