Documentation ¶
Index ¶
- Variables
- func RegisterEventServiceServer(s grpc.ServiceRegistrar, srv EventServiceServer)
- type EventServiceClient
- type EventServiceServer
- type EventType
- type PublishEventRequest
- func (*PublishEventRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PublishEventRequest) GetCreatedAt() *timestamppb.Timestamp
- func (x *PublishEventRequest) GetType() EventType
- func (x *PublishEventRequest) GetUserId() int64
- func (*PublishEventRequest) ProtoMessage()
- func (x *PublishEventRequest) ProtoReflect() protoreflect.Message
- func (x *PublishEventRequest) Reset()
- func (x *PublishEventRequest) String() string
- type PublishEventsResponse
- type UnimplementedEventServiceServer
- type UnsafeEventServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( EventType_name = map[int32]string{ 0: "UNKNOWN", 1: "INVITE", 2: "POST", 3: "MESSAGE", } EventType_value = map[string]int32{ "UNKNOWN": 0, "INVITE": 1, "POST": 2, "MESSAGE": 3, } )
Enum value maps for EventType.
var EventService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "event_api.EventService", HandlerType: (*EventServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Publish", Handler: _EventService_Publish_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "events.proto", }
EventService_ServiceDesc is the grpc.ServiceDesc for EventService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_events_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEventServiceServer ¶
func RegisterEventServiceServer(s grpc.ServiceRegistrar, srv EventServiceServer)
Types ¶
type EventServiceClient ¶
type EventServiceClient interface {
Publish(ctx context.Context, in *PublishEventRequest, opts ...grpc.CallOption) (*PublishEventsResponse, error)
}
EventServiceClient is the client API for EventService 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 NewEventServiceClient ¶
func NewEventServiceClient(cc grpc.ClientConnInterface) EventServiceClient
type EventServiceServer ¶
type EventServiceServer interface { Publish(context.Context, *PublishEventRequest) (*PublishEventsResponse, error) // contains filtered or unexported methods }
EventServiceServer is the server API for EventService service. All implementations must embed UnimplementedEventServiceServer for forward compatibility
type EventType ¶
type EventType int32
func (EventType) Descriptor ¶
func (EventType) Descriptor() protoreflect.EnumDescriptor
func (EventType) EnumDescriptor
deprecated
func (EventType) Number ¶
func (x EventType) Number() protoreflect.EnumNumber
func (EventType) Type ¶
func (EventType) Type() protoreflect.EnumType
type PublishEventRequest ¶
type PublishEventRequest struct { Type EventType `protobuf:"varint,1,opt,name=type,proto3,enum=event_api.EventType" json:"type,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UserId int64 `protobuf:"varint,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*PublishEventRequest) Descriptor
deprecated
func (*PublishEventRequest) Descriptor() ([]byte, []int)
Deprecated: Use PublishEventRequest.ProtoReflect.Descriptor instead.
func (*PublishEventRequest) GetCreatedAt ¶
func (x *PublishEventRequest) GetCreatedAt() *timestamppb.Timestamp
func (*PublishEventRequest) GetType ¶
func (x *PublishEventRequest) GetType() EventType
func (*PublishEventRequest) GetUserId ¶
func (x *PublishEventRequest) GetUserId() int64
func (*PublishEventRequest) ProtoMessage ¶
func (*PublishEventRequest) ProtoMessage()
func (*PublishEventRequest) ProtoReflect ¶
func (x *PublishEventRequest) ProtoReflect() protoreflect.Message
func (*PublishEventRequest) Reset ¶
func (x *PublishEventRequest) Reset()
func (*PublishEventRequest) String ¶
func (x *PublishEventRequest) String() string
type PublishEventsResponse ¶
type PublishEventsResponse struct {
// contains filtered or unexported fields
}
func (*PublishEventsResponse) Descriptor
deprecated
func (*PublishEventsResponse) Descriptor() ([]byte, []int)
Deprecated: Use PublishEventsResponse.ProtoReflect.Descriptor instead.
func (*PublishEventsResponse) ProtoMessage ¶
func (*PublishEventsResponse) ProtoMessage()
func (*PublishEventsResponse) ProtoReflect ¶
func (x *PublishEventsResponse) ProtoReflect() protoreflect.Message
func (*PublishEventsResponse) Reset ¶
func (x *PublishEventsResponse) Reset()
func (*PublishEventsResponse) String ¶
func (x *PublishEventsResponse) String() string
type UnimplementedEventServiceServer ¶
type UnimplementedEventServiceServer struct { }
UnimplementedEventServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedEventServiceServer) Publish ¶
func (UnimplementedEventServiceServer) Publish(context.Context, *PublishEventRequest) (*PublishEventsResponse, error)
type UnsafeEventServiceServer ¶
type UnsafeEventServiceServer interface {
// contains filtered or unexported methods
}
UnsafeEventServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EventServiceServer will result in compilation errors.