omgwords_serviceconnect

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// GameEventServiceCreateBroadcastGameProcedure is the fully-qualified name of the
	// GameEventService's CreateBroadcastGame RPC.
	GameEventServiceCreateBroadcastGameProcedure = "/omgwords_service.GameEventService/CreateBroadcastGame"
	// GameEventServiceDeleteBroadcastGameProcedure is the fully-qualified name of the
	// GameEventService's DeleteBroadcastGame RPC.
	GameEventServiceDeleteBroadcastGameProcedure = "/omgwords_service.GameEventService/DeleteBroadcastGame"
	// GameEventServiceSendGameEventProcedure is the fully-qualified name of the GameEventService's
	// SendGameEvent RPC.
	GameEventServiceSendGameEventProcedure = "/omgwords_service.GameEventService/SendGameEvent"
	// GameEventServiceSetRacksProcedure is the fully-qualified name of the GameEventService's SetRacks
	// RPC.
	GameEventServiceSetRacksProcedure = "/omgwords_service.GameEventService/SetRacks"
	// GameEventServiceReplaceGameDocumentProcedure is the fully-qualified name of the
	// GameEventService's ReplaceGameDocument RPC.
	GameEventServiceReplaceGameDocumentProcedure = "/omgwords_service.GameEventService/ReplaceGameDocument"
	// GameEventServicePatchGameDocumentProcedure is the fully-qualified name of the GameEventService's
	// PatchGameDocument RPC.
	GameEventServicePatchGameDocumentProcedure = "/omgwords_service.GameEventService/PatchGameDocument"
	// GameEventServiceSetBroadcastGamePrivacyProcedure is the fully-qualified name of the
	// GameEventService's SetBroadcastGamePrivacy RPC.
	GameEventServiceSetBroadcastGamePrivacyProcedure = "/omgwords_service.GameEventService/SetBroadcastGamePrivacy"
	// GameEventServiceGetGamesForEditorProcedure is the fully-qualified name of the GameEventService's
	// GetGamesForEditor RPC.
	GameEventServiceGetGamesForEditorProcedure = "/omgwords_service.GameEventService/GetGamesForEditor"
	// GameEventServiceGetMyUnfinishedGamesProcedure is the fully-qualified name of the
	// GameEventService's GetMyUnfinishedGames RPC.
	GameEventServiceGetMyUnfinishedGamesProcedure = "/omgwords_service.GameEventService/GetMyUnfinishedGames"
	// GameEventServiceGetGameDocumentProcedure is the fully-qualified name of the GameEventService's
	// GetGameDocument RPC.
	GameEventServiceGetGameDocumentProcedure = "/omgwords_service.GameEventService/GetGameDocument"
	// GameEventServiceGetRecentAnnotatedGamesProcedure is the fully-qualified name of the
	// GameEventService's GetRecentAnnotatedGames RPC.
	GameEventServiceGetRecentAnnotatedGamesProcedure = "/omgwords_service.GameEventService/GetRecentAnnotatedGames"
	// GameEventServiceGetCGPProcedure is the fully-qualified name of the GameEventService's GetCGP RPC.
	GameEventServiceGetCGPProcedure = "/omgwords_service.GameEventService/GetCGP"
	// GameEventServiceImportGCGProcedure is the fully-qualified name of the GameEventService's
	// ImportGCG RPC.
	GameEventServiceImportGCGProcedure = "/omgwords_service.GameEventService/ImportGCG"
)

These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.

Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.

View Source
const (
	// GameEventServiceName is the fully-qualified name of the GameEventService service.
	GameEventServiceName = "omgwords_service.GameEventService"
)

Variables

This section is empty.

Functions

func NewGameEventServiceHandler

func NewGameEventServiceHandler(svc GameEventServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewGameEventServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

Types

type GameEventServiceClient

type GameEventServiceClient interface {
	// CreateBroadcastGame will create a game for Woogles broadcast
	CreateBroadcastGame(context.Context, *connect.Request[omgwords_service.CreateBroadcastGameRequest]) (*connect.Response[omgwords_service.CreateBroadcastGameResponse], error)
	// DeleteBroadcastGame deletes a Woogles annotated game.
	DeleteBroadcastGame(context.Context, *connect.Request[omgwords_service.DeleteBroadcastGameRequest]) (*connect.Response[omgwords_service.DeleteBroadcastGameResponse], error)
	// SendGameEvent is how one sends game events to the Woogles API.
	SendGameEvent(context.Context, *connect.Request[omgwords_service.AnnotatedGameEvent]) (*connect.Response[omgwords_service.GameEventResponse], error)
	// SetRacks sets the rack for the players of the game.
	SetRacks(context.Context, *connect.Request[omgwords_service.SetRacksEvent]) (*connect.Response[omgwords_service.GameEventResponse], error)
	ReplaceGameDocument(context.Context, *connect.Request[omgwords_service.ReplaceDocumentRequest]) (*connect.Response[omgwords_service.GameEventResponse], error)
	// PatchGameDocument merges in the passed-in GameDocument with what's on the
	// server. The passed-in GameDocument should be a partial document
	PatchGameDocument(context.Context, *connect.Request[omgwords_service.PatchDocumentRequest]) (*connect.Response[omgwords_service.GameEventResponse], error)
	SetBroadcastGamePrivacy(context.Context, *connect.Request[omgwords_service.BroadcastGamePrivacy]) (*connect.Response[omgwords_service.GameEventResponse], error)
	GetGamesForEditor(context.Context, *connect.Request[omgwords_service.GetGamesForEditorRequest]) (*connect.Response[omgwords_service.BroadcastGamesResponse], error)
	GetMyUnfinishedGames(context.Context, *connect.Request[omgwords_service.GetMyUnfinishedGamesRequest]) (*connect.Response[omgwords_service.BroadcastGamesResponse], error)
	// GetGameDocument fetches the latest GameDocument for the passed-in ID.
	GetGameDocument(context.Context, *connect.Request[omgwords_service.GetGameDocumentRequest]) (*connect.Response[ipc.GameDocument], error)
	GetRecentAnnotatedGames(context.Context, *connect.Request[omgwords_service.GetRecentAnnotatedGamesRequest]) (*connect.Response[omgwords_service.BroadcastGamesResponse], error)
	GetCGP(context.Context, *connect.Request[omgwords_service.GetCGPRequest]) (*connect.Response[omgwords_service.CGPResponse], error)
	ImportGCG(context.Context, *connect.Request[omgwords_service.ImportGCGRequest]) (*connect.Response[omgwords_service.ImportGCGResponse], error)
}

GameEventServiceClient is a client for the omgwords_service.GameEventService service.

func NewGameEventServiceClient

func NewGameEventServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) GameEventServiceClient

NewGameEventServiceClient constructs a client for the omgwords_service.GameEventService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type GameEventServiceHandler

type GameEventServiceHandler interface {
	// CreateBroadcastGame will create a game for Woogles broadcast
	CreateBroadcastGame(context.Context, *connect.Request[omgwords_service.CreateBroadcastGameRequest]) (*connect.Response[omgwords_service.CreateBroadcastGameResponse], error)
	// DeleteBroadcastGame deletes a Woogles annotated game.
	DeleteBroadcastGame(context.Context, *connect.Request[omgwords_service.DeleteBroadcastGameRequest]) (*connect.Response[omgwords_service.DeleteBroadcastGameResponse], error)
	// SendGameEvent is how one sends game events to the Woogles API.
	SendGameEvent(context.Context, *connect.Request[omgwords_service.AnnotatedGameEvent]) (*connect.Response[omgwords_service.GameEventResponse], error)
	// SetRacks sets the rack for the players of the game.
	SetRacks(context.Context, *connect.Request[omgwords_service.SetRacksEvent]) (*connect.Response[omgwords_service.GameEventResponse], error)
	ReplaceGameDocument(context.Context, *connect.Request[omgwords_service.ReplaceDocumentRequest]) (*connect.Response[omgwords_service.GameEventResponse], error)
	// PatchGameDocument merges in the passed-in GameDocument with what's on the
	// server. The passed-in GameDocument should be a partial document
	PatchGameDocument(context.Context, *connect.Request[omgwords_service.PatchDocumentRequest]) (*connect.Response[omgwords_service.GameEventResponse], error)
	SetBroadcastGamePrivacy(context.Context, *connect.Request[omgwords_service.BroadcastGamePrivacy]) (*connect.Response[omgwords_service.GameEventResponse], error)
	GetGamesForEditor(context.Context, *connect.Request[omgwords_service.GetGamesForEditorRequest]) (*connect.Response[omgwords_service.BroadcastGamesResponse], error)
	GetMyUnfinishedGames(context.Context, *connect.Request[omgwords_service.GetMyUnfinishedGamesRequest]) (*connect.Response[omgwords_service.BroadcastGamesResponse], error)
	// GetGameDocument fetches the latest GameDocument for the passed-in ID.
	GetGameDocument(context.Context, *connect.Request[omgwords_service.GetGameDocumentRequest]) (*connect.Response[ipc.GameDocument], error)
	GetRecentAnnotatedGames(context.Context, *connect.Request[omgwords_service.GetRecentAnnotatedGamesRequest]) (*connect.Response[omgwords_service.BroadcastGamesResponse], error)
	GetCGP(context.Context, *connect.Request[omgwords_service.GetCGPRequest]) (*connect.Response[omgwords_service.CGPResponse], error)
	ImportGCG(context.Context, *connect.Request[omgwords_service.ImportGCGRequest]) (*connect.Response[omgwords_service.ImportGCGResponse], error)
}

GameEventServiceHandler is an implementation of the omgwords_service.GameEventService service.

type UnimplementedGameEventServiceHandler

type UnimplementedGameEventServiceHandler struct{}

UnimplementedGameEventServiceHandler returns CodeUnimplemented from all methods.

Jump to

Keyboard shortcuts

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