event_api

package
v0.0.0-...-23ae872 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

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

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

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
const (
	EventType_UNKNOWN EventType = 0
	EventType_INVITE  EventType = 1
	EventType_POST    EventType = 2
	EventType_MESSAGE EventType = 3
)

func (EventType) Descriptor

func (EventType) Descriptor() protoreflect.EnumDescriptor

func (EventType) Enum

func (x EventType) Enum() *EventType

func (EventType) EnumDescriptor deprecated

func (EventType) EnumDescriptor() ([]byte, []int)

Deprecated: Use EventType.Descriptor instead.

func (EventType) Number

func (x EventType) Number() protoreflect.EnumNumber

func (EventType) String

func (x EventType) String() string

func (EventType) Type

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

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.

Jump to

Keyboard shortcuts

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