Documentation ¶
Overview ¶
Package eventingest is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomError ¶
CustomError is a custom error type that includes an HTTP status code.
func NewAuthError ¶
func NewAuthError(message string) CustomError
NewAuthError creates a new CustomError with a 401 status code.
func NewInternalError ¶
func NewInternalError(message string) CustomError
NewInternalError creates a new CustomError with a 500 status code.
func NewProcessingError ¶
func NewProcessingError(message string) CustomError
NewProcessingError creates a new CustomError with a 500 status code.
type EventForwarder ¶
type EventForwarder interface {
ForwardEvent(c *gofr.Context, tenantID, customerID uuid.UUID, eventData []byte) error
}
EventForwarder interface defines the contract for forwarding events.
type GRPCEventForwarder ¶
type GRPCEventForwarder struct {
// contains filtered or unexported fields
}
GRPCEventForwarder implements the EventForwarder interface.
func NewGRPCEventForwarder ¶
func NewGRPCEventForwarder(conn *grpc.ClientConn) *GRPCEventForwarder
NewGRPCEventForwarder creates a new GRPCEventForwarder.
func (*GRPCEventForwarder) ForwardEvent ¶
func (f *GRPCEventForwarder) ForwardEvent(c *gofr.Context, tenantID, customerID uuid.UUID, eventData []byte) error
ForwardEvent implements the EventForwarder interface.
type HTTPServer ¶
type HTTPServer struct {
// contains filtered or unexported fields
}
HTTPServer is an HTTP server for handling event requests.
func NewHTTPServer ¶
func NewHTTPServer(app *gofr.App, forwarder EventForwarder) *HTTPServer
NewHTTPServer creates a new HTTP server for handling event requests.
func (*HTTPServer) HandleEvent ¶
func (s *HTTPServer) HandleEvent(cc customctx.Context) (interface{}, error)
HandleEvent handles an event request, it accepts a Context and returns an interface and an error.
type IngestEventRequest ¶
IngestEventRequest is the request structure for the IngestEvent RPC.
type MockEventForwarder ¶
type MockEventForwarder struct {
// contains filtered or unexported fields
}
MockEventForwarder is a mock of EventForwarder interface.
func NewMockEventForwarder ¶
func NewMockEventForwarder(ctrl *gomock.Controller) *MockEventForwarder
NewMockEventForwarder creates a new mock instance.
func (*MockEventForwarder) EXPECT ¶
func (m *MockEventForwarder) EXPECT() *MockEventForwarderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockEventForwarder) ForwardEvent ¶
func (m *MockEventForwarder) ForwardEvent(c *gofr.Context, tenantID, customerID uuid.UUID, eventData []byte) error
ForwardEvent mocks base method.
type MockEventForwarderMockRecorder ¶
type MockEventForwarderMockRecorder struct {
// contains filtered or unexported fields
}
MockEventForwarderMockRecorder is the mock recorder for MockEventForwarder.
func (*MockEventForwarderMockRecorder) ForwardEvent ¶
func (mr *MockEventForwarderMockRecorder) ForwardEvent(c, tenantID, customerID, eventData any) *gomock.Call
ForwardEvent indicates an expected call of ForwardEvent.
type MockServiceClient ¶
type MockServiceClient struct {
// contains filtered or unexported fields
}
MockServiceClient is a mock of ServiceClient interface.
func NewMockServiceClient ¶
func NewMockServiceClient(ctrl *gomock.Controller) *MockServiceClient
NewMockServiceClient creates a new mock instance.
func (*MockServiceClient) EXPECT ¶
func (m *MockServiceClient) EXPECT() *MockServiceClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockServiceClient) IngestEvent ¶
func (m *MockServiceClient) IngestEvent(ctx context.Context, in *IngestEventRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
IngestEvent mocks base method.
type MockServiceClientMockRecorder ¶
type MockServiceClientMockRecorder struct {
// contains filtered or unexported fields
}
MockServiceClientMockRecorder is the mock recorder for MockServiceClient.
func (*MockServiceClientMockRecorder) IngestEvent ¶
func (mr *MockServiceClientMockRecorder) IngestEvent(ctx, in any, opts ...any) *gomock.Call
IngestEvent indicates an expected call of IngestEvent.
type ServiceClient ¶
type ServiceClient interface {
IngestEvent(ctx context.Context, in *IngestEventRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
ServiceClient is the gRPC client interface.
func NewEventIngestServiceClient ¶
func NewEventIngestServiceClient(cc grpc.ClientConnInterface) ServiceClient
NewEventIngestServiceClient creates a new ServiceClient.