Documentation ¶
Overview ¶
Package apigrpc is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterNakamaHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterNakamaHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NakamaClient) error
- func RegisterNakamaHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterNakamaHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NakamaServer) error
- func RegisterNakamaServer(s *grpc.Server, srv NakamaServer)
- type NakamaClient
- type NakamaServer
- type UnimplementedNakamaServer
- func (UnimplementedNakamaServer) AddFriends(context.Context, *api.AddFriendsRequest) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) AddGroupUsers(context.Context, *api.AddGroupUsersRequest) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) AuthenticateApple(context.Context, *api.AuthenticateAppleRequest) (*api.Session, error)
- func (UnimplementedNakamaServer) AuthenticateCustom(context.Context, *api.AuthenticateCustomRequest) (*api.Session, error)
- func (UnimplementedNakamaServer) AuthenticateDevice(context.Context, *api.AuthenticateDeviceRequest) (*api.Session, error)
- func (UnimplementedNakamaServer) AuthenticateEmail(context.Context, *api.AuthenticateEmailRequest) (*api.Session, error)
- func (UnimplementedNakamaServer) AuthenticateFacebook(context.Context, *api.AuthenticateFacebookRequest) (*api.Session, error)
- func (UnimplementedNakamaServer) AuthenticateFacebookInstantGame(context.Context, *api.AuthenticateFacebookInstantGameRequest) (*api.Session, error)
- func (UnimplementedNakamaServer) AuthenticateGameCenter(context.Context, *api.AuthenticateGameCenterRequest) (*api.Session, error)
- func (UnimplementedNakamaServer) AuthenticateGoogle(context.Context, *api.AuthenticateGoogleRequest) (*api.Session, error)
- func (UnimplementedNakamaServer) AuthenticateSteam(context.Context, *api.AuthenticateSteamRequest) (*api.Session, error)
- func (UnimplementedNakamaServer) BanGroupUsers(context.Context, *api.BanGroupUsersRequest) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) BlockFriends(context.Context, *api.BlockFriendsRequest) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) CreateGroup(context.Context, *api.CreateGroupRequest) (*api.Group, error)
- func (UnimplementedNakamaServer) DeleteFriends(context.Context, *api.DeleteFriendsRequest) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) DeleteGroup(context.Context, *api.DeleteGroupRequest) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) DeleteLeaderboardRecord(context.Context, *api.DeleteLeaderboardRecordRequest) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) DeleteNotifications(context.Context, *api.DeleteNotificationsRequest) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) DeleteStorageObjects(context.Context, *api.DeleteStorageObjectsRequest) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) DemoteGroupUsers(context.Context, *api.DemoteGroupUsersRequest) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) Event(context.Context, *api.Event) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) GetAccount(context.Context, *emptypb.Empty) (*api.Account, error)
- func (UnimplementedNakamaServer) GetUsers(context.Context, *api.GetUsersRequest) (*api.Users, error)
- func (UnimplementedNakamaServer) Healthcheck(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) ImportFacebookFriends(context.Context, *api.ImportFacebookFriendsRequest) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) JoinGroup(context.Context, *api.JoinGroupRequest) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) JoinTournament(context.Context, *api.JoinTournamentRequest) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) KickGroupUsers(context.Context, *api.KickGroupUsersRequest) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) LeaveGroup(context.Context, *api.LeaveGroupRequest) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) LinkApple(context.Context, *api.AccountApple) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) LinkCustom(context.Context, *api.AccountCustom) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) LinkDevice(context.Context, *api.AccountDevice) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) LinkEmail(context.Context, *api.AccountEmail) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) LinkFacebook(context.Context, *api.LinkFacebookRequest) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) LinkFacebookInstantGame(context.Context, *api.AccountFacebookInstantGame) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) LinkGameCenter(context.Context, *api.AccountGameCenter) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) LinkGoogle(context.Context, *api.AccountGoogle) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) LinkSteam(context.Context, *api.AccountSteam) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) ListChannelMessages(context.Context, *api.ListChannelMessagesRequest) (*api.ChannelMessageList, error)
- func (UnimplementedNakamaServer) ListFriends(context.Context, *api.ListFriendsRequest) (*api.FriendList, error)
- func (UnimplementedNakamaServer) ListGroupUsers(context.Context, *api.ListGroupUsersRequest) (*api.GroupUserList, error)
- func (UnimplementedNakamaServer) ListGroups(context.Context, *api.ListGroupsRequest) (*api.GroupList, error)
- func (UnimplementedNakamaServer) ListLeaderboardRecords(context.Context, *api.ListLeaderboardRecordsRequest) (*api.LeaderboardRecordList, error)
- func (UnimplementedNakamaServer) ListLeaderboardRecordsAroundOwner(context.Context, *api.ListLeaderboardRecordsAroundOwnerRequest) (*api.LeaderboardRecordList, error)
- func (UnimplementedNakamaServer) ListMatches(context.Context, *api.ListMatchesRequest) (*api.MatchList, error)
- func (UnimplementedNakamaServer) ListNotifications(context.Context, *api.ListNotificationsRequest) (*api.NotificationList, error)
- func (UnimplementedNakamaServer) ListStorageObjects(context.Context, *api.ListStorageObjectsRequest) (*api.StorageObjectList, error)
- func (UnimplementedNakamaServer) ListTournamentRecords(context.Context, *api.ListTournamentRecordsRequest) (*api.TournamentRecordList, error)
- func (UnimplementedNakamaServer) ListTournamentRecordsAroundOwner(context.Context, *api.ListTournamentRecordsAroundOwnerRequest) (*api.TournamentRecordList, error)
- func (UnimplementedNakamaServer) ListTournaments(context.Context, *api.ListTournamentsRequest) (*api.TournamentList, error)
- func (UnimplementedNakamaServer) ListUserGroups(context.Context, *api.ListUserGroupsRequest) (*api.UserGroupList, error)
- func (UnimplementedNakamaServer) PromoteGroupUsers(context.Context, *api.PromoteGroupUsersRequest) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) ReadStorageObjects(context.Context, *api.ReadStorageObjectsRequest) (*api.StorageObjects, error)
- func (UnimplementedNakamaServer) RpcFunc(context.Context, *api.Rpc) (*api.Rpc, error)
- func (UnimplementedNakamaServer) UnlinkApple(context.Context, *api.AccountApple) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) UnlinkCustom(context.Context, *api.AccountCustom) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) UnlinkDevice(context.Context, *api.AccountDevice) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) UnlinkEmail(context.Context, *api.AccountEmail) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) UnlinkFacebook(context.Context, *api.AccountFacebook) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) UnlinkFacebookInstantGame(context.Context, *api.AccountFacebookInstantGame) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) UnlinkGameCenter(context.Context, *api.AccountGameCenter) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) UnlinkGoogle(context.Context, *api.AccountGoogle) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) UnlinkSteam(context.Context, *api.AccountSteam) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) UpdateAccount(context.Context, *api.UpdateAccountRequest) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) UpdateGroup(context.Context, *api.UpdateGroupRequest) (*emptypb.Empty, error)
- func (UnimplementedNakamaServer) WriteLeaderboardRecord(context.Context, *api.WriteLeaderboardRecordRequest) (*api.LeaderboardRecord, error)
- func (UnimplementedNakamaServer) WriteStorageObjects(context.Context, *api.WriteStorageObjectsRequest) (*api.StorageObjectAcks, error)
- func (UnimplementedNakamaServer) WriteTournamentRecord(context.Context, *api.WriteTournamentRecordRequest) (*api.LeaderboardRecord, error)
- type UnsafeNakamaServer
Constants ¶
This section is empty.
Variables ¶
var File_apigrpc_proto protoreflect.FileDescriptor
Functions ¶
func RegisterNakamaHandler ¶
RegisterNakamaHandler registers the http handlers for service Nakama to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterNakamaHandlerClient ¶
func RegisterNakamaHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NakamaClient) error
RegisterNakamaHandlerClient registers the http handlers for service Nakama to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "NakamaClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "NakamaClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "NakamaClient" to call the correct interceptors.
func RegisterNakamaHandlerFromEndpoint ¶
func RegisterNakamaHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterNakamaHandlerFromEndpoint is same as RegisterNakamaHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterNakamaHandlerServer ¶ added in v2.7.0
func RegisterNakamaHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NakamaServer) error
RegisterNakamaHandlerServer registers the http handlers for service Nakama to "mux". UnaryRPC :call NakamaServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterNakamaHandlerFromEndpoint instead.
func RegisterNakamaServer ¶
func RegisterNakamaServer(s *grpc.Server, srv NakamaServer)
Types ¶
type NakamaClient ¶
type NakamaClient interface { // Add friends by ID or username to a user's account. AddFriends(ctx context.Context, in *api.AddFriendsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Add users to a group. AddGroupUsers(ctx context.Context, in *api.AddGroupUsersRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Authenticate a user with an Apple ID against the server. AuthenticateApple(ctx context.Context, in *api.AuthenticateAppleRequest, opts ...grpc.CallOption) (*api.Session, error) // Authenticate a user with a custom id against the server. AuthenticateCustom(ctx context.Context, in *api.AuthenticateCustomRequest, opts ...grpc.CallOption) (*api.Session, error) // Authenticate a user with a device id against the server. AuthenticateDevice(ctx context.Context, in *api.AuthenticateDeviceRequest, opts ...grpc.CallOption) (*api.Session, error) // Authenticate a user with an email+password against the server. AuthenticateEmail(ctx context.Context, in *api.AuthenticateEmailRequest, opts ...grpc.CallOption) (*api.Session, error) // Authenticate a user with a Facebook OAuth token against the server. AuthenticateFacebook(ctx context.Context, in *api.AuthenticateFacebookRequest, opts ...grpc.CallOption) (*api.Session, error) // Authenticate a user with a Facebook Instant Game token against the server. AuthenticateFacebookInstantGame(ctx context.Context, in *api.AuthenticateFacebookInstantGameRequest, opts ...grpc.CallOption) (*api.Session, error) // Authenticate a user with Apple's GameCenter against the server. AuthenticateGameCenter(ctx context.Context, in *api.AuthenticateGameCenterRequest, opts ...grpc.CallOption) (*api.Session, error) // Authenticate a user with Google against the server. AuthenticateGoogle(ctx context.Context, in *api.AuthenticateGoogleRequest, opts ...grpc.CallOption) (*api.Session, error) // Authenticate a user with Steam against the server. AuthenticateSteam(ctx context.Context, in *api.AuthenticateSteamRequest, opts ...grpc.CallOption) (*api.Session, error) // Ban a set of users from a group. BanGroupUsers(ctx context.Context, in *api.BanGroupUsersRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Block one or more users by ID or username. BlockFriends(ctx context.Context, in *api.BlockFriendsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Create a new group with the current user as the owner. CreateGroup(ctx context.Context, in *api.CreateGroupRequest, opts ...grpc.CallOption) (*api.Group, error) // Delete one or more users by ID or username. DeleteFriends(ctx context.Context, in *api.DeleteFriendsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Delete a group by ID. DeleteGroup(ctx context.Context, in *api.DeleteGroupRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Delete a leaderboard record. DeleteLeaderboardRecord(ctx context.Context, in *api.DeleteLeaderboardRecordRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Delete one or more notifications for the current user. DeleteNotifications(ctx context.Context, in *api.DeleteNotificationsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Delete one or more objects by ID or username. DeleteStorageObjects(ctx context.Context, in *api.DeleteStorageObjectsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Submit an event for processing in the server's registered runtime custom events handler. Event(ctx context.Context, in *api.Event, opts ...grpc.CallOption) (*emptypb.Empty, error) // Fetch the current user's account. GetAccount(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*api.Account, error) // Fetch zero or more users by ID and/or username. GetUsers(ctx context.Context, in *api.GetUsersRequest, opts ...grpc.CallOption) (*api.Users, error) // A healthcheck which load balancers can use to check the service. Healthcheck(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) // Import Facebook friends and add them to a user's account. ImportFacebookFriends(ctx context.Context, in *api.ImportFacebookFriendsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Immediately join an open group, or request to join a closed one. JoinGroup(ctx context.Context, in *api.JoinGroupRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Attempt to join an open and running tournament. JoinTournament(ctx context.Context, in *api.JoinTournamentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Kick a set of users from a group. KickGroupUsers(ctx context.Context, in *api.KickGroupUsersRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Leave a group the user is a member of. LeaveGroup(ctx context.Context, in *api.LeaveGroupRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Add an Apple ID to the social profiles on the current user's account. LinkApple(ctx context.Context, in *api.AccountApple, opts ...grpc.CallOption) (*emptypb.Empty, error) // Add a custom ID to the social profiles on the current user's account. LinkCustom(ctx context.Context, in *api.AccountCustom, opts ...grpc.CallOption) (*emptypb.Empty, error) // Add a device ID to the social profiles on the current user's account. LinkDevice(ctx context.Context, in *api.AccountDevice, opts ...grpc.CallOption) (*emptypb.Empty, error) // Add an email+password to the social profiles on the current user's account. LinkEmail(ctx context.Context, in *api.AccountEmail, opts ...grpc.CallOption) (*emptypb.Empty, error) // Add Facebook to the social profiles on the current user's account. LinkFacebook(ctx context.Context, in *api.LinkFacebookRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Add Facebook Instant Game to the social profiles on the current user's account. LinkFacebookInstantGame(ctx context.Context, in *api.AccountFacebookInstantGame, opts ...grpc.CallOption) (*emptypb.Empty, error) // Add Apple's GameCenter to the social profiles on the current user's account. LinkGameCenter(ctx context.Context, in *api.AccountGameCenter, opts ...grpc.CallOption) (*emptypb.Empty, error) // Add Google to the social profiles on the current user's account. LinkGoogle(ctx context.Context, in *api.AccountGoogle, opts ...grpc.CallOption) (*emptypb.Empty, error) // Add Steam to the social profiles on the current user's account. LinkSteam(ctx context.Context, in *api.AccountSteam, opts ...grpc.CallOption) (*emptypb.Empty, error) // List a channel's message history. ListChannelMessages(ctx context.Context, in *api.ListChannelMessagesRequest, opts ...grpc.CallOption) (*api.ChannelMessageList, error) // List all friends for the current user. ListFriends(ctx context.Context, in *api.ListFriendsRequest, opts ...grpc.CallOption) (*api.FriendList, error) // List groups based on given filters. ListGroups(ctx context.Context, in *api.ListGroupsRequest, opts ...grpc.CallOption) (*api.GroupList, error) // List all users that are part of a group. ListGroupUsers(ctx context.Context, in *api.ListGroupUsersRequest, opts ...grpc.CallOption) (*api.GroupUserList, error) // List leaderboard records. ListLeaderboardRecords(ctx context.Context, in *api.ListLeaderboardRecordsRequest, opts ...grpc.CallOption) (*api.LeaderboardRecordList, error) // List leaderboard records that belong to a user. ListLeaderboardRecordsAroundOwner(ctx context.Context, in *api.ListLeaderboardRecordsAroundOwnerRequest, opts ...grpc.CallOption) (*api.LeaderboardRecordList, error) // Fetch list of running matches. ListMatches(ctx context.Context, in *api.ListMatchesRequest, opts ...grpc.CallOption) (*api.MatchList, error) // Fetch list of notifications. ListNotifications(ctx context.Context, in *api.ListNotificationsRequest, opts ...grpc.CallOption) (*api.NotificationList, error) // List publicly readable storage objects in a given collection. ListStorageObjects(ctx context.Context, in *api.ListStorageObjectsRequest, opts ...grpc.CallOption) (*api.StorageObjectList, error) // List current or upcoming tournaments. ListTournaments(ctx context.Context, in *api.ListTournamentsRequest, opts ...grpc.CallOption) (*api.TournamentList, error) // List tournament records. ListTournamentRecords(ctx context.Context, in *api.ListTournamentRecordsRequest, opts ...grpc.CallOption) (*api.TournamentRecordList, error) // List tournament records for a given owner. ListTournamentRecordsAroundOwner(ctx context.Context, in *api.ListTournamentRecordsAroundOwnerRequest, opts ...grpc.CallOption) (*api.TournamentRecordList, error) // List groups the current user belongs to. ListUserGroups(ctx context.Context, in *api.ListUserGroupsRequest, opts ...grpc.CallOption) (*api.UserGroupList, error) // Promote a set of users in a group to the next role up. PromoteGroupUsers(ctx context.Context, in *api.PromoteGroupUsersRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Demote a set of users in a group to the next role down. DemoteGroupUsers(ctx context.Context, in *api.DemoteGroupUsersRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Get storage objects. ReadStorageObjects(ctx context.Context, in *api.ReadStorageObjectsRequest, opts ...grpc.CallOption) (*api.StorageObjects, error) // Execute a Lua function on the server. RpcFunc(ctx context.Context, in *api.Rpc, opts ...grpc.CallOption) (*api.Rpc, error) // Remove the Apple ID from the social profiles on the current user's account. UnlinkApple(ctx context.Context, in *api.AccountApple, opts ...grpc.CallOption) (*emptypb.Empty, error) // Remove the custom ID from the social profiles on the current user's account. UnlinkCustom(ctx context.Context, in *api.AccountCustom, opts ...grpc.CallOption) (*emptypb.Empty, error) // Remove the device ID from the social profiles on the current user's account. UnlinkDevice(ctx context.Context, in *api.AccountDevice, opts ...grpc.CallOption) (*emptypb.Empty, error) // Remove the email+password from the social profiles on the current user's account. UnlinkEmail(ctx context.Context, in *api.AccountEmail, opts ...grpc.CallOption) (*emptypb.Empty, error) // Remove Facebook from the social profiles on the current user's account. UnlinkFacebook(ctx context.Context, in *api.AccountFacebook, opts ...grpc.CallOption) (*emptypb.Empty, error) // Remove Facebook Instant Game profile from the social profiles on the current user's account. UnlinkFacebookInstantGame(ctx context.Context, in *api.AccountFacebookInstantGame, opts ...grpc.CallOption) (*emptypb.Empty, error) // Remove Apple's GameCenter from the social profiles on the current user's account. UnlinkGameCenter(ctx context.Context, in *api.AccountGameCenter, opts ...grpc.CallOption) (*emptypb.Empty, error) // Remove Google from the social profiles on the current user's account. UnlinkGoogle(ctx context.Context, in *api.AccountGoogle, opts ...grpc.CallOption) (*emptypb.Empty, error) // Remove Steam from the social profiles on the current user's account. UnlinkSteam(ctx context.Context, in *api.AccountSteam, opts ...grpc.CallOption) (*emptypb.Empty, error) // Update fields in the current user's account. UpdateAccount(ctx context.Context, in *api.UpdateAccountRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Update fields in a given group. UpdateGroup(ctx context.Context, in *api.UpdateGroupRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Write a record to a leaderboard. WriteLeaderboardRecord(ctx context.Context, in *api.WriteLeaderboardRecordRequest, opts ...grpc.CallOption) (*api.LeaderboardRecord, error) // Write objects into the storage engine. WriteStorageObjects(ctx context.Context, in *api.WriteStorageObjectsRequest, opts ...grpc.CallOption) (*api.StorageObjectAcks, error) // Write a record to a tournament. WriteTournamentRecord(ctx context.Context, in *api.WriteTournamentRecordRequest, opts ...grpc.CallOption) (*api.LeaderboardRecord, error) }
NakamaClient is the client API for Nakama 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.
func NewNakamaClient ¶
func NewNakamaClient(cc grpc.ClientConnInterface) NakamaClient
type NakamaServer ¶
type NakamaServer interface { // Add friends by ID or username to a user's account. AddFriends(context.Context, *api.AddFriendsRequest) (*emptypb.Empty, error) // Add users to a group. AddGroupUsers(context.Context, *api.AddGroupUsersRequest) (*emptypb.Empty, error) // Authenticate a user with an Apple ID against the server. AuthenticateApple(context.Context, *api.AuthenticateAppleRequest) (*api.Session, error) // Authenticate a user with a custom id against the server. AuthenticateCustom(context.Context, *api.AuthenticateCustomRequest) (*api.Session, error) // Authenticate a user with a device id against the server. AuthenticateDevice(context.Context, *api.AuthenticateDeviceRequest) (*api.Session, error) // Authenticate a user with an email+password against the server. AuthenticateEmail(context.Context, *api.AuthenticateEmailRequest) (*api.Session, error) // Authenticate a user with a Facebook OAuth token against the server. AuthenticateFacebook(context.Context, *api.AuthenticateFacebookRequest) (*api.Session, error) // Authenticate a user with a Facebook Instant Game token against the server. AuthenticateFacebookInstantGame(context.Context, *api.AuthenticateFacebookInstantGameRequest) (*api.Session, error) // Authenticate a user with Apple's GameCenter against the server. AuthenticateGameCenter(context.Context, *api.AuthenticateGameCenterRequest) (*api.Session, error) // Authenticate a user with Google against the server. AuthenticateGoogle(context.Context, *api.AuthenticateGoogleRequest) (*api.Session, error) // Authenticate a user with Steam against the server. AuthenticateSteam(context.Context, *api.AuthenticateSteamRequest) (*api.Session, error) // Ban a set of users from a group. BanGroupUsers(context.Context, *api.BanGroupUsersRequest) (*emptypb.Empty, error) // Block one or more users by ID or username. BlockFriends(context.Context, *api.BlockFriendsRequest) (*emptypb.Empty, error) // Create a new group with the current user as the owner. CreateGroup(context.Context, *api.CreateGroupRequest) (*api.Group, error) // Delete one or more users by ID or username. DeleteFriends(context.Context, *api.DeleteFriendsRequest) (*emptypb.Empty, error) // Delete a group by ID. DeleteGroup(context.Context, *api.DeleteGroupRequest) (*emptypb.Empty, error) // Delete a leaderboard record. DeleteLeaderboardRecord(context.Context, *api.DeleteLeaderboardRecordRequest) (*emptypb.Empty, error) // Delete one or more notifications for the current user. DeleteNotifications(context.Context, *api.DeleteNotificationsRequest) (*emptypb.Empty, error) // Delete one or more objects by ID or username. DeleteStorageObjects(context.Context, *api.DeleteStorageObjectsRequest) (*emptypb.Empty, error) // Submit an event for processing in the server's registered runtime custom events handler. Event(context.Context, *api.Event) (*emptypb.Empty, error) // Fetch the current user's account. GetAccount(context.Context, *emptypb.Empty) (*api.Account, error) // Fetch zero or more users by ID and/or username. GetUsers(context.Context, *api.GetUsersRequest) (*api.Users, error) // A healthcheck which load balancers can use to check the service. Healthcheck(context.Context, *emptypb.Empty) (*emptypb.Empty, error) // Import Facebook friends and add them to a user's account. ImportFacebookFriends(context.Context, *api.ImportFacebookFriendsRequest) (*emptypb.Empty, error) // Immediately join an open group, or request to join a closed one. JoinGroup(context.Context, *api.JoinGroupRequest) (*emptypb.Empty, error) // Attempt to join an open and running tournament. JoinTournament(context.Context, *api.JoinTournamentRequest) (*emptypb.Empty, error) // Kick a set of users from a group. KickGroupUsers(context.Context, *api.KickGroupUsersRequest) (*emptypb.Empty, error) // Leave a group the user is a member of. LeaveGroup(context.Context, *api.LeaveGroupRequest) (*emptypb.Empty, error) // Add an Apple ID to the social profiles on the current user's account. LinkApple(context.Context, *api.AccountApple) (*emptypb.Empty, error) // Add a custom ID to the social profiles on the current user's account. LinkCustom(context.Context, *api.AccountCustom) (*emptypb.Empty, error) // Add a device ID to the social profiles on the current user's account. LinkDevice(context.Context, *api.AccountDevice) (*emptypb.Empty, error) // Add an email+password to the social profiles on the current user's account. LinkEmail(context.Context, *api.AccountEmail) (*emptypb.Empty, error) // Add Facebook to the social profiles on the current user's account. LinkFacebook(context.Context, *api.LinkFacebookRequest) (*emptypb.Empty, error) // Add Facebook Instant Game to the social profiles on the current user's account. LinkFacebookInstantGame(context.Context, *api.AccountFacebookInstantGame) (*emptypb.Empty, error) // Add Apple's GameCenter to the social profiles on the current user's account. LinkGameCenter(context.Context, *api.AccountGameCenter) (*emptypb.Empty, error) // Add Google to the social profiles on the current user's account. LinkGoogle(context.Context, *api.AccountGoogle) (*emptypb.Empty, error) // Add Steam to the social profiles on the current user's account. LinkSteam(context.Context, *api.AccountSteam) (*emptypb.Empty, error) // List a channel's message history. ListChannelMessages(context.Context, *api.ListChannelMessagesRequest) (*api.ChannelMessageList, error) // List all friends for the current user. ListFriends(context.Context, *api.ListFriendsRequest) (*api.FriendList, error) // List groups based on given filters. ListGroups(context.Context, *api.ListGroupsRequest) (*api.GroupList, error) // List all users that are part of a group. ListGroupUsers(context.Context, *api.ListGroupUsersRequest) (*api.GroupUserList, error) // List leaderboard records. ListLeaderboardRecords(context.Context, *api.ListLeaderboardRecordsRequest) (*api.LeaderboardRecordList, error) // List leaderboard records that belong to a user. ListLeaderboardRecordsAroundOwner(context.Context, *api.ListLeaderboardRecordsAroundOwnerRequest) (*api.LeaderboardRecordList, error) // Fetch list of running matches. ListMatches(context.Context, *api.ListMatchesRequest) (*api.MatchList, error) // Fetch list of notifications. ListNotifications(context.Context, *api.ListNotificationsRequest) (*api.NotificationList, error) // List publicly readable storage objects in a given collection. ListStorageObjects(context.Context, *api.ListStorageObjectsRequest) (*api.StorageObjectList, error) // List current or upcoming tournaments. ListTournaments(context.Context, *api.ListTournamentsRequest) (*api.TournamentList, error) // List tournament records. ListTournamentRecords(context.Context, *api.ListTournamentRecordsRequest) (*api.TournamentRecordList, error) // List tournament records for a given owner. ListTournamentRecordsAroundOwner(context.Context, *api.ListTournamentRecordsAroundOwnerRequest) (*api.TournamentRecordList, error) // List groups the current user belongs to. ListUserGroups(context.Context, *api.ListUserGroupsRequest) (*api.UserGroupList, error) // Promote a set of users in a group to the next role up. PromoteGroupUsers(context.Context, *api.PromoteGroupUsersRequest) (*emptypb.Empty, error) // Demote a set of users in a group to the next role down. DemoteGroupUsers(context.Context, *api.DemoteGroupUsersRequest) (*emptypb.Empty, error) // Get storage objects. ReadStorageObjects(context.Context, *api.ReadStorageObjectsRequest) (*api.StorageObjects, error) // Execute a Lua function on the server. RpcFunc(context.Context, *api.Rpc) (*api.Rpc, error) // Remove the Apple ID from the social profiles on the current user's account. UnlinkApple(context.Context, *api.AccountApple) (*emptypb.Empty, error) // Remove the custom ID from the social profiles on the current user's account. UnlinkCustom(context.Context, *api.AccountCustom) (*emptypb.Empty, error) // Remove the device ID from the social profiles on the current user's account. UnlinkDevice(context.Context, *api.AccountDevice) (*emptypb.Empty, error) // Remove the email+password from the social profiles on the current user's account. UnlinkEmail(context.Context, *api.AccountEmail) (*emptypb.Empty, error) // Remove Facebook from the social profiles on the current user's account. UnlinkFacebook(context.Context, *api.AccountFacebook) (*emptypb.Empty, error) // Remove Facebook Instant Game profile from the social profiles on the current user's account. UnlinkFacebookInstantGame(context.Context, *api.AccountFacebookInstantGame) (*emptypb.Empty, error) // Remove Apple's GameCenter from the social profiles on the current user's account. UnlinkGameCenter(context.Context, *api.AccountGameCenter) (*emptypb.Empty, error) // Remove Google from the social profiles on the current user's account. UnlinkGoogle(context.Context, *api.AccountGoogle) (*emptypb.Empty, error) // Remove Steam from the social profiles on the current user's account. UnlinkSteam(context.Context, *api.AccountSteam) (*emptypb.Empty, error) // Update fields in the current user's account. UpdateAccount(context.Context, *api.UpdateAccountRequest) (*emptypb.Empty, error) // Update fields in a given group. UpdateGroup(context.Context, *api.UpdateGroupRequest) (*emptypb.Empty, error) // Write a record to a leaderboard. WriteLeaderboardRecord(context.Context, *api.WriteLeaderboardRecordRequest) (*api.LeaderboardRecord, error) // Write objects into the storage engine. WriteStorageObjects(context.Context, *api.WriteStorageObjectsRequest) (*api.StorageObjectAcks, error) // Write a record to a tournament. WriteTournamentRecord(context.Context, *api.WriteTournamentRecordRequest) (*api.LeaderboardRecord, error) // contains filtered or unexported methods }
NakamaServer is the server API for Nakama service. All implementations must embed UnimplementedNakamaServer for forward compatibility
type UnimplementedNakamaServer ¶
type UnimplementedNakamaServer struct { }
UnimplementedNakamaServer must be embedded to have forward compatible implementations.
func (UnimplementedNakamaServer) AddFriends ¶
func (UnimplementedNakamaServer) AddFriends(context.Context, *api.AddFriendsRequest) (*emptypb.Empty, error)
func (UnimplementedNakamaServer) AddGroupUsers ¶
func (UnimplementedNakamaServer) AddGroupUsers(context.Context, *api.AddGroupUsersRequest) (*emptypb.Empty, error)
func (UnimplementedNakamaServer) AuthenticateApple ¶ added in v2.13.0
func (UnimplementedNakamaServer) AuthenticateApple(context.Context, *api.AuthenticateAppleRequest) (*api.Session, error)
func (UnimplementedNakamaServer) AuthenticateCustom ¶
func (UnimplementedNakamaServer) AuthenticateCustom(context.Context, *api.AuthenticateCustomRequest) (*api.Session, error)
func (UnimplementedNakamaServer) AuthenticateDevice ¶
func (UnimplementedNakamaServer) AuthenticateDevice(context.Context, *api.AuthenticateDeviceRequest) (*api.Session, error)
func (UnimplementedNakamaServer) AuthenticateEmail ¶
func (UnimplementedNakamaServer) AuthenticateEmail(context.Context, *api.AuthenticateEmailRequest) (*api.Session, error)
func (UnimplementedNakamaServer) AuthenticateFacebook ¶
func (UnimplementedNakamaServer) AuthenticateFacebook(context.Context, *api.AuthenticateFacebookRequest) (*api.Session, error)
func (UnimplementedNakamaServer) AuthenticateFacebookInstantGame ¶ added in v2.11.0
func (UnimplementedNakamaServer) AuthenticateFacebookInstantGame(context.Context, *api.AuthenticateFacebookInstantGameRequest) (*api.Session, error)
func (UnimplementedNakamaServer) AuthenticateGameCenter ¶
func (UnimplementedNakamaServer) AuthenticateGameCenter(context.Context, *api.AuthenticateGameCenterRequest) (*api.Session, error)
func (UnimplementedNakamaServer) AuthenticateGoogle ¶
func (UnimplementedNakamaServer) AuthenticateGoogle(context.Context, *api.AuthenticateGoogleRequest) (*api.Session, error)
func (UnimplementedNakamaServer) AuthenticateSteam ¶
func (UnimplementedNakamaServer) AuthenticateSteam(context.Context, *api.AuthenticateSteamRequest) (*api.Session, error)
func (UnimplementedNakamaServer) BanGroupUsers ¶ added in v2.9.0
func (UnimplementedNakamaServer) BanGroupUsers(context.Context, *api.BanGroupUsersRequest) (*emptypb.Empty, error)
func (UnimplementedNakamaServer) BlockFriends ¶
func (UnimplementedNakamaServer) BlockFriends(context.Context, *api.BlockFriendsRequest) (*emptypb.Empty, error)
func (UnimplementedNakamaServer) CreateGroup ¶
func (UnimplementedNakamaServer) CreateGroup(context.Context, *api.CreateGroupRequest) (*api.Group, error)
func (UnimplementedNakamaServer) DeleteFriends ¶
func (UnimplementedNakamaServer) DeleteFriends(context.Context, *api.DeleteFriendsRequest) (*emptypb.Empty, error)
func (UnimplementedNakamaServer) DeleteGroup ¶
func (UnimplementedNakamaServer) DeleteGroup(context.Context, *api.DeleteGroupRequest) (*emptypb.Empty, error)
func (UnimplementedNakamaServer) DeleteLeaderboardRecord ¶
func (UnimplementedNakamaServer) DeleteLeaderboardRecord(context.Context, *api.DeleteLeaderboardRecordRequest) (*emptypb.Empty, error)
func (UnimplementedNakamaServer) DeleteNotifications ¶
func (UnimplementedNakamaServer) DeleteNotifications(context.Context, *api.DeleteNotificationsRequest) (*emptypb.Empty, error)
func (UnimplementedNakamaServer) DeleteStorageObjects ¶
func (UnimplementedNakamaServer) DeleteStorageObjects(context.Context, *api.DeleteStorageObjectsRequest) (*emptypb.Empty, error)
func (UnimplementedNakamaServer) DemoteGroupUsers ¶ added in v2.13.0
func (UnimplementedNakamaServer) DemoteGroupUsers(context.Context, *api.DemoteGroupUsersRequest) (*emptypb.Empty, error)
func (UnimplementedNakamaServer) GetAccount ¶
func (UnimplementedNakamaServer) GetUsers ¶
func (UnimplementedNakamaServer) GetUsers(context.Context, *api.GetUsersRequest) (*api.Users, error)
func (UnimplementedNakamaServer) Healthcheck ¶
func (UnimplementedNakamaServer) ImportFacebookFriends ¶
func (UnimplementedNakamaServer) ImportFacebookFriends(context.Context, *api.ImportFacebookFriendsRequest) (*emptypb.Empty, error)
func (UnimplementedNakamaServer) JoinGroup ¶
func (UnimplementedNakamaServer) JoinGroup(context.Context, *api.JoinGroupRequest) (*emptypb.Empty, error)
func (UnimplementedNakamaServer) JoinTournament ¶
func (UnimplementedNakamaServer) JoinTournament(context.Context, *api.JoinTournamentRequest) (*emptypb.Empty, error)
func (UnimplementedNakamaServer) KickGroupUsers ¶
func (UnimplementedNakamaServer) KickGroupUsers(context.Context, *api.KickGroupUsersRequest) (*emptypb.Empty, error)
func (UnimplementedNakamaServer) LeaveGroup ¶
func (UnimplementedNakamaServer) LeaveGroup(context.Context, *api.LeaveGroupRequest) (*emptypb.Empty, error)
func (UnimplementedNakamaServer) LinkApple ¶ added in v2.13.0
func (UnimplementedNakamaServer) LinkApple(context.Context, *api.AccountApple) (*emptypb.Empty, error)
func (UnimplementedNakamaServer) LinkCustom ¶
func (UnimplementedNakamaServer) LinkCustom(context.Context, *api.AccountCustom) (*emptypb.Empty, error)
func (UnimplementedNakamaServer) LinkDevice ¶
func (UnimplementedNakamaServer) LinkDevice(context.Context, *api.AccountDevice) (*emptypb.Empty, error)
func (UnimplementedNakamaServer) LinkEmail ¶
func (UnimplementedNakamaServer) LinkEmail(context.Context, *api.AccountEmail) (*emptypb.Empty, error)
func (UnimplementedNakamaServer) LinkFacebook ¶
func (UnimplementedNakamaServer) LinkFacebook(context.Context, *api.LinkFacebookRequest) (*emptypb.Empty, error)
func (UnimplementedNakamaServer) LinkFacebookInstantGame ¶ added in v2.11.0
func (UnimplementedNakamaServer) LinkFacebookInstantGame(context.Context, *api.AccountFacebookInstantGame) (*emptypb.Empty, error)
func (UnimplementedNakamaServer) LinkGameCenter ¶
func (UnimplementedNakamaServer) LinkGameCenter(context.Context, *api.AccountGameCenter) (*emptypb.Empty, error)
func (UnimplementedNakamaServer) LinkGoogle ¶
func (UnimplementedNakamaServer) LinkGoogle(context.Context, *api.AccountGoogle) (*emptypb.Empty, error)
func (UnimplementedNakamaServer) LinkSteam ¶
func (UnimplementedNakamaServer) LinkSteam(context.Context, *api.AccountSteam) (*emptypb.Empty, error)
func (UnimplementedNakamaServer) ListChannelMessages ¶
func (UnimplementedNakamaServer) ListChannelMessages(context.Context, *api.ListChannelMessagesRequest) (*api.ChannelMessageList, error)
func (UnimplementedNakamaServer) ListFriends ¶
func (UnimplementedNakamaServer) ListFriends(context.Context, *api.ListFriendsRequest) (*api.FriendList, error)
func (UnimplementedNakamaServer) ListGroupUsers ¶
func (UnimplementedNakamaServer) ListGroupUsers(context.Context, *api.ListGroupUsersRequest) (*api.GroupUserList, error)
func (UnimplementedNakamaServer) ListGroups ¶
func (UnimplementedNakamaServer) ListGroups(context.Context, *api.ListGroupsRequest) (*api.GroupList, error)
func (UnimplementedNakamaServer) ListLeaderboardRecords ¶
func (UnimplementedNakamaServer) ListLeaderboardRecords(context.Context, *api.ListLeaderboardRecordsRequest) (*api.LeaderboardRecordList, error)
func (UnimplementedNakamaServer) ListLeaderboardRecordsAroundOwner ¶
func (UnimplementedNakamaServer) ListLeaderboardRecordsAroundOwner(context.Context, *api.ListLeaderboardRecordsAroundOwnerRequest) (*api.LeaderboardRecordList, error)
func (UnimplementedNakamaServer) ListMatches ¶
func (UnimplementedNakamaServer) ListMatches(context.Context, *api.ListMatchesRequest) (*api.MatchList, error)
func (UnimplementedNakamaServer) ListNotifications ¶
func (UnimplementedNakamaServer) ListNotifications(context.Context, *api.ListNotificationsRequest) (*api.NotificationList, error)
func (UnimplementedNakamaServer) ListStorageObjects ¶
func (UnimplementedNakamaServer) ListStorageObjects(context.Context, *api.ListStorageObjectsRequest) (*api.StorageObjectList, error)
func (UnimplementedNakamaServer) ListTournamentRecords ¶
func (UnimplementedNakamaServer) ListTournamentRecords(context.Context, *api.ListTournamentRecordsRequest) (*api.TournamentRecordList, error)
func (UnimplementedNakamaServer) ListTournamentRecordsAroundOwner ¶
func (UnimplementedNakamaServer) ListTournamentRecordsAroundOwner(context.Context, *api.ListTournamentRecordsAroundOwnerRequest) (*api.TournamentRecordList, error)
func (UnimplementedNakamaServer) ListTournaments ¶
func (UnimplementedNakamaServer) ListTournaments(context.Context, *api.ListTournamentsRequest) (*api.TournamentList, error)
func (UnimplementedNakamaServer) ListUserGroups ¶
func (UnimplementedNakamaServer) ListUserGroups(context.Context, *api.ListUserGroupsRequest) (*api.UserGroupList, error)
func (UnimplementedNakamaServer) PromoteGroupUsers ¶
func (UnimplementedNakamaServer) PromoteGroupUsers(context.Context, *api.PromoteGroupUsersRequest) (*emptypb.Empty, error)
func (UnimplementedNakamaServer) ReadStorageObjects ¶
func (UnimplementedNakamaServer) ReadStorageObjects(context.Context, *api.ReadStorageObjectsRequest) (*api.StorageObjects, error)
func (UnimplementedNakamaServer) UnlinkApple ¶ added in v2.13.0
func (UnimplementedNakamaServer) UnlinkApple(context.Context, *api.AccountApple) (*emptypb.Empty, error)
func (UnimplementedNakamaServer) UnlinkCustom ¶
func (UnimplementedNakamaServer) UnlinkCustom(context.Context, *api.AccountCustom) (*emptypb.Empty, error)
func (UnimplementedNakamaServer) UnlinkDevice ¶
func (UnimplementedNakamaServer) UnlinkDevice(context.Context, *api.AccountDevice) (*emptypb.Empty, error)
func (UnimplementedNakamaServer) UnlinkEmail ¶
func (UnimplementedNakamaServer) UnlinkEmail(context.Context, *api.AccountEmail) (*emptypb.Empty, error)
func (UnimplementedNakamaServer) UnlinkFacebook ¶
func (UnimplementedNakamaServer) UnlinkFacebook(context.Context, *api.AccountFacebook) (*emptypb.Empty, error)
func (UnimplementedNakamaServer) UnlinkFacebookInstantGame ¶ added in v2.11.0
func (UnimplementedNakamaServer) UnlinkFacebookInstantGame(context.Context, *api.AccountFacebookInstantGame) (*emptypb.Empty, error)
func (UnimplementedNakamaServer) UnlinkGameCenter ¶
func (UnimplementedNakamaServer) UnlinkGameCenter(context.Context, *api.AccountGameCenter) (*emptypb.Empty, error)
func (UnimplementedNakamaServer) UnlinkGoogle ¶
func (UnimplementedNakamaServer) UnlinkGoogle(context.Context, *api.AccountGoogle) (*emptypb.Empty, error)
func (UnimplementedNakamaServer) UnlinkSteam ¶
func (UnimplementedNakamaServer) UnlinkSteam(context.Context, *api.AccountSteam) (*emptypb.Empty, error)
func (UnimplementedNakamaServer) UpdateAccount ¶
func (UnimplementedNakamaServer) UpdateAccount(context.Context, *api.UpdateAccountRequest) (*emptypb.Empty, error)
func (UnimplementedNakamaServer) UpdateGroup ¶
func (UnimplementedNakamaServer) UpdateGroup(context.Context, *api.UpdateGroupRequest) (*emptypb.Empty, error)
func (UnimplementedNakamaServer) WriteLeaderboardRecord ¶
func (UnimplementedNakamaServer) WriteLeaderboardRecord(context.Context, *api.WriteLeaderboardRecordRequest) (*api.LeaderboardRecord, error)
func (UnimplementedNakamaServer) WriteStorageObjects ¶
func (UnimplementedNakamaServer) WriteStorageObjects(context.Context, *api.WriteStorageObjectsRequest) (*api.StorageObjectAcks, error)
func (UnimplementedNakamaServer) WriteTournamentRecord ¶
func (UnimplementedNakamaServer) WriteTournamentRecord(context.Context, *api.WriteTournamentRecordRequest) (*api.LeaderboardRecord, error)
type UnsafeNakamaServer ¶ added in v2.14.1
type UnsafeNakamaServer interface {
// contains filtered or unexported methods
}
UnsafeNakamaServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to NakamaServer will result in compilation errors.