grpc

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	gen.UnimplementedEventServiceServer
	// contains filtered or unexported fields
}

Handler defines a Event gRPC handler.

func New

func New(ctrl *event.Controller) *Handler

New creates a new Event gRPC handler.

func (*Handler) CreateBet

func (h *Handler) CreateBet(ctx context.Context, req *gen.CreateBetRequest) (*gen.CreateBetResponse, error)

func (*Handler) CreateEvent

func (h *Handler) CreateEvent(ctx context.Context, req *gen.CreateEventRequest) (*gen.CreateEventResponse, error)

func (*Handler) GetBets

func (h *Handler) GetBets(ctx context.Context, req *gen.BetsRequest) (*gen.BetsResponse, error)

func (*Handler) GetEvents

func (h *Handler) GetEvents(ctx context.Context, req *gen.GetEventsRequest) (*gen.GetEventsResponse, error)

func (*Handler) HealthCheck

func (h *Handler) HealthCheck(ctx context.Context, req *emptypb.Empty) (*gen.HealthResponse, error)

HealthCheck handles the gRPC request for checking the health status of the application. It delegates the call to the controller and converts the result into a protobuf response.

func (*Handler) SetResult

Jump to

Keyboard shortcuts

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