Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterGlobalServiceServer(s grpc.ServiceRegistrar, srv GlobalServiceServer)
- type GlobalEvent
- func (*GlobalEvent) Descriptor() ([]byte, []int)deprecated
- func (x *GlobalEvent) GetAttributes() map[string]*GlobalEvent_EventAttribute
- func (x *GlobalEvent) GetEventName() string
- func (x *GlobalEvent) GetGameId() string
- func (x *GlobalEvent) GetId() string
- func (x *GlobalEvent) GetPlayerId() string
- func (x *GlobalEvent) GetTeamId() string
- func (x *GlobalEvent) GetTimestamp() int64
- func (x *GlobalEvent) GetType() GlobalEvent_EventType
- func (*GlobalEvent) ProtoMessage()
- func (x *GlobalEvent) ProtoReflect() protoreflect.Message
- func (x *GlobalEvent) Reset()
- func (x *GlobalEvent) String() string
- type GlobalEvent_EventAttribute
- func (*GlobalEvent_EventAttribute) Descriptor() ([]byte, []int)deprecated
- func (x *GlobalEvent_EventAttribute) GetBoolValue() bool
- func (x *GlobalEvent_EventAttribute) GetFloatValue() float32
- func (x *GlobalEvent_EventAttribute) GetIntValue() int32
- func (x *GlobalEvent_EventAttribute) GetStringValue() string
- func (m *GlobalEvent_EventAttribute) GetValue() isGlobalEvent_EventAttribute_Value
- func (*GlobalEvent_EventAttribute) ProtoMessage()
- func (x *GlobalEvent_EventAttribute) ProtoReflect() protoreflect.Message
- func (x *GlobalEvent_EventAttribute) Reset()
- func (x *GlobalEvent_EventAttribute) String() string
- type GlobalEvent_EventAttribute_BoolValue
- type GlobalEvent_EventAttribute_FloatValue
- type GlobalEvent_EventAttribute_IntValue
- type GlobalEvent_EventAttribute_StringValue
- type GlobalEvent_EventType
- func (GlobalEvent_EventType) Descriptor() protoreflect.EnumDescriptor
- func (x GlobalEvent_EventType) Enum() *GlobalEvent_EventType
- func (GlobalEvent_EventType) EnumDescriptor() ([]byte, []int)deprecated
- func (x GlobalEvent_EventType) Number() protoreflect.EnumNumber
- func (x GlobalEvent_EventType) String() string
- func (GlobalEvent_EventType) Type() protoreflect.EnumType
- type GlobalServiceClient
- type GlobalServiceServer
- type GlobalService_StreamEventsClient
- type GlobalService_StreamEventsServer
- type GlobalTime
- type JoinLeaveGame
- func (*JoinLeaveGame) Descriptor() ([]byte, []int)deprecated
- func (x *JoinLeaveGame) GetAction() JoinLeaveGame_Action
- func (x *JoinLeaveGame) GetGameId() string
- func (x *JoinLeaveGame) GetPlayerId() string
- func (x *JoinLeaveGame) GetRegion() RegionEnum
- func (x *JoinLeaveGame) GetSessionId() string
- func (x *JoinLeaveGame) GetTeamId() string
- func (*JoinLeaveGame) ProtoMessage()
- func (x *JoinLeaveGame) ProtoReflect() protoreflect.Message
- func (x *JoinLeaveGame) Reset()
- func (x *JoinLeaveGame) String() string
- type JoinLeaveGame_Action
- func (JoinLeaveGame_Action) Descriptor() protoreflect.EnumDescriptor
- func (x JoinLeaveGame_Action) Enum() *JoinLeaveGame_Action
- func (JoinLeaveGame_Action) EnumDescriptor() ([]byte, []int)deprecated
- func (x JoinLeaveGame_Action) Number() protoreflect.EnumNumber
- func (x JoinLeaveGame_Action) String() string
- func (JoinLeaveGame_Action) Type() protoreflect.EnumType
- type RegionEnum
- type UnimplementedGlobalServiceServer
- type UnsafeGlobalServiceServer
Constants ¶
const (
GlobalService_StreamEvents_FullMethodName = "/v1.api.global.GlobalService/StreamEvents"
)
Variables ¶
var ( GlobalEvent_EventType_name = map[int32]string{ 0: "CUSTOM", 1: "ANNOUNCEMENT", 2: "ALERT", 3: "EVENT", 4: "REQUEST", } GlobalEvent_EventType_value = map[string]int32{ "CUSTOM": 0, "ANNOUNCEMENT": 1, "ALERT": 2, "EVENT": 3, "REQUEST": 4, } )
Enum value maps for GlobalEvent_EventType.
var ( RegionEnum_name = map[int32]string{ 0: "REGION_UNSPECIFIED", 1: "NA_EAST", 2: "NA_WEST", 3: "SA", 4: "EU_WEST", 5: "EU_CENTRAL", 6: "EU_NORTH", 7: "AS_EAST", 8: "AS_SE", 9: "AS_SOUTH", 10: "OC", 11: "MENA", 12: "AFRICA", 13: "GLOBAL", } RegionEnum_value = map[string]int32{ "REGION_UNSPECIFIED": 0, "NA_EAST": 1, "NA_WEST": 2, "SA": 3, "EU_WEST": 4, "EU_CENTRAL": 5, "EU_NORTH": 6, "AS_EAST": 7, "AS_SE": 8, "AS_SOUTH": 9, "OC": 10, "MENA": 11, "AFRICA": 12, "GLOBAL": 13, } )
Enum value maps for RegionEnum.
var ( JoinLeaveGame_Action_name = map[int32]string{ 0: "JOIN", 1: "LEAVE", } JoinLeaveGame_Action_value = map[string]int32{ "JOIN": 0, "LEAVE": 1, } )
Enum value maps for JoinLeaveGame_Action.
var File_v1_api_global_event_proto protoreflect.FileDescriptor
var File_v1_api_global_global_service_proto protoreflect.FileDescriptor
var File_v1_api_global_join_leave_proto protoreflect.FileDescriptor
var File_v1_api_global_time_proto protoreflect.FileDescriptor
var GlobalService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "v1.api.global.GlobalService", HandlerType: (*GlobalServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "StreamEvents", Handler: _GlobalService_StreamEvents_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "v1/api/global/global_service.proto", }
GlobalService_ServiceDesc is the grpc.ServiceDesc for GlobalService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGlobalServiceServer ¶
func RegisterGlobalServiceServer(s grpc.ServiceRegistrar, srv GlobalServiceServer)
Types ¶
type GlobalEvent ¶
type GlobalEvent struct { /// Unique identifier for the event to prevent duplicates, and to be able to retrieve the event from the server if necessary Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` /// Event name EventName string `protobuf:"bytes,2,opt,name=event_name,json=eventName,proto3" json:"event_name,omitempty"` /// Unix timestamp in milliseconds to synchronize time across clients Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` /// Game ID GameId *string `protobuf:"bytes,4,opt,name=game_id,json=gameId,proto3,oneof" json:"game_id,omitempty"` /// Player ID PlayerId *string `protobuf:"bytes,5,opt,name=player_id,json=playerId,proto3,oneof" json:"player_id,omitempty"` /// Team ID TeamId *string `protobuf:"bytes,6,opt,name=team_id,json=teamId,proto3,oneof" json:"team_id,omitempty"` /// Can be a key-value pair and the values can be string, int, float, or bool Attributes map[string]*GlobalEvent_EventAttribute `` /* 161-byte string literal not displayed */ /// Enum for event types Type GlobalEvent_EventType `protobuf:"varint,8,opt,name=type,proto3,enum=v1.api.global.GlobalEvent_EventType" json:"type,omitempty"` // contains filtered or unexported fields }
Global Events, message can trigger API calls or other events
func (*GlobalEvent) Descriptor
deprecated
func (*GlobalEvent) Descriptor() ([]byte, []int)
Deprecated: Use GlobalEvent.ProtoReflect.Descriptor instead.
func (*GlobalEvent) GetAttributes ¶
func (x *GlobalEvent) GetAttributes() map[string]*GlobalEvent_EventAttribute
func (*GlobalEvent) GetEventName ¶
func (x *GlobalEvent) GetEventName() string
func (*GlobalEvent) GetGameId ¶
func (x *GlobalEvent) GetGameId() string
func (*GlobalEvent) GetId ¶
func (x *GlobalEvent) GetId() string
func (*GlobalEvent) GetPlayerId ¶
func (x *GlobalEvent) GetPlayerId() string
func (*GlobalEvent) GetTeamId ¶
func (x *GlobalEvent) GetTeamId() string
func (*GlobalEvent) GetTimestamp ¶
func (x *GlobalEvent) GetTimestamp() int64
func (*GlobalEvent) GetType ¶
func (x *GlobalEvent) GetType() GlobalEvent_EventType
func (*GlobalEvent) ProtoMessage ¶
func (*GlobalEvent) ProtoMessage()
func (*GlobalEvent) ProtoReflect ¶
func (x *GlobalEvent) ProtoReflect() protoreflect.Message
func (*GlobalEvent) Reset ¶
func (x *GlobalEvent) Reset()
func (*GlobalEvent) String ¶
func (x *GlobalEvent) String() string
type GlobalEvent_EventAttribute ¶
type GlobalEvent_EventAttribute struct { // Types that are assignable to Value: // *GlobalEvent_EventAttribute_StringValue // *GlobalEvent_EventAttribute_IntValue // *GlobalEvent_EventAttribute_FloatValue // *GlobalEvent_EventAttribute_BoolValue Value isGlobalEvent_EventAttribute_Value `protobuf_oneof:"value"` // contains filtered or unexported fields }
/ Message for event attributes
func (*GlobalEvent_EventAttribute) Descriptor
deprecated
func (*GlobalEvent_EventAttribute) Descriptor() ([]byte, []int)
Deprecated: Use GlobalEvent_EventAttribute.ProtoReflect.Descriptor instead.
func (*GlobalEvent_EventAttribute) GetBoolValue ¶
func (x *GlobalEvent_EventAttribute) GetBoolValue() bool
func (*GlobalEvent_EventAttribute) GetFloatValue ¶
func (x *GlobalEvent_EventAttribute) GetFloatValue() float32
func (*GlobalEvent_EventAttribute) GetIntValue ¶
func (x *GlobalEvent_EventAttribute) GetIntValue() int32
func (*GlobalEvent_EventAttribute) GetStringValue ¶
func (x *GlobalEvent_EventAttribute) GetStringValue() string
func (*GlobalEvent_EventAttribute) GetValue ¶
func (m *GlobalEvent_EventAttribute) GetValue() isGlobalEvent_EventAttribute_Value
func (*GlobalEvent_EventAttribute) ProtoMessage ¶
func (*GlobalEvent_EventAttribute) ProtoMessage()
func (*GlobalEvent_EventAttribute) ProtoReflect ¶
func (x *GlobalEvent_EventAttribute) ProtoReflect() protoreflect.Message
func (*GlobalEvent_EventAttribute) Reset ¶
func (x *GlobalEvent_EventAttribute) Reset()
func (*GlobalEvent_EventAttribute) String ¶
func (x *GlobalEvent_EventAttribute) String() string
type GlobalEvent_EventAttribute_BoolValue ¶
type GlobalEvent_EventAttribute_BoolValue struct {
BoolValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue,proto3,oneof"`
}
type GlobalEvent_EventAttribute_FloatValue ¶
type GlobalEvent_EventAttribute_FloatValue struct {
FloatValue float32 `protobuf:"fixed32,3,opt,name=float_value,json=floatValue,proto3,oneof"`
}
type GlobalEvent_EventAttribute_IntValue ¶
type GlobalEvent_EventAttribute_IntValue struct {
IntValue int32 `protobuf:"varint,2,opt,name=int_value,json=intValue,proto3,oneof"`
}
type GlobalEvent_EventAttribute_StringValue ¶
type GlobalEvent_EventAttribute_StringValue struct {
StringValue string `protobuf:"bytes,1,opt,name=string_value,json=stringValue,proto3,oneof"`
}
type GlobalEvent_EventType ¶
type GlobalEvent_EventType int32
/ Enum for event types
const ( /// Custom events GlobalEvent_CUSTOM GlobalEvent_EventType = 0 /// Announcements GlobalEvent_ANNOUNCEMENT GlobalEvent_EventType = 1 /// Alerts GlobalEvent_ALERT GlobalEvent_EventType = 2 /// Events GlobalEvent_EVENT GlobalEvent_EventType = 3 /// Requests GlobalEvent_REQUEST GlobalEvent_EventType = 4 )
func (GlobalEvent_EventType) Descriptor ¶
func (GlobalEvent_EventType) Descriptor() protoreflect.EnumDescriptor
func (GlobalEvent_EventType) Enum ¶
func (x GlobalEvent_EventType) Enum() *GlobalEvent_EventType
func (GlobalEvent_EventType) EnumDescriptor
deprecated
func (GlobalEvent_EventType) EnumDescriptor() ([]byte, []int)
Deprecated: Use GlobalEvent_EventType.Descriptor instead.
func (GlobalEvent_EventType) Number ¶
func (x GlobalEvent_EventType) Number() protoreflect.EnumNumber
func (GlobalEvent_EventType) String ¶
func (x GlobalEvent_EventType) String() string
func (GlobalEvent_EventType) Type ¶
func (GlobalEvent_EventType) Type() protoreflect.EnumType
type GlobalServiceClient ¶
type GlobalServiceClient interface { // / Stream events from the global service StreamEvents(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[GlobalEvent, GlobalEvent], error) }
GlobalServiceClient is the client API for GlobalService 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.
/ Global service for joining and leaving games
func NewGlobalServiceClient ¶
func NewGlobalServiceClient(cc grpc.ClientConnInterface) GlobalServiceClient
type GlobalServiceServer ¶
type GlobalServiceServer interface { // / Stream events from the global service StreamEvents(grpc.BidiStreamingServer[GlobalEvent, GlobalEvent]) error // contains filtered or unexported methods }
GlobalServiceServer is the server API for GlobalService service. All implementations must embed UnimplementedGlobalServiceServer for forward compatibility.
/ Global service for joining and leaving games
type GlobalService_StreamEventsClient ¶
type GlobalService_StreamEventsClient = grpc.BidiStreamingClient[GlobalEvent, GlobalEvent]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type GlobalService_StreamEventsServer ¶
type GlobalService_StreamEventsServer = grpc.BidiStreamingServer[GlobalEvent, GlobalEvent]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type GlobalTime ¶
type GlobalTime struct { /// Unix timestamp in milliseconds to synchronize time across clients Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` /// Hash of the timestamp to pass to the server Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` // contains filtered or unexported fields }
/ Message to synchronize time across clients
func (*GlobalTime) Descriptor
deprecated
func (*GlobalTime) Descriptor() ([]byte, []int)
Deprecated: Use GlobalTime.ProtoReflect.Descriptor instead.
func (*GlobalTime) GetHash ¶
func (x *GlobalTime) GetHash() string
func (*GlobalTime) GetTimestamp ¶
func (x *GlobalTime) GetTimestamp() int64
func (*GlobalTime) ProtoMessage ¶
func (*GlobalTime) ProtoMessage()
func (*GlobalTime) ProtoReflect ¶
func (x *GlobalTime) ProtoReflect() protoreflect.Message
func (*GlobalTime) Reset ¶
func (x *GlobalTime) Reset()
func (*GlobalTime) String ¶
func (x *GlobalTime) String() string
type JoinLeaveGame ¶
type JoinLeaveGame struct { PlayerId string `protobuf:"bytes,1,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"` GameId string `protobuf:"bytes,2,opt,name=game_id,json=gameId,proto3" json:"game_id,omitempty"` Action JoinLeaveGame_Action `protobuf:"varint,3,opt,name=action,proto3,enum=v1.api.global.JoinLeaveGame_Action" json:"action,omitempty"` TeamId *string `protobuf:"bytes,4,opt,name=team_id,json=teamId,proto3,oneof" json:"team_id,omitempty"` SessionId *string `protobuf:"bytes,5,opt,name=session_id,json=sessionId,proto3,oneof" json:"session_id,omitempty"` Region *RegionEnum `protobuf:"varint,6,opt,name=region,proto3,enum=v1.api.global.RegionEnum,oneof" json:"region,omitempty"` // contains filtered or unexported fields }
Message joining or leaving a game
func (*JoinLeaveGame) Descriptor
deprecated
func (*JoinLeaveGame) Descriptor() ([]byte, []int)
Deprecated: Use JoinLeaveGame.ProtoReflect.Descriptor instead.
func (*JoinLeaveGame) GetAction ¶
func (x *JoinLeaveGame) GetAction() JoinLeaveGame_Action
func (*JoinLeaveGame) GetGameId ¶
func (x *JoinLeaveGame) GetGameId() string
func (*JoinLeaveGame) GetPlayerId ¶
func (x *JoinLeaveGame) GetPlayerId() string
func (*JoinLeaveGame) GetRegion ¶
func (x *JoinLeaveGame) GetRegion() RegionEnum
func (*JoinLeaveGame) GetSessionId ¶
func (x *JoinLeaveGame) GetSessionId() string
func (*JoinLeaveGame) GetTeamId ¶
func (x *JoinLeaveGame) GetTeamId() string
func (*JoinLeaveGame) ProtoMessage ¶
func (*JoinLeaveGame) ProtoMessage()
func (*JoinLeaveGame) ProtoReflect ¶
func (x *JoinLeaveGame) ProtoReflect() protoreflect.Message
func (*JoinLeaveGame) Reset ¶
func (x *JoinLeaveGame) Reset()
func (*JoinLeaveGame) String ¶
func (x *JoinLeaveGame) String() string
type JoinLeaveGame_Action ¶
type JoinLeaveGame_Action int32
const ( JoinLeaveGame_JOIN JoinLeaveGame_Action = 0 JoinLeaveGame_LEAVE JoinLeaveGame_Action = 1 )
func (JoinLeaveGame_Action) Descriptor ¶
func (JoinLeaveGame_Action) Descriptor() protoreflect.EnumDescriptor
func (JoinLeaveGame_Action) Enum ¶
func (x JoinLeaveGame_Action) Enum() *JoinLeaveGame_Action
func (JoinLeaveGame_Action) EnumDescriptor
deprecated
func (JoinLeaveGame_Action) EnumDescriptor() ([]byte, []int)
Deprecated: Use JoinLeaveGame_Action.Descriptor instead.
func (JoinLeaveGame_Action) Number ¶
func (x JoinLeaveGame_Action) Number() protoreflect.EnumNumber
func (JoinLeaveGame_Action) String ¶
func (x JoinLeaveGame_Action) String() string
func (JoinLeaveGame_Action) Type ¶
func (JoinLeaveGame_Action) Type() protoreflect.EnumType
type RegionEnum ¶
type RegionEnum int32
const ( RegionEnum_REGION_UNSPECIFIED RegionEnum = 0 // Default unspecified region // Americas RegionEnum_NA_EAST RegionEnum = 1 // North America East RegionEnum_NA_WEST RegionEnum = 2 // North America West RegionEnum_SA RegionEnum = 3 // South America (all countries) // Europe RegionEnum_EU_WEST RegionEnum = 4 // Western Europe RegionEnum_EU_CENTRAL RegionEnum = 5 // Central Europe RegionEnum_EU_NORTH RegionEnum = 6 // Northern Europe // Asia RegionEnum_AS_EAST RegionEnum = 7 // East Asia RegionEnum_AS_SE RegionEnum = 8 // Southeast Asia RegionEnum_AS_SOUTH RegionEnum = 9 // South Asia // Oceania RegionEnum_OC RegionEnum = 10 // Oceania (e.g., Australia, New Zealand) // MENA (Middle East & North Africa) RegionEnum_MENA RegionEnum = 11 // Middle East and North Africa // Sub-Saharan Africa RegionEnum_AFRICA RegionEnum = 12 // Sub-Saharan Africa // Global RegionEnum_GLOBAL RegionEnum = 13 // Cross-region/global servers )
func (RegionEnum) Descriptor ¶
func (RegionEnum) Descriptor() protoreflect.EnumDescriptor
func (RegionEnum) Enum ¶
func (x RegionEnum) Enum() *RegionEnum
func (RegionEnum) EnumDescriptor
deprecated
func (RegionEnum) EnumDescriptor() ([]byte, []int)
Deprecated: Use RegionEnum.Descriptor instead.
func (RegionEnum) Number ¶
func (x RegionEnum) Number() protoreflect.EnumNumber
func (RegionEnum) String ¶
func (x RegionEnum) String() string
func (RegionEnum) Type ¶
func (RegionEnum) Type() protoreflect.EnumType
type UnimplementedGlobalServiceServer ¶
type UnimplementedGlobalServiceServer struct{}
UnimplementedGlobalServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedGlobalServiceServer) StreamEvents ¶
func (UnimplementedGlobalServiceServer) StreamEvents(grpc.BidiStreamingServer[GlobalEvent, GlobalEvent]) error
type UnsafeGlobalServiceServer ¶
type UnsafeGlobalServiceServer interface {
// contains filtered or unexported methods
}
UnsafeGlobalServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GlobalServiceServer will result in compilation errors.