From c51e4f1eea72e4ada3bdddbf68a9ccaf75743381 Mon Sep 17 00:00:00 2001 From: Zak <34372536+ZakShearman@users.noreply.github.com> Date: Tue, 5 Nov 2024 15:22:41 +0000 Subject: [PATCH] feat: update leaderboard protos, update protoc/gen-go version --- gen/go/grpc/accountconnmanager/grpc.pb.go | 122 +-- .../grpc/accountconnmanager/grpc_grpc.pb.go | 42 +- gen/go/grpc/badge/grpc.pb.go | 340 ++----- gen/go/grpc/badge/grpc_grpc.pb.go | 66 +- gen/go/grpc/gameplayerdata/grpc.pb.go | 96 +- gen/go/grpc/gameplayerdata/grpc_grpc.pb.go | 42 +- gen/go/grpc/gametracker/grpc.pb.go | 120 +-- gen/go/grpc/gametracker/grpc_grpc.pb.go | 42 +- gen/go/grpc/leaderboard/grpc.pb.go | 316 ++----- gen/go/grpc/leaderboard/grpc_grpc.pb.go | 72 +- gen/go/grpc/matchmaker/grpc.pb.go | 344 ++----- gen/go/grpc/matchmaker/grpc_grpc.pb.go | 66 +- gen/go/grpc/mcplayer/grpc.pb.go | 650 +++---------- gen/go/grpc/mcplayer/grpc_grpc.pb.go | 136 ++- gen/go/grpc/messagehandler/grpc.pb.go | 74 +- gen/go/grpc/messagehandler/grpc_grpc.pb.go | 36 +- gen/go/grpc/party/grpc.pb.go | 860 ++++-------------- gen/go/grpc/party/grpc_grpc.pb.go | 164 +++- gen/go/grpc/permission/grpc.pb.go | 322 ++----- gen/go/grpc/permission/grpc_grpc.pb.go | 66 +- gen/go/grpc/relationship/grpc.pb.go | 496 ++-------- gen/go/grpc/relationship/grpc_grpc.pb.go | 90 +- gen/go/grpc/serverstore/grpc.pb.go | 98 +- gen/go/grpc/serverstore/grpc_grpc.pb.go | 36 +- .../message/accountconnmanager/messages.pb.go | 52 +- gen/go/message/badge/messages.pb.go | 74 +- gen/go/message/common/common_messages.pb.go | 96 +- gen/go/message/gameplayerdata/messages.pb.go | 30 +- gen/go/message/gamesdk/messages.pb.go | 30 +- gen/go/message/gametracker/messages.pb.go | 98 +- gen/go/message/leaderboard/messages.pb.go | 118 +-- gen/go/message/matchmaker/messages.pb.go | 162 +--- gen/go/message/messagehandler/messages.pb.go | 52 +- gen/go/message/party/messages.pb.go | 318 ++----- gen/go/message/permission/messages.pb.go | 52 +- gen/go/message/relationship/messages.pb.go | 96 +- gen/go/message/serverstore/messages.pb.go | 6 +- gen/go/model/accountconnmanager/models.pb.go | 32 +- gen/go/model/badge/models.pb.go | 52 +- gen/go/model/common/common_models.pb.go | 120 +-- gen/go/model/gameplayerdata/models.pb.go | 98 +- gen/go/model/gametracker/models.pb.go | 426 ++------- gen/go/model/leaderboard/models.pb.go | 52 +- gen/go/model/matchmaker/models.pb.go | 148 +-- gen/go/model/mcplayer/messages.pb.go | 30 +- gen/go/model/mcplayer/models.pb.go | 104 +-- gen/go/model/messagehandler/models.pb.go | 52 +- gen/go/model/party/models.pb.go | 120 +-- gen/go/model/permission/models.pb.go | 54 +- gen/go/model/relationship/models.pb.go | 52 +- gen/go/model/serverstore/models.pb.go | 6 +- src/proto/leaderboards/grpc.proto | 84 +- src/proto/leaderboards/messages.proto | 12 +- src/proto/leaderboards/models.proto | 20 +- 54 files changed, 1880 insertions(+), 5462 deletions(-) diff --git a/gen/go/grpc/accountconnmanager/grpc.pb.go b/gen/go/grpc/accountconnmanager/grpc.pb.go index 9d62f5f..869e75c 100644 --- a/gen/go/grpc/accountconnmanager/grpc.pb.go +++ b/gen/go/grpc/accountconnmanager/grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: account_conn_manager/grpc.proto package accountconnmanager @@ -83,11 +83,9 @@ type GetUserRequest struct { func (x *GetUserRequest) Reset() { *x = GetUserRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_account_conn_manager_grpc_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_account_conn_manager_grpc_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetUserRequest) String() string { @@ -98,7 +96,7 @@ func (*GetUserRequest) ProtoMessage() {} func (x *GetUserRequest) ProtoReflect() protoreflect.Message { mi := &file_account_conn_manager_grpc_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -173,11 +171,9 @@ type GetUserResponse struct { func (x *GetUserResponse) Reset() { *x = GetUserResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_account_conn_manager_grpc_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_account_conn_manager_grpc_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetUserResponse) String() string { @@ -188,7 +184,7 @@ func (*GetUserResponse) ProtoMessage() {} func (x *GetUserResponse) ProtoReflect() protoreflect.Message { mi := &file_account_conn_manager_grpc_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -227,11 +223,9 @@ type CreateOAuthLinkRequest struct { func (x *CreateOAuthLinkRequest) Reset() { *x = CreateOAuthLinkRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_account_conn_manager_grpc_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_account_conn_manager_grpc_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateOAuthLinkRequest) String() string { @@ -242,7 +236,7 @@ func (*CreateOAuthLinkRequest) ProtoMessage() {} func (x *CreateOAuthLinkRequest) ProtoReflect() protoreflect.Message { mi := &file_account_conn_manager_grpc_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -324,11 +318,9 @@ type CreateOAuthLinkResponse struct { func (x *CreateOAuthLinkResponse) Reset() { *x = CreateOAuthLinkResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_account_conn_manager_grpc_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_account_conn_manager_grpc_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateOAuthLinkResponse) String() string { @@ -339,7 +331,7 @@ func (*CreateOAuthLinkResponse) ProtoMessage() {} func (x *CreateOAuthLinkResponse) ProtoReflect() protoreflect.Message { mi := &file_account_conn_manager_grpc_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -369,11 +361,9 @@ type CreateOAuthLinkErrorResponse struct { func (x *CreateOAuthLinkErrorResponse) Reset() { *x = CreateOAuthLinkErrorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_account_conn_manager_grpc_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_account_conn_manager_grpc_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateOAuthLinkErrorResponse) String() string { @@ -384,7 +374,7 @@ func (*CreateOAuthLinkErrorResponse) ProtoMessage() {} func (x *CreateOAuthLinkErrorResponse) ProtoReflect() protoreflect.Message { mi := &file_account_conn_manager_grpc_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -491,7 +481,7 @@ func file_account_conn_manager_grpc_proto_rawDescGZIP() []byte { var file_account_conn_manager_grpc_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_account_conn_manager_grpc_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_account_conn_manager_grpc_proto_goTypes = []interface{}{ +var file_account_conn_manager_grpc_proto_goTypes = []any{ (CreateOAuthLinkErrorResponse_Reason)(0), // 0: emortal.grpc.account_conn_manager.CreateOAuthLinkErrorResponse.Reason (*GetUserRequest)(nil), // 1: emortal.grpc.account_conn_manager.GetUserRequest (*GetUserResponse)(nil), // 2: emortal.grpc.account_conn_manager.GetUserResponse @@ -520,74 +510,12 @@ func file_account_conn_manager_grpc_proto_init() { if File_account_conn_manager_grpc_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_account_conn_manager_grpc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetUserRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_account_conn_manager_grpc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetUserResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_account_conn_manager_grpc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateOAuthLinkRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_account_conn_manager_grpc_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateOAuthLinkResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_account_conn_manager_grpc_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateOAuthLinkErrorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_account_conn_manager_grpc_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_account_conn_manager_grpc_proto_msgTypes[0].OneofWrappers = []any{ (*GetUserRequest_MinecraftId)(nil), (*GetUserRequest_DiscordId)(nil), (*GetUserRequest_GithubId)(nil), } - file_account_conn_manager_grpc_proto_msgTypes[2].OneofWrappers = []interface{}{ + file_account_conn_manager_grpc_proto_msgTypes[2].OneofWrappers = []any{ (*CreateOAuthLinkRequest_SourceMinecraftId)(nil), (*CreateOAuthLinkRequest_SourceDiscordId)(nil), (*CreateOAuthLinkRequest_SourceGithubId)(nil), diff --git a/gen/go/grpc/accountconnmanager/grpc_grpc.pb.go b/gen/go/grpc/accountconnmanager/grpc_grpc.pb.go index 62f1aac..37484b0 100644 --- a/gen/go/grpc/accountconnmanager/grpc_grpc.pb.go +++ b/gen/go/grpc/accountconnmanager/grpc_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v5.28.0 +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.28.3 // source: account_conn_manager/grpc.proto package accountconnmanager @@ -15,8 +15,13 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + AccountConnectionManager_GetUser_FullMethodName = "/emortal.grpc.account_conn_manager.AccountConnectionManager/GetUser" + AccountConnectionManager_CreateOAuthLink_FullMethodName = "/emortal.grpc.account_conn_manager.AccountConnectionManager/CreateOAuthLink" +) // AccountConnectionManagerClient is the client API for AccountConnectionManager service. // @@ -35,8 +40,9 @@ func NewAccountConnectionManagerClient(cc grpc.ClientConnInterface) AccountConne } func (c *accountConnectionManagerClient) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetUserResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.account_conn_manager.AccountConnectionManager/GetUser", in, out, opts...) + err := c.cc.Invoke(ctx, AccountConnectionManager_GetUser_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -44,8 +50,9 @@ func (c *accountConnectionManagerClient) GetUser(ctx context.Context, in *GetUse } func (c *accountConnectionManagerClient) CreateOAuthLink(ctx context.Context, in *CreateOAuthLinkRequest, opts ...grpc.CallOption) (*CreateOAuthLinkResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CreateOAuthLinkResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.account_conn_manager.AccountConnectionManager/CreateOAuthLink", in, out, opts...) + err := c.cc.Invoke(ctx, AccountConnectionManager_CreateOAuthLink_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -54,16 +61,19 @@ func (c *accountConnectionManagerClient) CreateOAuthLink(ctx context.Context, in // AccountConnectionManagerServer is the server API for AccountConnectionManager service. // All implementations must embed UnimplementedAccountConnectionManagerServer -// for forward compatibility +// for forward compatibility. type AccountConnectionManagerServer interface { GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error) CreateOAuthLink(context.Context, *CreateOAuthLinkRequest) (*CreateOAuthLinkResponse, error) mustEmbedUnimplementedAccountConnectionManagerServer() } -// UnimplementedAccountConnectionManagerServer must be embedded to have forward compatible implementations. -type UnimplementedAccountConnectionManagerServer struct { -} +// UnimplementedAccountConnectionManagerServer 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. +type UnimplementedAccountConnectionManagerServer struct{} func (UnimplementedAccountConnectionManagerServer) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented") @@ -73,6 +83,7 @@ func (UnimplementedAccountConnectionManagerServer) CreateOAuthLink(context.Conte } func (UnimplementedAccountConnectionManagerServer) mustEmbedUnimplementedAccountConnectionManagerServer() { } +func (UnimplementedAccountConnectionManagerServer) testEmbeddedByValue() {} // UnsafeAccountConnectionManagerServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to AccountConnectionManagerServer will @@ -82,6 +93,13 @@ type UnsafeAccountConnectionManagerServer interface { } func RegisterAccountConnectionManagerServer(s grpc.ServiceRegistrar, srv AccountConnectionManagerServer) { + // If the following call pancis, it indicates UnimplementedAccountConnectionManagerServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&AccountConnectionManager_ServiceDesc, srv) } @@ -95,7 +113,7 @@ func _AccountConnectionManager_GetUser_Handler(srv interface{}, ctx context.Cont } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.account_conn_manager.AccountConnectionManager/GetUser", + FullMethod: AccountConnectionManager_GetUser_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AccountConnectionManagerServer).GetUser(ctx, req.(*GetUserRequest)) @@ -113,7 +131,7 @@ func _AccountConnectionManager_CreateOAuthLink_Handler(srv interface{}, ctx cont } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.account_conn_manager.AccountConnectionManager/CreateOAuthLink", + FullMethod: AccountConnectionManager_CreateOAuthLink_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AccountConnectionManagerServer).CreateOAuthLink(ctx, req.(*CreateOAuthLinkRequest)) diff --git a/gen/go/grpc/badge/grpc.pb.go b/gen/go/grpc/badge/grpc.pb.go index 50305a5..18f9ee3 100644 --- a/gen/go/grpc/badge/grpc.pb.go +++ b/gen/go/grpc/badge/grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: badges/grpc.proto package badge @@ -161,11 +161,9 @@ type GetPlayerBadgesRequest struct { func (x *GetPlayerBadgesRequest) Reset() { *x = GetPlayerBadgesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_badges_grpc_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_badges_grpc_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPlayerBadgesRequest) String() string { @@ -176,7 +174,7 @@ func (*GetPlayerBadgesRequest) ProtoMessage() {} func (x *GetPlayerBadgesRequest) ProtoReflect() protoreflect.Message { mi := &file_badges_grpc_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -210,11 +208,9 @@ type GetPlayerBadgesResponse struct { func (x *GetPlayerBadgesResponse) Reset() { *x = GetPlayerBadgesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_badges_grpc_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_badges_grpc_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPlayerBadgesResponse) String() string { @@ -225,7 +221,7 @@ func (*GetPlayerBadgesResponse) ProtoMessage() {} func (x *GetPlayerBadgesResponse) ProtoReflect() protoreflect.Message { mi := &file_badges_grpc_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -266,11 +262,9 @@ type SetActivePlayerBadgeRequest struct { func (x *SetActivePlayerBadgeRequest) Reset() { *x = SetActivePlayerBadgeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_badges_grpc_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_badges_grpc_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetActivePlayerBadgeRequest) String() string { @@ -281,7 +275,7 @@ func (*SetActivePlayerBadgeRequest) ProtoMessage() {} func (x *SetActivePlayerBadgeRequest) ProtoReflect() protoreflect.Message { mi := &file_badges_grpc_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -318,11 +312,9 @@ type SetActivePlayerBadgeResponse struct { func (x *SetActivePlayerBadgeResponse) Reset() { *x = SetActivePlayerBadgeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_badges_grpc_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_badges_grpc_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetActivePlayerBadgeResponse) String() string { @@ -333,7 +325,7 @@ func (*SetActivePlayerBadgeResponse) ProtoMessage() {} func (x *SetActivePlayerBadgeResponse) ProtoReflect() protoreflect.Message { mi := &file_badges_grpc_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -358,11 +350,9 @@ type SetActivePlayerBadgeErrorResponse struct { func (x *SetActivePlayerBadgeErrorResponse) Reset() { *x = SetActivePlayerBadgeErrorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_badges_grpc_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_badges_grpc_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetActivePlayerBadgeErrorResponse) String() string { @@ -373,7 +363,7 @@ func (*SetActivePlayerBadgeErrorResponse) ProtoMessage() {} func (x *SetActivePlayerBadgeErrorResponse) ProtoReflect() protoreflect.Message { mi := &file_badges_grpc_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -406,11 +396,9 @@ type GetActivePlayerBadgeRequest struct { func (x *GetActivePlayerBadgeRequest) Reset() { *x = GetActivePlayerBadgeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_badges_grpc_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_badges_grpc_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetActivePlayerBadgeRequest) String() string { @@ -421,7 +409,7 @@ func (*GetActivePlayerBadgeRequest) ProtoMessage() {} func (x *GetActivePlayerBadgeRequest) ProtoReflect() protoreflect.Message { mi := &file_badges_grpc_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -453,11 +441,9 @@ type GetActivePlayerBadgeResponse struct { func (x *GetActivePlayerBadgeResponse) Reset() { *x = GetActivePlayerBadgeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_badges_grpc_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_badges_grpc_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetActivePlayerBadgeResponse) String() string { @@ -468,7 +454,7 @@ func (*GetActivePlayerBadgeResponse) ProtoMessage() {} func (x *GetActivePlayerBadgeResponse) ProtoReflect() protoreflect.Message { mi := &file_badges_grpc_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -502,11 +488,9 @@ type AddBadgeToPlayerRequest struct { func (x *AddBadgeToPlayerRequest) Reset() { *x = AddBadgeToPlayerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_badges_grpc_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_badges_grpc_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddBadgeToPlayerRequest) String() string { @@ -517,7 +501,7 @@ func (*AddBadgeToPlayerRequest) ProtoMessage() {} func (x *AddBadgeToPlayerRequest) ProtoReflect() protoreflect.Message { mi := &file_badges_grpc_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -554,11 +538,9 @@ type AddBadgeToPlayerResponse struct { func (x *AddBadgeToPlayerResponse) Reset() { *x = AddBadgeToPlayerResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_badges_grpc_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_badges_grpc_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddBadgeToPlayerResponse) String() string { @@ -569,7 +551,7 @@ func (*AddBadgeToPlayerResponse) ProtoMessage() {} func (x *AddBadgeToPlayerResponse) ProtoReflect() protoreflect.Message { mi := &file_badges_grpc_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -594,11 +576,9 @@ type AddBadgeToPlayerErrorResponse struct { func (x *AddBadgeToPlayerErrorResponse) Reset() { *x = AddBadgeToPlayerErrorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_badges_grpc_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_badges_grpc_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddBadgeToPlayerErrorResponse) String() string { @@ -609,7 +589,7 @@ func (*AddBadgeToPlayerErrorResponse) ProtoMessage() {} func (x *AddBadgeToPlayerErrorResponse) ProtoReflect() protoreflect.Message { mi := &file_badges_grpc_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -643,11 +623,9 @@ type RemoveBadgeFromPlayerRequest struct { func (x *RemoveBadgeFromPlayerRequest) Reset() { *x = RemoveBadgeFromPlayerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_badges_grpc_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_badges_grpc_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveBadgeFromPlayerRequest) String() string { @@ -658,7 +636,7 @@ func (*RemoveBadgeFromPlayerRequest) ProtoMessage() {} func (x *RemoveBadgeFromPlayerRequest) ProtoReflect() protoreflect.Message { mi := &file_badges_grpc_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -695,11 +673,9 @@ type RemoveBadgeFromPlayerResponse struct { func (x *RemoveBadgeFromPlayerResponse) Reset() { *x = RemoveBadgeFromPlayerResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_badges_grpc_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_badges_grpc_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveBadgeFromPlayerResponse) String() string { @@ -710,7 +686,7 @@ func (*RemoveBadgeFromPlayerResponse) ProtoMessage() {} func (x *RemoveBadgeFromPlayerResponse) ProtoReflect() protoreflect.Message { mi := &file_badges_grpc_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -735,11 +711,9 @@ type RemoveBadgeFromPlayerErrorResponse struct { func (x *RemoveBadgeFromPlayerErrorResponse) Reset() { *x = RemoveBadgeFromPlayerErrorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_badges_grpc_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_badges_grpc_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveBadgeFromPlayerErrorResponse) String() string { @@ -750,7 +724,7 @@ func (*RemoveBadgeFromPlayerErrorResponse) ProtoMessage() {} func (x *RemoveBadgeFromPlayerErrorResponse) ProtoReflect() protoreflect.Message { mi := &file_badges_grpc_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -780,11 +754,9 @@ type GetBadgesRequest struct { func (x *GetBadgesRequest) Reset() { *x = GetBadgesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_badges_grpc_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_badges_grpc_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBadgesRequest) String() string { @@ -795,7 +767,7 @@ func (*GetBadgesRequest) ProtoMessage() {} func (x *GetBadgesRequest) ProtoReflect() protoreflect.Message { mi := &file_badges_grpc_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -820,11 +792,9 @@ type GetBadgesResponse struct { func (x *GetBadgesResponse) Reset() { *x = GetBadgesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_badges_grpc_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_badges_grpc_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBadgesResponse) String() string { @@ -835,7 +805,7 @@ func (*GetBadgesResponse) ProtoMessage() {} func (x *GetBadgesResponse) ProtoReflect() protoreflect.Message { mi := &file_badges_grpc_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1011,7 +981,7 @@ func file_badges_grpc_proto_rawDescGZIP() []byte { var file_badges_grpc_proto_enumTypes = make([]protoimpl.EnumInfo, 3) var file_badges_grpc_proto_msgTypes = make([]protoimpl.MessageInfo, 15) -var file_badges_grpc_proto_goTypes = []interface{}{ +var file_badges_grpc_proto_goTypes = []any{ (SetActivePlayerBadgeErrorResponse_Reason)(0), // 0: emortal.grpc.badge.SetActivePlayerBadgeErrorResponse.Reason (AddBadgeToPlayerErrorResponse_Reason)(0), // 1: emortal.grpc.badge.AddBadgeToPlayerErrorResponse.Reason (RemoveBadgeFromPlayerErrorResponse_Reason)(0), // 2: emortal.grpc.badge.RemoveBadgeFromPlayerErrorResponse.Reason @@ -1063,189 +1033,7 @@ func file_badges_grpc_proto_init() { if File_badges_grpc_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_badges_grpc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPlayerBadgesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_badges_grpc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPlayerBadgesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_badges_grpc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetActivePlayerBadgeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_badges_grpc_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetActivePlayerBadgeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_badges_grpc_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetActivePlayerBadgeErrorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_badges_grpc_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetActivePlayerBadgeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_badges_grpc_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetActivePlayerBadgeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_badges_grpc_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddBadgeToPlayerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_badges_grpc_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddBadgeToPlayerResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_badges_grpc_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddBadgeToPlayerErrorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_badges_grpc_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveBadgeFromPlayerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_badges_grpc_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveBadgeFromPlayerResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_badges_grpc_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveBadgeFromPlayerErrorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_badges_grpc_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetBadgesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_badges_grpc_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetBadgesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_badges_grpc_proto_msgTypes[1].OneofWrappers = []interface{}{} + file_badges_grpc_proto_msgTypes[1].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/go/grpc/badge/grpc_grpc.pb.go b/gen/go/grpc/badge/grpc_grpc.pb.go index 63b7b47..fd0aa10 100644 --- a/gen/go/grpc/badge/grpc_grpc.pb.go +++ b/gen/go/grpc/badge/grpc_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v5.28.0 +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.28.3 // source: badges/grpc.proto package badge @@ -15,8 +15,17 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + BadgeManager_GetPlayerBadges_FullMethodName = "/emortal.grpc.badge.BadgeManager/GetPlayerBadges" + BadgeManager_GetActivePlayerBadge_FullMethodName = "/emortal.grpc.badge.BadgeManager/GetActivePlayerBadge" + BadgeManager_SetActivePlayerBadge_FullMethodName = "/emortal.grpc.badge.BadgeManager/SetActivePlayerBadge" + BadgeManager_AddBadgeToPlayer_FullMethodName = "/emortal.grpc.badge.BadgeManager/AddBadgeToPlayer" + BadgeManager_RemoveBadgeFromPlayer_FullMethodName = "/emortal.grpc.badge.BadgeManager/RemoveBadgeFromPlayer" + BadgeManager_GetBadges_FullMethodName = "/emortal.grpc.badge.BadgeManager/GetBadges" +) // BadgeManagerClient is the client API for BadgeManager service. // @@ -40,8 +49,9 @@ func NewBadgeManagerClient(cc grpc.ClientConnInterface) BadgeManagerClient { } func (c *badgeManagerClient) GetPlayerBadges(ctx context.Context, in *GetPlayerBadgesRequest, opts ...grpc.CallOption) (*GetPlayerBadgesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetPlayerBadgesResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.badge.BadgeManager/GetPlayerBadges", in, out, opts...) + err := c.cc.Invoke(ctx, BadgeManager_GetPlayerBadges_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -49,8 +59,9 @@ func (c *badgeManagerClient) GetPlayerBadges(ctx context.Context, in *GetPlayerB } func (c *badgeManagerClient) GetActivePlayerBadge(ctx context.Context, in *GetActivePlayerBadgeRequest, opts ...grpc.CallOption) (*GetActivePlayerBadgeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetActivePlayerBadgeResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.badge.BadgeManager/GetActivePlayerBadge", in, out, opts...) + err := c.cc.Invoke(ctx, BadgeManager_GetActivePlayerBadge_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -58,8 +69,9 @@ func (c *badgeManagerClient) GetActivePlayerBadge(ctx context.Context, in *GetAc } func (c *badgeManagerClient) SetActivePlayerBadge(ctx context.Context, in *SetActivePlayerBadgeRequest, opts ...grpc.CallOption) (*SetActivePlayerBadgeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SetActivePlayerBadgeResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.badge.BadgeManager/SetActivePlayerBadge", in, out, opts...) + err := c.cc.Invoke(ctx, BadgeManager_SetActivePlayerBadge_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -67,8 +79,9 @@ func (c *badgeManagerClient) SetActivePlayerBadge(ctx context.Context, in *SetAc } func (c *badgeManagerClient) AddBadgeToPlayer(ctx context.Context, in *AddBadgeToPlayerRequest, opts ...grpc.CallOption) (*AddBadgeToPlayerResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(AddBadgeToPlayerResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.badge.BadgeManager/AddBadgeToPlayer", in, out, opts...) + err := c.cc.Invoke(ctx, BadgeManager_AddBadgeToPlayer_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -76,8 +89,9 @@ func (c *badgeManagerClient) AddBadgeToPlayer(ctx context.Context, in *AddBadgeT } func (c *badgeManagerClient) RemoveBadgeFromPlayer(ctx context.Context, in *RemoveBadgeFromPlayerRequest, opts ...grpc.CallOption) (*RemoveBadgeFromPlayerResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RemoveBadgeFromPlayerResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.badge.BadgeManager/RemoveBadgeFromPlayer", in, out, opts...) + err := c.cc.Invoke(ctx, BadgeManager_RemoveBadgeFromPlayer_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -85,8 +99,9 @@ func (c *badgeManagerClient) RemoveBadgeFromPlayer(ctx context.Context, in *Remo } func (c *badgeManagerClient) GetBadges(ctx context.Context, in *GetBadgesRequest, opts ...grpc.CallOption) (*GetBadgesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetBadgesResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.badge.BadgeManager/GetBadges", in, out, opts...) + err := c.cc.Invoke(ctx, BadgeManager_GetBadges_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -95,7 +110,7 @@ func (c *badgeManagerClient) GetBadges(ctx context.Context, in *GetBadgesRequest // BadgeManagerServer is the server API for BadgeManager service. // All implementations must embed UnimplementedBadgeManagerServer -// for forward compatibility +// for forward compatibility. type BadgeManagerServer interface { GetPlayerBadges(context.Context, *GetPlayerBadgesRequest) (*GetPlayerBadgesResponse, error) GetActivePlayerBadge(context.Context, *GetActivePlayerBadgeRequest) (*GetActivePlayerBadgeResponse, error) @@ -107,9 +122,12 @@ type BadgeManagerServer interface { mustEmbedUnimplementedBadgeManagerServer() } -// UnimplementedBadgeManagerServer must be embedded to have forward compatible implementations. -type UnimplementedBadgeManagerServer struct { -} +// UnimplementedBadgeManagerServer 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. +type UnimplementedBadgeManagerServer struct{} func (UnimplementedBadgeManagerServer) GetPlayerBadges(context.Context, *GetPlayerBadgesRequest) (*GetPlayerBadgesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetPlayerBadges not implemented") @@ -130,6 +148,7 @@ func (UnimplementedBadgeManagerServer) GetBadges(context.Context, *GetBadgesRequ return nil, status.Errorf(codes.Unimplemented, "method GetBadges not implemented") } func (UnimplementedBadgeManagerServer) mustEmbedUnimplementedBadgeManagerServer() {} +func (UnimplementedBadgeManagerServer) testEmbeddedByValue() {} // UnsafeBadgeManagerServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to BadgeManagerServer will @@ -139,6 +158,13 @@ type UnsafeBadgeManagerServer interface { } func RegisterBadgeManagerServer(s grpc.ServiceRegistrar, srv BadgeManagerServer) { + // If the following call pancis, it indicates UnimplementedBadgeManagerServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&BadgeManager_ServiceDesc, srv) } @@ -152,7 +178,7 @@ func _BadgeManager_GetPlayerBadges_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.badge.BadgeManager/GetPlayerBadges", + FullMethod: BadgeManager_GetPlayerBadges_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BadgeManagerServer).GetPlayerBadges(ctx, req.(*GetPlayerBadgesRequest)) @@ -170,7 +196,7 @@ func _BadgeManager_GetActivePlayerBadge_Handler(srv interface{}, ctx context.Con } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.badge.BadgeManager/GetActivePlayerBadge", + FullMethod: BadgeManager_GetActivePlayerBadge_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BadgeManagerServer).GetActivePlayerBadge(ctx, req.(*GetActivePlayerBadgeRequest)) @@ -188,7 +214,7 @@ func _BadgeManager_SetActivePlayerBadge_Handler(srv interface{}, ctx context.Con } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.badge.BadgeManager/SetActivePlayerBadge", + FullMethod: BadgeManager_SetActivePlayerBadge_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BadgeManagerServer).SetActivePlayerBadge(ctx, req.(*SetActivePlayerBadgeRequest)) @@ -206,7 +232,7 @@ func _BadgeManager_AddBadgeToPlayer_Handler(srv interface{}, ctx context.Context } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.badge.BadgeManager/AddBadgeToPlayer", + FullMethod: BadgeManager_AddBadgeToPlayer_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BadgeManagerServer).AddBadgeToPlayer(ctx, req.(*AddBadgeToPlayerRequest)) @@ -224,7 +250,7 @@ func _BadgeManager_RemoveBadgeFromPlayer_Handler(srv interface{}, ctx context.Co } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.badge.BadgeManager/RemoveBadgeFromPlayer", + FullMethod: BadgeManager_RemoveBadgeFromPlayer_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BadgeManagerServer).RemoveBadgeFromPlayer(ctx, req.(*RemoveBadgeFromPlayerRequest)) @@ -242,7 +268,7 @@ func _BadgeManager_GetBadges_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.badge.BadgeManager/GetBadges", + FullMethod: BadgeManager_GetBadges_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BadgeManagerServer).GetBadges(ctx, req.(*GetBadgesRequest)) diff --git a/gen/go/grpc/gameplayerdata/grpc.pb.go b/gen/go/grpc/gameplayerdata/grpc.pb.go index c55d439..2d257c4 100644 --- a/gen/go/grpc/gameplayerdata/grpc.pb.go +++ b/gen/go/grpc/gameplayerdata/grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: game_player_data/grpc.proto package gameplayerdata @@ -34,11 +34,9 @@ type GetGamePlayerDataRequest struct { func (x *GetGamePlayerDataRequest) Reset() { *x = GetGamePlayerDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_game_player_data_grpc_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_player_data_grpc_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGamePlayerDataRequest) String() string { @@ -49,7 +47,7 @@ func (*GetGamePlayerDataRequest) ProtoMessage() {} func (x *GetGamePlayerDataRequest) ProtoReflect() protoreflect.Message { mi := &file_game_player_data_grpc_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -89,11 +87,9 @@ type GetGamePlayerDataResponse struct { func (x *GetGamePlayerDataResponse) Reset() { *x = GetGamePlayerDataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_game_player_data_grpc_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_player_data_grpc_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGamePlayerDataResponse) String() string { @@ -104,7 +100,7 @@ func (*GetGamePlayerDataResponse) ProtoMessage() {} func (x *GetGamePlayerDataResponse) ProtoReflect() protoreflect.Message { mi := &file_game_player_data_grpc_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -137,11 +133,9 @@ type GetMultipleGamePlayerDataRequest struct { func (x *GetMultipleGamePlayerDataRequest) Reset() { *x = GetMultipleGamePlayerDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_game_player_data_grpc_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_player_data_grpc_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMultipleGamePlayerDataRequest) String() string { @@ -152,7 +146,7 @@ func (*GetMultipleGamePlayerDataRequest) ProtoMessage() {} func (x *GetMultipleGamePlayerDataRequest) ProtoReflect() protoreflect.Message { mi := &file_game_player_data_grpc_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -191,11 +185,9 @@ type GetMultipleGamePlayerDataResponse struct { func (x *GetMultipleGamePlayerDataResponse) Reset() { *x = GetMultipleGamePlayerDataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_game_player_data_grpc_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_player_data_grpc_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetMultipleGamePlayerDataResponse) String() string { @@ -206,7 +198,7 @@ func (*GetMultipleGamePlayerDataResponse) ProtoMessage() {} func (x *GetMultipleGamePlayerDataResponse) ProtoReflect() protoreflect.Message { mi := &file_game_player_data_grpc_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -319,7 +311,7 @@ func file_game_player_data_grpc_proto_rawDescGZIP() []byte { } var file_game_player_data_grpc_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_game_player_data_grpc_proto_goTypes = []interface{}{ +var file_game_player_data_grpc_proto_goTypes = []any{ (*GetGamePlayerDataRequest)(nil), // 0: emortal.grpc.gameplayerdata.GetGamePlayerDataRequest (*GetGamePlayerDataResponse)(nil), // 1: emortal.grpc.gameplayerdata.GetGamePlayerDataResponse (*GetMultipleGamePlayerDataRequest)(nil), // 2: emortal.grpc.gameplayerdata.GetMultipleGamePlayerDataRequest @@ -350,56 +342,6 @@ func file_game_player_data_grpc_proto_init() { if File_game_player_data_grpc_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_game_player_data_grpc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGamePlayerDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_game_player_data_grpc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGamePlayerDataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_game_player_data_grpc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetMultipleGamePlayerDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_game_player_data_grpc_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetMultipleGamePlayerDataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/go/grpc/gameplayerdata/grpc_grpc.pb.go b/gen/go/grpc/gameplayerdata/grpc_grpc.pb.go index 7d7afbf..01e49d9 100644 --- a/gen/go/grpc/gameplayerdata/grpc_grpc.pb.go +++ b/gen/go/grpc/gameplayerdata/grpc_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v5.28.0 +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.28.3 // source: game_player_data/grpc.proto package gameplayerdata @@ -15,8 +15,13 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + GamePlayerDataService_GetGamePlayerData_FullMethodName = "/emortal.grpc.gameplayerdata.GamePlayerDataService/GetGamePlayerData" + GamePlayerDataService_GetMultipleGamePlayerData_FullMethodName = "/emortal.grpc.gameplayerdata.GamePlayerDataService/GetMultipleGamePlayerData" +) // GamePlayerDataServiceClient is the client API for GamePlayerDataService service. // @@ -35,8 +40,9 @@ func NewGamePlayerDataServiceClient(cc grpc.ClientConnInterface) GamePlayerDataS } func (c *gamePlayerDataServiceClient) GetGamePlayerData(ctx context.Context, in *GetGamePlayerDataRequest, opts ...grpc.CallOption) (*GetGamePlayerDataResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetGamePlayerDataResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.gameplayerdata.GamePlayerDataService/GetGamePlayerData", in, out, opts...) + err := c.cc.Invoke(ctx, GamePlayerDataService_GetGamePlayerData_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -44,8 +50,9 @@ func (c *gamePlayerDataServiceClient) GetGamePlayerData(ctx context.Context, in } func (c *gamePlayerDataServiceClient) GetMultipleGamePlayerData(ctx context.Context, in *GetMultipleGamePlayerDataRequest, opts ...grpc.CallOption) (*GetMultipleGamePlayerDataResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetMultipleGamePlayerDataResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.gameplayerdata.GamePlayerDataService/GetMultipleGamePlayerData", in, out, opts...) + err := c.cc.Invoke(ctx, GamePlayerDataService_GetMultipleGamePlayerData_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -54,16 +61,19 @@ func (c *gamePlayerDataServiceClient) GetMultipleGamePlayerData(ctx context.Cont // GamePlayerDataServiceServer is the server API for GamePlayerDataService service. // All implementations must embed UnimplementedGamePlayerDataServiceServer -// for forward compatibility +// for forward compatibility. type GamePlayerDataServiceServer interface { GetGamePlayerData(context.Context, *GetGamePlayerDataRequest) (*GetGamePlayerDataResponse, error) GetMultipleGamePlayerData(context.Context, *GetMultipleGamePlayerDataRequest) (*GetMultipleGamePlayerDataResponse, error) mustEmbedUnimplementedGamePlayerDataServiceServer() } -// UnimplementedGamePlayerDataServiceServer must be embedded to have forward compatible implementations. -type UnimplementedGamePlayerDataServiceServer struct { -} +// UnimplementedGamePlayerDataServiceServer 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. +type UnimplementedGamePlayerDataServiceServer struct{} func (UnimplementedGamePlayerDataServiceServer) GetGamePlayerData(context.Context, *GetGamePlayerDataRequest) (*GetGamePlayerDataResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetGamePlayerData not implemented") @@ -72,6 +82,7 @@ func (UnimplementedGamePlayerDataServiceServer) GetMultipleGamePlayerData(contex return nil, status.Errorf(codes.Unimplemented, "method GetMultipleGamePlayerData not implemented") } func (UnimplementedGamePlayerDataServiceServer) mustEmbedUnimplementedGamePlayerDataServiceServer() {} +func (UnimplementedGamePlayerDataServiceServer) testEmbeddedByValue() {} // UnsafeGamePlayerDataServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to GamePlayerDataServiceServer will @@ -81,6 +92,13 @@ type UnsafeGamePlayerDataServiceServer interface { } func RegisterGamePlayerDataServiceServer(s grpc.ServiceRegistrar, srv GamePlayerDataServiceServer) { + // If the following call pancis, it indicates UnimplementedGamePlayerDataServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&GamePlayerDataService_ServiceDesc, srv) } @@ -94,7 +112,7 @@ func _GamePlayerDataService_GetGamePlayerData_Handler(srv interface{}, ctx conte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.gameplayerdata.GamePlayerDataService/GetGamePlayerData", + FullMethod: GamePlayerDataService_GetGamePlayerData_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(GamePlayerDataServiceServer).GetGamePlayerData(ctx, req.(*GetGamePlayerDataRequest)) @@ -112,7 +130,7 @@ func _GamePlayerDataService_GetMultipleGamePlayerData_Handler(srv interface{}, c } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.gameplayerdata.GamePlayerDataService/GetMultipleGamePlayerData", + FullMethod: GamePlayerDataService_GetMultipleGamePlayerData_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(GamePlayerDataServiceServer).GetMultipleGamePlayerData(ctx, req.(*GetMultipleGamePlayerDataRequest)) diff --git a/gen/go/grpc/gametracker/grpc.pb.go b/gen/go/grpc/gametracker/grpc.pb.go index ae8b91a..076c2aa 100644 --- a/gen/go/grpc/gametracker/grpc.pb.go +++ b/gen/go/grpc/gametracker/grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: game_tracker/grpc.proto package gametracker @@ -33,11 +33,9 @@ type GetPlayerActiveGameRequest struct { func (x *GetPlayerActiveGameRequest) Reset() { *x = GetPlayerActiveGameRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_game_tracker_grpc_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_tracker_grpc_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPlayerActiveGameRequest) String() string { @@ -48,7 +46,7 @@ func (*GetPlayerActiveGameRequest) ProtoMessage() {} func (x *GetPlayerActiveGameRequest) ProtoReflect() protoreflect.Message { mi := &file_game_tracker_grpc_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -78,11 +76,9 @@ type GetPlayerActiveGameResponse struct { func (x *GetPlayerActiveGameResponse) Reset() { *x = GetPlayerActiveGameResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_game_tracker_grpc_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_tracker_grpc_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPlayerActiveGameResponse) String() string { @@ -93,7 +89,7 @@ func (*GetPlayerActiveGameResponse) ProtoMessage() {} func (x *GetPlayerActiveGameResponse) ProtoReflect() protoreflect.Message { mi := &file_game_tracker_grpc_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -119,11 +115,9 @@ type ListGamesRequest struct { func (x *ListGamesRequest) Reset() { *x = ListGamesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_game_tracker_grpc_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_tracker_grpc_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGamesRequest) String() string { @@ -134,7 +128,7 @@ func (*ListGamesRequest) ProtoMessage() {} func (x *ListGamesRequest) ProtoReflect() protoreflect.Message { mi := &file_game_tracker_grpc_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -171,11 +165,9 @@ type ListGamesResponse struct { func (x *ListGamesResponse) Reset() { *x = ListGamesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_game_tracker_grpc_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_tracker_grpc_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGamesResponse) String() string { @@ -186,7 +178,7 @@ func (*ListGamesResponse) ProtoMessage() {} func (x *ListGamesResponse) ProtoReflect() protoreflect.Message { mi := &file_game_tracker_grpc_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -213,11 +205,9 @@ type ListGamesRequest_Filters struct { func (x *ListGamesRequest_Filters) Reset() { *x = ListGamesRequest_Filters{} - if protoimpl.UnsafeEnabled { - mi := &file_game_tracker_grpc_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_tracker_grpc_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListGamesRequest_Filters) String() string { @@ -228,7 +218,7 @@ func (*ListGamesRequest_Filters) ProtoMessage() {} func (x *ListGamesRequest_Filters) ProtoReflect() protoreflect.Message { mi := &file_game_tracker_grpc_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -338,7 +328,7 @@ func file_game_tracker_grpc_proto_rawDescGZIP() []byte { } var file_game_tracker_grpc_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_game_tracker_grpc_proto_goTypes = []interface{}{ +var file_game_tracker_grpc_proto_goTypes = []any{ (*GetPlayerActiveGameRequest)(nil), // 0: emortal.grpc.game_tracker.GetPlayerActiveGameRequest (*GetPlayerActiveGameResponse)(nil), // 1: emortal.grpc.game_tracker.GetPlayerActiveGameResponse (*ListGamesRequest)(nil), // 2: emortal.grpc.game_tracker.ListGamesRequest @@ -365,69 +355,7 @@ func file_game_tracker_grpc_proto_init() { if File_game_tracker_grpc_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_game_tracker_grpc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPlayerActiveGameRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_game_tracker_grpc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPlayerActiveGameResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_game_tracker_grpc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListGamesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_game_tracker_grpc_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListGamesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_game_tracker_grpc_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListGamesRequest_Filters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_game_tracker_grpc_proto_msgTypes[4].OneofWrappers = []interface{}{} + file_game_tracker_grpc_proto_msgTypes[4].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/go/grpc/gametracker/grpc_grpc.pb.go b/gen/go/grpc/gametracker/grpc_grpc.pb.go index e8fe81b..d907f7c 100644 --- a/gen/go/grpc/gametracker/grpc_grpc.pb.go +++ b/gen/go/grpc/gametracker/grpc_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v5.28.0 +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.28.3 // source: game_tracker/grpc.proto package gametracker @@ -15,8 +15,13 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + GameTracker_GetPlayerActiveGame_FullMethodName = "/emortal.grpc.game_tracker.GameTracker/GetPlayerActiveGame" + GameTracker_ListGames_FullMethodName = "/emortal.grpc.game_tracker.GameTracker/ListGames" +) // GameTrackerClient is the client API for GameTracker service. // @@ -35,8 +40,9 @@ func NewGameTrackerClient(cc grpc.ClientConnInterface) GameTrackerClient { } func (c *gameTrackerClient) GetPlayerActiveGame(ctx context.Context, in *GetPlayerActiveGameRequest, opts ...grpc.CallOption) (*GetPlayerActiveGameResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetPlayerActiveGameResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.game_tracker.GameTracker/GetPlayerActiveGame", in, out, opts...) + err := c.cc.Invoke(ctx, GameTracker_GetPlayerActiveGame_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -44,8 +50,9 @@ func (c *gameTrackerClient) GetPlayerActiveGame(ctx context.Context, in *GetPlay } func (c *gameTrackerClient) ListGames(ctx context.Context, in *ListGamesRequest, opts ...grpc.CallOption) (*ListGamesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListGamesResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.game_tracker.GameTracker/ListGames", in, out, opts...) + err := c.cc.Invoke(ctx, GameTracker_ListGames_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -54,16 +61,19 @@ func (c *gameTrackerClient) ListGames(ctx context.Context, in *ListGamesRequest, // GameTrackerServer is the server API for GameTracker service. // All implementations must embed UnimplementedGameTrackerServer -// for forward compatibility +// for forward compatibility. type GameTrackerServer interface { GetPlayerActiveGame(context.Context, *GetPlayerActiveGameRequest) (*GetPlayerActiveGameResponse, error) ListGames(context.Context, *ListGamesRequest) (*ListGamesResponse, error) mustEmbedUnimplementedGameTrackerServer() } -// UnimplementedGameTrackerServer must be embedded to have forward compatible implementations. -type UnimplementedGameTrackerServer struct { -} +// UnimplementedGameTrackerServer 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. +type UnimplementedGameTrackerServer struct{} func (UnimplementedGameTrackerServer) GetPlayerActiveGame(context.Context, *GetPlayerActiveGameRequest) (*GetPlayerActiveGameResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetPlayerActiveGame not implemented") @@ -72,6 +82,7 @@ func (UnimplementedGameTrackerServer) ListGames(context.Context, *ListGamesReque return nil, status.Errorf(codes.Unimplemented, "method ListGames not implemented") } func (UnimplementedGameTrackerServer) mustEmbedUnimplementedGameTrackerServer() {} +func (UnimplementedGameTrackerServer) testEmbeddedByValue() {} // UnsafeGameTrackerServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to GameTrackerServer will @@ -81,6 +92,13 @@ type UnsafeGameTrackerServer interface { } func RegisterGameTrackerServer(s grpc.ServiceRegistrar, srv GameTrackerServer) { + // If the following call pancis, it indicates UnimplementedGameTrackerServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&GameTracker_ServiceDesc, srv) } @@ -94,7 +112,7 @@ func _GameTracker_GetPlayerActiveGame_Handler(srv interface{}, ctx context.Conte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.game_tracker.GameTracker/GetPlayerActiveGame", + FullMethod: GameTracker_GetPlayerActiveGame_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(GameTrackerServer).GetPlayerActiveGame(ctx, req.(*GetPlayerActiveGameRequest)) @@ -112,7 +130,7 @@ func _GameTracker_ListGames_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.game_tracker.GameTracker/ListGames", + FullMethod: GameTracker_ListGames_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(GameTrackerServer).ListGames(ctx, req.(*ListGamesRequest)) diff --git a/gen/go/grpc/leaderboard/grpc.pb.go b/gen/go/grpc/leaderboard/grpc.pb.go index 8d191e7..15ae5af 100644 --- a/gen/go/grpc/leaderboard/grpc.pb.go +++ b/gen/go/grpc/leaderboard/grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: leaderboards/grpc.proto package leaderboard @@ -33,11 +33,9 @@ type CreateLeaderboardRequest struct { func (x *CreateLeaderboardRequest) Reset() { *x = CreateLeaderboardRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_leaderboards_grpc_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_leaderboards_grpc_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateLeaderboardRequest) String() string { @@ -48,7 +46,7 @@ func (*CreateLeaderboardRequest) ProtoMessage() {} func (x *CreateLeaderboardRequest) ProtoReflect() protoreflect.Message { mi := &file_leaderboards_grpc_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -78,11 +76,9 @@ type CreateLeaderboardResponse struct { func (x *CreateLeaderboardResponse) Reset() { *x = CreateLeaderboardResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_leaderboards_grpc_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_leaderboards_grpc_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateLeaderboardResponse) String() string { @@ -93,7 +89,7 @@ func (*CreateLeaderboardResponse) ProtoMessage() {} func (x *CreateLeaderboardResponse) ProtoReflect() protoreflect.Message { mi := &file_leaderboards_grpc_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -118,11 +114,9 @@ type DeleteLeaderboardRequest struct { func (x *DeleteLeaderboardRequest) Reset() { *x = DeleteLeaderboardRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_leaderboards_grpc_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_leaderboards_grpc_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteLeaderboardRequest) String() string { @@ -133,7 +127,7 @@ func (*DeleteLeaderboardRequest) ProtoMessage() {} func (x *DeleteLeaderboardRequest) ProtoReflect() protoreflect.Message { mi := &file_leaderboards_grpc_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -163,11 +157,9 @@ type DeleteLeaderboardResponse struct { func (x *DeleteLeaderboardResponse) Reset() { *x = DeleteLeaderboardResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_leaderboards_grpc_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_leaderboards_grpc_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteLeaderboardResponse) String() string { @@ -178,7 +170,7 @@ func (*DeleteLeaderboardResponse) ProtoMessage() {} func (x *DeleteLeaderboardResponse) ProtoReflect() protoreflect.Message { mi := &file_leaderboards_grpc_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -207,11 +199,9 @@ type GetEntriesRequest struct { func (x *GetEntriesRequest) Reset() { *x = GetEntriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_leaderboards_grpc_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_leaderboards_grpc_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEntriesRequest) String() string { @@ -222,7 +212,7 @@ func (*GetEntriesRequest) ProtoMessage() {} func (x *GetEntriesRequest) ProtoReflect() protoreflect.Message { mi := &file_leaderboards_grpc_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -268,11 +258,9 @@ type GetEntriesResponse struct { func (x *GetEntriesResponse) Reset() { *x = GetEntriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_leaderboards_grpc_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_leaderboards_grpc_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEntriesResponse) String() string { @@ -283,7 +271,7 @@ func (*GetEntriesResponse) ProtoMessage() {} func (x *GetEntriesResponse) ProtoReflect() protoreflect.Message { mi := &file_leaderboards_grpc_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -315,11 +303,9 @@ type GetEntryCountRequest struct { func (x *GetEntryCountRequest) Reset() { *x = GetEntryCountRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_leaderboards_grpc_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_leaderboards_grpc_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEntryCountRequest) String() string { @@ -330,7 +316,7 @@ func (*GetEntryCountRequest) ProtoMessage() {} func (x *GetEntryCountRequest) ProtoReflect() protoreflect.Message { mi := &file_leaderboards_grpc_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -362,11 +348,9 @@ type GetEntryCountResponse struct { func (x *GetEntryCountResponse) Reset() { *x = GetEntryCountResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_leaderboards_grpc_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_leaderboards_grpc_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEntryCountResponse) String() string { @@ -377,7 +361,7 @@ func (*GetEntryCountResponse) ProtoMessage() {} func (x *GetEntryCountResponse) ProtoReflect() protoreflect.Message { mi := &file_leaderboards_grpc_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -412,11 +396,9 @@ type CreateEntryRequest struct { func (x *CreateEntryRequest) Reset() { *x = CreateEntryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_leaderboards_grpc_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_leaderboards_grpc_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEntryRequest) String() string { @@ -427,7 +409,7 @@ func (*CreateEntryRequest) ProtoMessage() {} func (x *CreateEntryRequest) ProtoReflect() protoreflect.Message { mi := &file_leaderboards_grpc_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -478,11 +460,9 @@ type CreateEntryResponse struct { func (x *CreateEntryResponse) Reset() { *x = CreateEntryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_leaderboards_grpc_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_leaderboards_grpc_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEntryResponse) String() string { @@ -493,7 +473,7 @@ func (*CreateEntryResponse) ProtoMessage() {} func (x *CreateEntryResponse) ProtoReflect() protoreflect.Message { mi := &file_leaderboards_grpc_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -519,11 +499,9 @@ type DeleteEntryRequest struct { func (x *DeleteEntryRequest) Reset() { *x = DeleteEntryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_leaderboards_grpc_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_leaderboards_grpc_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEntryRequest) String() string { @@ -534,7 +512,7 @@ func (*DeleteEntryRequest) ProtoMessage() {} func (x *DeleteEntryRequest) ProtoReflect() protoreflect.Message { mi := &file_leaderboards_grpc_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -571,11 +549,9 @@ type DeleteEntryResponse struct { func (x *DeleteEntryResponse) Reset() { *x = DeleteEntryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_leaderboards_grpc_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_leaderboards_grpc_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEntryResponse) String() string { @@ -586,7 +562,7 @@ func (*DeleteEntryResponse) ProtoMessage() {} func (x *DeleteEntryResponse) ProtoReflect() protoreflect.Message { mi := &file_leaderboards_grpc_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -613,11 +589,9 @@ type UpdateScoreRequest struct { func (x *UpdateScoreRequest) Reset() { *x = UpdateScoreRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_leaderboards_grpc_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_leaderboards_grpc_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateScoreRequest) String() string { @@ -628,7 +602,7 @@ func (*UpdateScoreRequest) ProtoMessage() {} func (x *UpdateScoreRequest) ProtoReflect() protoreflect.Message { mi := &file_leaderboards_grpc_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -672,11 +646,9 @@ type UpdateScoreResponse struct { func (x *UpdateScoreResponse) Reset() { *x = UpdateScoreResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_leaderboards_grpc_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_leaderboards_grpc_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateScoreResponse) String() string { @@ -687,7 +659,7 @@ func (*UpdateScoreResponse) ProtoMessage() {} func (x *UpdateScoreResponse) ProtoReflect() protoreflect.Message { mi := &file_leaderboards_grpc_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -853,7 +825,7 @@ func file_leaderboards_grpc_proto_rawDescGZIP() []byte { } var file_leaderboards_grpc_proto_msgTypes = make([]protoimpl.MessageInfo, 15) -var file_leaderboards_grpc_proto_goTypes = []interface{}{ +var file_leaderboards_grpc_proto_goTypes = []any{ (*CreateLeaderboardRequest)(nil), // 0: emortal.grpc.leaderboard.CreateLeaderboardRequest (*CreateLeaderboardResponse)(nil), // 1: emortal.grpc.leaderboard.CreateLeaderboardResponse (*DeleteLeaderboardRequest)(nil), // 2: emortal.grpc.leaderboard.DeleteLeaderboardRequest @@ -904,176 +876,6 @@ func file_leaderboards_grpc_proto_init() { if File_leaderboards_grpc_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_leaderboards_grpc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateLeaderboardRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_leaderboards_grpc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateLeaderboardResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_leaderboards_grpc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteLeaderboardRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_leaderboards_grpc_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteLeaderboardResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_leaderboards_grpc_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetEntriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_leaderboards_grpc_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetEntriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_leaderboards_grpc_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetEntryCountRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_leaderboards_grpc_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetEntryCountResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_leaderboards_grpc_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateEntryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_leaderboards_grpc_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateEntryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_leaderboards_grpc_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteEntryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_leaderboards_grpc_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteEntryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_leaderboards_grpc_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateScoreRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_leaderboards_grpc_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateScoreResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/go/grpc/leaderboard/grpc_grpc.pb.go b/gen/go/grpc/leaderboard/grpc_grpc.pb.go index 465dcd2..f3f8639 100644 --- a/gen/go/grpc/leaderboard/grpc_grpc.pb.go +++ b/gen/go/grpc/leaderboard/grpc_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v5.28.0 +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.28.3 // source: leaderboards/grpc.proto package leaderboard @@ -15,8 +15,18 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Leaderboard_CreateLeaderboard_FullMethodName = "/emortal.grpc.leaderboard.Leaderboard/CreateLeaderboard" + Leaderboard_DeleteLeaderboard_FullMethodName = "/emortal.grpc.leaderboard.Leaderboard/DeleteLeaderboard" + Leaderboard_GetEntries_FullMethodName = "/emortal.grpc.leaderboard.Leaderboard/GetEntries" + Leaderboard_GetEntryCount_FullMethodName = "/emortal.grpc.leaderboard.Leaderboard/GetEntryCount" + Leaderboard_CreateEntry_FullMethodName = "/emortal.grpc.leaderboard.Leaderboard/CreateEntry" + Leaderboard_DeleteEntry_FullMethodName = "/emortal.grpc.leaderboard.Leaderboard/DeleteEntry" + Leaderboard_UpdateScore_FullMethodName = "/emortal.grpc.leaderboard.Leaderboard/UpdateScore" +) // LeaderboardClient is the client API for Leaderboard service. // @@ -47,8 +57,9 @@ func NewLeaderboardClient(cc grpc.ClientConnInterface) LeaderboardClient { } func (c *leaderboardClient) CreateLeaderboard(ctx context.Context, in *CreateLeaderboardRequest, opts ...grpc.CallOption) (*CreateLeaderboardResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CreateLeaderboardResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.leaderboard.Leaderboard/CreateLeaderboard", in, out, opts...) + err := c.cc.Invoke(ctx, Leaderboard_CreateLeaderboard_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -56,8 +67,9 @@ func (c *leaderboardClient) CreateLeaderboard(ctx context.Context, in *CreateLea } func (c *leaderboardClient) DeleteLeaderboard(ctx context.Context, in *DeleteLeaderboardRequest, opts ...grpc.CallOption) (*DeleteLeaderboardResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeleteLeaderboardResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.leaderboard.Leaderboard/DeleteLeaderboard", in, out, opts...) + err := c.cc.Invoke(ctx, Leaderboard_DeleteLeaderboard_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -65,8 +77,9 @@ func (c *leaderboardClient) DeleteLeaderboard(ctx context.Context, in *DeleteLea } func (c *leaderboardClient) GetEntries(ctx context.Context, in *GetEntriesRequest, opts ...grpc.CallOption) (*GetEntriesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetEntriesResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.leaderboard.Leaderboard/GetEntries", in, out, opts...) + err := c.cc.Invoke(ctx, Leaderboard_GetEntries_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -74,8 +87,9 @@ func (c *leaderboardClient) GetEntries(ctx context.Context, in *GetEntriesReques } func (c *leaderboardClient) GetEntryCount(ctx context.Context, in *GetEntryCountRequest, opts ...grpc.CallOption) (*GetEntryCountResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetEntryCountResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.leaderboard.Leaderboard/GetEntryCount", in, out, opts...) + err := c.cc.Invoke(ctx, Leaderboard_GetEntryCount_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -83,8 +97,9 @@ func (c *leaderboardClient) GetEntryCount(ctx context.Context, in *GetEntryCount } func (c *leaderboardClient) CreateEntry(ctx context.Context, in *CreateEntryRequest, opts ...grpc.CallOption) (*CreateEntryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CreateEntryResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.leaderboard.Leaderboard/CreateEntry", in, out, opts...) + err := c.cc.Invoke(ctx, Leaderboard_CreateEntry_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -92,8 +107,9 @@ func (c *leaderboardClient) CreateEntry(ctx context.Context, in *CreateEntryRequ } func (c *leaderboardClient) DeleteEntry(ctx context.Context, in *DeleteEntryRequest, opts ...grpc.CallOption) (*DeleteEntryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeleteEntryResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.leaderboard.Leaderboard/DeleteEntry", in, out, opts...) + err := c.cc.Invoke(ctx, Leaderboard_DeleteEntry_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -101,8 +117,9 @@ func (c *leaderboardClient) DeleteEntry(ctx context.Context, in *DeleteEntryRequ } func (c *leaderboardClient) UpdateScore(ctx context.Context, in *UpdateScoreRequest, opts ...grpc.CallOption) (*UpdateScoreResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UpdateScoreResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.leaderboard.Leaderboard/UpdateScore", in, out, opts...) + err := c.cc.Invoke(ctx, Leaderboard_UpdateScore_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -111,7 +128,7 @@ func (c *leaderboardClient) UpdateScore(ctx context.Context, in *UpdateScoreRequ // LeaderboardServer is the server API for Leaderboard service. // All implementations must embed UnimplementedLeaderboardServer -// for forward compatibility +// for forward compatibility. type LeaderboardServer interface { CreateLeaderboard(context.Context, *CreateLeaderboardRequest) (*CreateLeaderboardResponse, error) // If the leaderboard does not exist, an error with status NOT_FOUND is returned. @@ -130,9 +147,12 @@ type LeaderboardServer interface { mustEmbedUnimplementedLeaderboardServer() } -// UnimplementedLeaderboardServer must be embedded to have forward compatible implementations. -type UnimplementedLeaderboardServer struct { -} +// UnimplementedLeaderboardServer 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. +type UnimplementedLeaderboardServer struct{} func (UnimplementedLeaderboardServer) CreateLeaderboard(context.Context, *CreateLeaderboardRequest) (*CreateLeaderboardResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateLeaderboard not implemented") @@ -156,6 +176,7 @@ func (UnimplementedLeaderboardServer) UpdateScore(context.Context, *UpdateScoreR return nil, status.Errorf(codes.Unimplemented, "method UpdateScore not implemented") } func (UnimplementedLeaderboardServer) mustEmbedUnimplementedLeaderboardServer() {} +func (UnimplementedLeaderboardServer) testEmbeddedByValue() {} // UnsafeLeaderboardServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to LeaderboardServer will @@ -165,6 +186,13 @@ type UnsafeLeaderboardServer interface { } func RegisterLeaderboardServer(s grpc.ServiceRegistrar, srv LeaderboardServer) { + // If the following call pancis, it indicates UnimplementedLeaderboardServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&Leaderboard_ServiceDesc, srv) } @@ -178,7 +206,7 @@ func _Leaderboard_CreateLeaderboard_Handler(srv interface{}, ctx context.Context } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.leaderboard.Leaderboard/CreateLeaderboard", + FullMethod: Leaderboard_CreateLeaderboard_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(LeaderboardServer).CreateLeaderboard(ctx, req.(*CreateLeaderboardRequest)) @@ -196,7 +224,7 @@ func _Leaderboard_DeleteLeaderboard_Handler(srv interface{}, ctx context.Context } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.leaderboard.Leaderboard/DeleteLeaderboard", + FullMethod: Leaderboard_DeleteLeaderboard_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(LeaderboardServer).DeleteLeaderboard(ctx, req.(*DeleteLeaderboardRequest)) @@ -214,7 +242,7 @@ func _Leaderboard_GetEntries_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.leaderboard.Leaderboard/GetEntries", + FullMethod: Leaderboard_GetEntries_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(LeaderboardServer).GetEntries(ctx, req.(*GetEntriesRequest)) @@ -232,7 +260,7 @@ func _Leaderboard_GetEntryCount_Handler(srv interface{}, ctx context.Context, de } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.leaderboard.Leaderboard/GetEntryCount", + FullMethod: Leaderboard_GetEntryCount_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(LeaderboardServer).GetEntryCount(ctx, req.(*GetEntryCountRequest)) @@ -250,7 +278,7 @@ func _Leaderboard_CreateEntry_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.leaderboard.Leaderboard/CreateEntry", + FullMethod: Leaderboard_CreateEntry_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(LeaderboardServer).CreateEntry(ctx, req.(*CreateEntryRequest)) @@ -268,7 +296,7 @@ func _Leaderboard_DeleteEntry_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.leaderboard.Leaderboard/DeleteEntry", + FullMethod: Leaderboard_DeleteEntry_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(LeaderboardServer).DeleteEntry(ctx, req.(*DeleteEntryRequest)) @@ -286,7 +314,7 @@ func _Leaderboard_UpdateScore_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.leaderboard.Leaderboard/UpdateScore", + FullMethod: Leaderboard_UpdateScore_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(LeaderboardServer).UpdateScore(ctx, req.(*UpdateScoreRequest)) diff --git a/gen/go/grpc/matchmaker/grpc.pb.go b/gen/go/grpc/matchmaker/grpc.pb.go index 41fddd0..fff650b 100644 --- a/gen/go/grpc/matchmaker/grpc.pb.go +++ b/gen/go/grpc/matchmaker/grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: kurushimi/grpc.proto package matchmaker @@ -197,11 +197,9 @@ type QueueByPlayerRequest struct { func (x *QueueByPlayerRequest) Reset() { *x = QueueByPlayerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_kurushimi_grpc_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kurushimi_grpc_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueueByPlayerRequest) String() string { @@ -212,7 +210,7 @@ func (*QueueByPlayerRequest) ProtoMessage() {} func (x *QueueByPlayerRequest) ProtoReflect() protoreflect.Message { mi := &file_kurushimi_grpc_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -270,11 +268,9 @@ type QueueByPlayerResponse struct { func (x *QueueByPlayerResponse) Reset() { *x = QueueByPlayerResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_kurushimi_grpc_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kurushimi_grpc_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueueByPlayerResponse) String() string { @@ -285,7 +281,7 @@ func (*QueueByPlayerResponse) ProtoMessage() {} func (x *QueueByPlayerResponse) ProtoReflect() protoreflect.Message { mi := &file_kurushimi_grpc_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -310,11 +306,9 @@ type QueueByPlayerErrorResponse struct { func (x *QueueByPlayerErrorResponse) Reset() { *x = QueueByPlayerErrorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_kurushimi_grpc_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kurushimi_grpc_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueueByPlayerErrorResponse) String() string { @@ -325,7 +319,7 @@ func (*QueueByPlayerErrorResponse) ProtoMessage() {} func (x *QueueByPlayerErrorResponse) ProtoReflect() protoreflect.Message { mi := &file_kurushimi_grpc_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -361,11 +355,9 @@ type SendPlayerToLobbyRequest struct { func (x *SendPlayerToLobbyRequest) Reset() { *x = SendPlayerToLobbyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_kurushimi_grpc_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kurushimi_grpc_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SendPlayerToLobbyRequest) String() string { @@ -376,7 +368,7 @@ func (*SendPlayerToLobbyRequest) ProtoMessage() {} func (x *SendPlayerToLobbyRequest) ProtoReflect() protoreflect.Message { mi := &file_kurushimi_grpc_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -413,11 +405,9 @@ type SendPlayerToLobbyResponse struct { func (x *SendPlayerToLobbyResponse) Reset() { *x = SendPlayerToLobbyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_kurushimi_grpc_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kurushimi_grpc_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SendPlayerToLobbyResponse) String() string { @@ -428,7 +418,7 @@ func (*SendPlayerToLobbyResponse) ProtoMessage() {} func (x *SendPlayerToLobbyResponse) ProtoReflect() protoreflect.Message { mi := &file_kurushimi_grpc_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -455,11 +445,9 @@ type LoginQueueByPlayerRequest struct { func (x *LoginQueueByPlayerRequest) Reset() { *x = LoginQueueByPlayerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_kurushimi_grpc_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kurushimi_grpc_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LoginQueueByPlayerRequest) String() string { @@ -470,7 +458,7 @@ func (*LoginQueueByPlayerRequest) ProtoMessage() {} func (x *LoginQueueByPlayerRequest) ProtoReflect() protoreflect.Message { mi := &file_kurushimi_grpc_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -507,11 +495,9 @@ type LoginQueueByPlayerResponse struct { func (x *LoginQueueByPlayerResponse) Reset() { *x = LoginQueueByPlayerResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_kurushimi_grpc_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kurushimi_grpc_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LoginQueueByPlayerResponse) String() string { @@ -522,7 +508,7 @@ func (*LoginQueueByPlayerResponse) ProtoMessage() {} func (x *LoginQueueByPlayerResponse) ProtoReflect() protoreflect.Message { mi := &file_kurushimi_grpc_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -548,11 +534,9 @@ type DequeueByPlayerRequest struct { func (x *DequeueByPlayerRequest) Reset() { *x = DequeueByPlayerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_kurushimi_grpc_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kurushimi_grpc_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DequeueByPlayerRequest) String() string { @@ -563,7 +547,7 @@ func (*DequeueByPlayerRequest) ProtoMessage() {} func (x *DequeueByPlayerRequest) ProtoReflect() protoreflect.Message { mi := &file_kurushimi_grpc_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -593,11 +577,9 @@ type DequeueByPlayerResponse struct { func (x *DequeueByPlayerResponse) Reset() { *x = DequeueByPlayerResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_kurushimi_grpc_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kurushimi_grpc_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DequeueByPlayerResponse) String() string { @@ -608,7 +590,7 @@ func (*DequeueByPlayerResponse) ProtoMessage() {} func (x *DequeueByPlayerResponse) ProtoReflect() protoreflect.Message { mi := &file_kurushimi_grpc_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -633,11 +615,9 @@ type DequeueByPlayerErrorResponse struct { func (x *DequeueByPlayerErrorResponse) Reset() { *x = DequeueByPlayerErrorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_kurushimi_grpc_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kurushimi_grpc_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DequeueByPlayerErrorResponse) String() string { @@ -648,7 +628,7 @@ func (*DequeueByPlayerErrorResponse) ProtoMessage() {} func (x *DequeueByPlayerErrorResponse) ProtoReflect() protoreflect.Message { mi := &file_kurushimi_grpc_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -681,11 +661,9 @@ type ChangePlayerMapVoteRequest struct { func (x *ChangePlayerMapVoteRequest) Reset() { *x = ChangePlayerMapVoteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_kurushimi_grpc_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kurushimi_grpc_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChangePlayerMapVoteRequest) String() string { @@ -696,7 +674,7 @@ func (*ChangePlayerMapVoteRequest) ProtoMessage() {} func (x *ChangePlayerMapVoteRequest) ProtoReflect() protoreflect.Message { mi := &file_kurushimi_grpc_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -733,11 +711,9 @@ type ChangePlayerMapVoteResponse struct { func (x *ChangePlayerMapVoteResponse) Reset() { *x = ChangePlayerMapVoteResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_kurushimi_grpc_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kurushimi_grpc_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChangePlayerMapVoteResponse) String() string { @@ -748,7 +724,7 @@ func (*ChangePlayerMapVoteResponse) ProtoMessage() {} func (x *ChangePlayerMapVoteResponse) ProtoReflect() protoreflect.Message { mi := &file_kurushimi_grpc_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -773,11 +749,9 @@ type ChangePlayerMapVoteErrorResponse struct { func (x *ChangePlayerMapVoteErrorResponse) Reset() { *x = ChangePlayerMapVoteErrorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_kurushimi_grpc_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kurushimi_grpc_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChangePlayerMapVoteErrorResponse) String() string { @@ -788,7 +762,7 @@ func (*ChangePlayerMapVoteErrorResponse) ProtoMessage() {} func (x *ChangePlayerMapVoteErrorResponse) ProtoReflect() protoreflect.Message { mi := &file_kurushimi_grpc_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -820,11 +794,9 @@ type GetPlayerQueueInfoRequest struct { func (x *GetPlayerQueueInfoRequest) Reset() { *x = GetPlayerQueueInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_kurushimi_grpc_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kurushimi_grpc_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPlayerQueueInfoRequest) String() string { @@ -835,7 +807,7 @@ func (*GetPlayerQueueInfoRequest) ProtoMessage() {} func (x *GetPlayerQueueInfoRequest) ProtoReflect() protoreflect.Message { mi := &file_kurushimi_grpc_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -869,11 +841,9 @@ type GetPlayerQueueInfoResponse struct { func (x *GetPlayerQueueInfoResponse) Reset() { *x = GetPlayerQueueInfoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_kurushimi_grpc_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kurushimi_grpc_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPlayerQueueInfoResponse) String() string { @@ -884,7 +854,7 @@ func (*GetPlayerQueueInfoResponse) ProtoMessage() {} func (x *GetPlayerQueueInfoResponse) ProtoReflect() protoreflect.Message { mi := &file_kurushimi_grpc_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1104,7 +1074,7 @@ func file_kurushimi_grpc_proto_rawDescGZIP() []byte { var file_kurushimi_grpc_proto_enumTypes = make([]protoimpl.EnumInfo, 3) var file_kurushimi_grpc_proto_msgTypes = make([]protoimpl.MessageInfo, 15) -var file_kurushimi_grpc_proto_goTypes = []interface{}{ +var file_kurushimi_grpc_proto_goTypes = []any{ (QueueByPlayerErrorResponse_ErrorReason)(0), // 0: emortal.kurushimi.grpc.QueueByPlayerErrorResponse.ErrorReason (DequeueByPlayerErrorResponse_ErrorReason)(0), // 1: emortal.kurushimi.grpc.DequeueByPlayerErrorResponse.ErrorReason (ChangePlayerMapVoteErrorResponse_ErrorReason)(0), // 2: emortal.kurushimi.grpc.ChangePlayerMapVoteErrorResponse.ErrorReason @@ -1158,191 +1128,9 @@ func file_kurushimi_grpc_proto_init() { if File_kurushimi_grpc_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_kurushimi_grpc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueueByPlayerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kurushimi_grpc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueueByPlayerResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kurushimi_grpc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueueByPlayerErrorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kurushimi_grpc_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SendPlayerToLobbyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kurushimi_grpc_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SendPlayerToLobbyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kurushimi_grpc_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LoginQueueByPlayerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kurushimi_grpc_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LoginQueueByPlayerResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kurushimi_grpc_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DequeueByPlayerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kurushimi_grpc_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DequeueByPlayerResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kurushimi_grpc_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DequeueByPlayerErrorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kurushimi_grpc_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangePlayerMapVoteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kurushimi_grpc_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangePlayerMapVoteResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kurushimi_grpc_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangePlayerMapVoteErrorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kurushimi_grpc_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPlayerQueueInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kurushimi_grpc_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPlayerQueueInfoResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_kurushimi_grpc_proto_msgTypes[0].OneofWrappers = []interface{}{} - file_kurushimi_grpc_proto_msgTypes[3].OneofWrappers = []interface{}{} - file_kurushimi_grpc_proto_msgTypes[14].OneofWrappers = []interface{}{} + file_kurushimi_grpc_proto_msgTypes[0].OneofWrappers = []any{} + file_kurushimi_grpc_proto_msgTypes[3].OneofWrappers = []any{} + file_kurushimi_grpc_proto_msgTypes[14].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/go/grpc/matchmaker/grpc_grpc.pb.go b/gen/go/grpc/matchmaker/grpc_grpc.pb.go index 1bd1eb5..9ac3f02 100644 --- a/gen/go/grpc/matchmaker/grpc_grpc.pb.go +++ b/gen/go/grpc/matchmaker/grpc_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v5.28.0 +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.28.3 // source: kurushimi/grpc.proto package matchmaker @@ -15,8 +15,17 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Matchmaker_QueueByPlayer_FullMethodName = "/emortal.kurushimi.grpc.Matchmaker/QueueByPlayer" + Matchmaker_SendPlayersToLobby_FullMethodName = "/emortal.kurushimi.grpc.Matchmaker/SendPlayersToLobby" + Matchmaker_LoginQueueByPlayer_FullMethodName = "/emortal.kurushimi.grpc.Matchmaker/LoginQueueByPlayer" + Matchmaker_DequeueByPlayer_FullMethodName = "/emortal.kurushimi.grpc.Matchmaker/DequeueByPlayer" + Matchmaker_ChangePlayerMapVote_FullMethodName = "/emortal.kurushimi.grpc.Matchmaker/ChangePlayerMapVote" + Matchmaker_GetPlayerQueueInfo_FullMethodName = "/emortal.kurushimi.grpc.Matchmaker/GetPlayerQueueInfo" +) // MatchmakerClient is the client API for Matchmaker service. // @@ -46,8 +55,9 @@ func NewMatchmakerClient(cc grpc.ClientConnInterface) MatchmakerClient { } func (c *matchmakerClient) QueueByPlayer(ctx context.Context, in *QueueByPlayerRequest, opts ...grpc.CallOption) (*QueueByPlayerResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueueByPlayerResponse) - err := c.cc.Invoke(ctx, "/emortal.kurushimi.grpc.Matchmaker/QueueByPlayer", in, out, opts...) + err := c.cc.Invoke(ctx, Matchmaker_QueueByPlayer_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -55,8 +65,9 @@ func (c *matchmakerClient) QueueByPlayer(ctx context.Context, in *QueueByPlayerR } func (c *matchmakerClient) SendPlayersToLobby(ctx context.Context, in *SendPlayerToLobbyRequest, opts ...grpc.CallOption) (*SendPlayerToLobbyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SendPlayerToLobbyResponse) - err := c.cc.Invoke(ctx, "/emortal.kurushimi.grpc.Matchmaker/SendPlayersToLobby", in, out, opts...) + err := c.cc.Invoke(ctx, Matchmaker_SendPlayersToLobby_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -64,8 +75,9 @@ func (c *matchmakerClient) SendPlayersToLobby(ctx context.Context, in *SendPlaye } func (c *matchmakerClient) LoginQueueByPlayer(ctx context.Context, in *LoginQueueByPlayerRequest, opts ...grpc.CallOption) (*LoginQueueByPlayerResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(LoginQueueByPlayerResponse) - err := c.cc.Invoke(ctx, "/emortal.kurushimi.grpc.Matchmaker/LoginQueueByPlayer", in, out, opts...) + err := c.cc.Invoke(ctx, Matchmaker_LoginQueueByPlayer_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -73,8 +85,9 @@ func (c *matchmakerClient) LoginQueueByPlayer(ctx context.Context, in *LoginQueu } func (c *matchmakerClient) DequeueByPlayer(ctx context.Context, in *DequeueByPlayerRequest, opts ...grpc.CallOption) (*DequeueByPlayerResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DequeueByPlayerResponse) - err := c.cc.Invoke(ctx, "/emortal.kurushimi.grpc.Matchmaker/DequeueByPlayer", in, out, opts...) + err := c.cc.Invoke(ctx, Matchmaker_DequeueByPlayer_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -82,8 +95,9 @@ func (c *matchmakerClient) DequeueByPlayer(ctx context.Context, in *DequeueByPla } func (c *matchmakerClient) ChangePlayerMapVote(ctx context.Context, in *ChangePlayerMapVoteRequest, opts ...grpc.CallOption) (*ChangePlayerMapVoteResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ChangePlayerMapVoteResponse) - err := c.cc.Invoke(ctx, "/emortal.kurushimi.grpc.Matchmaker/ChangePlayerMapVote", in, out, opts...) + err := c.cc.Invoke(ctx, Matchmaker_ChangePlayerMapVote_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -91,8 +105,9 @@ func (c *matchmakerClient) ChangePlayerMapVote(ctx context.Context, in *ChangePl } func (c *matchmakerClient) GetPlayerQueueInfo(ctx context.Context, in *GetPlayerQueueInfoRequest, opts ...grpc.CallOption) (*GetPlayerQueueInfoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetPlayerQueueInfoResponse) - err := c.cc.Invoke(ctx, "/emortal.kurushimi.grpc.Matchmaker/GetPlayerQueueInfo", in, out, opts...) + err := c.cc.Invoke(ctx, Matchmaker_GetPlayerQueueInfo_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -101,7 +116,7 @@ func (c *matchmakerClient) GetPlayerQueueInfo(ctx context.Context, in *GetPlayer // MatchmakerServer is the server API for Matchmaker service. // All implementations must embed UnimplementedMatchmakerServer -// for forward compatibility +// for forward compatibility. type MatchmakerServer interface { QueueByPlayer(context.Context, *QueueByPlayerRequest) (*QueueByPlayerResponse, error) // SendPlayerToLobby is used to send a player to a lobby match after they've already joined the server. @@ -119,9 +134,12 @@ type MatchmakerServer interface { mustEmbedUnimplementedMatchmakerServer() } -// UnimplementedMatchmakerServer must be embedded to have forward compatible implementations. -type UnimplementedMatchmakerServer struct { -} +// UnimplementedMatchmakerServer 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. +type UnimplementedMatchmakerServer struct{} func (UnimplementedMatchmakerServer) QueueByPlayer(context.Context, *QueueByPlayerRequest) (*QueueByPlayerResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method QueueByPlayer not implemented") @@ -142,6 +160,7 @@ func (UnimplementedMatchmakerServer) GetPlayerQueueInfo(context.Context, *GetPla return nil, status.Errorf(codes.Unimplemented, "method GetPlayerQueueInfo not implemented") } func (UnimplementedMatchmakerServer) mustEmbedUnimplementedMatchmakerServer() {} +func (UnimplementedMatchmakerServer) testEmbeddedByValue() {} // UnsafeMatchmakerServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to MatchmakerServer will @@ -151,6 +170,13 @@ type UnsafeMatchmakerServer interface { } func RegisterMatchmakerServer(s grpc.ServiceRegistrar, srv MatchmakerServer) { + // If the following call pancis, it indicates UnimplementedMatchmakerServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&Matchmaker_ServiceDesc, srv) } @@ -164,7 +190,7 @@ func _Matchmaker_QueueByPlayer_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.kurushimi.grpc.Matchmaker/QueueByPlayer", + FullMethod: Matchmaker_QueueByPlayer_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MatchmakerServer).QueueByPlayer(ctx, req.(*QueueByPlayerRequest)) @@ -182,7 +208,7 @@ func _Matchmaker_SendPlayersToLobby_Handler(srv interface{}, ctx context.Context } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.kurushimi.grpc.Matchmaker/SendPlayersToLobby", + FullMethod: Matchmaker_SendPlayersToLobby_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MatchmakerServer).SendPlayersToLobby(ctx, req.(*SendPlayerToLobbyRequest)) @@ -200,7 +226,7 @@ func _Matchmaker_LoginQueueByPlayer_Handler(srv interface{}, ctx context.Context } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.kurushimi.grpc.Matchmaker/LoginQueueByPlayer", + FullMethod: Matchmaker_LoginQueueByPlayer_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MatchmakerServer).LoginQueueByPlayer(ctx, req.(*LoginQueueByPlayerRequest)) @@ -218,7 +244,7 @@ func _Matchmaker_DequeueByPlayer_Handler(srv interface{}, ctx context.Context, d } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.kurushimi.grpc.Matchmaker/DequeueByPlayer", + FullMethod: Matchmaker_DequeueByPlayer_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MatchmakerServer).DequeueByPlayer(ctx, req.(*DequeueByPlayerRequest)) @@ -236,7 +262,7 @@ func _Matchmaker_ChangePlayerMapVote_Handler(srv interface{}, ctx context.Contex } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.kurushimi.grpc.Matchmaker/ChangePlayerMapVote", + FullMethod: Matchmaker_ChangePlayerMapVote_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MatchmakerServer).ChangePlayerMapVote(ctx, req.(*ChangePlayerMapVoteRequest)) @@ -254,7 +280,7 @@ func _Matchmaker_GetPlayerQueueInfo_Handler(srv interface{}, ctx context.Context } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.kurushimi.grpc.Matchmaker/GetPlayerQueueInfo", + FullMethod: Matchmaker_GetPlayerQueueInfo_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MatchmakerServer).GetPlayerQueueInfo(ctx, req.(*GetPlayerQueueInfoRequest)) diff --git a/gen/go/grpc/mcplayer/grpc.pb.go b/gen/go/grpc/mcplayer/grpc.pb.go index c142c2b..8b8b97c 100644 --- a/gen/go/grpc/mcplayer/grpc.pb.go +++ b/gen/go/grpc/mcplayer/grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: mc_player/grpc.proto package mcplayer @@ -81,11 +81,9 @@ type GetPlayerRequest struct { func (x *GetPlayerRequest) Reset() { *x = GetPlayerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_mc_player_grpc_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mc_player_grpc_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPlayerRequest) String() string { @@ -96,7 +94,7 @@ func (*GetPlayerRequest) ProtoMessage() {} func (x *GetPlayerRequest) ProtoReflect() protoreflect.Message { mi := &file_mc_player_grpc_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -128,11 +126,9 @@ type GetPlayerResponse struct { func (x *GetPlayerResponse) Reset() { *x = GetPlayerResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_mc_player_grpc_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mc_player_grpc_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPlayerResponse) String() string { @@ -143,7 +139,7 @@ func (*GetPlayerResponse) ProtoMessage() {} func (x *GetPlayerResponse) ProtoReflect() protoreflect.Message { mi := &file_mc_player_grpc_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -175,11 +171,9 @@ type GetPlayersRequest struct { func (x *GetPlayersRequest) Reset() { *x = GetPlayersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_mc_player_grpc_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mc_player_grpc_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPlayersRequest) String() string { @@ -190,7 +184,7 @@ func (*GetPlayersRequest) ProtoMessage() {} func (x *GetPlayersRequest) ProtoReflect() protoreflect.Message { mi := &file_mc_player_grpc_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -222,11 +216,9 @@ type GetPlayersResponse struct { func (x *GetPlayersResponse) Reset() { *x = GetPlayersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_mc_player_grpc_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mc_player_grpc_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPlayersResponse) String() string { @@ -237,7 +229,7 @@ func (*GetPlayersResponse) ProtoMessage() {} func (x *GetPlayersResponse) ProtoReflect() protoreflect.Message { mi := &file_mc_player_grpc_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -269,11 +261,9 @@ type PlayerUsernameRequest struct { func (x *PlayerUsernameRequest) Reset() { *x = PlayerUsernameRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_mc_player_grpc_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mc_player_grpc_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PlayerUsernameRequest) String() string { @@ -284,7 +274,7 @@ func (*PlayerUsernameRequest) ProtoMessage() {} func (x *PlayerUsernameRequest) ProtoReflect() protoreflect.Message { mi := &file_mc_player_grpc_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -316,11 +306,9 @@ type GetPlayerByUsernameResponse struct { func (x *GetPlayerByUsernameResponse) Reset() { *x = GetPlayerByUsernameResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_mc_player_grpc_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mc_player_grpc_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPlayerByUsernameResponse) String() string { @@ -331,7 +319,7 @@ func (*GetPlayerByUsernameResponse) ProtoMessage() {} func (x *GetPlayerByUsernameResponse) ProtoReflect() protoreflect.Message { mi := &file_mc_player_grpc_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -365,11 +353,9 @@ type McPageablePlayerRequest struct { func (x *McPageablePlayerRequest) Reset() { *x = McPageablePlayerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_mc_player_grpc_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mc_player_grpc_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *McPageablePlayerRequest) String() string { @@ -380,7 +366,7 @@ func (*McPageablePlayerRequest) ProtoMessage() {} func (x *McPageablePlayerRequest) ProtoReflect() protoreflect.Message { mi := &file_mc_player_grpc_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -434,11 +420,9 @@ type SearchPlayersByUsernameRequest struct { func (x *SearchPlayersByUsernameRequest) Reset() { *x = SearchPlayersByUsernameRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_mc_player_grpc_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mc_player_grpc_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchPlayersByUsernameRequest) String() string { @@ -449,7 +433,7 @@ func (*SearchPlayersByUsernameRequest) ProtoMessage() {} func (x *SearchPlayersByUsernameRequest) ProtoReflect() protoreflect.Message { mi := &file_mc_player_grpc_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -510,11 +494,9 @@ type SearchPlayersByUsernameResponse struct { func (x *SearchPlayersByUsernameResponse) Reset() { *x = SearchPlayersByUsernameResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_mc_player_grpc_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mc_player_grpc_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SearchPlayersByUsernameResponse) String() string { @@ -525,7 +507,7 @@ func (*SearchPlayersByUsernameResponse) ProtoMessage() {} func (x *SearchPlayersByUsernameResponse) ProtoReflect() protoreflect.Message { mi := &file_mc_player_grpc_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -565,11 +547,9 @@ type GetLoginSessionsRequest struct { func (x *GetLoginSessionsRequest) Reset() { *x = GetLoginSessionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_mc_player_grpc_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mc_player_grpc_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetLoginSessionsRequest) String() string { @@ -580,7 +560,7 @@ func (*GetLoginSessionsRequest) ProtoMessage() {} func (x *GetLoginSessionsRequest) ProtoReflect() protoreflect.Message { mi := &file_mc_player_grpc_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -620,11 +600,9 @@ type LoginSessionsResponse struct { func (x *LoginSessionsResponse) Reset() { *x = LoginSessionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_mc_player_grpc_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mc_player_grpc_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LoginSessionsResponse) String() string { @@ -635,7 +613,7 @@ func (*LoginSessionsResponse) ProtoMessage() {} func (x *LoginSessionsResponse) ProtoReflect() protoreflect.Message { mi := &file_mc_player_grpc_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -672,11 +650,9 @@ type GetStatTotalUniquePlayersRequest struct { func (x *GetStatTotalUniquePlayersRequest) Reset() { *x = GetStatTotalUniquePlayersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_mc_player_grpc_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mc_player_grpc_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetStatTotalUniquePlayersRequest) String() string { @@ -687,7 +663,7 @@ func (*GetStatTotalUniquePlayersRequest) ProtoMessage() {} func (x *GetStatTotalUniquePlayersRequest) ProtoReflect() protoreflect.Message { mi := &file_mc_player_grpc_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -712,11 +688,9 @@ type GetStatTotalUniquePlayersResponse struct { func (x *GetStatTotalUniquePlayersResponse) Reset() { *x = GetStatTotalUniquePlayersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_mc_player_grpc_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mc_player_grpc_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetStatTotalUniquePlayersResponse) String() string { @@ -727,7 +701,7 @@ func (*GetStatTotalUniquePlayersResponse) ProtoMessage() {} func (x *GetStatTotalUniquePlayersResponse) ProtoReflect() protoreflect.Message { mi := &file_mc_player_grpc_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -757,11 +731,9 @@ type GetStatTotalPlaytimeRequest struct { func (x *GetStatTotalPlaytimeRequest) Reset() { *x = GetStatTotalPlaytimeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_mc_player_grpc_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mc_player_grpc_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetStatTotalPlaytimeRequest) String() string { @@ -772,7 +744,7 @@ func (*GetStatTotalPlaytimeRequest) ProtoMessage() {} func (x *GetStatTotalPlaytimeRequest) ProtoReflect() protoreflect.Message { mi := &file_mc_player_grpc_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -797,11 +769,9 @@ type GetStatTotalPlaytimeResponse struct { func (x *GetStatTotalPlaytimeResponse) Reset() { *x = GetStatTotalPlaytimeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_mc_player_grpc_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mc_player_grpc_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetStatTotalPlaytimeResponse) String() string { @@ -812,7 +782,7 @@ func (*GetStatTotalPlaytimeResponse) ProtoMessage() {} func (x *GetStatTotalPlaytimeResponse) ProtoReflect() protoreflect.Message { mi := &file_mc_player_grpc_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -844,11 +814,9 @@ type GetPlayerServersRequest struct { func (x *GetPlayerServersRequest) Reset() { *x = GetPlayerServersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_mc_player_grpc_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mc_player_grpc_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPlayerServersRequest) String() string { @@ -859,7 +827,7 @@ func (*GetPlayerServersRequest) ProtoMessage() {} func (x *GetPlayerServersRequest) ProtoReflect() protoreflect.Message { mi := &file_mc_player_grpc_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -891,11 +859,9 @@ type GetPlayerServersResponse struct { func (x *GetPlayerServersResponse) Reset() { *x = GetPlayerServersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_mc_player_grpc_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mc_player_grpc_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPlayerServersResponse) String() string { @@ -906,7 +872,7 @@ func (*GetPlayerServersResponse) ProtoMessage() {} func (x *GetPlayerServersResponse) ProtoReflect() protoreflect.Message { mi := &file_mc_player_grpc_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -938,11 +904,9 @@ type GetServerPlayersRequest struct { func (x *GetServerPlayersRequest) Reset() { *x = GetServerPlayersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_mc_player_grpc_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mc_player_grpc_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetServerPlayersRequest) String() string { @@ -953,7 +917,7 @@ func (*GetServerPlayersRequest) ProtoMessage() {} func (x *GetServerPlayersRequest) ProtoReflect() protoreflect.Message { mi := &file_mc_player_grpc_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -985,11 +949,9 @@ type GetServerPlayersResponse struct { func (x *GetServerPlayersResponse) Reset() { *x = GetServerPlayersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_mc_player_grpc_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mc_player_grpc_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetServerPlayersResponse) String() string { @@ -1000,7 +962,7 @@ func (*GetServerPlayersResponse) ProtoMessage() {} func (x *GetServerPlayersResponse) ProtoReflect() protoreflect.Message { mi := &file_mc_player_grpc_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1035,11 +997,9 @@ type GetPlayerCountRequest struct { func (x *GetPlayerCountRequest) Reset() { *x = GetPlayerCountRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_mc_player_grpc_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mc_player_grpc_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPlayerCountRequest) String() string { @@ -1050,7 +1010,7 @@ func (*GetPlayerCountRequest) ProtoMessage() {} func (x *GetPlayerCountRequest) ProtoReflect() protoreflect.Message { mi := &file_mc_player_grpc_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1089,11 +1049,9 @@ type GetPlayerCountResponse struct { func (x *GetPlayerCountResponse) Reset() { *x = GetPlayerCountResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_mc_player_grpc_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mc_player_grpc_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPlayerCountResponse) String() string { @@ -1104,7 +1062,7 @@ func (*GetPlayerCountResponse) ProtoMessage() {} func (x *GetPlayerCountResponse) ProtoReflect() protoreflect.Message { mi := &file_mc_player_grpc_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1136,11 +1094,9 @@ type GetFleetsPlayerCountRequest struct { func (x *GetFleetsPlayerCountRequest) Reset() { *x = GetFleetsPlayerCountRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_mc_player_grpc_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mc_player_grpc_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFleetsPlayerCountRequest) String() string { @@ -1151,7 +1107,7 @@ func (*GetFleetsPlayerCountRequest) ProtoMessage() {} func (x *GetFleetsPlayerCountRequest) ProtoReflect() protoreflect.Message { mi := &file_mc_player_grpc_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1183,11 +1139,9 @@ type GetFleetsPlayerCountResponse struct { func (x *GetFleetsPlayerCountResponse) Reset() { *x = GetFleetsPlayerCountResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_mc_player_grpc_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mc_player_grpc_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFleetsPlayerCountResponse) String() string { @@ -1198,7 +1152,7 @@ func (*GetFleetsPlayerCountResponse) ProtoMessage() {} func (x *GetFleetsPlayerCountResponse) ProtoReflect() protoreflect.Message { mi := &file_mc_player_grpc_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1233,11 +1187,9 @@ type GetGlobalPlayersSummaryRequest struct { func (x *GetGlobalPlayersSummaryRequest) Reset() { *x = GetGlobalPlayersSummaryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_mc_player_grpc_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mc_player_grpc_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGlobalPlayersSummaryRequest) String() string { @@ -1248,7 +1200,7 @@ func (*GetGlobalPlayersSummaryRequest) ProtoMessage() {} func (x *GetGlobalPlayersSummaryRequest) ProtoReflect() protoreflect.Message { mi := &file_mc_player_grpc_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1287,11 +1239,9 @@ type GetGlobalPlayersSummaryResponse struct { func (x *GetGlobalPlayersSummaryResponse) Reset() { *x = GetGlobalPlayersSummaryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_mc_player_grpc_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mc_player_grpc_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetGlobalPlayersSummaryResponse) String() string { @@ -1302,7 +1252,7 @@ func (*GetGlobalPlayersSummaryResponse) ProtoMessage() {} func (x *GetGlobalPlayersSummaryResponse) ProtoReflect() protoreflect.Message { mi := &file_mc_player_grpc_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1338,11 +1288,9 @@ type AddExperienceToPlayersRequest struct { func (x *AddExperienceToPlayersRequest) Reset() { *x = AddExperienceToPlayersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_mc_player_grpc_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mc_player_grpc_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddExperienceToPlayersRequest) String() string { @@ -1353,7 +1301,7 @@ func (*AddExperienceToPlayersRequest) ProtoMessage() {} func (x *AddExperienceToPlayersRequest) ProtoReflect() protoreflect.Message { mi := &file_mc_player_grpc_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1400,11 +1348,9 @@ type AddExperienceToPlayersResponse struct { func (x *AddExperienceToPlayersResponse) Reset() { *x = AddExperienceToPlayersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_mc_player_grpc_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mc_player_grpc_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddExperienceToPlayersResponse) String() string { @@ -1415,7 +1361,7 @@ func (*AddExperienceToPlayersResponse) ProtoMessage() {} func (x *AddExperienceToPlayersResponse) ProtoReflect() protoreflect.Message { mi := &file_mc_player_grpc_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1448,11 +1394,9 @@ type GetPlayerExperienceRequest struct { func (x *GetPlayerExperienceRequest) Reset() { *x = GetPlayerExperienceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_mc_player_grpc_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mc_player_grpc_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPlayerExperienceRequest) String() string { @@ -1463,7 +1407,7 @@ func (*GetPlayerExperienceRequest) ProtoMessage() {} func (x *GetPlayerExperienceRequest) ProtoReflect() protoreflect.Message { mi := &file_mc_player_grpc_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1495,11 +1439,9 @@ type GetPlayerExperienceResponse struct { func (x *GetPlayerExperienceResponse) Reset() { *x = GetPlayerExperienceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_mc_player_grpc_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mc_player_grpc_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPlayerExperienceResponse) String() string { @@ -1510,7 +1452,7 @@ func (*GetPlayerExperienceResponse) ProtoMessage() {} func (x *GetPlayerExperienceResponse) ProtoReflect() protoreflect.Message { mi := &file_mc_player_grpc_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1840,7 +1782,7 @@ func file_mc_player_grpc_proto_rawDescGZIP() []byte { var file_mc_player_grpc_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_mc_player_grpc_proto_msgTypes = make([]protoimpl.MessageInfo, 32) -var file_mc_player_grpc_proto_goTypes = []interface{}{ +var file_mc_player_grpc_proto_goTypes = []any{ (SearchPlayersByUsernameRequest_FilterMethod)(0), // 0: emortal.grpc.SearchPlayersByUsernameRequest.FilterMethod (*GetPlayerRequest)(nil), // 1: emortal.grpc.GetPlayerRequest (*GetPlayerResponse)(nil), // 2: emortal.grpc.GetPlayerResponse @@ -1938,358 +1880,8 @@ func file_mc_player_grpc_proto_init() { if File_mc_player_grpc_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_mc_player_grpc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPlayerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_mc_player_grpc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPlayerResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_mc_player_grpc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPlayersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_mc_player_grpc_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPlayersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_mc_player_grpc_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PlayerUsernameRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_mc_player_grpc_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPlayerByUsernameResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_mc_player_grpc_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*McPageablePlayerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_mc_player_grpc_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SearchPlayersByUsernameRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_mc_player_grpc_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SearchPlayersByUsernameResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_mc_player_grpc_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLoginSessionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_mc_player_grpc_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LoginSessionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_mc_player_grpc_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetStatTotalUniquePlayersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_mc_player_grpc_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetStatTotalUniquePlayersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_mc_player_grpc_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetStatTotalPlaytimeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_mc_player_grpc_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetStatTotalPlaytimeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_mc_player_grpc_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPlayerServersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_mc_player_grpc_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPlayerServersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_mc_player_grpc_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetServerPlayersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_mc_player_grpc_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetServerPlayersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_mc_player_grpc_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPlayerCountRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_mc_player_grpc_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPlayerCountResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_mc_player_grpc_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetFleetsPlayerCountRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_mc_player_grpc_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetFleetsPlayerCountResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_mc_player_grpc_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGlobalPlayersSummaryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_mc_player_grpc_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGlobalPlayersSummaryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_mc_player_grpc_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddExperienceToPlayersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_mc_player_grpc_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddExperienceToPlayersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_mc_player_grpc_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPlayerExperienceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_mc_player_grpc_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPlayerExperienceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_mc_player_grpc_proto_msgTypes[19].OneofWrappers = []interface{}{} - file_mc_player_grpc_proto_msgTypes[23].OneofWrappers = []interface{}{} + file_mc_player_grpc_proto_msgTypes[19].OneofWrappers = []any{} + file_mc_player_grpc_proto_msgTypes[23].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/go/grpc/mcplayer/grpc_grpc.pb.go b/gen/go/grpc/mcplayer/grpc_grpc.pb.go index 8eb3c13..87c7bf6 100644 --- a/gen/go/grpc/mcplayer/grpc_grpc.pb.go +++ b/gen/go/grpc/mcplayer/grpc_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v5.28.0 +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.28.3 // source: mc_player/grpc.proto package mcplayer @@ -15,8 +15,20 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + McPlayer_GetPlayer_FullMethodName = "/emortal.grpc.McPlayer/GetPlayer" + McPlayer_GetPlayers_FullMethodName = "/emortal.grpc.McPlayer/GetPlayers" + McPlayer_GetPlayerByUsername_FullMethodName = "/emortal.grpc.McPlayer/GetPlayerByUsername" + McPlayer_SearchPlayersByUsername_FullMethodName = "/emortal.grpc.McPlayer/SearchPlayersByUsername" + McPlayer_GetLoginSessions_FullMethodName = "/emortal.grpc.McPlayer/GetLoginSessions" + McPlayer_GetStatTotalUniquePlayers_FullMethodName = "/emortal.grpc.McPlayer/GetStatTotalUniquePlayers" + McPlayer_GetStatTotalPlaytime_FullMethodName = "/emortal.grpc.McPlayer/GetStatTotalPlaytime" + McPlayer_AddExperienceToPlayers_FullMethodName = "/emortal.grpc.McPlayer/AddExperienceToPlayers" + McPlayer_GetPlayerExperience_FullMethodName = "/emortal.grpc.McPlayer/GetPlayerExperience" +) // McPlayerClient is the client API for McPlayer service. // @@ -42,8 +54,9 @@ func NewMcPlayerClient(cc grpc.ClientConnInterface) McPlayerClient { } func (c *mcPlayerClient) GetPlayer(ctx context.Context, in *GetPlayerRequest, opts ...grpc.CallOption) (*GetPlayerResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetPlayerResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.McPlayer/GetPlayer", in, out, opts...) + err := c.cc.Invoke(ctx, McPlayer_GetPlayer_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -51,8 +64,9 @@ func (c *mcPlayerClient) GetPlayer(ctx context.Context, in *GetPlayerRequest, op } func (c *mcPlayerClient) GetPlayers(ctx context.Context, in *GetPlayersRequest, opts ...grpc.CallOption) (*GetPlayersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetPlayersResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.McPlayer/GetPlayers", in, out, opts...) + err := c.cc.Invoke(ctx, McPlayer_GetPlayers_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -60,8 +74,9 @@ func (c *mcPlayerClient) GetPlayers(ctx context.Context, in *GetPlayersRequest, } func (c *mcPlayerClient) GetPlayerByUsername(ctx context.Context, in *PlayerUsernameRequest, opts ...grpc.CallOption) (*GetPlayerByUsernameResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetPlayerByUsernameResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.McPlayer/GetPlayerByUsername", in, out, opts...) + err := c.cc.Invoke(ctx, McPlayer_GetPlayerByUsername_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -69,8 +84,9 @@ func (c *mcPlayerClient) GetPlayerByUsername(ctx context.Context, in *PlayerUser } func (c *mcPlayerClient) SearchPlayersByUsername(ctx context.Context, in *SearchPlayersByUsernameRequest, opts ...grpc.CallOption) (*SearchPlayersByUsernameResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SearchPlayersByUsernameResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.McPlayer/SearchPlayersByUsername", in, out, opts...) + err := c.cc.Invoke(ctx, McPlayer_SearchPlayersByUsername_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -78,8 +94,9 @@ func (c *mcPlayerClient) SearchPlayersByUsername(ctx context.Context, in *Search } func (c *mcPlayerClient) GetLoginSessions(ctx context.Context, in *GetLoginSessionsRequest, opts ...grpc.CallOption) (*LoginSessionsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(LoginSessionsResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.McPlayer/GetLoginSessions", in, out, opts...) + err := c.cc.Invoke(ctx, McPlayer_GetLoginSessions_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -87,8 +104,9 @@ func (c *mcPlayerClient) GetLoginSessions(ctx context.Context, in *GetLoginSessi } func (c *mcPlayerClient) GetStatTotalUniquePlayers(ctx context.Context, in *GetStatTotalUniquePlayersRequest, opts ...grpc.CallOption) (*GetStatTotalUniquePlayersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetStatTotalUniquePlayersResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.McPlayer/GetStatTotalUniquePlayers", in, out, opts...) + err := c.cc.Invoke(ctx, McPlayer_GetStatTotalUniquePlayers_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -96,8 +114,9 @@ func (c *mcPlayerClient) GetStatTotalUniquePlayers(ctx context.Context, in *GetS } func (c *mcPlayerClient) GetStatTotalPlaytime(ctx context.Context, in *GetStatTotalPlaytimeRequest, opts ...grpc.CallOption) (*GetStatTotalPlaytimeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetStatTotalPlaytimeResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.McPlayer/GetStatTotalPlaytime", in, out, opts...) + err := c.cc.Invoke(ctx, McPlayer_GetStatTotalPlaytime_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -105,8 +124,9 @@ func (c *mcPlayerClient) GetStatTotalPlaytime(ctx context.Context, in *GetStatTo } func (c *mcPlayerClient) AddExperienceToPlayers(ctx context.Context, in *AddExperienceToPlayersRequest, opts ...grpc.CallOption) (*AddExperienceToPlayersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(AddExperienceToPlayersResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.McPlayer/AddExperienceToPlayers", in, out, opts...) + err := c.cc.Invoke(ctx, McPlayer_AddExperienceToPlayers_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -114,8 +134,9 @@ func (c *mcPlayerClient) AddExperienceToPlayers(ctx context.Context, in *AddExpe } func (c *mcPlayerClient) GetPlayerExperience(ctx context.Context, in *GetPlayerExperienceRequest, opts ...grpc.CallOption) (*GetPlayerExperienceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetPlayerExperienceResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.McPlayer/GetPlayerExperience", in, out, opts...) + err := c.cc.Invoke(ctx, McPlayer_GetPlayerExperience_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -124,7 +145,7 @@ func (c *mcPlayerClient) GetPlayerExperience(ctx context.Context, in *GetPlayerE // McPlayerServer is the server API for McPlayer service. // All implementations must embed UnimplementedMcPlayerServer -// for forward compatibility +// for forward compatibility. type McPlayerServer interface { GetPlayer(context.Context, *GetPlayerRequest) (*GetPlayerResponse, error) GetPlayers(context.Context, *GetPlayersRequest) (*GetPlayersResponse, error) @@ -138,9 +159,12 @@ type McPlayerServer interface { mustEmbedUnimplementedMcPlayerServer() } -// UnimplementedMcPlayerServer must be embedded to have forward compatible implementations. -type UnimplementedMcPlayerServer struct { -} +// UnimplementedMcPlayerServer 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. +type UnimplementedMcPlayerServer struct{} func (UnimplementedMcPlayerServer) GetPlayer(context.Context, *GetPlayerRequest) (*GetPlayerResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetPlayer not implemented") @@ -170,6 +194,7 @@ func (UnimplementedMcPlayerServer) GetPlayerExperience(context.Context, *GetPlay return nil, status.Errorf(codes.Unimplemented, "method GetPlayerExperience not implemented") } func (UnimplementedMcPlayerServer) mustEmbedUnimplementedMcPlayerServer() {} +func (UnimplementedMcPlayerServer) testEmbeddedByValue() {} // UnsafeMcPlayerServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to McPlayerServer will @@ -179,6 +204,13 @@ type UnsafeMcPlayerServer interface { } func RegisterMcPlayerServer(s grpc.ServiceRegistrar, srv McPlayerServer) { + // If the following call pancis, it indicates UnimplementedMcPlayerServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&McPlayer_ServiceDesc, srv) } @@ -192,7 +224,7 @@ func _McPlayer_GetPlayer_Handler(srv interface{}, ctx context.Context, dec func( } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.McPlayer/GetPlayer", + FullMethod: McPlayer_GetPlayer_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(McPlayerServer).GetPlayer(ctx, req.(*GetPlayerRequest)) @@ -210,7 +242,7 @@ func _McPlayer_GetPlayers_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.McPlayer/GetPlayers", + FullMethod: McPlayer_GetPlayers_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(McPlayerServer).GetPlayers(ctx, req.(*GetPlayersRequest)) @@ -228,7 +260,7 @@ func _McPlayer_GetPlayerByUsername_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.McPlayer/GetPlayerByUsername", + FullMethod: McPlayer_GetPlayerByUsername_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(McPlayerServer).GetPlayerByUsername(ctx, req.(*PlayerUsernameRequest)) @@ -246,7 +278,7 @@ func _McPlayer_SearchPlayersByUsername_Handler(srv interface{}, ctx context.Cont } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.McPlayer/SearchPlayersByUsername", + FullMethod: McPlayer_SearchPlayersByUsername_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(McPlayerServer).SearchPlayersByUsername(ctx, req.(*SearchPlayersByUsernameRequest)) @@ -264,7 +296,7 @@ func _McPlayer_GetLoginSessions_Handler(srv interface{}, ctx context.Context, de } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.McPlayer/GetLoginSessions", + FullMethod: McPlayer_GetLoginSessions_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(McPlayerServer).GetLoginSessions(ctx, req.(*GetLoginSessionsRequest)) @@ -282,7 +314,7 @@ func _McPlayer_GetStatTotalUniquePlayers_Handler(srv interface{}, ctx context.Co } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.McPlayer/GetStatTotalUniquePlayers", + FullMethod: McPlayer_GetStatTotalUniquePlayers_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(McPlayerServer).GetStatTotalUniquePlayers(ctx, req.(*GetStatTotalUniquePlayersRequest)) @@ -300,7 +332,7 @@ func _McPlayer_GetStatTotalPlaytime_Handler(srv interface{}, ctx context.Context } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.McPlayer/GetStatTotalPlaytime", + FullMethod: McPlayer_GetStatTotalPlaytime_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(McPlayerServer).GetStatTotalPlaytime(ctx, req.(*GetStatTotalPlaytimeRequest)) @@ -318,7 +350,7 @@ func _McPlayer_AddExperienceToPlayers_Handler(srv interface{}, ctx context.Conte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.McPlayer/AddExperienceToPlayers", + FullMethod: McPlayer_AddExperienceToPlayers_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(McPlayerServer).AddExperienceToPlayers(ctx, req.(*AddExperienceToPlayersRequest)) @@ -336,7 +368,7 @@ func _McPlayer_GetPlayerExperience_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.McPlayer/GetPlayerExperience", + FullMethod: McPlayer_GetPlayerExperience_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(McPlayerServer).GetPlayerExperience(ctx, req.(*GetPlayerExperienceRequest)) @@ -392,6 +424,14 @@ var McPlayer_ServiceDesc = grpc.ServiceDesc{ Metadata: "mc_player/grpc.proto", } +const ( + PlayerTracker_GetPlayerServers_FullMethodName = "/emortal.grpc.PlayerTracker/GetPlayerServers" + PlayerTracker_GetServerPlayers_FullMethodName = "/emortal.grpc.PlayerTracker/GetServerPlayers" + PlayerTracker_GetPlayerCount_FullMethodName = "/emortal.grpc.PlayerTracker/GetPlayerCount" + PlayerTracker_GetFleetPlayerCounts_FullMethodName = "/emortal.grpc.PlayerTracker/GetFleetPlayerCounts" + PlayerTracker_GetGlobalPlayersSummary_FullMethodName = "/emortal.grpc.PlayerTracker/GetGlobalPlayersSummary" +) + // PlayerTrackerClient is the client API for PlayerTracker 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. @@ -413,8 +453,9 @@ func NewPlayerTrackerClient(cc grpc.ClientConnInterface) PlayerTrackerClient { } func (c *playerTrackerClient) GetPlayerServers(ctx context.Context, in *GetPlayerServersRequest, opts ...grpc.CallOption) (*GetPlayerServersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetPlayerServersResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.PlayerTracker/GetPlayerServers", in, out, opts...) + err := c.cc.Invoke(ctx, PlayerTracker_GetPlayerServers_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -422,8 +463,9 @@ func (c *playerTrackerClient) GetPlayerServers(ctx context.Context, in *GetPlaye } func (c *playerTrackerClient) GetServerPlayers(ctx context.Context, in *GetServerPlayersRequest, opts ...grpc.CallOption) (*GetServerPlayersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetServerPlayersResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.PlayerTracker/GetServerPlayers", in, out, opts...) + err := c.cc.Invoke(ctx, PlayerTracker_GetServerPlayers_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -431,8 +473,9 @@ func (c *playerTrackerClient) GetServerPlayers(ctx context.Context, in *GetServe } func (c *playerTrackerClient) GetPlayerCount(ctx context.Context, in *GetPlayerCountRequest, opts ...grpc.CallOption) (*GetPlayerCountResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetPlayerCountResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.PlayerTracker/GetPlayerCount", in, out, opts...) + err := c.cc.Invoke(ctx, PlayerTracker_GetPlayerCount_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -440,8 +483,9 @@ func (c *playerTrackerClient) GetPlayerCount(ctx context.Context, in *GetPlayerC } func (c *playerTrackerClient) GetFleetPlayerCounts(ctx context.Context, in *GetFleetsPlayerCountRequest, opts ...grpc.CallOption) (*GetFleetsPlayerCountResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetFleetsPlayerCountResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.PlayerTracker/GetFleetPlayerCounts", in, out, opts...) + err := c.cc.Invoke(ctx, PlayerTracker_GetFleetPlayerCounts_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -449,8 +493,9 @@ func (c *playerTrackerClient) GetFleetPlayerCounts(ctx context.Context, in *GetF } func (c *playerTrackerClient) GetGlobalPlayersSummary(ctx context.Context, in *GetGlobalPlayersSummaryRequest, opts ...grpc.CallOption) (*GetGlobalPlayersSummaryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetGlobalPlayersSummaryResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.PlayerTracker/GetGlobalPlayersSummary", in, out, opts...) + err := c.cc.Invoke(ctx, PlayerTracker_GetGlobalPlayersSummary_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -459,7 +504,7 @@ func (c *playerTrackerClient) GetGlobalPlayersSummary(ctx context.Context, in *G // PlayerTrackerServer is the server API for PlayerTracker service. // All implementations must embed UnimplementedPlayerTrackerServer -// for forward compatibility +// for forward compatibility. type PlayerTrackerServer interface { GetPlayerServers(context.Context, *GetPlayerServersRequest) (*GetPlayerServersResponse, error) GetServerPlayers(context.Context, *GetServerPlayersRequest) (*GetServerPlayersResponse, error) @@ -470,9 +515,12 @@ type PlayerTrackerServer interface { mustEmbedUnimplementedPlayerTrackerServer() } -// UnimplementedPlayerTrackerServer must be embedded to have forward compatible implementations. -type UnimplementedPlayerTrackerServer struct { -} +// UnimplementedPlayerTrackerServer 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. +type UnimplementedPlayerTrackerServer struct{} func (UnimplementedPlayerTrackerServer) GetPlayerServers(context.Context, *GetPlayerServersRequest) (*GetPlayerServersResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetPlayerServers not implemented") @@ -490,6 +538,7 @@ func (UnimplementedPlayerTrackerServer) GetGlobalPlayersSummary(context.Context, return nil, status.Errorf(codes.Unimplemented, "method GetGlobalPlayersSummary not implemented") } func (UnimplementedPlayerTrackerServer) mustEmbedUnimplementedPlayerTrackerServer() {} +func (UnimplementedPlayerTrackerServer) testEmbeddedByValue() {} // UnsafePlayerTrackerServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to PlayerTrackerServer will @@ -499,6 +548,13 @@ type UnsafePlayerTrackerServer interface { } func RegisterPlayerTrackerServer(s grpc.ServiceRegistrar, srv PlayerTrackerServer) { + // If the following call pancis, it indicates UnimplementedPlayerTrackerServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&PlayerTracker_ServiceDesc, srv) } @@ -512,7 +568,7 @@ func _PlayerTracker_GetPlayerServers_Handler(srv interface{}, ctx context.Contex } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.PlayerTracker/GetPlayerServers", + FullMethod: PlayerTracker_GetPlayerServers_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PlayerTrackerServer).GetPlayerServers(ctx, req.(*GetPlayerServersRequest)) @@ -530,7 +586,7 @@ func _PlayerTracker_GetServerPlayers_Handler(srv interface{}, ctx context.Contex } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.PlayerTracker/GetServerPlayers", + FullMethod: PlayerTracker_GetServerPlayers_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PlayerTrackerServer).GetServerPlayers(ctx, req.(*GetServerPlayersRequest)) @@ -548,7 +604,7 @@ func _PlayerTracker_GetPlayerCount_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.PlayerTracker/GetPlayerCount", + FullMethod: PlayerTracker_GetPlayerCount_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PlayerTrackerServer).GetPlayerCount(ctx, req.(*GetPlayerCountRequest)) @@ -566,7 +622,7 @@ func _PlayerTracker_GetFleetPlayerCounts_Handler(srv interface{}, ctx context.Co } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.PlayerTracker/GetFleetPlayerCounts", + FullMethod: PlayerTracker_GetFleetPlayerCounts_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PlayerTrackerServer).GetFleetPlayerCounts(ctx, req.(*GetFleetsPlayerCountRequest)) @@ -584,7 +640,7 @@ func _PlayerTracker_GetGlobalPlayersSummary_Handler(srv interface{}, ctx context } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.PlayerTracker/GetGlobalPlayersSummary", + FullMethod: PlayerTracker_GetGlobalPlayersSummary_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PlayerTrackerServer).GetGlobalPlayersSummary(ctx, req.(*GetGlobalPlayersSummaryRequest)) diff --git a/gen/go/grpc/messagehandler/grpc.pb.go b/gen/go/grpc/messagehandler/grpc.pb.go index 7055210..b93b8cc 100644 --- a/gen/go/grpc/messagehandler/grpc.pb.go +++ b/gen/go/grpc/messagehandler/grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: message_handler/grpc.proto package messagehandler @@ -80,11 +80,9 @@ type PrivateMessageRequest struct { func (x *PrivateMessageRequest) Reset() { *x = PrivateMessageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_message_handler_grpc_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_message_handler_grpc_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivateMessageRequest) String() string { @@ -95,7 +93,7 @@ func (*PrivateMessageRequest) ProtoMessage() {} func (x *PrivateMessageRequest) ProtoReflect() protoreflect.Message { mi := &file_message_handler_grpc_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -128,11 +126,9 @@ type PrivateMessageResponse struct { func (x *PrivateMessageResponse) Reset() { *x = PrivateMessageResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_message_handler_grpc_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_message_handler_grpc_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivateMessageResponse) String() string { @@ -143,7 +139,7 @@ func (*PrivateMessageResponse) ProtoMessage() {} func (x *PrivateMessageResponse) ProtoReflect() protoreflect.Message { mi := &file_message_handler_grpc_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -175,11 +171,9 @@ type PrivateMessageErrorResponse struct { func (x *PrivateMessageErrorResponse) Reset() { *x = PrivateMessageErrorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_message_handler_grpc_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_message_handler_grpc_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivateMessageErrorResponse) String() string { @@ -190,7 +184,7 @@ func (*PrivateMessageErrorResponse) ProtoMessage() {} func (x *PrivateMessageErrorResponse) ProtoReflect() protoreflect.Message { mi := &file_message_handler_grpc_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -278,7 +272,7 @@ func file_message_handler_grpc_proto_rawDescGZIP() []byte { var file_message_handler_grpc_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_message_handler_grpc_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_message_handler_grpc_proto_goTypes = []interface{}{ +var file_message_handler_grpc_proto_goTypes = []any{ (PrivateMessageErrorResponse_Reason)(0), // 0: emortal.grpc.messagehandler.PrivateMessageErrorResponse.Reason (*PrivateMessageRequest)(nil), // 1: emortal.grpc.messagehandler.PrivateMessageRequest (*PrivateMessageResponse)(nil), // 2: emortal.grpc.messagehandler.PrivateMessageResponse @@ -303,44 +297,6 @@ func file_message_handler_grpc_proto_init() { if File_message_handler_grpc_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_message_handler_grpc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PrivateMessageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_message_handler_grpc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PrivateMessageResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_message_handler_grpc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PrivateMessageErrorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/go/grpc/messagehandler/grpc_grpc.pb.go b/gen/go/grpc/messagehandler/grpc_grpc.pb.go index f8f736d..eb2807c 100644 --- a/gen/go/grpc/messagehandler/grpc_grpc.pb.go +++ b/gen/go/grpc/messagehandler/grpc_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v5.28.0 +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.28.3 // source: message_handler/grpc.proto package messagehandler @@ -15,8 +15,12 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + MessageHandler_SendPrivateMessage_FullMethodName = "/emortal.grpc.messagehandler.MessageHandler/SendPrivateMessage" +) // MessageHandlerClient is the client API for MessageHandler service. // @@ -34,8 +38,9 @@ func NewMessageHandlerClient(cc grpc.ClientConnInterface) MessageHandlerClient { } func (c *messageHandlerClient) SendPrivateMessage(ctx context.Context, in *PrivateMessageRequest, opts ...grpc.CallOption) (*PrivateMessageResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(PrivateMessageResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.messagehandler.MessageHandler/SendPrivateMessage", in, out, opts...) + err := c.cc.Invoke(ctx, MessageHandler_SendPrivateMessage_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -44,20 +49,24 @@ func (c *messageHandlerClient) SendPrivateMessage(ctx context.Context, in *Priva // MessageHandlerServer is the server API for MessageHandler service. // All implementations must embed UnimplementedMessageHandlerServer -// for forward compatibility +// for forward compatibility. type MessageHandlerServer interface { SendPrivateMessage(context.Context, *PrivateMessageRequest) (*PrivateMessageResponse, error) mustEmbedUnimplementedMessageHandlerServer() } -// UnimplementedMessageHandlerServer must be embedded to have forward compatible implementations. -type UnimplementedMessageHandlerServer struct { -} +// UnimplementedMessageHandlerServer 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. +type UnimplementedMessageHandlerServer struct{} func (UnimplementedMessageHandlerServer) SendPrivateMessage(context.Context, *PrivateMessageRequest) (*PrivateMessageResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SendPrivateMessage not implemented") } func (UnimplementedMessageHandlerServer) mustEmbedUnimplementedMessageHandlerServer() {} +func (UnimplementedMessageHandlerServer) testEmbeddedByValue() {} // UnsafeMessageHandlerServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to MessageHandlerServer will @@ -67,6 +76,13 @@ type UnsafeMessageHandlerServer interface { } func RegisterMessageHandlerServer(s grpc.ServiceRegistrar, srv MessageHandlerServer) { + // If the following call pancis, it indicates UnimplementedMessageHandlerServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&MessageHandler_ServiceDesc, srv) } @@ -80,7 +96,7 @@ func _MessageHandler_SendPrivateMessage_Handler(srv interface{}, ctx context.Con } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.messagehandler.MessageHandler/SendPrivateMessage", + FullMethod: MessageHandler_SendPrivateMessage_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MessageHandlerServer).SendPrivateMessage(ctx, req.(*PrivateMessageRequest)) diff --git a/gen/go/grpc/party/grpc.pb.go b/gen/go/grpc/party/grpc.pb.go index fc2885f..3c04c8f 100644 --- a/gen/go/grpc/party/grpc.pb.go +++ b/gen/go/grpc/party/grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: party/grpc.proto package party @@ -404,11 +404,9 @@ type EmptyPartyRequest struct { func (x *EmptyPartyRequest) Reset() { *x = EmptyPartyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EmptyPartyRequest) String() string { @@ -419,7 +417,7 @@ func (*EmptyPartyRequest) ProtoMessage() {} func (x *EmptyPartyRequest) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -479,11 +477,9 @@ type EmptyPartyResponse struct { func (x *EmptyPartyResponse) Reset() { *x = EmptyPartyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EmptyPartyResponse) String() string { @@ -494,7 +490,7 @@ func (*EmptyPartyResponse) ProtoMessage() {} func (x *EmptyPartyResponse) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -519,11 +515,9 @@ type EmptyPartyErrorResponse struct { func (x *EmptyPartyErrorResponse) Reset() { *x = EmptyPartyErrorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EmptyPartyErrorResponse) String() string { @@ -534,7 +528,7 @@ func (*EmptyPartyErrorResponse) ProtoMessage() {} func (x *EmptyPartyErrorResponse) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -570,11 +564,9 @@ type GetPartyRequest struct { func (x *GetPartyRequest) Reset() { *x = GetPartyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPartyRequest) String() string { @@ -585,7 +577,7 @@ func (*GetPartyRequest) ProtoMessage() {} func (x *GetPartyRequest) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -647,11 +639,9 @@ type GetPartyResponse struct { func (x *GetPartyResponse) Reset() { *x = GetPartyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPartyResponse) String() string { @@ -662,7 +652,7 @@ func (*GetPartyResponse) ProtoMessage() {} func (x *GetPartyResponse) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -696,11 +686,9 @@ type SetOpenPartyRequest struct { func (x *SetOpenPartyRequest) Reset() { *x = SetOpenPartyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetOpenPartyRequest) String() string { @@ -711,7 +699,7 @@ func (*SetOpenPartyRequest) ProtoMessage() {} func (x *SetOpenPartyRequest) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -750,11 +738,9 @@ type SetOpenPartyResponse struct { func (x *SetOpenPartyResponse) Reset() { *x = SetOpenPartyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetOpenPartyResponse) String() string { @@ -765,7 +751,7 @@ func (*SetOpenPartyResponse) ProtoMessage() {} func (x *SetOpenPartyResponse) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -797,11 +783,9 @@ type SetOpenPartyErrorResponse struct { func (x *SetOpenPartyErrorResponse) Reset() { *x = SetOpenPartyErrorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetOpenPartyErrorResponse) String() string { @@ -812,7 +796,7 @@ func (*SetOpenPartyErrorResponse) ProtoMessage() {} func (x *SetOpenPartyErrorResponse) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -849,11 +833,9 @@ type GetPartyInvitesRequest struct { func (x *GetPartyInvitesRequest) Reset() { *x = GetPartyInvitesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPartyInvitesRequest) String() string { @@ -864,7 +846,7 @@ func (*GetPartyInvitesRequest) ProtoMessage() {} func (x *GetPartyInvitesRequest) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -933,11 +915,9 @@ type GetPartyInvitesResponse struct { func (x *GetPartyInvitesResponse) Reset() { *x = GetPartyInvitesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPartyInvitesResponse) String() string { @@ -948,7 +928,7 @@ func (*GetPartyInvitesResponse) ProtoMessage() {} func (x *GetPartyInvitesResponse) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -985,11 +965,9 @@ type InvitePlayerRequest struct { func (x *InvitePlayerRequest) Reset() { *x = InvitePlayerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InvitePlayerRequest) String() string { @@ -1000,7 +978,7 @@ func (*InvitePlayerRequest) ProtoMessage() {} func (x *InvitePlayerRequest) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1053,11 +1031,9 @@ type InvitePlayerResponse struct { func (x *InvitePlayerResponse) Reset() { *x = InvitePlayerResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InvitePlayerResponse) String() string { @@ -1068,7 +1044,7 @@ func (*InvitePlayerResponse) ProtoMessage() {} func (x *InvitePlayerResponse) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1100,11 +1076,9 @@ type InvitePlayerErrorResponse struct { func (x *InvitePlayerErrorResponse) Reset() { *x = InvitePlayerErrorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *InvitePlayerErrorResponse) String() string { @@ -1115,7 +1089,7 @@ func (*InvitePlayerErrorResponse) ProtoMessage() {} func (x *InvitePlayerErrorResponse) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1150,11 +1124,9 @@ type JoinPartyRequest struct { func (x *JoinPartyRequest) Reset() { *x = JoinPartyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JoinPartyRequest) String() string { @@ -1165,7 +1137,7 @@ func (*JoinPartyRequest) ProtoMessage() {} func (x *JoinPartyRequest) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1211,11 +1183,9 @@ type JoinPartyResponse struct { func (x *JoinPartyResponse) Reset() { *x = JoinPartyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JoinPartyResponse) String() string { @@ -1226,7 +1196,7 @@ func (*JoinPartyResponse) ProtoMessage() {} func (x *JoinPartyResponse) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1258,11 +1228,9 @@ type JoinPartyErrorResponse struct { func (x *JoinPartyErrorResponse) Reset() { *x = JoinPartyErrorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *JoinPartyErrorResponse) String() string { @@ -1273,7 +1241,7 @@ func (*JoinPartyErrorResponse) ProtoMessage() {} func (x *JoinPartyErrorResponse) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1306,11 +1274,9 @@ type LeavePartyRequest struct { func (x *LeavePartyRequest) Reset() { *x = LeavePartyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LeavePartyRequest) String() string { @@ -1321,7 +1287,7 @@ func (*LeavePartyRequest) ProtoMessage() {} func (x *LeavePartyRequest) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1351,11 +1317,9 @@ type LeavePartyResponse struct { func (x *LeavePartyResponse) Reset() { *x = LeavePartyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LeavePartyResponse) String() string { @@ -1366,7 +1330,7 @@ func (*LeavePartyResponse) ProtoMessage() {} func (x *LeavePartyResponse) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1391,11 +1355,9 @@ type LeavePartyErrorResponse struct { func (x *LeavePartyErrorResponse) Reset() { *x = LeavePartyErrorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LeavePartyErrorResponse) String() string { @@ -1406,7 +1368,7 @@ func (*LeavePartyErrorResponse) ProtoMessage() {} func (x *LeavePartyErrorResponse) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1442,11 +1404,9 @@ type KickPlayerRequest struct { func (x *KickPlayerRequest) Reset() { *x = KickPlayerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KickPlayerRequest) String() string { @@ -1457,7 +1417,7 @@ func (*KickPlayerRequest) ProtoMessage() {} func (x *KickPlayerRequest) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1501,11 +1461,9 @@ type KickPlayerResponse struct { func (x *KickPlayerResponse) Reset() { *x = KickPlayerResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KickPlayerResponse) String() string { @@ -1516,7 +1474,7 @@ func (*KickPlayerResponse) ProtoMessage() {} func (x *KickPlayerResponse) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1541,11 +1499,9 @@ type KickPlayerErrorResponse struct { func (x *KickPlayerErrorResponse) Reset() { *x = KickPlayerErrorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KickPlayerErrorResponse) String() string { @@ -1556,7 +1512,7 @@ func (*KickPlayerErrorResponse) ProtoMessage() {} func (x *KickPlayerErrorResponse) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1592,11 +1548,9 @@ type SetPartyLeaderRequest struct { func (x *SetPartyLeaderRequest) Reset() { *x = SetPartyLeaderRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetPartyLeaderRequest) String() string { @@ -1607,7 +1561,7 @@ func (*SetPartyLeaderRequest) ProtoMessage() {} func (x *SetPartyLeaderRequest) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1651,11 +1605,9 @@ type SetPartyLeaderResponse struct { func (x *SetPartyLeaderResponse) Reset() { *x = SetPartyLeaderResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetPartyLeaderResponse) String() string { @@ -1666,7 +1618,7 @@ func (*SetPartyLeaderResponse) ProtoMessage() {} func (x *SetPartyLeaderResponse) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1691,11 +1643,9 @@ type SetPartyLeaderErrorResponse struct { func (x *SetPartyLeaderErrorResponse) Reset() { *x = SetPartyLeaderErrorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetPartyLeaderErrorResponse) String() string { @@ -1706,7 +1656,7 @@ func (*SetPartyLeaderErrorResponse) ProtoMessage() {} func (x *SetPartyLeaderErrorResponse) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1742,11 +1692,9 @@ type GetPartySettingsRequest struct { func (x *GetPartySettingsRequest) Reset() { *x = GetPartySettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPartySettingsRequest) String() string { @@ -1757,7 +1705,7 @@ func (*GetPartySettingsRequest) ProtoMessage() {} func (x *GetPartySettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1819,11 +1767,9 @@ type GetPartySettingsResponse struct { func (x *GetPartySettingsResponse) Reset() { *x = GetPartySettingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPartySettingsResponse) String() string { @@ -1834,7 +1780,7 @@ func (*GetPartySettingsResponse) ProtoMessage() {} func (x *GetPartySettingsResponse) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1870,11 +1816,9 @@ type UpdatePartySettingsRequest struct { func (x *UpdatePartySettingsRequest) Reset() { *x = UpdatePartySettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdatePartySettingsRequest) String() string { @@ -1885,7 +1829,7 @@ func (*UpdatePartySettingsRequest) ProtoMessage() {} func (x *UpdatePartySettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1936,11 +1880,9 @@ type UpdatePartySettingsResponse struct { func (x *UpdatePartySettingsResponse) Reset() { *x = UpdatePartySettingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdatePartySettingsResponse) String() string { @@ -1951,7 +1893,7 @@ func (*UpdatePartySettingsResponse) ProtoMessage() {} func (x *UpdatePartySettingsResponse) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1983,11 +1925,9 @@ type CreateEventRequest struct { func (x *CreateEventRequest) Reset() { *x = CreateEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEventRequest) String() string { @@ -1998,7 +1938,7 @@ func (*CreateEventRequest) ProtoMessage() {} func (x *CreateEventRequest) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2065,11 +2005,9 @@ type CreateEventResponse struct { func (x *CreateEventResponse) Reset() { *x = CreateEventResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateEventResponse) String() string { @@ -2080,7 +2018,7 @@ func (*CreateEventResponse) ProtoMessage() {} func (x *CreateEventResponse) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2114,11 +2052,9 @@ type UpdateEventRequest struct { func (x *UpdateEventRequest) Reset() { *x = UpdateEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEventRequest) String() string { @@ -2129,7 +2065,7 @@ func (*UpdateEventRequest) ProtoMessage() {} func (x *UpdateEventRequest) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2175,11 +2111,9 @@ type UpdateEventResponse struct { func (x *UpdateEventResponse) Reset() { *x = UpdateEventResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateEventResponse) String() string { @@ -2190,7 +2124,7 @@ func (*UpdateEventResponse) ProtoMessage() {} func (x *UpdateEventResponse) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2224,11 +2158,9 @@ type DeleteEventRequest struct { func (x *DeleteEventRequest) Reset() { *x = DeleteEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEventRequest) String() string { @@ -2239,7 +2171,7 @@ func (*DeleteEventRequest) ProtoMessage() {} func (x *DeleteEventRequest) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2269,11 +2201,9 @@ type DeleteEventResponse struct { func (x *DeleteEventResponse) Reset() { *x = DeleteEventResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEventResponse) String() string { @@ -2284,7 +2214,7 @@ func (*DeleteEventResponse) ProtoMessage() {} func (x *DeleteEventResponse) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2309,11 +2239,9 @@ type DeleteEventErrorResponse struct { func (x *DeleteEventErrorResponse) Reset() { *x = DeleteEventErrorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteEventErrorResponse) String() string { @@ -2324,7 +2252,7 @@ func (*DeleteEventErrorResponse) ProtoMessage() {} func (x *DeleteEventErrorResponse) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2354,11 +2282,9 @@ type ListEventsRequest struct { func (x *ListEventsRequest) Reset() { *x = ListEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEventsRequest) String() string { @@ -2369,7 +2295,7 @@ func (*ListEventsRequest) ProtoMessage() {} func (x *ListEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2394,11 +2320,9 @@ type ListEventsResponse struct { func (x *ListEventsResponse) Reset() { *x = ListEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_party_grpc_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_grpc_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListEventsResponse) String() string { @@ -2409,7 +2333,7 @@ func (*ListEventsResponse) ProtoMessage() {} func (x *ListEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_party_grpc_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2827,7 +2751,7 @@ func file_party_grpc_proto_rawDescGZIP() []byte { var file_party_grpc_proto_enumTypes = make([]protoimpl.EnumInfo, 8) var file_party_grpc_proto_msgTypes = make([]protoimpl.MessageInfo, 38) -var file_party_grpc_proto_goTypes = []interface{}{ +var file_party_grpc_proto_goTypes = []any{ (EmptyPartyErrorResponse_ErrorType)(0), // 0: emortal.grpc.party.EmptyPartyErrorResponse.ErrorType (SetOpenPartyErrorResponse_ErrorType)(0), // 1: emortal.grpc.party.SetOpenPartyErrorResponse.ErrorType (InvitePlayerErrorResponse_ErrorType)(0), // 2: emortal.grpc.party.InvitePlayerErrorResponse.ErrorType @@ -2948,484 +2872,26 @@ func file_party_grpc_proto_init() { if File_party_grpc_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_party_grpc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EmptyPartyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EmptyPartyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EmptyPartyErrorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPartyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPartyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetOpenPartyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetOpenPartyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetOpenPartyErrorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPartyInvitesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPartyInvitesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InvitePlayerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InvitePlayerResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InvitePlayerErrorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JoinPartyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JoinPartyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JoinPartyErrorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LeavePartyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LeavePartyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LeavePartyErrorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KickPlayerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KickPlayerResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KickPlayerErrorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetPartyLeaderRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetPartyLeaderResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetPartyLeaderErrorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPartySettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPartySettingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdatePartySettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdatePartySettingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateEventResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateEventResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteEventResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteEventErrorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_grpc_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_party_grpc_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_party_grpc_proto_msgTypes[0].OneofWrappers = []any{ (*EmptyPartyRequest_PartyId)(nil), (*EmptyPartyRequest_PlayerId)(nil), } - file_party_grpc_proto_msgTypes[3].OneofWrappers = []interface{}{ + file_party_grpc_proto_msgTypes[3].OneofWrappers = []any{ (*GetPartyRequest_PartyId)(nil), (*GetPartyRequest_PlayerId)(nil), } - file_party_grpc_proto_msgTypes[8].OneofWrappers = []interface{}{ + file_party_grpc_proto_msgTypes[8].OneofWrappers = []any{ (*GetPartyInvitesRequest_PartyId)(nil), (*GetPartyInvitesRequest_PlayerId)(nil), } - file_party_grpc_proto_msgTypes[25].OneofWrappers = []interface{}{ + file_party_grpc_proto_msgTypes[25].OneofWrappers = []any{ (*GetPartySettingsRequest_PartyId)(nil), (*GetPartySettingsRequest_PlayerId)(nil), } - file_party_grpc_proto_msgTypes[27].OneofWrappers = []interface{}{} - file_party_grpc_proto_msgTypes[29].OneofWrappers = []interface{}{} - file_party_grpc_proto_msgTypes[31].OneofWrappers = []interface{}{} - file_party_grpc_proto_msgTypes[33].OneofWrappers = []interface{}{} + file_party_grpc_proto_msgTypes[27].OneofWrappers = []any{} + file_party_grpc_proto_msgTypes[29].OneofWrappers = []any{} + file_party_grpc_proto_msgTypes[31].OneofWrappers = []any{} + file_party_grpc_proto_msgTypes[33].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/go/grpc/party/grpc_grpc.pb.go b/gen/go/grpc/party/grpc_grpc.pb.go index c9523cc..7416f6f 100644 --- a/gen/go/grpc/party/grpc_grpc.pb.go +++ b/gen/go/grpc/party/grpc_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v5.28.0 +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.28.3 // source: party/grpc.proto package party @@ -15,8 +15,20 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + PartyService_EmptyParty_FullMethodName = "/emortal.grpc.party.PartyService/EmptyParty" + PartyService_GetParty_FullMethodName = "/emortal.grpc.party.PartyService/GetParty" + PartyService_SetOpenParty_FullMethodName = "/emortal.grpc.party.PartyService/SetOpenParty" + PartyService_GetPartyInvites_FullMethodName = "/emortal.grpc.party.PartyService/GetPartyInvites" + PartyService_InvitePlayer_FullMethodName = "/emortal.grpc.party.PartyService/InvitePlayer" + PartyService_JoinParty_FullMethodName = "/emortal.grpc.party.PartyService/JoinParty" + PartyService_LeaveParty_FullMethodName = "/emortal.grpc.party.PartyService/LeaveParty" + PartyService_KickPlayer_FullMethodName = "/emortal.grpc.party.PartyService/KickPlayer" + PartyService_SetPartyLeader_FullMethodName = "/emortal.grpc.party.PartyService/SetPartyLeader" +) // PartyServiceClient is the client API for PartyService service. // @@ -43,8 +55,9 @@ func NewPartyServiceClient(cc grpc.ClientConnInterface) PartyServiceClient { } func (c *partyServiceClient) EmptyParty(ctx context.Context, in *EmptyPartyRequest, opts ...grpc.CallOption) (*EmptyPartyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(EmptyPartyResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.party.PartyService/EmptyParty", in, out, opts...) + err := c.cc.Invoke(ctx, PartyService_EmptyParty_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -52,8 +65,9 @@ func (c *partyServiceClient) EmptyParty(ctx context.Context, in *EmptyPartyReque } func (c *partyServiceClient) GetParty(ctx context.Context, in *GetPartyRequest, opts ...grpc.CallOption) (*GetPartyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetPartyResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.party.PartyService/GetParty", in, out, opts...) + err := c.cc.Invoke(ctx, PartyService_GetParty_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -61,8 +75,9 @@ func (c *partyServiceClient) GetParty(ctx context.Context, in *GetPartyRequest, } func (c *partyServiceClient) SetOpenParty(ctx context.Context, in *SetOpenPartyRequest, opts ...grpc.CallOption) (*SetOpenPartyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SetOpenPartyResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.party.PartyService/SetOpenParty", in, out, opts...) + err := c.cc.Invoke(ctx, PartyService_SetOpenParty_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -70,8 +85,9 @@ func (c *partyServiceClient) SetOpenParty(ctx context.Context, in *SetOpenPartyR } func (c *partyServiceClient) GetPartyInvites(ctx context.Context, in *GetPartyInvitesRequest, opts ...grpc.CallOption) (*GetPartyInvitesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetPartyInvitesResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.party.PartyService/GetPartyInvites", in, out, opts...) + err := c.cc.Invoke(ctx, PartyService_GetPartyInvites_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -79,8 +95,9 @@ func (c *partyServiceClient) GetPartyInvites(ctx context.Context, in *GetPartyIn } func (c *partyServiceClient) InvitePlayer(ctx context.Context, in *InvitePlayerRequest, opts ...grpc.CallOption) (*InvitePlayerResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(InvitePlayerResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.party.PartyService/InvitePlayer", in, out, opts...) + err := c.cc.Invoke(ctx, PartyService_InvitePlayer_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -88,8 +105,9 @@ func (c *partyServiceClient) InvitePlayer(ctx context.Context, in *InvitePlayerR } func (c *partyServiceClient) JoinParty(ctx context.Context, in *JoinPartyRequest, opts ...grpc.CallOption) (*JoinPartyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(JoinPartyResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.party.PartyService/JoinParty", in, out, opts...) + err := c.cc.Invoke(ctx, PartyService_JoinParty_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -97,8 +115,9 @@ func (c *partyServiceClient) JoinParty(ctx context.Context, in *JoinPartyRequest } func (c *partyServiceClient) LeaveParty(ctx context.Context, in *LeavePartyRequest, opts ...grpc.CallOption) (*LeavePartyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(LeavePartyResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.party.PartyService/LeaveParty", in, out, opts...) + err := c.cc.Invoke(ctx, PartyService_LeaveParty_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -106,8 +125,9 @@ func (c *partyServiceClient) LeaveParty(ctx context.Context, in *LeavePartyReque } func (c *partyServiceClient) KickPlayer(ctx context.Context, in *KickPlayerRequest, opts ...grpc.CallOption) (*KickPlayerResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(KickPlayerResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.party.PartyService/KickPlayer", in, out, opts...) + err := c.cc.Invoke(ctx, PartyService_KickPlayer_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -115,8 +135,9 @@ func (c *partyServiceClient) KickPlayer(ctx context.Context, in *KickPlayerReque } func (c *partyServiceClient) SetPartyLeader(ctx context.Context, in *SetPartyLeaderRequest, opts ...grpc.CallOption) (*SetPartyLeaderResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SetPartyLeaderResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.party.PartyService/SetPartyLeader", in, out, opts...) + err := c.cc.Invoke(ctx, PartyService_SetPartyLeader_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -125,7 +146,7 @@ func (c *partyServiceClient) SetPartyLeader(ctx context.Context, in *SetPartyLea // PartyServiceServer is the server API for PartyService service. // All implementations must embed UnimplementedPartyServiceServer -// for forward compatibility +// for forward compatibility. type PartyServiceServer interface { // EmptyParty empties a party, removing all members and invites. EmptyParty(context.Context, *EmptyPartyRequest) (*EmptyPartyResponse, error) @@ -140,9 +161,12 @@ type PartyServiceServer interface { mustEmbedUnimplementedPartyServiceServer() } -// UnimplementedPartyServiceServer must be embedded to have forward compatible implementations. -type UnimplementedPartyServiceServer struct { -} +// UnimplementedPartyServiceServer 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. +type UnimplementedPartyServiceServer struct{} func (UnimplementedPartyServiceServer) EmptyParty(context.Context, *EmptyPartyRequest) (*EmptyPartyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method EmptyParty not implemented") @@ -172,6 +196,7 @@ func (UnimplementedPartyServiceServer) SetPartyLeader(context.Context, *SetParty return nil, status.Errorf(codes.Unimplemented, "method SetPartyLeader not implemented") } func (UnimplementedPartyServiceServer) mustEmbedUnimplementedPartyServiceServer() {} +func (UnimplementedPartyServiceServer) testEmbeddedByValue() {} // UnsafePartyServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to PartyServiceServer will @@ -181,6 +206,13 @@ type UnsafePartyServiceServer interface { } func RegisterPartyServiceServer(s grpc.ServiceRegistrar, srv PartyServiceServer) { + // If the following call pancis, it indicates UnimplementedPartyServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&PartyService_ServiceDesc, srv) } @@ -194,7 +226,7 @@ func _PartyService_EmptyParty_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.party.PartyService/EmptyParty", + FullMethod: PartyService_EmptyParty_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PartyServiceServer).EmptyParty(ctx, req.(*EmptyPartyRequest)) @@ -212,7 +244,7 @@ func _PartyService_GetParty_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.party.PartyService/GetParty", + FullMethod: PartyService_GetParty_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PartyServiceServer).GetParty(ctx, req.(*GetPartyRequest)) @@ -230,7 +262,7 @@ func _PartyService_SetOpenParty_Handler(srv interface{}, ctx context.Context, de } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.party.PartyService/SetOpenParty", + FullMethod: PartyService_SetOpenParty_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PartyServiceServer).SetOpenParty(ctx, req.(*SetOpenPartyRequest)) @@ -248,7 +280,7 @@ func _PartyService_GetPartyInvites_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.party.PartyService/GetPartyInvites", + FullMethod: PartyService_GetPartyInvites_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PartyServiceServer).GetPartyInvites(ctx, req.(*GetPartyInvitesRequest)) @@ -266,7 +298,7 @@ func _PartyService_InvitePlayer_Handler(srv interface{}, ctx context.Context, de } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.party.PartyService/InvitePlayer", + FullMethod: PartyService_InvitePlayer_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PartyServiceServer).InvitePlayer(ctx, req.(*InvitePlayerRequest)) @@ -284,7 +316,7 @@ func _PartyService_JoinParty_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.party.PartyService/JoinParty", + FullMethod: PartyService_JoinParty_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PartyServiceServer).JoinParty(ctx, req.(*JoinPartyRequest)) @@ -302,7 +334,7 @@ func _PartyService_LeaveParty_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.party.PartyService/LeaveParty", + FullMethod: PartyService_LeaveParty_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PartyServiceServer).LeaveParty(ctx, req.(*LeavePartyRequest)) @@ -320,7 +352,7 @@ func _PartyService_KickPlayer_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.party.PartyService/KickPlayer", + FullMethod: PartyService_KickPlayer_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PartyServiceServer).KickPlayer(ctx, req.(*KickPlayerRequest)) @@ -338,7 +370,7 @@ func _PartyService_SetPartyLeader_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.party.PartyService/SetPartyLeader", + FullMethod: PartyService_SetPartyLeader_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PartyServiceServer).SetPartyLeader(ctx, req.(*SetPartyLeaderRequest)) @@ -394,6 +426,11 @@ var PartyService_ServiceDesc = grpc.ServiceDesc{ Metadata: "party/grpc.proto", } +const ( + PartySettingsService_GetPartySettings_FullMethodName = "/emortal.grpc.party.PartySettingsService/GetPartySettings" + PartySettingsService_UpdatePartySettings_FullMethodName = "/emortal.grpc.party.PartySettingsService/UpdatePartySettings" +) + // PartySettingsServiceClient is the client API for PartySettingsService 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. @@ -411,8 +448,9 @@ func NewPartySettingsServiceClient(cc grpc.ClientConnInterface) PartySettingsSer } func (c *partySettingsServiceClient) GetPartySettings(ctx context.Context, in *GetPartySettingsRequest, opts ...grpc.CallOption) (*GetPartySettingsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetPartySettingsResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.party.PartySettingsService/GetPartySettings", in, out, opts...) + err := c.cc.Invoke(ctx, PartySettingsService_GetPartySettings_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -420,8 +458,9 @@ func (c *partySettingsServiceClient) GetPartySettings(ctx context.Context, in *G } func (c *partySettingsServiceClient) UpdatePartySettings(ctx context.Context, in *UpdatePartySettingsRequest, opts ...grpc.CallOption) (*UpdatePartySettingsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UpdatePartySettingsResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.party.PartySettingsService/UpdatePartySettings", in, out, opts...) + err := c.cc.Invoke(ctx, PartySettingsService_UpdatePartySettings_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -430,16 +469,19 @@ func (c *partySettingsServiceClient) UpdatePartySettings(ctx context.Context, in // PartySettingsServiceServer is the server API for PartySettingsService service. // All implementations must embed UnimplementedPartySettingsServiceServer -// for forward compatibility +// for forward compatibility. type PartySettingsServiceServer interface { GetPartySettings(context.Context, *GetPartySettingsRequest) (*GetPartySettingsResponse, error) UpdatePartySettings(context.Context, *UpdatePartySettingsRequest) (*UpdatePartySettingsResponse, error) mustEmbedUnimplementedPartySettingsServiceServer() } -// UnimplementedPartySettingsServiceServer must be embedded to have forward compatible implementations. -type UnimplementedPartySettingsServiceServer struct { -} +// UnimplementedPartySettingsServiceServer 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. +type UnimplementedPartySettingsServiceServer struct{} func (UnimplementedPartySettingsServiceServer) GetPartySettings(context.Context, *GetPartySettingsRequest) (*GetPartySettingsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetPartySettings not implemented") @@ -448,6 +490,7 @@ func (UnimplementedPartySettingsServiceServer) UpdatePartySettings(context.Conte return nil, status.Errorf(codes.Unimplemented, "method UpdatePartySettings not implemented") } func (UnimplementedPartySettingsServiceServer) mustEmbedUnimplementedPartySettingsServiceServer() {} +func (UnimplementedPartySettingsServiceServer) testEmbeddedByValue() {} // UnsafePartySettingsServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to PartySettingsServiceServer will @@ -457,6 +500,13 @@ type UnsafePartySettingsServiceServer interface { } func RegisterPartySettingsServiceServer(s grpc.ServiceRegistrar, srv PartySettingsServiceServer) { + // If the following call pancis, it indicates UnimplementedPartySettingsServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&PartySettingsService_ServiceDesc, srv) } @@ -470,7 +520,7 @@ func _PartySettingsService_GetPartySettings_Handler(srv interface{}, ctx context } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.party.PartySettingsService/GetPartySettings", + FullMethod: PartySettingsService_GetPartySettings_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PartySettingsServiceServer).GetPartySettings(ctx, req.(*GetPartySettingsRequest)) @@ -488,7 +538,7 @@ func _PartySettingsService_UpdatePartySettings_Handler(srv interface{}, ctx cont } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.party.PartySettingsService/UpdatePartySettings", + FullMethod: PartySettingsService_UpdatePartySettings_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PartySettingsServiceServer).UpdatePartySettings(ctx, req.(*UpdatePartySettingsRequest)) @@ -516,6 +566,13 @@ var PartySettingsService_ServiceDesc = grpc.ServiceDesc{ Metadata: "party/grpc.proto", } +const ( + EventService_CreateEvent_FullMethodName = "/emortal.grpc.party.EventService/CreateEvent" + EventService_UpdateEvent_FullMethodName = "/emortal.grpc.party.EventService/UpdateEvent" + EventService_DeleteEvent_FullMethodName = "/emortal.grpc.party.EventService/DeleteEvent" + EventService_ListEvents_FullMethodName = "/emortal.grpc.party.EventService/ListEvents" +) + // EventServiceClient is the client API for EventService 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. @@ -535,8 +592,9 @@ func NewEventServiceClient(cc grpc.ClientConnInterface) EventServiceClient { } func (c *eventServiceClient) CreateEvent(ctx context.Context, in *CreateEventRequest, opts ...grpc.CallOption) (*CreateEventResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CreateEventResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.party.EventService/CreateEvent", in, out, opts...) + err := c.cc.Invoke(ctx, EventService_CreateEvent_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -544,8 +602,9 @@ func (c *eventServiceClient) CreateEvent(ctx context.Context, in *CreateEventReq } func (c *eventServiceClient) UpdateEvent(ctx context.Context, in *UpdateEventRequest, opts ...grpc.CallOption) (*UpdateEventResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UpdateEventResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.party.EventService/UpdateEvent", in, out, opts...) + err := c.cc.Invoke(ctx, EventService_UpdateEvent_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -553,8 +612,9 @@ func (c *eventServiceClient) UpdateEvent(ctx context.Context, in *UpdateEventReq } func (c *eventServiceClient) DeleteEvent(ctx context.Context, in *DeleteEventRequest, opts ...grpc.CallOption) (*DeleteEventResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeleteEventResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.party.EventService/DeleteEvent", in, out, opts...) + err := c.cc.Invoke(ctx, EventService_DeleteEvent_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -562,8 +622,9 @@ func (c *eventServiceClient) DeleteEvent(ctx context.Context, in *DeleteEventReq } func (c *eventServiceClient) ListEvents(ctx context.Context, in *ListEventsRequest, opts ...grpc.CallOption) (*ListEventsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListEventsResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.party.EventService/ListEvents", in, out, opts...) + err := c.cc.Invoke(ctx, EventService_ListEvents_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -572,7 +633,7 @@ func (c *eventServiceClient) ListEvents(ctx context.Context, in *ListEventsReque // EventServiceServer is the server API for EventService service. // All implementations must embed UnimplementedEventServiceServer -// for forward compatibility +// for forward compatibility. type EventServiceServer interface { CreateEvent(context.Context, *CreateEventRequest) (*CreateEventResponse, error) UpdateEvent(context.Context, *UpdateEventRequest) (*UpdateEventResponse, error) @@ -581,9 +642,12 @@ type EventServiceServer interface { mustEmbedUnimplementedEventServiceServer() } -// UnimplementedEventServiceServer must be embedded to have forward compatible implementations. -type UnimplementedEventServiceServer struct { -} +// UnimplementedEventServiceServer 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. +type UnimplementedEventServiceServer struct{} func (UnimplementedEventServiceServer) CreateEvent(context.Context, *CreateEventRequest) (*CreateEventResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateEvent not implemented") @@ -598,6 +662,7 @@ func (UnimplementedEventServiceServer) ListEvents(context.Context, *ListEventsRe return nil, status.Errorf(codes.Unimplemented, "method ListEvents not implemented") } func (UnimplementedEventServiceServer) mustEmbedUnimplementedEventServiceServer() {} +func (UnimplementedEventServiceServer) testEmbeddedByValue() {} // UnsafeEventServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to EventServiceServer will @@ -607,6 +672,13 @@ type UnsafeEventServiceServer interface { } func RegisterEventServiceServer(s grpc.ServiceRegistrar, srv EventServiceServer) { + // If the following call pancis, it indicates UnimplementedEventServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&EventService_ServiceDesc, srv) } @@ -620,7 +692,7 @@ func _EventService_CreateEvent_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.party.EventService/CreateEvent", + FullMethod: EventService_CreateEvent_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EventServiceServer).CreateEvent(ctx, req.(*CreateEventRequest)) @@ -638,7 +710,7 @@ func _EventService_UpdateEvent_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.party.EventService/UpdateEvent", + FullMethod: EventService_UpdateEvent_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EventServiceServer).UpdateEvent(ctx, req.(*UpdateEventRequest)) @@ -656,7 +728,7 @@ func _EventService_DeleteEvent_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.party.EventService/DeleteEvent", + FullMethod: EventService_DeleteEvent_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EventServiceServer).DeleteEvent(ctx, req.(*DeleteEventRequest)) @@ -674,7 +746,7 @@ func _EventService_ListEvents_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.party.EventService/ListEvents", + FullMethod: EventService_ListEvents_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EventServiceServer).ListEvents(ctx, req.(*ListEventsRequest)) diff --git a/gen/go/grpc/permission/grpc.pb.go b/gen/go/grpc/permission/grpc.pb.go index 3dc605e..a89c0b5 100644 --- a/gen/go/grpc/permission/grpc.pb.go +++ b/gen/go/grpc/permission/grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: permission/grpc.proto package permission @@ -124,11 +124,9 @@ type GetAllRolesRequest struct { func (x *GetAllRolesRequest) Reset() { *x = GetAllRolesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_permission_grpc_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_permission_grpc_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAllRolesRequest) String() string { @@ -139,7 +137,7 @@ func (*GetAllRolesRequest) ProtoMessage() {} func (x *GetAllRolesRequest) ProtoReflect() protoreflect.Message { mi := &file_permission_grpc_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -164,11 +162,9 @@ type GetAllRolesResponse struct { func (x *GetAllRolesResponse) Reset() { *x = GetAllRolesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_permission_grpc_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_permission_grpc_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetAllRolesResponse) String() string { @@ -179,7 +175,7 @@ func (*GetAllRolesResponse) ProtoMessage() {} func (x *GetAllRolesResponse) ProtoReflect() protoreflect.Message { mi := &file_permission_grpc_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -211,11 +207,9 @@ type GetPlayerRolesRequest struct { func (x *GetPlayerRolesRequest) Reset() { *x = GetPlayerRolesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_permission_grpc_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_permission_grpc_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPlayerRolesRequest) String() string { @@ -226,7 +220,7 @@ func (*GetPlayerRolesRequest) ProtoMessage() {} func (x *GetPlayerRolesRequest) ProtoReflect() protoreflect.Message { mi := &file_permission_grpc_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -261,11 +255,9 @@ type PlayerRolesResponse struct { func (x *PlayerRolesResponse) Reset() { *x = PlayerRolesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_permission_grpc_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_permission_grpc_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PlayerRolesResponse) String() string { @@ -276,7 +268,7 @@ func (*PlayerRolesResponse) ProtoMessage() {} func (x *PlayerRolesResponse) ProtoReflect() protoreflect.Message { mi := &file_permission_grpc_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -319,11 +311,9 @@ type RoleCreateRequest struct { func (x *RoleCreateRequest) Reset() { *x = RoleCreateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_permission_grpc_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_permission_grpc_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RoleCreateRequest) String() string { @@ -334,7 +324,7 @@ func (*RoleCreateRequest) ProtoMessage() {} func (x *RoleCreateRequest) ProtoReflect() protoreflect.Message { mi := &file_permission_grpc_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -380,11 +370,9 @@ type CreateRoleResponse struct { func (x *CreateRoleResponse) Reset() { *x = CreateRoleResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_permission_grpc_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_permission_grpc_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateRoleResponse) String() string { @@ -395,7 +383,7 @@ func (*CreateRoleResponse) ProtoMessage() {} func (x *CreateRoleResponse) ProtoReflect() protoreflect.Message { mi := &file_permission_grpc_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -431,11 +419,9 @@ type RoleUpdateRequest struct { func (x *RoleUpdateRequest) Reset() { *x = RoleUpdateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_permission_grpc_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_permission_grpc_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RoleUpdateRequest) String() string { @@ -446,7 +432,7 @@ func (*RoleUpdateRequest) ProtoMessage() {} func (x *RoleUpdateRequest) ProtoReflect() protoreflect.Message { mi := &file_permission_grpc_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -506,11 +492,9 @@ type UpdateRoleResponse struct { func (x *UpdateRoleResponse) Reset() { *x = UpdateRoleResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_permission_grpc_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_permission_grpc_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateRoleResponse) String() string { @@ -521,7 +505,7 @@ func (*UpdateRoleResponse) ProtoMessage() {} func (x *UpdateRoleResponse) ProtoReflect() protoreflect.Message { mi := &file_permission_grpc_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -554,11 +538,9 @@ type AddRoleToPlayerRequest struct { func (x *AddRoleToPlayerRequest) Reset() { *x = AddRoleToPlayerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_permission_grpc_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_permission_grpc_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddRoleToPlayerRequest) String() string { @@ -569,7 +551,7 @@ func (*AddRoleToPlayerRequest) ProtoMessage() {} func (x *AddRoleToPlayerRequest) ProtoReflect() protoreflect.Message { mi := &file_permission_grpc_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -606,11 +588,9 @@ type AddRoleToPlayerResponse struct { func (x *AddRoleToPlayerResponse) Reset() { *x = AddRoleToPlayerResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_permission_grpc_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_permission_grpc_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddRoleToPlayerResponse) String() string { @@ -621,7 +601,7 @@ func (*AddRoleToPlayerResponse) ProtoMessage() {} func (x *AddRoleToPlayerResponse) ProtoReflect() protoreflect.Message { mi := &file_permission_grpc_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -646,11 +626,9 @@ type AddRoleToPlayerError struct { func (x *AddRoleToPlayerError) Reset() { *x = AddRoleToPlayerError{} - if protoimpl.UnsafeEnabled { - mi := &file_permission_grpc_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_permission_grpc_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddRoleToPlayerError) String() string { @@ -661,7 +639,7 @@ func (*AddRoleToPlayerError) ProtoMessage() {} func (x *AddRoleToPlayerError) ProtoReflect() protoreflect.Message { mi := &file_permission_grpc_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -694,11 +672,9 @@ type RemoveRoleFromPlayerRequest struct { func (x *RemoveRoleFromPlayerRequest) Reset() { *x = RemoveRoleFromPlayerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_permission_grpc_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_permission_grpc_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveRoleFromPlayerRequest) String() string { @@ -709,7 +685,7 @@ func (*RemoveRoleFromPlayerRequest) ProtoMessage() {} func (x *RemoveRoleFromPlayerRequest) ProtoReflect() protoreflect.Message { mi := &file_permission_grpc_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -746,11 +722,9 @@ type RemoveRoleFromPlayerResponse struct { func (x *RemoveRoleFromPlayerResponse) Reset() { *x = RemoveRoleFromPlayerResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_permission_grpc_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_permission_grpc_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveRoleFromPlayerResponse) String() string { @@ -761,7 +735,7 @@ func (*RemoveRoleFromPlayerResponse) ProtoMessage() {} func (x *RemoveRoleFromPlayerResponse) ProtoReflect() protoreflect.Message { mi := &file_permission_grpc_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -786,11 +760,9 @@ type RemoveRoleFromPlayerError struct { func (x *RemoveRoleFromPlayerError) Reset() { *x = RemoveRoleFromPlayerError{} - if protoimpl.UnsafeEnabled { - mi := &file_permission_grpc_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_permission_grpc_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveRoleFromPlayerError) String() string { @@ -801,7 +773,7 @@ func (*RemoveRoleFromPlayerError) ProtoMessage() {} func (x *RemoveRoleFromPlayerError) ProtoReflect() protoreflect.Message { mi := &file_permission_grpc_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -989,7 +961,7 @@ func file_permission_grpc_proto_rawDescGZIP() []byte { var file_permission_grpc_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_permission_grpc_proto_msgTypes = make([]protoimpl.MessageInfo, 14) -var file_permission_grpc_proto_goTypes = []interface{}{ +var file_permission_grpc_proto_goTypes = []any{ (AddRoleToPlayerError_ErrorType)(0), // 0: emortal.grpc.permission.AddRoleToPlayerError.ErrorType (RemoveRoleFromPlayerError_ErrorType)(0), // 1: emortal.grpc.permission.RemoveRoleFromPlayerError.ErrorType (*GetAllRolesRequest)(nil), // 2: emortal.grpc.permission.GetAllRolesRequest @@ -1040,179 +1012,9 @@ func file_permission_grpc_proto_init() { if File_permission_grpc_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_permission_grpc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAllRolesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_permission_grpc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAllRolesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_permission_grpc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPlayerRolesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_permission_grpc_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PlayerRolesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_permission_grpc_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RoleCreateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_permission_grpc_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateRoleResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_permission_grpc_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RoleUpdateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_permission_grpc_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateRoleResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_permission_grpc_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddRoleToPlayerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_permission_grpc_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddRoleToPlayerResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_permission_grpc_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddRoleToPlayerError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_permission_grpc_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveRoleFromPlayerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_permission_grpc_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveRoleFromPlayerResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_permission_grpc_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveRoleFromPlayerError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_permission_grpc_proto_msgTypes[3].OneofWrappers = []interface{}{} - file_permission_grpc_proto_msgTypes[4].OneofWrappers = []interface{}{} - file_permission_grpc_proto_msgTypes[6].OneofWrappers = []interface{}{} + file_permission_grpc_proto_msgTypes[3].OneofWrappers = []any{} + file_permission_grpc_proto_msgTypes[4].OneofWrappers = []any{} + file_permission_grpc_proto_msgTypes[6].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/go/grpc/permission/grpc_grpc.pb.go b/gen/go/grpc/permission/grpc_grpc.pb.go index eaf884c..ceba73c 100644 --- a/gen/go/grpc/permission/grpc_grpc.pb.go +++ b/gen/go/grpc/permission/grpc_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v5.28.0 +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.28.3 // source: permission/grpc.proto package permission @@ -15,8 +15,17 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + PermissionService_GetAllRoles_FullMethodName = "/emortal.grpc.permission.PermissionService/GetAllRoles" + PermissionService_GetPlayerRoles_FullMethodName = "/emortal.grpc.permission.PermissionService/GetPlayerRoles" + PermissionService_CreateRole_FullMethodName = "/emortal.grpc.permission.PermissionService/CreateRole" + PermissionService_UpdateRole_FullMethodName = "/emortal.grpc.permission.PermissionService/UpdateRole" + PermissionService_AddRoleToPlayer_FullMethodName = "/emortal.grpc.permission.PermissionService/AddRoleToPlayer" + PermissionService_RemoveRoleFromPlayer_FullMethodName = "/emortal.grpc.permission.PermissionService/RemoveRoleFromPlayer" +) // PermissionServiceClient is the client API for PermissionService service. // @@ -39,8 +48,9 @@ func NewPermissionServiceClient(cc grpc.ClientConnInterface) PermissionServiceCl } func (c *permissionServiceClient) GetAllRoles(ctx context.Context, in *GetAllRolesRequest, opts ...grpc.CallOption) (*GetAllRolesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetAllRolesResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.permission.PermissionService/GetAllRoles", in, out, opts...) + err := c.cc.Invoke(ctx, PermissionService_GetAllRoles_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -48,8 +58,9 @@ func (c *permissionServiceClient) GetAllRoles(ctx context.Context, in *GetAllRol } func (c *permissionServiceClient) GetPlayerRoles(ctx context.Context, in *GetPlayerRolesRequest, opts ...grpc.CallOption) (*PlayerRolesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(PlayerRolesResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.permission.PermissionService/GetPlayerRoles", in, out, opts...) + err := c.cc.Invoke(ctx, PermissionService_GetPlayerRoles_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -57,8 +68,9 @@ func (c *permissionServiceClient) GetPlayerRoles(ctx context.Context, in *GetPla } func (c *permissionServiceClient) CreateRole(ctx context.Context, in *RoleCreateRequest, opts ...grpc.CallOption) (*CreateRoleResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CreateRoleResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.permission.PermissionService/CreateRole", in, out, opts...) + err := c.cc.Invoke(ctx, PermissionService_CreateRole_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -66,8 +78,9 @@ func (c *permissionServiceClient) CreateRole(ctx context.Context, in *RoleCreate } func (c *permissionServiceClient) UpdateRole(ctx context.Context, in *RoleUpdateRequest, opts ...grpc.CallOption) (*UpdateRoleResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UpdateRoleResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.permission.PermissionService/UpdateRole", in, out, opts...) + err := c.cc.Invoke(ctx, PermissionService_UpdateRole_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -75,8 +88,9 @@ func (c *permissionServiceClient) UpdateRole(ctx context.Context, in *RoleUpdate } func (c *permissionServiceClient) AddRoleToPlayer(ctx context.Context, in *AddRoleToPlayerRequest, opts ...grpc.CallOption) (*AddRoleToPlayerResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(AddRoleToPlayerResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.permission.PermissionService/AddRoleToPlayer", in, out, opts...) + err := c.cc.Invoke(ctx, PermissionService_AddRoleToPlayer_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -84,8 +98,9 @@ func (c *permissionServiceClient) AddRoleToPlayer(ctx context.Context, in *AddRo } func (c *permissionServiceClient) RemoveRoleFromPlayer(ctx context.Context, in *RemoveRoleFromPlayerRequest, opts ...grpc.CallOption) (*RemoveRoleFromPlayerResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RemoveRoleFromPlayerResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.permission.PermissionService/RemoveRoleFromPlayer", in, out, opts...) + err := c.cc.Invoke(ctx, PermissionService_RemoveRoleFromPlayer_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -94,7 +109,7 @@ func (c *permissionServiceClient) RemoveRoleFromPlayer(ctx context.Context, in * // PermissionServiceServer is the server API for PermissionService service. // All implementations must embed UnimplementedPermissionServiceServer -// for forward compatibility +// for forward compatibility. type PermissionServiceServer interface { GetAllRoles(context.Context, *GetAllRolesRequest) (*GetAllRolesResponse, error) GetPlayerRoles(context.Context, *GetPlayerRolesRequest) (*PlayerRolesResponse, error) @@ -105,9 +120,12 @@ type PermissionServiceServer interface { mustEmbedUnimplementedPermissionServiceServer() } -// UnimplementedPermissionServiceServer must be embedded to have forward compatible implementations. -type UnimplementedPermissionServiceServer struct { -} +// UnimplementedPermissionServiceServer 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. +type UnimplementedPermissionServiceServer struct{} func (UnimplementedPermissionServiceServer) GetAllRoles(context.Context, *GetAllRolesRequest) (*GetAllRolesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetAllRoles not implemented") @@ -128,6 +146,7 @@ func (UnimplementedPermissionServiceServer) RemoveRoleFromPlayer(context.Context return nil, status.Errorf(codes.Unimplemented, "method RemoveRoleFromPlayer not implemented") } func (UnimplementedPermissionServiceServer) mustEmbedUnimplementedPermissionServiceServer() {} +func (UnimplementedPermissionServiceServer) testEmbeddedByValue() {} // UnsafePermissionServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to PermissionServiceServer will @@ -137,6 +156,13 @@ type UnsafePermissionServiceServer interface { } func RegisterPermissionServiceServer(s grpc.ServiceRegistrar, srv PermissionServiceServer) { + // If the following call pancis, it indicates UnimplementedPermissionServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&PermissionService_ServiceDesc, srv) } @@ -150,7 +176,7 @@ func _PermissionService_GetAllRoles_Handler(srv interface{}, ctx context.Context } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.permission.PermissionService/GetAllRoles", + FullMethod: PermissionService_GetAllRoles_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PermissionServiceServer).GetAllRoles(ctx, req.(*GetAllRolesRequest)) @@ -168,7 +194,7 @@ func _PermissionService_GetPlayerRoles_Handler(srv interface{}, ctx context.Cont } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.permission.PermissionService/GetPlayerRoles", + FullMethod: PermissionService_GetPlayerRoles_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PermissionServiceServer).GetPlayerRoles(ctx, req.(*GetPlayerRolesRequest)) @@ -186,7 +212,7 @@ func _PermissionService_CreateRole_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.permission.PermissionService/CreateRole", + FullMethod: PermissionService_CreateRole_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PermissionServiceServer).CreateRole(ctx, req.(*RoleCreateRequest)) @@ -204,7 +230,7 @@ func _PermissionService_UpdateRole_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.permission.PermissionService/UpdateRole", + FullMethod: PermissionService_UpdateRole_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PermissionServiceServer).UpdateRole(ctx, req.(*RoleUpdateRequest)) @@ -222,7 +248,7 @@ func _PermissionService_AddRoleToPlayer_Handler(srv interface{}, ctx context.Con } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.permission.PermissionService/AddRoleToPlayer", + FullMethod: PermissionService_AddRoleToPlayer_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PermissionServiceServer).AddRoleToPlayer(ctx, req.(*AddRoleToPlayerRequest)) @@ -240,7 +266,7 @@ func _PermissionService_RemoveRoleFromPlayer_Handler(srv interface{}, ctx contex } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.permission.PermissionService/RemoveRoleFromPlayer", + FullMethod: PermissionService_RemoveRoleFromPlayer_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PermissionServiceServer).RemoveRoleFromPlayer(ctx, req.(*RemoveRoleFromPlayerRequest)) diff --git a/gen/go/grpc/relationship/grpc.pb.go b/gen/go/grpc/relationship/grpc.pb.go index 079173e..5129a30 100644 --- a/gen/go/grpc/relationship/grpc.pb.go +++ b/gen/go/grpc/relationship/grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: relationship/grpc.proto package relationship @@ -232,11 +232,9 @@ type AddFriendRequest struct { func (x *AddFriendRequest) Reset() { *x = AddFriendRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_relationship_grpc_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_relationship_grpc_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddFriendRequest) String() string { @@ -247,7 +245,7 @@ func (*AddFriendRequest) ProtoMessage() {} func (x *AddFriendRequest) ProtoReflect() protoreflect.Message { mi := &file_relationship_grpc_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -280,11 +278,9 @@ type AddFriendResponse struct { func (x *AddFriendResponse) Reset() { *x = AddFriendResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_relationship_grpc_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_relationship_grpc_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddFriendResponse) String() string { @@ -295,7 +291,7 @@ func (*AddFriendResponse) ProtoMessage() {} func (x *AddFriendResponse) ProtoReflect() protoreflect.Message { mi := &file_relationship_grpc_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -336,11 +332,9 @@ type RemoveFriendRequest struct { func (x *RemoveFriendRequest) Reset() { *x = RemoveFriendRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_relationship_grpc_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_relationship_grpc_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveFriendRequest) String() string { @@ -351,7 +345,7 @@ func (*RemoveFriendRequest) ProtoMessage() {} func (x *RemoveFriendRequest) ProtoReflect() protoreflect.Message { mi := &file_relationship_grpc_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -397,11 +391,9 @@ type RemoveFriendResponse struct { func (x *RemoveFriendResponse) Reset() { *x = RemoveFriendResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_relationship_grpc_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_relationship_grpc_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RemoveFriendResponse) String() string { @@ -412,7 +404,7 @@ func (*RemoveFriendResponse) ProtoMessage() {} func (x *RemoveFriendResponse) ProtoReflect() protoreflect.Message { mi := &file_relationship_grpc_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -444,11 +436,9 @@ type FriendListResponse struct { func (x *FriendListResponse) Reset() { *x = FriendListResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_relationship_grpc_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_relationship_grpc_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FriendListResponse) String() string { @@ -459,7 +449,7 @@ func (*FriendListResponse) ProtoMessage() {} func (x *FriendListResponse) ProtoReflect() protoreflect.Message { mi := &file_relationship_grpc_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -492,11 +482,9 @@ type GetPendingFriendRequestListRequest struct { func (x *GetPendingFriendRequestListRequest) Reset() { *x = GetPendingFriendRequestListRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_relationship_grpc_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_relationship_grpc_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPendingFriendRequestListRequest) String() string { @@ -507,7 +495,7 @@ func (*GetPendingFriendRequestListRequest) ProtoMessage() {} func (x *GetPendingFriendRequestListRequest) ProtoReflect() protoreflect.Message { mi := &file_relationship_grpc_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -546,11 +534,9 @@ type PendingFriendListResponse struct { func (x *PendingFriendListResponse) Reset() { *x = PendingFriendListResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_relationship_grpc_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_relationship_grpc_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PendingFriendListResponse) String() string { @@ -561,7 +547,7 @@ func (*PendingFriendListResponse) ProtoMessage() {} func (x *PendingFriendListResponse) ProtoReflect() protoreflect.Message { mi := &file_relationship_grpc_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -594,11 +580,9 @@ type DenyFriendRequestRequest struct { func (x *DenyFriendRequestRequest) Reset() { *x = DenyFriendRequestRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_relationship_grpc_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_relationship_grpc_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DenyFriendRequestRequest) String() string { @@ -609,7 +593,7 @@ func (*DenyFriendRequestRequest) ProtoMessage() {} func (x *DenyFriendRequestRequest) ProtoReflect() protoreflect.Message { mi := &file_relationship_grpc_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -648,11 +632,9 @@ type DenyFriendRequestResponse struct { func (x *DenyFriendRequestResponse) Reset() { *x = DenyFriendRequestResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_relationship_grpc_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_relationship_grpc_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DenyFriendRequestResponse) String() string { @@ -663,7 +645,7 @@ func (*DenyFriendRequestResponse) ProtoMessage() {} func (x *DenyFriendRequestResponse) ProtoReflect() protoreflect.Message { mi := &file_relationship_grpc_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -698,11 +680,9 @@ type MassDenyFriendRequestRequest struct { func (x *MassDenyFriendRequestRequest) Reset() { *x = MassDenyFriendRequestRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_relationship_grpc_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_relationship_grpc_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MassDenyFriendRequestRequest) String() string { @@ -713,7 +693,7 @@ func (*MassDenyFriendRequestRequest) ProtoMessage() {} func (x *MassDenyFriendRequestRequest) ProtoReflect() protoreflect.Message { mi := &file_relationship_grpc_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -752,11 +732,9 @@ type MassDenyFriendRequestResponse struct { func (x *MassDenyFriendRequestResponse) Reset() { *x = MassDenyFriendRequestResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_relationship_grpc_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_relationship_grpc_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MassDenyFriendRequestResponse) String() string { @@ -767,7 +745,7 @@ func (*MassDenyFriendRequestResponse) ProtoMessage() {} func (x *MassDenyFriendRequestResponse) ProtoReflect() protoreflect.Message { mi := &file_relationship_grpc_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -799,11 +777,9 @@ type GetFriendListRequest struct { func (x *GetFriendListRequest) Reset() { *x = GetFriendListRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_relationship_grpc_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_relationship_grpc_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetFriendListRequest) String() string { @@ -814,7 +790,7 @@ func (*GetFriendListRequest) ProtoMessage() {} func (x *GetFriendListRequest) ProtoReflect() protoreflect.Message { mi := &file_relationship_grpc_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -846,11 +822,9 @@ type CreateBlockRequest struct { func (x *CreateBlockRequest) Reset() { *x = CreateBlockRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_relationship_grpc_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_relationship_grpc_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBlockRequest) String() string { @@ -861,7 +835,7 @@ func (*CreateBlockRequest) ProtoMessage() {} func (x *CreateBlockRequest) ProtoReflect() protoreflect.Message { mi := &file_relationship_grpc_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -893,11 +867,9 @@ type CreateBlockResponse struct { func (x *CreateBlockResponse) Reset() { *x = CreateBlockResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_relationship_grpc_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_relationship_grpc_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateBlockResponse) String() string { @@ -908,7 +880,7 @@ func (*CreateBlockResponse) ProtoMessage() {} func (x *CreateBlockResponse) ProtoReflect() protoreflect.Message { mi := &file_relationship_grpc_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -941,11 +913,9 @@ type DeleteBlockRequest struct { func (x *DeleteBlockRequest) Reset() { *x = DeleteBlockRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_relationship_grpc_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_relationship_grpc_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBlockRequest) String() string { @@ -956,7 +926,7 @@ func (*DeleteBlockRequest) ProtoMessage() {} func (x *DeleteBlockRequest) ProtoReflect() protoreflect.Message { mi := &file_relationship_grpc_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -993,11 +963,9 @@ type DeleteBlockResponse struct { func (x *DeleteBlockResponse) Reset() { *x = DeleteBlockResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_relationship_grpc_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_relationship_grpc_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteBlockResponse) String() string { @@ -1008,7 +976,7 @@ func (*DeleteBlockResponse) ProtoMessage() {} func (x *DeleteBlockResponse) ProtoReflect() protoreflect.Message { mi := &file_relationship_grpc_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1034,11 +1002,9 @@ type IsBlockedRequest struct { func (x *IsBlockedRequest) Reset() { *x = IsBlockedRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_relationship_grpc_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_relationship_grpc_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IsBlockedRequest) String() string { @@ -1049,7 +1015,7 @@ func (*IsBlockedRequest) ProtoMessage() {} func (x *IsBlockedRequest) ProtoReflect() protoreflect.Message { mi := &file_relationship_grpc_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1090,11 +1056,9 @@ type IsBlockedResponse struct { func (x *IsBlockedResponse) Reset() { *x = IsBlockedResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_relationship_grpc_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_relationship_grpc_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IsBlockedResponse) String() string { @@ -1105,7 +1069,7 @@ func (*IsBlockedResponse) ProtoMessage() {} func (x *IsBlockedResponse) ProtoReflect() protoreflect.Message { mi := &file_relationship_grpc_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1137,11 +1101,9 @@ type GetBlockedListRequest struct { func (x *GetBlockedListRequest) Reset() { *x = GetBlockedListRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_relationship_grpc_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_relationship_grpc_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBlockedListRequest) String() string { @@ -1152,7 +1114,7 @@ func (*GetBlockedListRequest) ProtoMessage() {} func (x *GetBlockedListRequest) ProtoReflect() protoreflect.Message { mi := &file_relationship_grpc_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1184,11 +1146,9 @@ type BlockedListResponse struct { func (x *BlockedListResponse) Reset() { *x = BlockedListResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_relationship_grpc_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_relationship_grpc_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BlockedListResponse) String() string { @@ -1199,7 +1159,7 @@ func (*BlockedListResponse) ProtoMessage() {} func (x *BlockedListResponse) ProtoReflect() protoreflect.Message { mi := &file_relationship_grpc_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1232,11 +1192,9 @@ type FriendListResponse_FriendListPlayer struct { func (x *FriendListResponse_FriendListPlayer) Reset() { *x = FriendListResponse_FriendListPlayer{} - if protoimpl.UnsafeEnabled { - mi := &file_relationship_grpc_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_relationship_grpc_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FriendListResponse_FriendListPlayer) String() string { @@ -1247,7 +1205,7 @@ func (*FriendListResponse_FriendListPlayer) ProtoMessage() {} func (x *FriendListResponse_FriendListPlayer) ProtoReflect() protoreflect.Message { mi := &file_relationship_grpc_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1288,11 +1246,9 @@ type PendingFriendListResponse_RequestedFriendPlayer struct { func (x *PendingFriendListResponse_RequestedFriendPlayer) Reset() { *x = PendingFriendListResponse_RequestedFriendPlayer{} - if protoimpl.UnsafeEnabled { - mi := &file_relationship_grpc_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_relationship_grpc_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PendingFriendListResponse_RequestedFriendPlayer) String() string { @@ -1303,7 +1259,7 @@ func (*PendingFriendListResponse_RequestedFriendPlayer) ProtoMessage() {} func (x *PendingFriendListResponse_RequestedFriendPlayer) ProtoReflect() protoreflect.Message { mi := &file_relationship_grpc_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1603,7 +1559,7 @@ func file_relationship_grpc_proto_rawDescGZIP() []byte { var file_relationship_grpc_proto_enumTypes = make([]protoimpl.EnumInfo, 4) var file_relationship_grpc_proto_msgTypes = make([]protoimpl.MessageInfo, 22) -var file_relationship_grpc_proto_goTypes = []interface{}{ +var file_relationship_grpc_proto_goTypes = []any{ (AddFriendResponse_AddFriendResult)(0), // 0: emortal.grpc.relationship.AddFriendResponse.AddFriendResult (RemoveFriendResponse_RemoveFriendResult)(0), // 1: emortal.grpc.relationship.RemoveFriendResponse.RemoveFriendResult (DenyFriendRequestResponse_DenyFriendRequestResult)(0), // 2: emortal.grpc.relationship.DenyFriendRequestResponse.DenyFriendRequestResult @@ -1679,274 +1635,8 @@ func file_relationship_grpc_proto_init() { if File_relationship_grpc_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_relationship_grpc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddFriendRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relationship_grpc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddFriendResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relationship_grpc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveFriendRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relationship_grpc_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveFriendResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relationship_grpc_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendListResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relationship_grpc_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPendingFriendRequestListRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relationship_grpc_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PendingFriendListResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relationship_grpc_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DenyFriendRequestRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relationship_grpc_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DenyFriendRequestResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relationship_grpc_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MassDenyFriendRequestRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relationship_grpc_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MassDenyFriendRequestResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relationship_grpc_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetFriendListRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relationship_grpc_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateBlockRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relationship_grpc_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateBlockResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relationship_grpc_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteBlockRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relationship_grpc_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteBlockResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relationship_grpc_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsBlockedRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relationship_grpc_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsBlockedResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relationship_grpc_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetBlockedListRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relationship_grpc_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BlockedListResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relationship_grpc_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendListResponse_FriendListPlayer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relationship_grpc_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PendingFriendListResponse_RequestedFriendPlayer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_relationship_grpc_proto_msgTypes[1].OneofWrappers = []interface{}{} - file_relationship_grpc_proto_msgTypes[17].OneofWrappers = []interface{}{} + file_relationship_grpc_proto_msgTypes[1].OneofWrappers = []any{} + file_relationship_grpc_proto_msgTypes[17].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/go/grpc/relationship/grpc_grpc.pb.go b/gen/go/grpc/relationship/grpc_grpc.pb.go index 3cd69c1..afc1a3a 100644 --- a/gen/go/grpc/relationship/grpc_grpc.pb.go +++ b/gen/go/grpc/relationship/grpc_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v5.28.0 +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.28.3 // source: relationship/grpc.proto package relationship @@ -15,8 +15,21 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Relationship_AddFriend_FullMethodName = "/emortal.grpc.relationship.Relationship/AddFriend" + Relationship_RemoveFriend_FullMethodName = "/emortal.grpc.relationship.Relationship/RemoveFriend" + Relationship_DenyFriendRequest_FullMethodName = "/emortal.grpc.relationship.Relationship/DenyFriendRequest" + Relationship_MassDenyFriendRequest_FullMethodName = "/emortal.grpc.relationship.Relationship/MassDenyFriendRequest" + Relationship_GetFriendList_FullMethodName = "/emortal.grpc.relationship.Relationship/GetFriendList" + Relationship_GetPendingFriendRequestList_FullMethodName = "/emortal.grpc.relationship.Relationship/GetPendingFriendRequestList" + Relationship_CreateBlock_FullMethodName = "/emortal.grpc.relationship.Relationship/CreateBlock" + Relationship_DeleteBlock_FullMethodName = "/emortal.grpc.relationship.Relationship/DeleteBlock" + Relationship_IsBlocked_FullMethodName = "/emortal.grpc.relationship.Relationship/IsBlocked" + Relationship_GetBlockedList_FullMethodName = "/emortal.grpc.relationship.Relationship/GetBlockedList" +) // RelationshipClient is the client API for Relationship service. // @@ -43,8 +56,9 @@ func NewRelationshipClient(cc grpc.ClientConnInterface) RelationshipClient { } func (c *relationshipClient) AddFriend(ctx context.Context, in *AddFriendRequest, opts ...grpc.CallOption) (*AddFriendResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(AddFriendResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.relationship.Relationship/AddFriend", in, out, opts...) + err := c.cc.Invoke(ctx, Relationship_AddFriend_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -52,8 +66,9 @@ func (c *relationshipClient) AddFriend(ctx context.Context, in *AddFriendRequest } func (c *relationshipClient) RemoveFriend(ctx context.Context, in *RemoveFriendRequest, opts ...grpc.CallOption) (*RemoveFriendResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RemoveFriendResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.relationship.Relationship/RemoveFriend", in, out, opts...) + err := c.cc.Invoke(ctx, Relationship_RemoveFriend_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -61,8 +76,9 @@ func (c *relationshipClient) RemoveFriend(ctx context.Context, in *RemoveFriendR } func (c *relationshipClient) DenyFriendRequest(ctx context.Context, in *DenyFriendRequestRequest, opts ...grpc.CallOption) (*DenyFriendRequestResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DenyFriendRequestResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.relationship.Relationship/DenyFriendRequest", in, out, opts...) + err := c.cc.Invoke(ctx, Relationship_DenyFriendRequest_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -70,8 +86,9 @@ func (c *relationshipClient) DenyFriendRequest(ctx context.Context, in *DenyFrie } func (c *relationshipClient) MassDenyFriendRequest(ctx context.Context, in *MassDenyFriendRequestRequest, opts ...grpc.CallOption) (*MassDenyFriendRequestResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MassDenyFriendRequestResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.relationship.Relationship/MassDenyFriendRequest", in, out, opts...) + err := c.cc.Invoke(ctx, Relationship_MassDenyFriendRequest_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -79,8 +96,9 @@ func (c *relationshipClient) MassDenyFriendRequest(ctx context.Context, in *Mass } func (c *relationshipClient) GetFriendList(ctx context.Context, in *GetFriendListRequest, opts ...grpc.CallOption) (*FriendListResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(FriendListResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.relationship.Relationship/GetFriendList", in, out, opts...) + err := c.cc.Invoke(ctx, Relationship_GetFriendList_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -88,8 +106,9 @@ func (c *relationshipClient) GetFriendList(ctx context.Context, in *GetFriendLis } func (c *relationshipClient) GetPendingFriendRequestList(ctx context.Context, in *GetPendingFriendRequestListRequest, opts ...grpc.CallOption) (*PendingFriendListResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(PendingFriendListResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.relationship.Relationship/GetPendingFriendRequestList", in, out, opts...) + err := c.cc.Invoke(ctx, Relationship_GetPendingFriendRequestList_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -97,8 +116,9 @@ func (c *relationshipClient) GetPendingFriendRequestList(ctx context.Context, in } func (c *relationshipClient) CreateBlock(ctx context.Context, in *CreateBlockRequest, opts ...grpc.CallOption) (*CreateBlockResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CreateBlockResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.relationship.Relationship/CreateBlock", in, out, opts...) + err := c.cc.Invoke(ctx, Relationship_CreateBlock_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -106,8 +126,9 @@ func (c *relationshipClient) CreateBlock(ctx context.Context, in *CreateBlockReq } func (c *relationshipClient) DeleteBlock(ctx context.Context, in *DeleteBlockRequest, opts ...grpc.CallOption) (*DeleteBlockResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeleteBlockResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.relationship.Relationship/DeleteBlock", in, out, opts...) + err := c.cc.Invoke(ctx, Relationship_DeleteBlock_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -115,8 +136,9 @@ func (c *relationshipClient) DeleteBlock(ctx context.Context, in *DeleteBlockReq } func (c *relationshipClient) IsBlocked(ctx context.Context, in *IsBlockedRequest, opts ...grpc.CallOption) (*IsBlockedResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(IsBlockedResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.relationship.Relationship/IsBlocked", in, out, opts...) + err := c.cc.Invoke(ctx, Relationship_IsBlocked_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -124,8 +146,9 @@ func (c *relationshipClient) IsBlocked(ctx context.Context, in *IsBlockedRequest } func (c *relationshipClient) GetBlockedList(ctx context.Context, in *GetBlockedListRequest, opts ...grpc.CallOption) (*BlockedListResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(BlockedListResponse) - err := c.cc.Invoke(ctx, "/emortal.grpc.relationship.Relationship/GetBlockedList", in, out, opts...) + err := c.cc.Invoke(ctx, Relationship_GetBlockedList_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -134,7 +157,7 @@ func (c *relationshipClient) GetBlockedList(ctx context.Context, in *GetBlockedL // RelationshipServer is the server API for Relationship service. // All implementations must embed UnimplementedRelationshipServer -// for forward compatibility +// for forward compatibility. type RelationshipServer interface { AddFriend(context.Context, *AddFriendRequest) (*AddFriendResponse, error) RemoveFriend(context.Context, *RemoveFriendRequest) (*RemoveFriendResponse, error) @@ -149,9 +172,12 @@ type RelationshipServer interface { mustEmbedUnimplementedRelationshipServer() } -// UnimplementedRelationshipServer must be embedded to have forward compatible implementations. -type UnimplementedRelationshipServer struct { -} +// UnimplementedRelationshipServer 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. +type UnimplementedRelationshipServer struct{} func (UnimplementedRelationshipServer) AddFriend(context.Context, *AddFriendRequest) (*AddFriendResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddFriend not implemented") @@ -184,6 +210,7 @@ func (UnimplementedRelationshipServer) GetBlockedList(context.Context, *GetBlock return nil, status.Errorf(codes.Unimplemented, "method GetBlockedList not implemented") } func (UnimplementedRelationshipServer) mustEmbedUnimplementedRelationshipServer() {} +func (UnimplementedRelationshipServer) testEmbeddedByValue() {} // UnsafeRelationshipServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to RelationshipServer will @@ -193,6 +220,13 @@ type UnsafeRelationshipServer interface { } func RegisterRelationshipServer(s grpc.ServiceRegistrar, srv RelationshipServer) { + // If the following call pancis, it indicates UnimplementedRelationshipServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&Relationship_ServiceDesc, srv) } @@ -206,7 +240,7 @@ func _Relationship_AddFriend_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.relationship.Relationship/AddFriend", + FullMethod: Relationship_AddFriend_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RelationshipServer).AddFriend(ctx, req.(*AddFriendRequest)) @@ -224,7 +258,7 @@ func _Relationship_RemoveFriend_Handler(srv interface{}, ctx context.Context, de } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.relationship.Relationship/RemoveFriend", + FullMethod: Relationship_RemoveFriend_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RelationshipServer).RemoveFriend(ctx, req.(*RemoveFriendRequest)) @@ -242,7 +276,7 @@ func _Relationship_DenyFriendRequest_Handler(srv interface{}, ctx context.Contex } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.relationship.Relationship/DenyFriendRequest", + FullMethod: Relationship_DenyFriendRequest_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RelationshipServer).DenyFriendRequest(ctx, req.(*DenyFriendRequestRequest)) @@ -260,7 +294,7 @@ func _Relationship_MassDenyFriendRequest_Handler(srv interface{}, ctx context.Co } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.relationship.Relationship/MassDenyFriendRequest", + FullMethod: Relationship_MassDenyFriendRequest_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RelationshipServer).MassDenyFriendRequest(ctx, req.(*MassDenyFriendRequestRequest)) @@ -278,7 +312,7 @@ func _Relationship_GetFriendList_Handler(srv interface{}, ctx context.Context, d } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.relationship.Relationship/GetFriendList", + FullMethod: Relationship_GetFriendList_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RelationshipServer).GetFriendList(ctx, req.(*GetFriendListRequest)) @@ -296,7 +330,7 @@ func _Relationship_GetPendingFriendRequestList_Handler(srv interface{}, ctx cont } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.relationship.Relationship/GetPendingFriendRequestList", + FullMethod: Relationship_GetPendingFriendRequestList_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RelationshipServer).GetPendingFriendRequestList(ctx, req.(*GetPendingFriendRequestListRequest)) @@ -314,7 +348,7 @@ func _Relationship_CreateBlock_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.relationship.Relationship/CreateBlock", + FullMethod: Relationship_CreateBlock_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RelationshipServer).CreateBlock(ctx, req.(*CreateBlockRequest)) @@ -332,7 +366,7 @@ func _Relationship_DeleteBlock_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.relationship.Relationship/DeleteBlock", + FullMethod: Relationship_DeleteBlock_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RelationshipServer).DeleteBlock(ctx, req.(*DeleteBlockRequest)) @@ -350,7 +384,7 @@ func _Relationship_IsBlocked_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.relationship.Relationship/IsBlocked", + FullMethod: Relationship_IsBlocked_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RelationshipServer).IsBlocked(ctx, req.(*IsBlockedRequest)) @@ -368,7 +402,7 @@ func _Relationship_GetBlockedList_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.relationship.Relationship/GetBlockedList", + FullMethod: Relationship_GetBlockedList_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RelationshipServer).GetBlockedList(ctx, req.(*GetBlockedListRequest)) diff --git a/gen/go/grpc/serverstore/grpc.pb.go b/gen/go/grpc/serverstore/grpc.pb.go index b8797fd..b8f7025 100644 --- a/gen/go/grpc/serverstore/grpc.pb.go +++ b/gen/go/grpc/serverstore/grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: server_store/grpc.proto package serverstore @@ -35,11 +35,9 @@ type AllocationRequest struct { func (x *AllocationRequest) Reset() { *x = AllocationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_server_store_grpc_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_server_store_grpc_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AllocationRequest) String() string { @@ -50,7 +48,7 @@ func (*AllocationRequest) ProtoMessage() {} func (x *AllocationRequest) ProtoReflect() protoreflect.Message { mi := &file_server_store_grpc_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -123,11 +121,9 @@ type PlayerBasedAllocator struct { func (x *PlayerBasedAllocator) Reset() { *x = PlayerBasedAllocator{} - if protoimpl.UnsafeEnabled { - mi := &file_server_store_grpc_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_server_store_grpc_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PlayerBasedAllocator) String() string { @@ -138,7 +134,7 @@ func (*PlayerBasedAllocator) ProtoMessage() {} func (x *PlayerBasedAllocator) ProtoReflect() protoreflect.Message { mi := &file_server_store_grpc_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -175,11 +171,9 @@ type GameBasedAllocator struct { func (x *GameBasedAllocator) Reset() { *x = GameBasedAllocator{} - if protoimpl.UnsafeEnabled { - mi := &file_server_store_grpc_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_server_store_grpc_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GameBasedAllocator) String() string { @@ -190,7 +184,7 @@ func (*GameBasedAllocator) ProtoMessage() {} func (x *GameBasedAllocator) ProtoReflect() protoreflect.Message { mi := &file_server_store_grpc_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -213,11 +207,9 @@ type ServerAllocation struct { func (x *ServerAllocation) Reset() { *x = ServerAllocation{} - if protoimpl.UnsafeEnabled { - mi := &file_server_store_grpc_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_server_store_grpc_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServerAllocation) String() string { @@ -228,7 +220,7 @@ func (*ServerAllocation) ProtoMessage() {} func (x *ServerAllocation) ProtoReflect() protoreflect.Message { mi := &file_server_store_grpc_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -303,7 +295,7 @@ func file_server_store_grpc_proto_rawDescGZIP() []byte { } var file_server_store_grpc_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_server_store_grpc_proto_goTypes = []interface{}{ +var file_server_store_grpc_proto_goTypes = []any{ (*AllocationRequest)(nil), // 0: emortal.grpc.server_store.AllocationRequest (*PlayerBasedAllocator)(nil), // 1: emortal.grpc.server_store.PlayerBasedAllocator (*GameBasedAllocator)(nil), // 2: emortal.grpc.server_store.GameBasedAllocator @@ -326,57 +318,7 @@ func file_server_store_grpc_proto_init() { if File_server_store_grpc_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_server_store_grpc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AllocationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_server_store_grpc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PlayerBasedAllocator); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_server_store_grpc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GameBasedAllocator); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_server_store_grpc_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ServerAllocation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_server_store_grpc_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_server_store_grpc_proto_msgTypes[0].OneofWrappers = []any{ (*AllocationRequest_PlayerBased)(nil), (*AllocationRequest_GameBased)(nil), } diff --git a/gen/go/grpc/serverstore/grpc_grpc.pb.go b/gen/go/grpc/serverstore/grpc_grpc.pb.go index 935a12d..e9c929a 100644 --- a/gen/go/grpc/serverstore/grpc_grpc.pb.go +++ b/gen/go/grpc/serverstore/grpc_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v5.28.0 +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.28.3 // source: server_store/grpc.proto package serverstore @@ -15,8 +15,12 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + ServerStore_AllocateServer_FullMethodName = "/emortal.grpc.server_store.ServerStore/AllocateServer" +) // ServerStoreClient is the client API for ServerStore service. // @@ -34,8 +38,9 @@ func NewServerStoreClient(cc grpc.ClientConnInterface) ServerStoreClient { } func (c *serverStoreClient) AllocateServer(ctx context.Context, in *AllocationRequest, opts ...grpc.CallOption) (*ServerAllocation, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ServerAllocation) - err := c.cc.Invoke(ctx, "/emortal.grpc.server_store.ServerStore/AllocateServer", in, out, opts...) + err := c.cc.Invoke(ctx, ServerStore_AllocateServer_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -44,20 +49,24 @@ func (c *serverStoreClient) AllocateServer(ctx context.Context, in *AllocationRe // ServerStoreServer is the server API for ServerStore service. // All implementations must embed UnimplementedServerStoreServer -// for forward compatibility +// for forward compatibility. type ServerStoreServer interface { AllocateServer(context.Context, *AllocationRequest) (*ServerAllocation, error) mustEmbedUnimplementedServerStoreServer() } -// UnimplementedServerStoreServer must be embedded to have forward compatible implementations. -type UnimplementedServerStoreServer struct { -} +// UnimplementedServerStoreServer 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. +type UnimplementedServerStoreServer struct{} func (UnimplementedServerStoreServer) AllocateServer(context.Context, *AllocationRequest) (*ServerAllocation, error) { return nil, status.Errorf(codes.Unimplemented, "method AllocateServer not implemented") } func (UnimplementedServerStoreServer) mustEmbedUnimplementedServerStoreServer() {} +func (UnimplementedServerStoreServer) testEmbeddedByValue() {} // UnsafeServerStoreServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ServerStoreServer will @@ -67,6 +76,13 @@ type UnsafeServerStoreServer interface { } func RegisterServerStoreServer(s grpc.ServiceRegistrar, srv ServerStoreServer) { + // If the following call pancis, it indicates UnimplementedServerStoreServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&ServerStore_ServiceDesc, srv) } @@ -80,7 +96,7 @@ func _ServerStore_AllocateServer_Handler(srv interface{}, ctx context.Context, d } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/emortal.grpc.server_store.ServerStore/AllocateServer", + FullMethod: ServerStore_AllocateServer_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ServerStoreServer).AllocateServer(ctx, req.(*AllocationRequest)) diff --git a/gen/go/message/accountconnmanager/messages.pb.go b/gen/go/message/accountconnmanager/messages.pb.go index e3c5b6b..704fbc0 100644 --- a/gen/go/message/accountconnmanager/messages.pb.go +++ b/gen/go/message/accountconnmanager/messages.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: account_conn_manager/messages.proto package accountconnmanager @@ -34,11 +34,9 @@ type AccountConnectedMessage struct { func (x *AccountConnectedMessage) Reset() { *x = AccountConnectedMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_account_conn_manager_messages_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_account_conn_manager_messages_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccountConnectedMessage) String() string { @@ -49,7 +47,7 @@ func (*AccountConnectedMessage) ProtoMessage() {} func (x *AccountConnectedMessage) ProtoReflect() protoreflect.Message { mi := &file_account_conn_manager_messages_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -89,11 +87,9 @@ type AccountConnectionRemovedMessage struct { func (x *AccountConnectionRemovedMessage) Reset() { *x = AccountConnectionRemovedMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_account_conn_manager_messages_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_account_conn_manager_messages_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AccountConnectionRemovedMessage) String() string { @@ -104,7 +100,7 @@ func (*AccountConnectionRemovedMessage) ProtoMessage() {} func (x *AccountConnectionRemovedMessage) ProtoReflect() protoreflect.Message { mi := &file_account_conn_manager_messages_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -191,7 +187,7 @@ func file_account_conn_manager_messages_proto_rawDescGZIP() []byte { } var file_account_conn_manager_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_account_conn_manager_messages_proto_goTypes = []interface{}{ +var file_account_conn_manager_messages_proto_goTypes = []any{ (*AccountConnectedMessage)(nil), // 0: emortal.message.account_conn_manager.AccountConnectedMessage (*AccountConnectionRemovedMessage)(nil), // 1: emortal.message.account_conn_manager.AccountConnectionRemovedMessage (*accountconnmanager.ConnectionUser)(nil), // 2: emortal.model.account_conn_manager.ConnectionUser @@ -214,32 +210,6 @@ func file_account_conn_manager_messages_proto_init() { if File_account_conn_manager_messages_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_account_conn_manager_messages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AccountConnectedMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_account_conn_manager_messages_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AccountConnectionRemovedMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/go/message/badge/messages.pb.go b/gen/go/message/badge/messages.pb.go index d26fb83..fe23f24 100644 --- a/gen/go/message/badge/messages.pb.go +++ b/gen/go/message/badge/messages.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: badges/messages.proto package badge @@ -33,11 +33,9 @@ type PlayerBadgeAddedMessage struct { func (x *PlayerBadgeAddedMessage) Reset() { *x = PlayerBadgeAddedMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_badges_messages_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_badges_messages_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PlayerBadgeAddedMessage) String() string { @@ -48,7 +46,7 @@ func (*PlayerBadgeAddedMessage) ProtoMessage() {} func (x *PlayerBadgeAddedMessage) ProtoReflect() protoreflect.Message { mi := &file_badges_messages_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -89,11 +87,9 @@ type PlayerBadgeRemovedMessage struct { func (x *PlayerBadgeRemovedMessage) Reset() { *x = PlayerBadgeRemovedMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_badges_messages_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_badges_messages_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PlayerBadgeRemovedMessage) String() string { @@ -104,7 +100,7 @@ func (*PlayerBadgeRemovedMessage) ProtoMessage() {} func (x *PlayerBadgeRemovedMessage) ProtoReflect() protoreflect.Message { mi := &file_badges_messages_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -145,11 +141,9 @@ type PlayerActiveBadgeChangedMessage struct { func (x *PlayerActiveBadgeChangedMessage) Reset() { *x = PlayerActiveBadgeChangedMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_badges_messages_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_badges_messages_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PlayerActiveBadgeChangedMessage) String() string { @@ -160,7 +154,7 @@ func (*PlayerActiveBadgeChangedMessage) ProtoMessage() {} func (x *PlayerActiveBadgeChangedMessage) ProtoReflect() protoreflect.Message { mi := &file_badges_messages_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -238,7 +232,7 @@ func file_badges_messages_proto_rawDescGZIP() []byte { } var file_badges_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_badges_messages_proto_goTypes = []interface{}{ +var file_badges_messages_proto_goTypes = []any{ (*PlayerBadgeAddedMessage)(nil), // 0: emortal.message.badge.PlayerBadgeAddedMessage (*PlayerBadgeRemovedMessage)(nil), // 1: emortal.message.badge.PlayerBadgeRemovedMessage (*PlayerActiveBadgeChangedMessage)(nil), // 2: emortal.message.badge.PlayerActiveBadgeChangedMessage @@ -260,44 +254,6 @@ func file_badges_messages_proto_init() { if File_badges_messages_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_badges_messages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PlayerBadgeAddedMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_badges_messages_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PlayerBadgeRemovedMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_badges_messages_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PlayerActiveBadgeChangedMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/go/message/common/common_messages.pb.go b/gen/go/message/common/common_messages.pb.go index 2c373d4..190c855 100644 --- a/gen/go/message/common/common_messages.pb.go +++ b/gen/go/message/common/common_messages.pb.go @@ -2,8 +2,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: common_messages.proto package common @@ -37,11 +37,9 @@ type PlayerConnectMessage struct { func (x *PlayerConnectMessage) Reset() { *x = PlayerConnectMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_common_messages_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_common_messages_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PlayerConnectMessage) String() string { @@ -52,7 +50,7 @@ func (*PlayerConnectMessage) ProtoMessage() {} func (x *PlayerConnectMessage) ProtoReflect() protoreflect.Message { mi := &file_common_messages_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -108,11 +106,9 @@ type PlayerSwitchServerMessage struct { func (x *PlayerSwitchServerMessage) Reset() { *x = PlayerSwitchServerMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_common_messages_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_common_messages_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PlayerSwitchServerMessage) String() string { @@ -123,7 +119,7 @@ func (*PlayerSwitchServerMessage) ProtoMessage() {} func (x *PlayerSwitchServerMessage) ProtoReflect() protoreflect.Message { mi := &file_common_messages_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -163,11 +159,9 @@ type PlayerDisconnectMessage struct { func (x *PlayerDisconnectMessage) Reset() { *x = PlayerDisconnectMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_common_messages_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_common_messages_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PlayerDisconnectMessage) String() string { @@ -178,7 +172,7 @@ func (*PlayerDisconnectMessage) ProtoMessage() {} func (x *PlayerDisconnectMessage) ProtoReflect() protoreflect.Message { mi := &file_common_messages_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -222,11 +216,9 @@ type PlayerChatMessageMessage struct { func (x *PlayerChatMessageMessage) Reset() { *x = PlayerChatMessageMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_common_messages_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_common_messages_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PlayerChatMessageMessage) String() string { @@ -237,7 +229,7 @@ func (*PlayerChatMessageMessage) ProtoMessage() {} func (x *PlayerChatMessageMessage) ProtoReflect() protoreflect.Message { mi := &file_common_messages_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -346,7 +338,7 @@ func file_common_messages_proto_rawDescGZIP() []byte { } var file_common_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_common_messages_proto_goTypes = []interface{}{ +var file_common_messages_proto_goTypes = []any{ (*PlayerConnectMessage)(nil), // 0: emortal.message.PlayerConnectMessage (*PlayerSwitchServerMessage)(nil), // 1: emortal.message.PlayerSwitchServerMessage (*PlayerDisconnectMessage)(nil), // 2: emortal.message.PlayerDisconnectMessage @@ -369,56 +361,6 @@ func file_common_messages_proto_init() { if File_common_messages_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_common_messages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PlayerConnectMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_common_messages_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PlayerSwitchServerMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_common_messages_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PlayerDisconnectMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_common_messages_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PlayerChatMessageMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/go/message/gameplayerdata/messages.pb.go b/gen/go/message/gameplayerdata/messages.pb.go index c7412c4..731a580 100644 --- a/gen/go/message/gameplayerdata/messages.pb.go +++ b/gen/go/message/gameplayerdata/messages.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: game_player_data/messages.proto package gameplayerdata @@ -39,11 +39,9 @@ type UpdateGamePlayerDataMessage struct { func (x *UpdateGamePlayerDataMessage) Reset() { *x = UpdateGamePlayerDataMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_game_player_data_messages_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_player_data_messages_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateGamePlayerDataMessage) String() string { @@ -54,7 +52,7 @@ func (*UpdateGamePlayerDataMessage) ProtoMessage() {} func (x *UpdateGamePlayerDataMessage) ProtoReflect() protoreflect.Message { mi := &file_game_player_data_messages_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -149,7 +147,7 @@ func file_game_player_data_messages_proto_rawDescGZIP() []byte { } var file_game_player_data_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_game_player_data_messages_proto_goTypes = []interface{}{ +var file_game_player_data_messages_proto_goTypes = []any{ (*UpdateGamePlayerDataMessage)(nil), // 0: emortal.message.gameplayerdata.UpdateGamePlayerDataMessage (gameplayerdata.GameDataGameMode)(0), // 1: emortal.model.gameplayerdata.GameDataGameMode (*anypb.Any)(nil), // 2: google.protobuf.Any @@ -171,20 +169,6 @@ func file_game_player_data_messages_proto_init() { if File_game_player_data_messages_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_game_player_data_messages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateGamePlayerDataMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/go/message/gamesdk/messages.pb.go b/gen/go/message/gamesdk/messages.pb.go index 83cafc1..1e27812 100644 --- a/gen/go/message/gamesdk/messages.pb.go +++ b/gen/go/message/gamesdk/messages.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: gamesdk/messages.proto package gamesdk @@ -31,11 +31,9 @@ type GameReadyMessage struct { func (x *GameReadyMessage) Reset() { *x = GameReadyMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_gamesdk_messages_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_gamesdk_messages_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GameReadyMessage) String() string { @@ -46,7 +44,7 @@ func (*GameReadyMessage) ProtoMessage() {} func (x *GameReadyMessage) ProtoReflect() protoreflect.Message { mi := &file_gamesdk_messages_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -102,7 +100,7 @@ func file_gamesdk_messages_proto_rawDescGZIP() []byte { } var file_gamesdk_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_gamesdk_messages_proto_goTypes = []interface{}{ +var file_gamesdk_messages_proto_goTypes = []any{ (*GameReadyMessage)(nil), // 0: emortal.message.gamesdk.GameReadyMessage (*matchmaker.Match)(nil), // 1: emortal.kurushimi.model.Match } @@ -120,20 +118,6 @@ func file_gamesdk_messages_proto_init() { if File_gamesdk_messages_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_gamesdk_messages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GameReadyMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/go/message/gametracker/messages.pb.go b/gen/go/message/gametracker/messages.pb.go index 8d40d6a..eeecc29 100644 --- a/gen/go/message/gametracker/messages.pb.go +++ b/gen/go/message/gametracker/messages.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: game_tracker/messages.proto package gametracker @@ -36,11 +36,9 @@ type GameStartMessage struct { func (x *GameStartMessage) Reset() { *x = GameStartMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_game_tracker_messages_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_tracker_messages_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GameStartMessage) String() string { @@ -51,7 +49,7 @@ func (*GameStartMessage) ProtoMessage() {} func (x *GameStartMessage) ProtoReflect() protoreflect.Message { mi := &file_game_tracker_messages_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -105,11 +103,9 @@ type GameUpdateMessage struct { func (x *GameUpdateMessage) Reset() { *x = GameUpdateMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_game_tracker_messages_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_tracker_messages_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GameUpdateMessage) String() string { @@ -120,7 +116,7 @@ func (*GameUpdateMessage) ProtoMessage() {} func (x *GameUpdateMessage) ProtoReflect() protoreflect.Message { mi := &file_game_tracker_messages_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -161,11 +157,9 @@ type GameFinishMessage struct { func (x *GameFinishMessage) Reset() { *x = GameFinishMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_game_tracker_messages_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_tracker_messages_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GameFinishMessage) String() string { @@ -176,7 +170,7 @@ func (*GameFinishMessage) ProtoMessage() {} func (x *GameFinishMessage) ProtoReflect() protoreflect.Message { mi := &file_game_tracker_messages_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -225,11 +219,9 @@ type CommonGameData struct { func (x *CommonGameData) Reset() { *x = CommonGameData{} - if protoimpl.UnsafeEnabled { - mi := &file_game_tracker_messages_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_tracker_messages_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommonGameData) String() string { @@ -240,7 +232,7 @@ func (*CommonGameData) ProtoMessage() {} func (x *CommonGameData) ProtoReflect() protoreflect.Message { mi := &file_game_tracker_messages_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -366,7 +358,7 @@ func file_game_tracker_messages_proto_rawDescGZIP() []byte { } var file_game_tracker_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_game_tracker_messages_proto_goTypes = []interface{}{ +var file_game_tracker_messages_proto_goTypes = []any{ (*GameStartMessage)(nil), // 0: emortal.message.game_tracker.GameStartMessage (*GameUpdateMessage)(nil), // 1: emortal.message.game_tracker.GameUpdateMessage (*GameFinishMessage)(nil), // 2: emortal.message.game_tracker.GameFinishMessage @@ -397,57 +389,7 @@ func file_game_tracker_messages_proto_init() { if File_game_tracker_messages_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_game_tracker_messages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GameStartMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_game_tracker_messages_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GameUpdateMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_game_tracker_messages_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GameFinishMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_game_tracker_messages_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommonGameData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_game_tracker_messages_proto_msgTypes[0].OneofWrappers = []interface{}{} + file_game_tracker_messages_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/go/message/leaderboard/messages.pb.go b/gen/go/message/leaderboard/messages.pb.go index 90f9459..05ad10e 100644 --- a/gen/go/message/leaderboard/messages.pb.go +++ b/gen/go/message/leaderboard/messages.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: leaderboards/messages.proto package leaderboard @@ -31,11 +31,9 @@ type LeaderboardCreatedMessage struct { func (x *LeaderboardCreatedMessage) Reset() { *x = LeaderboardCreatedMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_leaderboards_messages_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_leaderboards_messages_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LeaderboardCreatedMessage) String() string { @@ -46,7 +44,7 @@ func (*LeaderboardCreatedMessage) ProtoMessage() {} func (x *LeaderboardCreatedMessage) ProtoReflect() protoreflect.Message { mi := &file_leaderboards_messages_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -78,11 +76,9 @@ type LeaderboardDeletedMessage struct { func (x *LeaderboardDeletedMessage) Reset() { *x = LeaderboardDeletedMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_leaderboards_messages_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_leaderboards_messages_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LeaderboardDeletedMessage) String() string { @@ -93,7 +89,7 @@ func (*LeaderboardDeletedMessage) ProtoMessage() {} func (x *LeaderboardDeletedMessage) ProtoReflect() protoreflect.Message { mi := &file_leaderboards_messages_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -125,11 +121,9 @@ type EntryCreatedMessage struct { func (x *EntryCreatedMessage) Reset() { *x = EntryCreatedMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_leaderboards_messages_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_leaderboards_messages_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntryCreatedMessage) String() string { @@ -140,7 +134,7 @@ func (*EntryCreatedMessage) ProtoMessage() {} func (x *EntryCreatedMessage) ProtoReflect() protoreflect.Message { mi := &file_leaderboards_messages_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -173,11 +167,9 @@ type EntryDeletedMessage struct { func (x *EntryDeletedMessage) Reset() { *x = EntryDeletedMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_leaderboards_messages_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_leaderboards_messages_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EntryDeletedMessage) String() string { @@ -188,7 +180,7 @@ func (*EntryDeletedMessage) ProtoMessage() {} func (x *EntryDeletedMessage) ProtoReflect() protoreflect.Message { mi := &file_leaderboards_messages_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -232,11 +224,9 @@ type ScoreUpdatedMessage struct { func (x *ScoreUpdatedMessage) Reset() { *x = ScoreUpdatedMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_leaderboards_messages_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_leaderboards_messages_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ScoreUpdatedMessage) String() string { @@ -247,7 +237,7 @@ func (*ScoreUpdatedMessage) ProtoMessage() {} func (x *ScoreUpdatedMessage) ProtoReflect() protoreflect.Message { mi := &file_leaderboards_messages_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -369,7 +359,7 @@ func file_leaderboards_messages_proto_rawDescGZIP() []byte { } var file_leaderboards_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_leaderboards_messages_proto_goTypes = []interface{}{ +var file_leaderboards_messages_proto_goTypes = []any{ (*LeaderboardCreatedMessage)(nil), // 0: emortal.message.leaderboard.LeaderboardCreatedMessage (*LeaderboardDeletedMessage)(nil), // 1: emortal.message.leaderboard.LeaderboardDeletedMessage (*EntryCreatedMessage)(nil), // 2: emortal.message.leaderboard.EntryCreatedMessage @@ -393,68 +383,6 @@ func file_leaderboards_messages_proto_init() { if File_leaderboards_messages_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_leaderboards_messages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LeaderboardCreatedMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_leaderboards_messages_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LeaderboardDeletedMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_leaderboards_messages_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EntryCreatedMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_leaderboards_messages_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EntryDeletedMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_leaderboards_messages_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ScoreUpdatedMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/go/message/matchmaker/messages.pb.go b/gen/go/message/matchmaker/messages.pb.go index 5f28ec1..4fa239a 100644 --- a/gen/go/message/matchmaker/messages.pb.go +++ b/gen/go/message/matchmaker/messages.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: kurushimi/messages.proto package matchmaker @@ -126,11 +126,9 @@ type TicketCreatedMessage struct { func (x *TicketCreatedMessage) Reset() { *x = TicketCreatedMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_kurushimi_messages_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kurushimi_messages_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TicketCreatedMessage) String() string { @@ -141,7 +139,7 @@ func (*TicketCreatedMessage) ProtoMessage() {} func (x *TicketCreatedMessage) ProtoReflect() protoreflect.Message { mi := &file_kurushimi_messages_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -173,11 +171,9 @@ type TicketUpdatedMessage struct { func (x *TicketUpdatedMessage) Reset() { *x = TicketUpdatedMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_kurushimi_messages_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kurushimi_messages_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TicketUpdatedMessage) String() string { @@ -188,7 +184,7 @@ func (*TicketUpdatedMessage) ProtoMessage() {} func (x *TicketUpdatedMessage) ProtoReflect() protoreflect.Message { mi := &file_kurushimi_messages_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -225,11 +221,9 @@ type TicketDeletedMessage struct { func (x *TicketDeletedMessage) Reset() { *x = TicketDeletedMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_kurushimi_messages_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kurushimi_messages_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TicketDeletedMessage) String() string { @@ -240,7 +234,7 @@ func (*TicketDeletedMessage) ProtoMessage() {} func (x *TicketDeletedMessage) ProtoReflect() protoreflect.Message { mi := &file_kurushimi_messages_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -279,11 +273,9 @@ type PendingMatchCreatedMessage struct { func (x *PendingMatchCreatedMessage) Reset() { *x = PendingMatchCreatedMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_kurushimi_messages_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kurushimi_messages_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PendingMatchCreatedMessage) String() string { @@ -294,7 +286,7 @@ func (*PendingMatchCreatedMessage) ProtoMessage() {} func (x *PendingMatchCreatedMessage) ProtoReflect() protoreflect.Message { mi := &file_kurushimi_messages_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -328,11 +320,9 @@ type PendingMatchUpdatedMessage struct { func (x *PendingMatchUpdatedMessage) Reset() { *x = PendingMatchUpdatedMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_kurushimi_messages_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kurushimi_messages_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PendingMatchUpdatedMessage) String() string { @@ -343,7 +333,7 @@ func (*PendingMatchUpdatedMessage) ProtoMessage() {} func (x *PendingMatchUpdatedMessage) ProtoReflect() protoreflect.Message { mi := &file_kurushimi_messages_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -376,11 +366,9 @@ type PendingMatchDeletedMessage struct { func (x *PendingMatchDeletedMessage) Reset() { *x = PendingMatchDeletedMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_kurushimi_messages_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kurushimi_messages_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PendingMatchDeletedMessage) String() string { @@ -391,7 +379,7 @@ func (*PendingMatchDeletedMessage) ProtoMessage() {} func (x *PendingMatchDeletedMessage) ProtoReflect() protoreflect.Message { mi := &file_kurushimi_messages_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -430,11 +418,9 @@ type MatchCreatedMessage struct { func (x *MatchCreatedMessage) Reset() { *x = MatchCreatedMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_kurushimi_messages_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kurushimi_messages_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MatchCreatedMessage) String() string { @@ -445,7 +431,7 @@ func (*MatchCreatedMessage) ProtoMessage() {} func (x *MatchCreatedMessage) ProtoReflect() protoreflect.Message { mi := &file_kurushimi_messages_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -556,7 +542,7 @@ func file_kurushimi_messages_proto_rawDescGZIP() []byte { var file_kurushimi_messages_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_kurushimi_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_kurushimi_messages_proto_goTypes = []interface{}{ +var file_kurushimi_messages_proto_goTypes = []any{ (TicketDeletedMessage_Reason)(0), // 0: emortal.kurushimi.messages.TicketDeletedMessage.Reason (PendingMatchDeletedMessage_Reason)(0), // 1: emortal.kurushimi.messages.PendingMatchDeletedMessage.Reason (*TicketCreatedMessage)(nil), // 2: emortal.kurushimi.messages.TicketCreatedMessage @@ -592,92 +578,6 @@ func file_kurushimi_messages_proto_init() { if File_kurushimi_messages_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_kurushimi_messages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TicketCreatedMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kurushimi_messages_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TicketUpdatedMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kurushimi_messages_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TicketDeletedMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kurushimi_messages_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PendingMatchCreatedMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kurushimi_messages_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PendingMatchUpdatedMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kurushimi_messages_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PendingMatchDeletedMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kurushimi_messages_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MatchCreatedMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/go/message/messagehandler/messages.pb.go b/gen/go/message/messagehandler/messages.pb.go index e9a4b71..49c5880 100644 --- a/gen/go/message/messagehandler/messages.pb.go +++ b/gen/go/message/messagehandler/messages.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: message_handler/messages.proto package messagehandler @@ -31,11 +31,9 @@ type PrivateMessageCreatedMessage struct { func (x *PrivateMessageCreatedMessage) Reset() { *x = PrivateMessageCreatedMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_message_handler_messages_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_message_handler_messages_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivateMessageCreatedMessage) String() string { @@ -46,7 +44,7 @@ func (*PrivateMessageCreatedMessage) ProtoMessage() {} func (x *PrivateMessageCreatedMessage) ProtoReflect() protoreflect.Message { mi := &file_message_handler_messages_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -79,11 +77,9 @@ type ChatMessageCreatedMessage struct { func (x *ChatMessageCreatedMessage) Reset() { *x = ChatMessageCreatedMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_message_handler_messages_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_message_handler_messages_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChatMessageCreatedMessage) String() string { @@ -94,7 +90,7 @@ func (*ChatMessageCreatedMessage) ProtoMessage() {} func (x *ChatMessageCreatedMessage) ProtoReflect() protoreflect.Message { mi := &file_message_handler_messages_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -161,7 +157,7 @@ func file_message_handler_messages_proto_rawDescGZIP() []byte { } var file_message_handler_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_message_handler_messages_proto_goTypes = []interface{}{ +var file_message_handler_messages_proto_goTypes = []any{ (*PrivateMessageCreatedMessage)(nil), // 0: emortal.message.messagehandler.PrivateMessageCreatedMessage (*ChatMessageCreatedMessage)(nil), // 1: emortal.message.messagehandler.ChatMessageCreatedMessage (*messagehandler.PrivateMessage)(nil), // 2: emortal.model.messagehandler.PrivateMessage @@ -182,32 +178,6 @@ func file_message_handler_messages_proto_init() { if File_message_handler_messages_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_message_handler_messages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PrivateMessageCreatedMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_message_handler_messages_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChatMessageCreatedMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/go/message/party/messages.pb.go b/gen/go/message/party/messages.pb.go index bdc8ee0..e6c009c 100644 --- a/gen/go/message/party/messages.pb.go +++ b/gen/go/message/party/messages.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: party/messages.proto package party @@ -31,11 +31,9 @@ type PartyCreatedMessage struct { func (x *PartyCreatedMessage) Reset() { *x = PartyCreatedMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_party_messages_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_messages_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartyCreatedMessage) String() string { @@ -46,7 +44,7 @@ func (*PartyCreatedMessage) ProtoMessage() {} func (x *PartyCreatedMessage) ProtoReflect() protoreflect.Message { mi := &file_party_messages_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -79,11 +77,9 @@ type PartyDeletedMessage struct { func (x *PartyDeletedMessage) Reset() { *x = PartyDeletedMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_party_messages_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_messages_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartyDeletedMessage) String() string { @@ -94,7 +90,7 @@ func (*PartyDeletedMessage) ProtoMessage() {} func (x *PartyDeletedMessage) ProtoReflect() protoreflect.Message { mi := &file_party_messages_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -129,11 +125,9 @@ type PartyEmptiedMessage struct { func (x *PartyEmptiedMessage) Reset() { *x = PartyEmptiedMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_party_messages_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_messages_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartyEmptiedMessage) String() string { @@ -144,7 +138,7 @@ func (*PartyEmptiedMessage) ProtoMessage() {} func (x *PartyEmptiedMessage) ProtoReflect() protoreflect.Message { mi := &file_party_messages_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -176,11 +170,9 @@ type PartyInviteCreatedMessage struct { func (x *PartyInviteCreatedMessage) Reset() { *x = PartyInviteCreatedMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_party_messages_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_messages_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartyInviteCreatedMessage) String() string { @@ -191,7 +183,7 @@ func (*PartyInviteCreatedMessage) ProtoMessage() {} func (x *PartyInviteCreatedMessage) ProtoReflect() protoreflect.Message { mi := &file_party_messages_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -225,11 +217,9 @@ type PartyPlayerJoinedMessage struct { func (x *PartyPlayerJoinedMessage) Reset() { *x = PartyPlayerJoinedMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_party_messages_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_messages_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartyPlayerJoinedMessage) String() string { @@ -240,7 +230,7 @@ func (*PartyPlayerJoinedMessage) ProtoMessage() {} func (x *PartyPlayerJoinedMessage) ProtoReflect() protoreflect.Message { mi := &file_party_messages_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -283,11 +273,9 @@ type PartyPlayerLeftMessage struct { func (x *PartyPlayerLeftMessage) Reset() { *x = PartyPlayerLeftMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_party_messages_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_messages_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartyPlayerLeftMessage) String() string { @@ -298,7 +286,7 @@ func (*PartyPlayerLeftMessage) ProtoMessage() {} func (x *PartyPlayerLeftMessage) ProtoReflect() protoreflect.Message { mi := &file_party_messages_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -346,11 +334,9 @@ type PartyOpenChangedMessage struct { func (x *PartyOpenChangedMessage) Reset() { *x = PartyOpenChangedMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_party_messages_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_messages_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartyOpenChangedMessage) String() string { @@ -361,7 +347,7 @@ func (*PartyOpenChangedMessage) ProtoMessage() {} func (x *PartyOpenChangedMessage) ProtoReflect() protoreflect.Message { mi := &file_party_messages_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -401,11 +387,9 @@ type PartyClosedMessage struct { func (x *PartyClosedMessage) Reset() { *x = PartyClosedMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_party_messages_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_messages_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartyClosedMessage) String() string { @@ -416,7 +400,7 @@ func (*PartyClosedMessage) ProtoMessage() {} func (x *PartyClosedMessage) ProtoReflect() protoreflect.Message { mi := &file_party_messages_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -450,11 +434,9 @@ type PartyLeaderChangedMessage struct { func (x *PartyLeaderChangedMessage) Reset() { *x = PartyLeaderChangedMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_party_messages_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_messages_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartyLeaderChangedMessage) String() string { @@ -465,7 +447,7 @@ func (*PartyLeaderChangedMessage) ProtoMessage() {} func (x *PartyLeaderChangedMessage) ProtoReflect() protoreflect.Message { mi := &file_party_messages_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -506,11 +488,9 @@ type PartySettingsChangedMessage struct { func (x *PartySettingsChangedMessage) Reset() { *x = PartySettingsChangedMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_party_messages_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_messages_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartySettingsChangedMessage) String() string { @@ -521,7 +501,7 @@ func (*PartySettingsChangedMessage) ProtoMessage() {} func (x *PartySettingsChangedMessage) ProtoReflect() protoreflect.Message { mi := &file_party_messages_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -560,11 +540,9 @@ type PartyBroadcastMessage struct { func (x *PartyBroadcastMessage) Reset() { *x = PartyBroadcastMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_party_messages_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_messages_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartyBroadcastMessage) String() string { @@ -575,7 +553,7 @@ func (*PartyBroadcastMessage) ProtoMessage() {} func (x *PartyBroadcastMessage) ProtoReflect() protoreflect.Message { mi := &file_party_messages_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -608,11 +586,9 @@ type EventDisplayMessage struct { func (x *EventDisplayMessage) Reset() { *x = EventDisplayMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_party_messages_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_messages_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EventDisplayMessage) String() string { @@ -623,7 +599,7 @@ func (*EventDisplayMessage) ProtoMessage() {} func (x *EventDisplayMessage) ProtoReflect() protoreflect.Message { mi := &file_party_messages_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -655,11 +631,9 @@ type EventStartMessage struct { func (x *EventStartMessage) Reset() { *x = EventStartMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_party_messages_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_messages_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EventStartMessage) String() string { @@ -670,7 +644,7 @@ func (*EventStartMessage) ProtoMessage() {} func (x *EventStartMessage) ProtoReflect() protoreflect.Message { mi := &file_party_messages_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -705,11 +679,9 @@ type EventDeleteMessage struct { func (x *EventDeleteMessage) Reset() { *x = EventDeleteMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_party_messages_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_messages_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EventDeleteMessage) String() string { @@ -720,7 +692,7 @@ func (*EventDeleteMessage) ProtoMessage() {} func (x *EventDeleteMessage) ProtoReflect() protoreflect.Message { mi := &file_party_messages_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -851,7 +823,7 @@ func file_party_messages_proto_rawDescGZIP() []byte { } var file_party_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 14) -var file_party_messages_proto_goTypes = []interface{}{ +var file_party_messages_proto_goTypes = []any{ (*PartyCreatedMessage)(nil), // 0: emortal.message.party.PartyCreatedMessage (*PartyDeletedMessage)(nil), // 1: emortal.message.party.PartyDeletedMessage (*PartyEmptiedMessage)(nil), // 2: emortal.message.party.PartyEmptiedMessage @@ -898,177 +870,7 @@ func file_party_messages_proto_init() { if File_party_messages_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_party_messages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PartyCreatedMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_messages_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PartyDeletedMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_messages_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PartyEmptiedMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_messages_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PartyInviteCreatedMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_messages_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PartyPlayerJoinedMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_messages_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PartyPlayerLeftMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_messages_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PartyOpenChangedMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_messages_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PartyClosedMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_messages_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PartyLeaderChangedMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_messages_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PartySettingsChangedMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_messages_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PartyBroadcastMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_messages_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventDisplayMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_messages_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventStartMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_messages_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventDeleteMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_party_messages_proto_msgTypes[5].OneofWrappers = []interface{}{} + file_party_messages_proto_msgTypes[5].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/go/message/permission/messages.pb.go b/gen/go/message/permission/messages.pb.go index 34cd52c..57f0f26 100644 --- a/gen/go/message/permission/messages.pb.go +++ b/gen/go/message/permission/messages.pb.go @@ -2,8 +2,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: permission/messages.proto package permission @@ -130,11 +130,9 @@ type RoleUpdateMessage struct { func (x *RoleUpdateMessage) Reset() { *x = RoleUpdateMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_permission_messages_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_permission_messages_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RoleUpdateMessage) String() string { @@ -145,7 +143,7 @@ func (*RoleUpdateMessage) ProtoMessage() {} func (x *RoleUpdateMessage) ProtoReflect() protoreflect.Message { mi := &file_permission_messages_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -186,11 +184,9 @@ type PlayerRolesUpdateMessage struct { func (x *PlayerRolesUpdateMessage) Reset() { *x = PlayerRolesUpdateMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_permission_messages_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_permission_messages_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PlayerRolesUpdateMessage) String() string { @@ -201,7 +197,7 @@ func (*PlayerRolesUpdateMessage) ProtoMessage() {} func (x *PlayerRolesUpdateMessage) ProtoReflect() protoreflect.Message { mi := &file_permission_messages_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -295,7 +291,7 @@ func file_permission_messages_proto_rawDescGZIP() []byte { var file_permission_messages_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_permission_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_permission_messages_proto_goTypes = []interface{}{ +var file_permission_messages_proto_goTypes = []any{ (RoleUpdateMessage_ChangeType)(0), // 0: emortal.message.permission.RoleUpdateMessage.ChangeType (PlayerRolesUpdateMessage_ChangeType)(0), // 1: emortal.message.permission.PlayerRolesUpdateMessage.ChangeType (*RoleUpdateMessage)(nil), // 2: emortal.message.permission.RoleUpdateMessage @@ -318,32 +314,6 @@ func file_permission_messages_proto_init() { if File_permission_messages_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_permission_messages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RoleUpdateMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_permission_messages_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PlayerRolesUpdateMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/go/message/relationship/messages.pb.go b/gen/go/message/relationship/messages.pb.go index f4618b3..21d189a 100644 --- a/gen/go/message/relationship/messages.pb.go +++ b/gen/go/message/relationship/messages.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: relationship/messages.proto package relationship @@ -31,11 +31,9 @@ type FriendRequestReceivedMessage struct { func (x *FriendRequestReceivedMessage) Reset() { *x = FriendRequestReceivedMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_relationship_messages_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_relationship_messages_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FriendRequestReceivedMessage) String() string { @@ -46,7 +44,7 @@ func (*FriendRequestReceivedMessage) ProtoMessage() {} func (x *FriendRequestReceivedMessage) ProtoReflect() protoreflect.Message { mi := &file_relationship_messages_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -82,11 +80,9 @@ type FriendAddedMessage struct { func (x *FriendAddedMessage) Reset() { *x = FriendAddedMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_relationship_messages_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_relationship_messages_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FriendAddedMessage) String() string { @@ -97,7 +93,7 @@ func (*FriendAddedMessage) ProtoMessage() {} func (x *FriendAddedMessage) ProtoReflect() protoreflect.Message { mi := &file_relationship_messages_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -144,11 +140,9 @@ type FriendRemovedMessage struct { func (x *FriendRemovedMessage) Reset() { *x = FriendRemovedMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_relationship_messages_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_relationship_messages_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FriendRemovedMessage) String() string { @@ -159,7 +153,7 @@ func (*FriendRemovedMessage) ProtoMessage() {} func (x *FriendRemovedMessage) ProtoReflect() protoreflect.Message { mi := &file_relationship_messages_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -202,11 +196,9 @@ type FriendConnectionMessage struct { func (x *FriendConnectionMessage) Reset() { *x = FriendConnectionMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_relationship_messages_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_relationship_messages_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FriendConnectionMessage) String() string { @@ -217,7 +209,7 @@ func (*FriendConnectionMessage) ProtoMessage() {} func (x *FriendConnectionMessage) ProtoReflect() protoreflect.Message { mi := &file_relationship_messages_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -320,7 +312,7 @@ func file_relationship_messages_proto_rawDescGZIP() []byte { } var file_relationship_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_relationship_messages_proto_goTypes = []interface{}{ +var file_relationship_messages_proto_goTypes = []any{ (*FriendRequestReceivedMessage)(nil), // 0: emortal.message.relationship.FriendRequestReceivedMessage (*FriendAddedMessage)(nil), // 1: emortal.message.relationship.FriendAddedMessage (*FriendRemovedMessage)(nil), // 2: emortal.message.relationship.FriendRemovedMessage @@ -341,56 +333,6 @@ func file_relationship_messages_proto_init() { if File_relationship_messages_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_relationship_messages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendRequestReceivedMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relationship_messages_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendAddedMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relationship_messages_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendRemovedMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relationship_messages_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendConnectionMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/go/message/serverstore/messages.pb.go b/gen/go/message/serverstore/messages.pb.go index d2aa340..f5c1584 100644 --- a/gen/go/message/serverstore/messages.pb.go +++ b/gen/go/message/serverstore/messages.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: server_store/messages.proto package serverstore @@ -35,7 +35,7 @@ var file_server_store_messages_proto_rawDesc = []byte{ 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } -var file_server_store_messages_proto_goTypes = []interface{}{} +var file_server_store_messages_proto_goTypes = []any{} var file_server_store_messages_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/gen/go/model/accountconnmanager/models.pb.go b/gen/go/model/accountconnmanager/models.pb.go index 00cc974..418ff81 100644 --- a/gen/go/model/accountconnmanager/models.pb.go +++ b/gen/go/model/accountconnmanager/models.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: account_conn_manager/models.proto package accountconnmanager @@ -84,11 +84,9 @@ type ConnectionUser struct { func (x *ConnectionUser) Reset() { *x = ConnectionUser{} - if protoimpl.UnsafeEnabled { - mi := &file_account_conn_manager_models_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_account_conn_manager_models_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConnectionUser) String() string { @@ -99,7 +97,7 @@ func (*ConnectionUser) ProtoMessage() {} func (x *ConnectionUser) ProtoReflect() protoreflect.Message { mi := &file_account_conn_manager_models_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -181,7 +179,7 @@ func file_account_conn_manager_models_proto_rawDescGZIP() []byte { var file_account_conn_manager_models_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_account_conn_manager_models_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_account_conn_manager_models_proto_goTypes = []interface{}{ +var file_account_conn_manager_models_proto_goTypes = []any{ (ConnectionType)(0), // 0: emortal.model.account_conn_manager.ConnectionType (*ConnectionUser)(nil), // 1: emortal.model.account_conn_manager.ConnectionUser } @@ -198,21 +196,7 @@ func file_account_conn_manager_models_proto_init() { if File_account_conn_manager_models_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_account_conn_manager_models_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConnectionUser); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_account_conn_manager_models_proto_msgTypes[0].OneofWrappers = []interface{}{} + file_account_conn_manager_models_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/go/model/badge/models.pb.go b/gen/go/model/badge/models.pb.go index 134e383..458d3ab 100644 --- a/gen/go/model/badge/models.pb.go +++ b/gen/go/model/badge/models.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: badges/models.proto package badge @@ -38,11 +38,9 @@ type Badge struct { func (x *Badge) Reset() { *x = Badge{} - if protoimpl.UnsafeEnabled { - mi := &file_badges_models_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_badges_models_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Badge) String() string { @@ -53,7 +51,7 @@ func (*Badge) ProtoMessage() {} func (x *Badge) ProtoReflect() protoreflect.Message { mi := &file_badges_models_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -129,11 +127,9 @@ type Badge_GuiItem struct { func (x *Badge_GuiItem) Reset() { *x = Badge_GuiItem{} - if protoimpl.UnsafeEnabled { - mi := &file_badges_models_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_badges_models_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Badge_GuiItem) String() string { @@ -144,7 +140,7 @@ func (*Badge_GuiItem) ProtoMessage() {} func (x *Badge_GuiItem) ProtoReflect() protoreflect.Message { mi := &file_badges_models_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -228,7 +224,7 @@ func file_badges_models_proto_rawDescGZIP() []byte { } var file_badges_models_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_badges_models_proto_goTypes = []interface{}{ +var file_badges_models_proto_goTypes = []any{ (*Badge)(nil), // 0: emortal.model.badge.Badge (*Badge_GuiItem)(nil), // 1: emortal.model.badge.Badge.GuiItem } @@ -246,32 +242,6 @@ func file_badges_models_proto_init() { if File_badges_models_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_badges_models_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Badge); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_badges_models_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Badge_GuiItem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/go/model/common/common_models.pb.go b/gen/go/model/common/common_models.pb.go index 4e3cf98..bcb8a53 100644 --- a/gen/go/model/common/common_models.pb.go +++ b/gen/go/model/common/common_models.pb.go @@ -2,8 +2,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: common_models.proto package common @@ -33,11 +33,9 @@ type PlayerSkin struct { func (x *PlayerSkin) Reset() { *x = PlayerSkin{} - if protoimpl.UnsafeEnabled { - mi := &file_common_models_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_common_models_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PlayerSkin) String() string { @@ -48,7 +46,7 @@ func (*PlayerSkin) ProtoMessage() {} func (x *PlayerSkin) ProtoReflect() protoreflect.Message { mi := &file_common_models_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -90,11 +88,9 @@ type ConnectableServer struct { func (x *ConnectableServer) Reset() { *x = ConnectableServer{} - if protoimpl.UnsafeEnabled { - mi := &file_common_models_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_common_models_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConnectableServer) String() string { @@ -105,7 +101,7 @@ func (*ConnectableServer) ProtoMessage() {} func (x *ConnectableServer) ProtoReflect() protoreflect.Message { mi := &file_common_models_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -154,11 +150,9 @@ type Pageable struct { func (x *Pageable) Reset() { *x = Pageable{} - if protoimpl.UnsafeEnabled { - mi := &file_common_models_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_common_models_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Pageable) String() string { @@ -169,7 +163,7 @@ func (*Pageable) ProtoMessage() {} func (x *Pageable) ProtoReflect() protoreflect.Message { mi := &file_common_models_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -209,11 +203,9 @@ type Sortable struct { func (x *Sortable) Reset() { *x = Sortable{} - if protoimpl.UnsafeEnabled { - mi := &file_common_models_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_common_models_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Sortable) String() string { @@ -224,7 +216,7 @@ func (*Sortable) ProtoMessage() {} func (x *Sortable) ProtoReflect() protoreflect.Message { mi := &file_common_models_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -266,11 +258,9 @@ type PageData struct { func (x *PageData) Reset() { *x = PageData{} - if protoimpl.UnsafeEnabled { - mi := &file_common_models_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_common_models_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PageData) String() string { @@ -281,7 +271,7 @@ func (*PageData) ProtoMessage() {} func (x *PageData) ProtoReflect() protoreflect.Message { mi := &file_common_models_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -376,7 +366,7 @@ func file_common_models_proto_rawDescGZIP() []byte { } var file_common_models_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_common_models_proto_goTypes = []interface{}{ +var file_common_models_proto_goTypes = []any{ (*PlayerSkin)(nil), // 0: emortal.model.PlayerSkin (*ConnectableServer)(nil), // 1: emortal.model.ConnectableServer (*Pageable)(nil), // 2: emortal.model.Pageable @@ -396,69 +386,7 @@ func file_common_models_proto_init() { if File_common_models_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_common_models_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PlayerSkin); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_common_models_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConnectableServer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_common_models_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Pageable); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_common_models_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Sortable); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_common_models_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PageData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_common_models_proto_msgTypes[2].OneofWrappers = []interface{}{} + file_common_models_proto_msgTypes[2].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/go/model/gameplayerdata/models.pb.go b/gen/go/model/gameplayerdata/models.pb.go index ec70426..e0f51bd 100644 --- a/gen/go/model/gameplayerdata/models.pb.go +++ b/gen/go/model/gameplayerdata/models.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: game_player_data/models.proto package gameplayerdata @@ -83,11 +83,9 @@ type V1BlockSumoPlayerData struct { func (x *V1BlockSumoPlayerData) Reset() { *x = V1BlockSumoPlayerData{} - if protoimpl.UnsafeEnabled { - mi := &file_game_player_data_models_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_player_data_models_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *V1BlockSumoPlayerData) String() string { @@ -98,7 +96,7 @@ func (*V1BlockSumoPlayerData) ProtoMessage() {} func (x *V1BlockSumoPlayerData) ProtoReflect() protoreflect.Message { mi := &file_game_player_data_models_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -139,11 +137,9 @@ type V1MarathonData struct { func (x *V1MarathonData) Reset() { *x = V1MarathonData{} - if protoimpl.UnsafeEnabled { - mi := &file_game_player_data_models_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_player_data_models_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *V1MarathonData) String() string { @@ -154,7 +150,7 @@ func (*V1MarathonData) ProtoMessage() {} func (x *V1MarathonData) ProtoReflect() protoreflect.Message { mi := &file_game_player_data_models_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -198,11 +194,9 @@ type V1TowerDefencePlayerData struct { func (x *V1TowerDefencePlayerData) Reset() { *x = V1TowerDefencePlayerData{} - if protoimpl.UnsafeEnabled { - mi := &file_game_player_data_models_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_player_data_models_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *V1TowerDefencePlayerData) String() string { @@ -213,7 +207,7 @@ func (*V1TowerDefencePlayerData) ProtoMessage() {} func (x *V1TowerDefencePlayerData) ProtoReflect() protoreflect.Message { mi := &file_game_player_data_models_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -243,11 +237,9 @@ type V1MinesweeperPlayerData struct { func (x *V1MinesweeperPlayerData) Reset() { *x = V1MinesweeperPlayerData{} - if protoimpl.UnsafeEnabled { - mi := &file_game_player_data_models_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_player_data_models_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *V1MinesweeperPlayerData) String() string { @@ -258,7 +250,7 @@ func (*V1MinesweeperPlayerData) ProtoMessage() {} func (x *V1MinesweeperPlayerData) ProtoReflect() protoreflect.Message { mi := &file_game_player_data_models_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -367,7 +359,7 @@ func file_game_player_data_models_proto_rawDescGZIP() []byte { var file_game_player_data_models_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_game_player_data_models_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_game_player_data_models_proto_goTypes = []interface{}{ +var file_game_player_data_models_proto_goTypes = []any{ (GameDataGameMode)(0), // 0: emortal.model.gameplayerdata.GameDataGameMode (*V1BlockSumoPlayerData)(nil), // 1: emortal.model.gameplayerdata.V1BlockSumoPlayerData (*V1MarathonData)(nil), // 2: emortal.model.gameplayerdata.V1MarathonData @@ -387,57 +379,7 @@ func file_game_player_data_models_proto_init() { if File_game_player_data_models_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_game_player_data_models_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*V1BlockSumoPlayerData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_game_player_data_models_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*V1MarathonData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_game_player_data_models_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*V1TowerDefencePlayerData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_game_player_data_models_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*V1MinesweeperPlayerData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_game_player_data_models_proto_msgTypes[1].OneofWrappers = []interface{}{} + file_game_player_data_models_proto_msgTypes[1].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/go/model/gametracker/models.pb.go b/gen/go/model/gametracker/models.pb.go index 0d36da6..b4a9bcd 100644 --- a/gen/go/model/gametracker/models.pb.go +++ b/gen/go/model/gametracker/models.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: game_tracker/models.proto package gametracker @@ -29,11 +29,9 @@ type Game struct { func (x *Game) Reset() { *x = Game{} - if protoimpl.UnsafeEnabled { - mi := &file_game_tracker_models_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_tracker_models_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Game) String() string { @@ -44,7 +42,7 @@ func (*Game) ProtoMessage() {} func (x *Game) ProtoReflect() protoreflect.Message { mi := &file_game_tracker_models_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -70,11 +68,9 @@ type BasicGamePlayer struct { func (x *BasicGamePlayer) Reset() { *x = BasicGamePlayer{} - if protoimpl.UnsafeEnabled { - mi := &file_game_tracker_models_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_tracker_models_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BasicGamePlayer) String() string { @@ -85,7 +81,7 @@ func (*BasicGamePlayer) ProtoMessage() {} func (x *BasicGamePlayer) ProtoReflect() protoreflect.Message { mi := &file_game_tracker_models_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -130,11 +126,9 @@ type Team struct { func (x *Team) Reset() { *x = Team{} - if protoimpl.UnsafeEnabled { - mi := &file_game_tracker_models_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_tracker_models_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Team) String() string { @@ -145,7 +139,7 @@ func (*Team) ProtoMessage() {} func (x *Team) ProtoReflect() protoreflect.Message { mi := &file_game_tracker_models_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -198,11 +192,9 @@ type CommonGameTeamData struct { func (x *CommonGameTeamData) Reset() { *x = CommonGameTeamData{} - if protoimpl.UnsafeEnabled { - mi := &file_game_tracker_models_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_tracker_models_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommonGameTeamData) String() string { @@ -213,7 +205,7 @@ func (*CommonGameTeamData) ProtoMessage() {} func (x *CommonGameTeamData) ProtoReflect() protoreflect.Message { mi := &file_game_tracker_models_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -248,11 +240,9 @@ type CommonGameFinishWinnerData struct { func (x *CommonGameFinishWinnerData) Reset() { *x = CommonGameFinishWinnerData{} - if protoimpl.UnsafeEnabled { - mi := &file_game_tracker_models_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_tracker_models_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CommonGameFinishWinnerData) String() string { @@ -263,7 +253,7 @@ func (*CommonGameFinishWinnerData) ProtoMessage() {} func (x *CommonGameFinishWinnerData) ProtoReflect() protoreflect.Message { mi := &file_game_tracker_models_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -304,11 +294,9 @@ type TowerDefenceHealthData struct { func (x *TowerDefenceHealthData) Reset() { *x = TowerDefenceHealthData{} - if protoimpl.UnsafeEnabled { - mi := &file_game_tracker_models_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_tracker_models_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TowerDefenceHealthData) String() string { @@ -319,7 +307,7 @@ func (*TowerDefenceHealthData) ProtoMessage() {} func (x *TowerDefenceHealthData) ProtoReflect() protoreflect.Message { mi := &file_game_tracker_models_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -365,11 +353,9 @@ type TowerDefenceStartData struct { func (x *TowerDefenceStartData) Reset() { *x = TowerDefenceStartData{} - if protoimpl.UnsafeEnabled { - mi := &file_game_tracker_models_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_tracker_models_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TowerDefenceStartData) String() string { @@ -380,7 +366,7 @@ func (*TowerDefenceStartData) ProtoMessage() {} func (x *TowerDefenceStartData) ProtoReflect() protoreflect.Message { mi := &file_game_tracker_models_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -412,11 +398,9 @@ type TowerDefenceUpdateData struct { func (x *TowerDefenceUpdateData) Reset() { *x = TowerDefenceUpdateData{} - if protoimpl.UnsafeEnabled { - mi := &file_game_tracker_models_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_tracker_models_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TowerDefenceUpdateData) String() string { @@ -427,7 +411,7 @@ func (*TowerDefenceUpdateData) ProtoMessage() {} func (x *TowerDefenceUpdateData) ProtoReflect() protoreflect.Message { mi := &file_game_tracker_models_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -459,11 +443,9 @@ type TowerDefenceFinishData struct { func (x *TowerDefenceFinishData) Reset() { *x = TowerDefenceFinishData{} - if protoimpl.UnsafeEnabled { - mi := &file_game_tracker_models_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_tracker_models_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TowerDefenceFinishData) String() string { @@ -474,7 +456,7 @@ func (*TowerDefenceFinishData) ProtoMessage() {} func (x *TowerDefenceFinishData) ProtoReflect() protoreflect.Message { mi := &file_game_tracker_models_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -506,11 +488,9 @@ type BlockSumoUpdateData struct { func (x *BlockSumoUpdateData) Reset() { *x = BlockSumoUpdateData{} - if protoimpl.UnsafeEnabled { - mi := &file_game_tracker_models_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_tracker_models_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BlockSumoUpdateData) String() string { @@ -521,7 +501,7 @@ func (*BlockSumoUpdateData) ProtoMessage() {} func (x *BlockSumoUpdateData) ProtoReflect() protoreflect.Message { mi := &file_game_tracker_models_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -553,11 +533,9 @@ type BlockSumoFinishData struct { func (x *BlockSumoFinishData) Reset() { *x = BlockSumoFinishData{} - if protoimpl.UnsafeEnabled { - mi := &file_game_tracker_models_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_tracker_models_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BlockSumoFinishData) String() string { @@ -568,7 +546,7 @@ func (*BlockSumoFinishData) ProtoMessage() {} func (x *BlockSumoFinishData) ProtoReflect() protoreflect.Message { mi := &file_game_tracker_models_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -601,11 +579,9 @@ type BlockSumoScoreboard struct { func (x *BlockSumoScoreboard) Reset() { *x = BlockSumoScoreboard{} - if protoimpl.UnsafeEnabled { - mi := &file_game_tracker_models_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_tracker_models_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BlockSumoScoreboard) String() string { @@ -616,7 +592,7 @@ func (*BlockSumoScoreboard) ProtoMessage() {} func (x *BlockSumoScoreboard) ProtoReflect() protoreflect.Message { mi := &file_game_tracker_models_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -650,11 +626,9 @@ type MinesweeperStartData struct { func (x *MinesweeperStartData) Reset() { *x = MinesweeperStartData{} - if protoimpl.UnsafeEnabled { - mi := &file_game_tracker_models_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_tracker_models_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MinesweeperStartData) String() string { @@ -665,7 +639,7 @@ func (*MinesweeperStartData) ProtoMessage() {} func (x *MinesweeperStartData) ProtoReflect() protoreflect.Message { mi := &file_game_tracker_models_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -709,11 +683,9 @@ type MinesweeperUpdateData struct { func (x *MinesweeperUpdateData) Reset() { *x = MinesweeperUpdateData{} - if protoimpl.UnsafeEnabled { - mi := &file_game_tracker_models_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_tracker_models_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MinesweeperUpdateData) String() string { @@ -724,7 +696,7 @@ func (*MinesweeperUpdateData) ProtoMessage() {} func (x *MinesweeperUpdateData) ProtoReflect() protoreflect.Message { mi := &file_game_tracker_models_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -772,11 +744,9 @@ type MinesweeperFinishData struct { func (x *MinesweeperFinishData) Reset() { *x = MinesweeperFinishData{} - if protoimpl.UnsafeEnabled { - mi := &file_game_tracker_models_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_tracker_models_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MinesweeperFinishData) String() string { @@ -787,7 +757,7 @@ func (*MinesweeperFinishData) ProtoMessage() {} func (x *MinesweeperFinishData) ProtoReflect() protoreflect.Message { mi := &file_game_tracker_models_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -824,11 +794,9 @@ type MarathonUpdateData struct { func (x *MarathonUpdateData) Reset() { *x = MarathonUpdateData{} - if protoimpl.UnsafeEnabled { - mi := &file_game_tracker_models_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_tracker_models_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MarathonUpdateData) String() string { @@ -839,7 +807,7 @@ func (*MarathonUpdateData) ProtoMessage() {} func (x *MarathonUpdateData) ProtoReflect() protoreflect.Message { mi := &file_game_tracker_models_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -889,11 +857,9 @@ type MarathonRun struct { func (x *MarathonRun) Reset() { *x = MarathonRun{} - if protoimpl.UnsafeEnabled { - mi := &file_game_tracker_models_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_tracker_models_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MarathonRun) String() string { @@ -904,7 +870,7 @@ func (*MarathonRun) ProtoMessage() {} func (x *MarathonRun) ProtoReflect() protoreflect.Message { mi := &file_game_tracker_models_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -950,11 +916,9 @@ type MarathonFinishData struct { func (x *MarathonFinishData) Reset() { *x = MarathonFinishData{} - if protoimpl.UnsafeEnabled { - mi := &file_game_tracker_models_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_tracker_models_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MarathonFinishData) String() string { @@ -965,7 +929,7 @@ func (*MarathonFinishData) ProtoMessage() {} func (x *MarathonFinishData) ProtoReflect() protoreflect.Message { mi := &file_game_tracker_models_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -999,11 +963,9 @@ type BlockSumoScoreboard_Entry struct { func (x *BlockSumoScoreboard_Entry) Reset() { *x = BlockSumoScoreboard_Entry{} - if protoimpl.UnsafeEnabled { - mi := &file_game_tracker_models_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_game_tracker_models_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BlockSumoScoreboard_Entry) String() string { @@ -1014,7 +976,7 @@ func (*BlockSumoScoreboard_Entry) ProtoMessage() {} func (x *BlockSumoScoreboard_Entry) ProtoReflect() protoreflect.Message { mi := &file_game_tracker_models_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1217,7 +1179,7 @@ func file_game_tracker_models_proto_rawDescGZIP() []byte { } var file_game_tracker_models_proto_msgTypes = make([]protoimpl.MessageInfo, 20) -var file_game_tracker_models_proto_goTypes = []interface{}{ +var file_game_tracker_models_proto_goTypes = []any{ (*Game)(nil), // 0: emortal.model.game_tracker.Game (*BasicGamePlayer)(nil), // 1: emortal.model.game_tracker.BasicGamePlayer (*Team)(nil), // 2: emortal.model.game_tracker.Team @@ -1268,236 +1230,6 @@ func file_game_tracker_models_proto_init() { if File_game_tracker_models_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_game_tracker_models_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Game); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_game_tracker_models_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BasicGamePlayer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_game_tracker_models_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Team); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_game_tracker_models_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommonGameTeamData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_game_tracker_models_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommonGameFinishWinnerData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_game_tracker_models_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TowerDefenceHealthData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_game_tracker_models_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TowerDefenceStartData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_game_tracker_models_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TowerDefenceUpdateData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_game_tracker_models_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TowerDefenceFinishData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_game_tracker_models_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BlockSumoUpdateData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_game_tracker_models_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BlockSumoFinishData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_game_tracker_models_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BlockSumoScoreboard); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_game_tracker_models_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MinesweeperStartData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_game_tracker_models_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MinesweeperUpdateData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_game_tracker_models_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MinesweeperFinishData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_game_tracker_models_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MarathonUpdateData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_game_tracker_models_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MarathonRun); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_game_tracker_models_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MarathonFinishData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_game_tracker_models_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BlockSumoScoreboard_Entry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/go/model/leaderboard/models.pb.go b/gen/go/model/leaderboard/models.pb.go index 90e7dbe..8f25ee1 100644 --- a/gen/go/model/leaderboard/models.pb.go +++ b/gen/go/model/leaderboard/models.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: leaderboards/models.proto package leaderboard @@ -78,11 +78,9 @@ type Leaderboard struct { func (x *Leaderboard) Reset() { *x = Leaderboard{} - if protoimpl.UnsafeEnabled { - mi := &file_leaderboards_models_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_leaderboards_models_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Leaderboard) String() string { @@ -93,7 +91,7 @@ func (*Leaderboard) ProtoMessage() {} func (x *Leaderboard) ProtoReflect() protoreflect.Message { mi := &file_leaderboards_models_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -135,11 +133,9 @@ type LeaderboardEntry struct { func (x *LeaderboardEntry) Reset() { *x = LeaderboardEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_leaderboards_models_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_leaderboards_models_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LeaderboardEntry) String() string { @@ -150,7 +146,7 @@ func (*LeaderboardEntry) ProtoMessage() {} func (x *LeaderboardEntry) ProtoReflect() protoreflect.Message { mi := &file_leaderboards_models_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -248,7 +244,7 @@ func file_leaderboards_models_proto_rawDescGZIP() []byte { var file_leaderboards_models_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_leaderboards_models_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_leaderboards_models_proto_goTypes = []interface{}{ +var file_leaderboards_models_proto_goTypes = []any{ (SortOrder)(0), // 0: emortal.model.leaderboard.SortOrder (*Leaderboard)(nil), // 1: emortal.model.leaderboard.Leaderboard (*LeaderboardEntry)(nil), // 2: emortal.model.leaderboard.LeaderboardEntry @@ -271,32 +267,6 @@ func file_leaderboards_models_proto_init() { if File_leaderboards_models_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_leaderboards_models_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Leaderboard); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_leaderboards_models_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LeaderboardEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/go/model/matchmaker/models.pb.go b/gen/go/model/matchmaker/models.pb.go index a783478..1bb24e5 100644 --- a/gen/go/model/matchmaker/models.pb.go +++ b/gen/go/model/matchmaker/models.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: kurushimi/models.proto package matchmaker @@ -35,11 +35,9 @@ type QueuedPlayer struct { func (x *QueuedPlayer) Reset() { *x = QueuedPlayer{} - if protoimpl.UnsafeEnabled { - mi := &file_kurushimi_models_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kurushimi_models_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *QueuedPlayer) String() string { @@ -50,7 +48,7 @@ func (*QueuedPlayer) ProtoMessage() {} func (x *QueuedPlayer) ProtoReflect() protoreflect.Message { mi := &file_kurushimi_models_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -117,11 +115,9 @@ type Ticket struct { func (x *Ticket) Reset() { *x = Ticket{} - if protoimpl.UnsafeEnabled { - mi := &file_kurushimi_models_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kurushimi_models_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Ticket) String() string { @@ -132,7 +128,7 @@ func (*Ticket) ProtoMessage() {} func (x *Ticket) ProtoReflect() protoreflect.Message { mi := &file_kurushimi_models_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -221,11 +217,9 @@ type Match struct { func (x *Match) Reset() { *x = Match{} - if protoimpl.UnsafeEnabled { - mi := &file_kurushimi_models_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kurushimi_models_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Match) String() string { @@ -236,7 +230,7 @@ func (*Match) ProtoMessage() {} func (x *Match) ProtoReflect() protoreflect.Message { mi := &file_kurushimi_models_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -304,11 +298,9 @@ type Assignment struct { func (x *Assignment) Reset() { *x = Assignment{} - if protoimpl.UnsafeEnabled { - mi := &file_kurushimi_models_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kurushimi_models_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Assignment) String() string { @@ -319,7 +311,7 @@ func (*Assignment) ProtoMessage() {} func (x *Assignment) ProtoReflect() protoreflect.Message { mi := &file_kurushimi_models_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -386,11 +378,9 @@ type PendingMatch struct { func (x *PendingMatch) Reset() { *x = PendingMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_kurushimi_models_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kurushimi_models_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PendingMatch) String() string { @@ -401,7 +391,7 @@ func (*PendingMatch) ProtoMessage() {} func (x *PendingMatch) ProtoReflect() protoreflect.Message { mi := &file_kurushimi_models_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -461,11 +451,9 @@ type AllocationData struct { func (x *AllocationData) Reset() { *x = AllocationData{} - if protoimpl.UnsafeEnabled { - mi := &file_kurushimi_models_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kurushimi_models_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AllocationData) String() string { @@ -476,7 +464,7 @@ func (*AllocationData) ProtoMessage() {} func (x *AllocationData) ProtoReflect() protoreflect.Message { mi := &file_kurushimi_models_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -602,7 +590,7 @@ func file_kurushimi_models_proto_rawDescGZIP() []byte { } var file_kurushimi_models_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_kurushimi_models_proto_goTypes = []interface{}{ +var file_kurushimi_models_proto_goTypes = []any{ (*QueuedPlayer)(nil), // 0: emortal.kurushimi.model.QueuedPlayer (*Ticket)(nil), // 1: emortal.kurushimi.model.Ticket (*Match)(nil), // 2: emortal.kurushimi.model.Match @@ -629,84 +617,10 @@ func file_kurushimi_models_proto_init() { if File_kurushimi_models_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_kurushimi_models_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueuedPlayer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kurushimi_models_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Ticket); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kurushimi_models_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Match); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kurushimi_models_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Assignment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kurushimi_models_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PendingMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kurushimi_models_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AllocationData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_kurushimi_models_proto_msgTypes[0].OneofWrappers = []interface{}{} - file_kurushimi_models_proto_msgTypes[1].OneofWrappers = []interface{}{} - file_kurushimi_models_proto_msgTypes[2].OneofWrappers = []interface{}{} - file_kurushimi_models_proto_msgTypes[3].OneofWrappers = []interface{}{} + file_kurushimi_models_proto_msgTypes[0].OneofWrappers = []any{} + file_kurushimi_models_proto_msgTypes[1].OneofWrappers = []any{} + file_kurushimi_models_proto_msgTypes[2].OneofWrappers = []any{} + file_kurushimi_models_proto_msgTypes[3].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/go/model/mcplayer/messages.pb.go b/gen/go/model/mcplayer/messages.pb.go index f73abe5..2923b40 100644 --- a/gen/go/model/mcplayer/messages.pb.go +++ b/gen/go/model/mcplayer/messages.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: mc_player/messages.proto package mcplayer @@ -36,11 +36,9 @@ type PlayerExperienceChangeMessage struct { func (x *PlayerExperienceChangeMessage) Reset() { *x = PlayerExperienceChangeMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_mc_player_messages_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mc_player_messages_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PlayerExperienceChangeMessage) String() string { @@ -51,7 +49,7 @@ func (*PlayerExperienceChangeMessage) ProtoMessage() {} func (x *PlayerExperienceChangeMessage) ProtoReflect() protoreflect.Message { mi := &file_mc_player_messages_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -151,7 +149,7 @@ func file_mc_player_messages_proto_rawDescGZIP() []byte { } var file_mc_player_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_mc_player_messages_proto_goTypes = []interface{}{ +var file_mc_player_messages_proto_goTypes = []any{ (*PlayerExperienceChangeMessage)(nil), // 0: emortal.model.mcplayer.PlayerExperienceChangeMessage } var file_mc_player_messages_proto_depIdxs = []int32{ @@ -167,20 +165,6 @@ func file_mc_player_messages_proto_init() { if File_mc_player_messages_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_mc_player_messages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PlayerExperienceChangeMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/go/model/mcplayer/models.pb.go b/gen/go/model/mcplayer/models.pb.go index f913ec9..3b1cb66 100644 --- a/gen/go/model/mcplayer/models.pb.go +++ b/gen/go/model/mcplayer/models.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: mc_player/models.proto package mcplayer @@ -35,7 +35,7 @@ type McPlayer struct { LastOnline *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=last_online,json=lastOnline,proto3" json:"last_online,omitempty"` // currently_online use current_server and presence check instead. // - // Deprecated: Do not use. + // Deprecated: Marked as deprecated in mc_player/models.proto. CurrentlyOnline bool `protobuf:"varint,5,opt,name=currently_online,json=currentlyOnline,proto3" json:"currently_online,omitempty"` CurrentSession *LoginSession `protobuf:"bytes,6,opt,name=current_session,json=currentSession,proto3,oneof" json:"current_session,omitempty"` // The total play time of this player. @@ -49,11 +49,9 @@ type McPlayer struct { func (x *McPlayer) Reset() { *x = McPlayer{} - if protoimpl.UnsafeEnabled { - mi := &file_mc_player_models_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mc_player_models_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *McPlayer) String() string { @@ -64,7 +62,7 @@ func (*McPlayer) ProtoMessage() {} func (x *McPlayer) ProtoReflect() protoreflect.Message { mi := &file_mc_player_models_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -107,7 +105,7 @@ func (x *McPlayer) GetLastOnline() *timestamppb.Timestamp { return nil } -// Deprecated: Do not use. +// Deprecated: Marked as deprecated in mc_player/models.proto. func (x *McPlayer) GetCurrentlyOnline() bool { if x != nil { return x.CurrentlyOnline @@ -163,11 +161,9 @@ type LoginSession struct { func (x *LoginSession) Reset() { *x = LoginSession{} - if protoimpl.UnsafeEnabled { - mi := &file_mc_player_models_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mc_player_models_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LoginSession) String() string { @@ -178,7 +174,7 @@ func (*LoginSession) ProtoMessage() {} func (x *LoginSession) ProtoReflect() protoreflect.Message { mi := &file_mc_player_models_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -226,11 +222,9 @@ type OnlinePlayer struct { func (x *OnlinePlayer) Reset() { *x = OnlinePlayer{} - if protoimpl.UnsafeEnabled { - mi := &file_mc_player_models_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mc_player_models_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OnlinePlayer) String() string { @@ -241,7 +235,7 @@ func (*OnlinePlayer) ProtoMessage() {} func (x *OnlinePlayer) ProtoReflect() protoreflect.Message { mi := &file_mc_player_models_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -290,11 +284,9 @@ type CurrentServer struct { func (x *CurrentServer) Reset() { *x = CurrentServer{} - if protoimpl.UnsafeEnabled { - mi := &file_mc_player_models_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_mc_player_models_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CurrentServer) String() string { @@ -305,7 +297,7 @@ func (*CurrentServer) ProtoMessage() {} func (x *CurrentServer) ProtoReflect() protoreflect.Message { mi := &file_mc_player_models_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -438,7 +430,7 @@ func file_mc_player_models_proto_rawDescGZIP() []byte { } var file_mc_player_models_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_mc_player_models_proto_goTypes = []interface{}{ +var file_mc_player_models_proto_goTypes = []any{ (*McPlayer)(nil), // 0: emortal.model.McPlayer (*LoginSession)(nil), // 1: emortal.model.LoginSession (*OnlinePlayer)(nil), // 2: emortal.model.OnlinePlayer @@ -469,58 +461,8 @@ func file_mc_player_models_proto_init() { if File_mc_player_models_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_mc_player_models_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*McPlayer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_mc_player_models_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LoginSession); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_mc_player_models_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OnlinePlayer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_mc_player_models_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CurrentServer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_mc_player_models_proto_msgTypes[0].OneofWrappers = []interface{}{} - file_mc_player_models_proto_msgTypes[1].OneofWrappers = []interface{}{} + file_mc_player_models_proto_msgTypes[0].OneofWrappers = []any{} + file_mc_player_models_proto_msgTypes[1].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/go/model/messagehandler/models.pb.go b/gen/go/model/messagehandler/models.pb.go index 005190f..08e5761 100644 --- a/gen/go/model/messagehandler/models.pb.go +++ b/gen/go/model/messagehandler/models.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: message_handler/models.proto package messagehandler @@ -37,11 +37,9 @@ type PrivateMessage struct { func (x *PrivateMessage) Reset() { *x = PrivateMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_message_handler_models_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_message_handler_models_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivateMessage) String() string { @@ -52,7 +50,7 @@ func (*PrivateMessage) ProtoMessage() {} func (x *PrivateMessage) ProtoReflect() protoreflect.Message { mi := &file_message_handler_models_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -127,11 +125,9 @@ type ChatMessage struct { func (x *ChatMessage) Reset() { *x = ChatMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_message_handler_models_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_message_handler_models_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ChatMessage) String() string { @@ -142,7 +138,7 @@ func (*ChatMessage) ProtoMessage() {} func (x *ChatMessage) ProtoReflect() protoreflect.Message { mi := &file_message_handler_models_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -261,7 +257,7 @@ func file_message_handler_models_proto_rawDescGZIP() []byte { } var file_message_handler_models_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_message_handler_models_proto_goTypes = []interface{}{ +var file_message_handler_models_proto_goTypes = []any{ (*PrivateMessage)(nil), // 0: emortal.model.messagehandler.PrivateMessage (*ChatMessage)(nil), // 1: emortal.model.messagehandler.ChatMessage (*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp @@ -280,32 +276,6 @@ func file_message_handler_models_proto_init() { if File_message_handler_models_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_message_handler_models_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PrivateMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_message_handler_models_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChatMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/go/model/party/models.pb.go b/gen/go/model/party/models.pb.go index 074e7ce..091ebd8 100644 --- a/gen/go/model/party/models.pb.go +++ b/gen/go/model/party/models.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: party/models.proto package party @@ -38,11 +38,9 @@ type Party struct { func (x *Party) Reset() { *x = Party{} - if protoimpl.UnsafeEnabled { - mi := &file_party_models_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_models_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Party) String() string { @@ -53,7 +51,7 @@ func (*Party) ProtoMessage() {} func (x *Party) ProtoReflect() protoreflect.Message { mi := &file_party_models_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -108,11 +106,9 @@ type PartyMember struct { func (x *PartyMember) Reset() { *x = PartyMember{} - if protoimpl.UnsafeEnabled { - mi := &file_party_models_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_models_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartyMember) String() string { @@ -123,7 +119,7 @@ func (*PartyMember) ProtoMessage() {} func (x *PartyMember) ProtoReflect() protoreflect.Message { mi := &file_party_models_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -171,11 +167,9 @@ type PartyInvite struct { func (x *PartyInvite) Reset() { *x = PartyInvite{} - if protoimpl.UnsafeEnabled { - mi := &file_party_models_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_models_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartyInvite) String() string { @@ -186,7 +180,7 @@ func (*PartyInvite) ProtoMessage() {} func (x *PartyInvite) ProtoReflect() protoreflect.Message { mi := &file_party_models_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -259,11 +253,9 @@ type PartySettings struct { func (x *PartySettings) Reset() { *x = PartySettings{} - if protoimpl.UnsafeEnabled { - mi := &file_party_models_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_models_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PartySettings) String() string { @@ -274,7 +266,7 @@ func (*PartySettings) ProtoMessage() {} func (x *PartySettings) ProtoReflect() protoreflect.Message { mi := &file_party_models_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -330,11 +322,9 @@ type EventData struct { func (x *EventData) Reset() { *x = EventData{} - if protoimpl.UnsafeEnabled { - mi := &file_party_models_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_party_models_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EventData) String() string { @@ -345,7 +335,7 @@ func (*EventData) ProtoMessage() {} func (x *EventData) ProtoReflect() protoreflect.Message { mi := &file_party_models_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -500,7 +490,7 @@ func file_party_models_proto_rawDescGZIP() []byte { } var file_party_models_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_party_models_proto_goTypes = []interface{}{ +var file_party_models_proto_goTypes = []any{ (*Party)(nil), // 0: emortal.model.party.Party (*PartyMember)(nil), // 1: emortal.model.party.PartyMember (*PartyInvite)(nil), // 2: emortal.model.party.PartyInvite @@ -527,69 +517,7 @@ func file_party_models_proto_init() { if File_party_models_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_party_models_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Party); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_models_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PartyMember); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_models_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PartyInvite); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_models_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PartySettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_party_models_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_party_models_proto_msgTypes[4].OneofWrappers = []interface{}{} + file_party_models_proto_msgTypes[4].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/go/model/permission/models.pb.go b/gen/go/model/permission/models.pb.go index 3e62109..83ac018 100644 --- a/gen/go/model/permission/models.pb.go +++ b/gen/go/model/permission/models.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: permission/models.proto package permission @@ -79,11 +79,9 @@ type Role struct { func (x *Role) Reset() { *x = Role{} - if protoimpl.UnsafeEnabled { - mi := &file_permission_models_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_permission_models_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Role) String() string { @@ -94,7 +92,7 @@ func (*Role) ProtoMessage() {} func (x *Role) ProtoReflect() protoreflect.Message { mi := &file_permission_models_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -148,11 +146,9 @@ type PermissionNode struct { func (x *PermissionNode) Reset() { *x = PermissionNode{} - if protoimpl.UnsafeEnabled { - mi := &file_permission_models_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_permission_models_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PermissionNode) String() string { @@ -163,7 +159,7 @@ func (*PermissionNode) ProtoMessage() {} func (x *PermissionNode) ProtoReflect() protoreflect.Message { mi := &file_permission_models_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -243,7 +239,7 @@ func file_permission_models_proto_rawDescGZIP() []byte { var file_permission_models_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_permission_models_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_permission_models_proto_goTypes = []interface{}{ +var file_permission_models_proto_goTypes = []any{ (PermissionNode_PermissionState)(0), // 0: emortal.model.permission.PermissionNode.PermissionState (*Role)(nil), // 1: emortal.model.permission.Role (*PermissionNode)(nil), // 2: emortal.model.permission.PermissionNode @@ -263,33 +259,7 @@ func file_permission_models_proto_init() { if File_permission_models_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_permission_models_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Role); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_permission_models_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PermissionNode); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_permission_models_proto_msgTypes[0].OneofWrappers = []interface{}{} + file_permission_models_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/go/model/relationship/models.pb.go b/gen/go/model/relationship/models.pb.go index 4392d7c..be5769b 100644 --- a/gen/go/model/relationship/models.pb.go +++ b/gen/go/model/relationship/models.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: relationship/models.proto package relationship @@ -32,11 +32,9 @@ type FriendRequest struct { func (x *FriendRequest) Reset() { *x = FriendRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_relationship_models_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_relationship_models_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FriendRequest) String() string { @@ -47,7 +45,7 @@ func (*FriendRequest) ProtoMessage() {} func (x *FriendRequest) ProtoReflect() protoreflect.Message { mi := &file_relationship_models_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -94,11 +92,9 @@ type PlayerBlock struct { func (x *PlayerBlock) Reset() { *x = PlayerBlock{} - if protoimpl.UnsafeEnabled { - mi := &file_relationship_models_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_relationship_models_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PlayerBlock) String() string { @@ -109,7 +105,7 @@ func (*PlayerBlock) ProtoMessage() {} func (x *PlayerBlock) ProtoReflect() protoreflect.Message { mi := &file_relationship_models_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -179,7 +175,7 @@ func file_relationship_models_proto_rawDescGZIP() []byte { } var file_relationship_models_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_relationship_models_proto_goTypes = []interface{}{ +var file_relationship_models_proto_goTypes = []any{ (*FriendRequest)(nil), // 0: emortal.model.relationship.FriendRequest (*PlayerBlock)(nil), // 1: emortal.model.relationship.PlayerBlock } @@ -196,32 +192,6 @@ func file_relationship_models_proto_init() { if File_relationship_models_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_relationship_models_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_relationship_models_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PlayerBlock); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/go/model/serverstore/models.pb.go b/gen/go/model/serverstore/models.pb.go index 7cbca00..a92f7d0 100644 --- a/gen/go/model/serverstore/models.pb.go +++ b/gen/go/model/serverstore/models.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v5.28.0 +// protoc-gen-go v1.35.1 +// protoc v5.28.3 // source: server_store/models.proto package serverstore @@ -35,7 +35,7 @@ var file_server_store_models_proto_rawDesc = []byte{ 0x74, 0x6f, 0x33, } -var file_server_store_models_proto_goTypes = []interface{}{} +var file_server_store_models_proto_goTypes = []any{} var file_server_store_models_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/src/proto/leaderboards/grpc.proto b/src/proto/leaderboards/grpc.proto index 112e25d..b56e71a 100644 --- a/src/proto/leaderboards/grpc.proto +++ b/src/proto/leaderboards/grpc.proto @@ -10,86 +10,34 @@ import "common_models.proto"; import "google/protobuf/any.proto"; service Leaderboard { - rpc CreateLeaderboard(CreateLeaderboardRequest) returns (CreateLeaderboardResponse); - // If the leaderboard does not exist, an error with status NOT_FOUND is returned. - rpc DeleteLeaderboard(DeleteLeaderboardRequest) returns (DeleteLeaderboardResponse); // If the leaderboard does not exist, an error with status NOT_FOUND is returned. // If the start place is greater than the end place, an error with status INVALID_ARGUMENT is returned. // If the end place is greater than the number of entries in the leaderboard, an error with status INVALID_ARGUMENT is returned. rpc GetEntries(GetEntriesRequest) returns (GetEntriesResponse); - // If the leaderboard does not exist, an error with status NOT_FOUND is returned. - rpc GetEntryCount(GetEntryCountRequest) returns (GetEntryCountResponse); - - rpc CreateEntry(CreateEntryRequest) returns (CreateEntryResponse); - // If the leaderboard or entry does not exist, an error with status NOT_FOUND is returned. - rpc DeleteEntry(DeleteEntryRequest) returns (DeleteEntryResponse); - - // If the leaderboard or entry does not exist, an error with status NOT_FOUND is returned. - rpc UpdateScore(UpdateScoreRequest) returns (UpdateScoreResponse); } -message CreateLeaderboardRequest { - model.leaderboard.Leaderboard leaderboard = 1; -} - -message CreateLeaderboardResponse { -} - -message DeleteLeaderboardRequest { +message GetEntriesRequest { string id = 1; -} + model.leaderboard.Period period = 2; + // period_rolling whether the period should be the last x time or roll every x time, e.g. last 24 hours or since the + // start of the day + bool period_rolling = 3; -message DeleteLeaderboardResponse { -} + // limit the maximum number of entries returned, default is 10 + int32 limit = 4; -message GetEntriesRequest { - string leaderboard_id = 1; + // offset the number of entries to skip, default is 0 + int32 offset = 5; + + // uuid_filter filter the leaderboard for players with a specific UUID. Common usage is for friend filtering. + repeated string uuid_filter = 6; - // The start and end rank indicate the range of entries to return, where the rank is the - // ranking in the leaderboard - uint32 start_rank = 2; - uint32 end_rank = 3; + // sort_override override the configured direction of the leaderboard within the leaderboard service. + model.leaderboard.SortOrder sort_override = 7; } message GetEntriesResponse { repeated model.leaderboard.LeaderboardEntry entries = 1; -} - -message GetEntryCountRequest { - string leaderboard_id = 1; -} - -message GetEntryCountResponse { - uint32 count = 1; -} - -message CreateEntryRequest { - string leaderboard_id = 1; - - string entry_id = 2; - double score = 3; - - map data = 4; -} - -message CreateEntryResponse { -} - -message DeleteEntryRequest { - string leaderboard_id = 1; - string entry_id = 2; -} - -message DeleteEntryResponse { -} - -message UpdateScoreRequest { - string leaderboard_id = 1; - string entry_id = 2; - - double score = 3; -} - -message UpdateScoreResponse { -} + int32 total_entries = 2; +} \ No newline at end of file diff --git a/src/proto/leaderboards/messages.proto b/src/proto/leaderboards/messages.proto index 5b87c76..44b59a2 100644 --- a/src/proto/leaderboards/messages.proto +++ b/src/proto/leaderboards/messages.proto @@ -7,14 +7,6 @@ option go_package = "github.com/emortalmc/proto-specs/gen/go/message/leaderboard import "leaderboards/models.proto"; -message LeaderboardCreatedMessage { - model.leaderboard.Leaderboard leaderboard = 1; -} - -message LeaderboardDeletedMessage { - string leaderboard_id = 1; -} - message EntryCreatedMessage { model.leaderboard.LeaderboardEntry entry = 1; } @@ -33,4 +25,8 @@ message ScoreUpdatedMessage { uint32 old_rank = 5; uint32 new_rank = 6; + + message ScorePacket { + + } } diff --git a/src/proto/leaderboards/models.proto b/src/proto/leaderboards/models.proto index 3146db1..1370ab0 100644 --- a/src/proto/leaderboards/models.proto +++ b/src/proto/leaderboards/models.proto @@ -7,9 +7,16 @@ option go_package = "github.com/emortalmc/proto-specs/gen/go/model/leaderboard"; import "google/protobuf/any.proto"; -message Leaderboard { - string id = 1; - SortOrder sort_order = 2; +enum Period { + ALL_TIME = 0; + DAY = 1; + WEEK = 2; + MONTH = 3; +} + +enum SortOrder { + ASC = 0; + DESC = 1; } message LeaderboardEntry { @@ -18,9 +25,4 @@ message LeaderboardEntry { uint32 rank = 3; map data = 4; -} - -enum SortOrder { - ASCENDING = 0; - DESCENDING = 1; -} +} \ No newline at end of file