contracts

package
v0.3.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EventsService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "EventsService",
	HandlerType: (*EventsServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Push",
			Handler:    _EventsService_Push_Handler,
		},
		{
			MethodName: "List",
			Handler:    _EventsService_List_Handler,
		},
		{
			MethodName: "ReplaySingleEvent",
			Handler:    _EventsService_ReplaySingleEvent_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "events.proto",
}

EventsService_ServiceDesc is the grpc.ServiceDesc for EventsService 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 RegisterEventsServiceServer

func RegisterEventsServiceServer(s grpc.ServiceRegistrar, srv EventsServiceServer)

Types

type Event

type Event struct {

	// the tenant id
	TenantId string `protobuf:"bytes,1,opt,name=tenantId,proto3" json:"tenantId,omitempty"`
	// the id of the event
	EventId string `protobuf:"bytes,2,opt,name=eventId,proto3" json:"eventId,omitempty"`
	// the key for the event
	Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
	// the payload for the event
	Payload string `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"`
	// when the event was generated
	EventTimestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=eventTimestamp,proto3" json:"eventTimestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*Event) Descriptor deprecated

func (*Event) Descriptor() ([]byte, []int)

Deprecated: Use Event.ProtoReflect.Descriptor instead.

func (*Event) GetEventId

func (x *Event) GetEventId() string

func (*Event) GetEventTimestamp

func (x *Event) GetEventTimestamp() *timestamppb.Timestamp

func (*Event) GetKey

func (x *Event) GetKey() string

func (*Event) GetPayload

func (x *Event) GetPayload() string

func (*Event) GetTenantId

func (x *Event) GetTenantId() string

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) ProtoReflect

func (x *Event) ProtoReflect() protoreflect.Message

func (*Event) Reset

func (x *Event) Reset()

func (*Event) String

func (x *Event) String() string

type EventsServiceClient

type EventsServiceClient interface {
	Push(ctx context.Context, in *PushEventRequest, opts ...grpc.CallOption) (*Event, error)
	List(ctx context.Context, in *ListEventRequest, opts ...grpc.CallOption) (*ListEventResponse, error)
	ReplaySingleEvent(ctx context.Context, in *ReplayEventRequest, opts ...grpc.CallOption) (*Event, error)
}

EventsServiceClient is the client API for EventsService 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 EventsServiceServer

type EventsServiceServer interface {
	Push(context.Context, *PushEventRequest) (*Event, error)
	List(context.Context, *ListEventRequest) (*ListEventResponse, error)
	ReplaySingleEvent(context.Context, *ReplayEventRequest) (*Event, error)
	// contains filtered or unexported methods
}

EventsServiceServer is the server API for EventsService service. All implementations must embed UnimplementedEventsServiceServer for forward compatibility

type ListEventRequest

type ListEventRequest struct {

	// (required) the tenant id
	TenantId string `protobuf:"bytes,1,opt,name=tenantId,proto3" json:"tenantId,omitempty"`
	// (optional) the number of events to skip
	Offset int32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
	// (optional) the key for the event
	Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
	// contains filtered or unexported fields
}

func (*ListEventRequest) Descriptor deprecated

func (*ListEventRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListEventRequest.ProtoReflect.Descriptor instead.

func (*ListEventRequest) GetKey

func (x *ListEventRequest) GetKey() string

func (*ListEventRequest) GetOffset

func (x *ListEventRequest) GetOffset() int32

func (*ListEventRequest) GetTenantId

func (x *ListEventRequest) GetTenantId() string

func (*ListEventRequest) ProtoMessage

func (*ListEventRequest) ProtoMessage()

func (*ListEventRequest) ProtoReflect

func (x *ListEventRequest) ProtoReflect() protoreflect.Message

func (*ListEventRequest) Reset

func (x *ListEventRequest) Reset()

func (*ListEventRequest) String

func (x *ListEventRequest) String() string

type ListEventResponse

type ListEventResponse struct {

	// the events
	Events []*Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"`
	// contains filtered or unexported fields
}

func (*ListEventResponse) Descriptor deprecated

func (*ListEventResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListEventResponse.ProtoReflect.Descriptor instead.

func (*ListEventResponse) GetEvents

func (x *ListEventResponse) GetEvents() []*Event

func (*ListEventResponse) ProtoMessage

func (*ListEventResponse) ProtoMessage()

func (*ListEventResponse) ProtoReflect

func (x *ListEventResponse) ProtoReflect() protoreflect.Message

func (*ListEventResponse) Reset

func (x *ListEventResponse) Reset()

func (*ListEventResponse) String

func (x *ListEventResponse) String() string

type PushEventRequest

type PushEventRequest struct {

	// the tenant id
	TenantId string `protobuf:"bytes,1,opt,name=tenantId,proto3" json:"tenantId,omitempty"`
	// the key for the event
	Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	// the payload for the event
	Payload string `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
	// when the event was generated
	EventTimestamp *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=eventTimestamp,proto3" json:"eventTimestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*PushEventRequest) Descriptor deprecated

func (*PushEventRequest) Descriptor() ([]byte, []int)

Deprecated: Use PushEventRequest.ProtoReflect.Descriptor instead.

func (*PushEventRequest) GetEventTimestamp

func (x *PushEventRequest) GetEventTimestamp() *timestamppb.Timestamp

func (*PushEventRequest) GetKey

func (x *PushEventRequest) GetKey() string

func (*PushEventRequest) GetPayload

func (x *PushEventRequest) GetPayload() string

func (*PushEventRequest) GetTenantId

func (x *PushEventRequest) GetTenantId() string

func (*PushEventRequest) ProtoMessage

func (*PushEventRequest) ProtoMessage()

func (*PushEventRequest) ProtoReflect

func (x *PushEventRequest) ProtoReflect() protoreflect.Message

func (*PushEventRequest) Reset

func (x *PushEventRequest) Reset()

func (*PushEventRequest) String

func (x *PushEventRequest) String() string

type ReplayEventRequest

type ReplayEventRequest struct {

	// the tenant id
	TenantId string `protobuf:"bytes,1,opt,name=tenantId,proto3" json:"tenantId,omitempty"`
	// the event id to replay
	EventId string `protobuf:"bytes,2,opt,name=eventId,proto3" json:"eventId,omitempty"`
	// contains filtered or unexported fields
}

func (*ReplayEventRequest) Descriptor deprecated

func (*ReplayEventRequest) Descriptor() ([]byte, []int)

Deprecated: Use ReplayEventRequest.ProtoReflect.Descriptor instead.

func (*ReplayEventRequest) GetEventId

func (x *ReplayEventRequest) GetEventId() string

func (*ReplayEventRequest) GetTenantId

func (x *ReplayEventRequest) GetTenantId() string

func (*ReplayEventRequest) ProtoMessage

func (*ReplayEventRequest) ProtoMessage()

func (*ReplayEventRequest) ProtoReflect

func (x *ReplayEventRequest) ProtoReflect() protoreflect.Message

func (*ReplayEventRequest) Reset

func (x *ReplayEventRequest) Reset()

func (*ReplayEventRequest) String

func (x *ReplayEventRequest) String() string

type UnimplementedEventsServiceServer

type UnimplementedEventsServiceServer struct {
}

UnimplementedEventsServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedEventsServiceServer) List

func (UnimplementedEventsServiceServer) Push

func (UnimplementedEventsServiceServer) ReplaySingleEvent

type UnsafeEventsServiceServer

type UnsafeEventsServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeEventsServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EventsServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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