nakama

package module
v0.8.7 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 26 Imported by: 3

README

About

A Go web and realtime client package for the Nakama game server. Works with WASM builds.

Tests Go Report Card Reference Releases

Using

go get github.com/ascii8/nakama-go

Quickstart

package nakama_test

import (
	"context"
	"fmt"
	"log"

	"github.com/ascii8/nakama-go"
)

func Example() {
	const id = "6d0c9e83-8385-48a8-8601-060b8f6a3bf6"
	ctx, cancel := context.WithCancel(context.Background())
	defer cancel()
	// create client
	cl := nakama.New(nakama.WithServerKey("apitest_server"))
	// authenticate
	if err := cl.AuthenticateDevice(ctx, id, true, ""); err != nil {
		log.Fatal(err)
	}
	// retrieve account
	account, err := cl.Account(ctx)
	if err != nil {
		log.Fatal(err)
	}
	// list devices on the account
	for _, d := range account.Devices {
		fmt.Println("id:", d.Id)
	}
	// Output:
	// id: 6d0c9e83-8385-48a8-8601-060b8f6a3bf6
}

Examples

See github.com/ascii8/xoxo-go for a demonstration of end-to-end unit tests using nktest, and "real world" examples of pure Go clients (e.g., Ebitengine) built using this client package.

See the Go package documentation for other examples.

Notes

Run browser tests:

# setup wasmbrowsertest
$ go install github.com/agnivade/wasmbrowsertest@latest
$ cd $GOPATH/bin && ln -s wasmbrowsertest go_js_wasm_exec

# run the wasmtests
$ cd /path/to/nakama-go/wasmtest
$ GOOS=js GOARCH=wasm go test -v
  • github.com/ascii8/nktest - a Nakama test runner
  • github.com/ascii8/xoxo-go - a pure Go version of Nakama's XOXO example, demonstrating end-to-end unit tests, and providing multiple example clients using this package. Has example Ebitengine client

Documentation

Overview

Package nakama is a nakama http and realtime websocket client.

Example
const id = "6d0c9e83-8385-48a8-8601-060b8f6a3bf6"
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
// create client
cl := nakama.New(nakama.WithServerKey("nakama-go_server"))
// authenticate
if err := cl.AuthenticateDevice(ctx, id, true, ""); err != nil {
	log.Fatal(err)
}
// retrieve account
account, err := cl.Account(ctx)
if err != nil {
	log.Fatal(err)
}
// list devices on the account
for _, d := range account.Devices {
	fmt.Println("id:", d.Id)
}
Output:

id: 6d0c9e83-8385-48a8-8601-060b8f6a3bf6

Index

Examples

Constants

This section is empty.

Variables

View Source
var (
	FriendState_name = map[int32]string{
		0: "FRIEND",
		1: "INVITE_SENT",
		2: "INVITE_RECEIVED",
		3: "BLOCKED",
	}
	FriendState_value = map[string]int32{
		"FRIEND":          0,
		"INVITE_SENT":     1,
		"INVITE_RECEIVED": 2,
		"BLOCKED":         3,
	}
)

Enum value maps for FriendState.

View Source
var (
	UserRoleState_name = map[int32]string{
		0: "SUPERADMIN",
		1: "ADMIN",
		2: "MEMBER",
		3: "JOIN_REQUEST",
	}
	UserRoleState_value = map[string]int32{
		"SUPERADMIN":   0,
		"ADMIN":        1,
		"MEMBER":       2,
		"JOIN_REQUEST": 3,
	}
)

Enum value maps for UserRoleState.

View Source
var (
	StoreProvider_name = map[int32]string{
		0: "APPLE_APP_STORE",
		1: "GOOGLE_PLAY_STORE",
		2: "HUAWEI_APP_GALLERY",
	}
	StoreProvider_value = map[string]int32{
		"APPLE_APP_STORE":    0,
		"GOOGLE_PLAY_STORE":  1,
		"HUAWEI_APP_GALLERY": 2,
	}
)

Enum value maps for StoreProvider.

View Source
var (
	StoreEnvironment_name = map[int32]string{
		0: "UNKNOWN",
		1: "SANDBOX",
		2: "PRODUCTION",
	}
	StoreEnvironment_value = map[string]int32{
		"UNKNOWN":    0,
		"SANDBOX":    1,
		"PRODUCTION": 2,
	}
)

Enum value maps for StoreEnvironment.

View Source
var (
	OpType_name = map[int32]string{
		0: "NO_OVERRIDE",
		1: "BEST",
		2: "SET",
		3: "INCREMENT",
		4: "DECREMENT",
	}
	OpType_value = map[string]int32{
		"NO_OVERRIDE": 0,
		"BEST":        1,
		"SET":         2,
		"INCREMENT":   3,
		"DECREMENT":   4,
	}
)

Enum value maps for OpType.

View Source
var (
	ChannelType_name = map[int32]string{
		0: "TYPE_UNSPECIFIED",
		1: "ROOM",
		2: "DIRECT_MESSAGE",
		3: "GROUP",
	}
	ChannelType_value = map[string]int32{
		"TYPE_UNSPECIFIED": 0,
		"ROOM":             1,
		"DIRECT_MESSAGE":   2,
		"GROUP":            3,
	}
)

Enum value maps for ChannelType.

View Source
var (
	ErrorCode_name = map[int32]string{
		0: "RUNTIME_EXCEPTION",
		1: "UNRECOGNIZED_PAYLOAD",
		2: "MISSING_PAYLOAD",
		3: "BAD_INPUT",
		4: "MATCH_NOT_FOUND",
		5: "MATCH_JOIN_REJECTED",
		6: "RUNTIME_FUNCTION_NOT_FOUND",
		7: "RUNTIME_FUNCTION_EXCEPTION",
	}
	ErrorCode_value = map[string]int32{
		"RUNTIME_EXCEPTION":          0,
		"UNRECOGNIZED_PAYLOAD":       1,
		"MISSING_PAYLOAD":            2,
		"BAD_INPUT":                  3,
		"MATCH_NOT_FOUND":            4,
		"MATCH_JOIN_REJECTED":        5,
		"RUNTIME_FUNCTION_NOT_FOUND": 6,
		"RUNTIME_FUNCTION_EXCEPTION": 7,
	}
)

Enum value maps for ErrorCode.

View Source
var DefaultWsPath = "/ws"

DefaultWsPath is the default websocket path.

View Source
var File_nakama_proto protoreflect.FileDescriptor
View Source
var File_nkrealtime_proto protoreflect.FileDescriptor
View Source
var File_proto_proto protoreflect.FileDescriptor

Functions

func NewClientError added in v0.5.0

func NewClientError(statusCode int, code Code, message string) error

NewClientError creates a client error.

func NewClientErrorFromReader

func NewClientErrorFromReader(statusCode int, r io.Reader) error

NewClientErrorFromReader reads a client error from a reader.

func ParseTokenExpiry

func ParseTokenExpiry(tokenstr, typ string, grace time.Duration) (time.Time, time.Time, error)

ParseTokenExpiry parse the exp field on a jwt token.

Types

type AccountApple

type AccountApple struct {

	// The ID token received from Apple to validate.
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// Extra information that will be bundled in the session token.
	Vars map[string]string `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

Send a Apple Sign In token to the server. Used with authenticate/link/unlink.

func (*AccountApple) Descriptor deprecated

func (*AccountApple) Descriptor() ([]byte, []int)

Deprecated: Use AccountApple.ProtoReflect.Descriptor instead.

func (*AccountApple) GetToken

func (x *AccountApple) GetToken() string

func (*AccountApple) GetVars

func (x *AccountApple) GetVars() map[string]string

func (*AccountApple) ProtoMessage

func (*AccountApple) ProtoMessage()

func (*AccountApple) ProtoReflect

func (x *AccountApple) ProtoReflect() protoreflect.Message

func (*AccountApple) Reset

func (x *AccountApple) Reset()

func (*AccountApple) String

func (x *AccountApple) String() string

type AccountCustom

type AccountCustom struct {

	// A custom identifier.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Extra information that will be bundled in the session token.
	Vars map[string]string `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

Send a custom ID to the server. Used with authenticate/link/unlink.

func (*AccountCustom) Descriptor deprecated

func (*AccountCustom) Descriptor() ([]byte, []int)

Deprecated: Use AccountCustom.ProtoReflect.Descriptor instead.

func (*AccountCustom) GetId

func (x *AccountCustom) GetId() string

func (*AccountCustom) GetVars

func (x *AccountCustom) GetVars() map[string]string

func (*AccountCustom) ProtoMessage

func (*AccountCustom) ProtoMessage()

func (*AccountCustom) ProtoReflect

func (x *AccountCustom) ProtoReflect() protoreflect.Message

func (*AccountCustom) Reset

func (x *AccountCustom) Reset()

func (*AccountCustom) String

func (x *AccountCustom) String() string

type AccountDevice

type AccountDevice struct {

	// A device identifier. Should be obtained by a platform-specific device API.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Extra information that will be bundled in the session token.
	Vars map[string]string `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

Send a device to the server. Used with authenticate/link/unlink and user.

func (*AccountDevice) Descriptor deprecated

func (*AccountDevice) Descriptor() ([]byte, []int)

Deprecated: Use AccountDevice.ProtoReflect.Descriptor instead.

func (*AccountDevice) GetId

func (x *AccountDevice) GetId() string

func (*AccountDevice) GetVars

func (x *AccountDevice) GetVars() map[string]string

func (*AccountDevice) ProtoMessage

func (*AccountDevice) ProtoMessage()

func (*AccountDevice) ProtoReflect

func (x *AccountDevice) ProtoReflect() protoreflect.Message

func (*AccountDevice) Reset

func (x *AccountDevice) Reset()

func (*AccountDevice) String

func (x *AccountDevice) String() string

type AccountEmail

type AccountEmail struct {

	// A valid RFC-5322 email address.
	Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	// A password for the user account.
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // Ignored with unlink operations.
	// Extra information that will be bundled in the session token.
	Vars map[string]string `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

Send an email with password to the server. Used with authenticate/link/unlink.

func (*AccountEmail) Descriptor deprecated

func (*AccountEmail) Descriptor() ([]byte, []int)

Deprecated: Use AccountEmail.ProtoReflect.Descriptor instead.

func (*AccountEmail) GetEmail

func (x *AccountEmail) GetEmail() string

func (*AccountEmail) GetPassword

func (x *AccountEmail) GetPassword() string

func (*AccountEmail) GetVars

func (x *AccountEmail) GetVars() map[string]string

func (*AccountEmail) ProtoMessage

func (*AccountEmail) ProtoMessage()

func (*AccountEmail) ProtoReflect

func (x *AccountEmail) ProtoReflect() protoreflect.Message

func (*AccountEmail) Reset

func (x *AccountEmail) Reset()

func (*AccountEmail) String

func (x *AccountEmail) String() string

type AccountFacebook

type AccountFacebook struct {

	// The OAuth token received from Facebook to access their profile API.
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// Extra information that will be bundled in the session token.
	Vars map[string]string `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

Send a Facebook token to the server. Used with authenticate/link/unlink.

func (*AccountFacebook) Descriptor deprecated

func (*AccountFacebook) Descriptor() ([]byte, []int)

Deprecated: Use AccountFacebook.ProtoReflect.Descriptor instead.

func (*AccountFacebook) GetToken

func (x *AccountFacebook) GetToken() string

func (*AccountFacebook) GetVars

func (x *AccountFacebook) GetVars() map[string]string

func (*AccountFacebook) ProtoMessage

func (*AccountFacebook) ProtoMessage()

func (*AccountFacebook) ProtoReflect

func (x *AccountFacebook) ProtoReflect() protoreflect.Message

func (*AccountFacebook) Reset

func (x *AccountFacebook) Reset()

func (*AccountFacebook) String

func (x *AccountFacebook) String() string

type AccountFacebookInstantGame

type AccountFacebookInstantGame struct {

	// The OAuth token received from a Facebook Instant Game that may be decoded with the Application Secret (must be available with the nakama configuration)
	SignedPlayerInfo string `protobuf:"bytes,1,opt,name=signed_player_info,json=signedPlayerInfo,proto3" json:"signed_player_info,omitempty"`
	// Extra information that will be bundled in the session token.
	Vars map[string]string `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

Send a Facebook Instant Game token to the server. Used with authenticate/link/unlink.

func (*AccountFacebookInstantGame) Descriptor deprecated

func (*AccountFacebookInstantGame) Descriptor() ([]byte, []int)

Deprecated: Use AccountFacebookInstantGame.ProtoReflect.Descriptor instead.

func (*AccountFacebookInstantGame) GetSignedPlayerInfo

func (x *AccountFacebookInstantGame) GetSignedPlayerInfo() string

func (*AccountFacebookInstantGame) GetVars

func (x *AccountFacebookInstantGame) GetVars() map[string]string

func (*AccountFacebookInstantGame) ProtoMessage

func (*AccountFacebookInstantGame) ProtoMessage()

func (*AccountFacebookInstantGame) ProtoReflect

func (*AccountFacebookInstantGame) Reset

func (x *AccountFacebookInstantGame) Reset()

func (*AccountFacebookInstantGame) String

func (x *AccountFacebookInstantGame) String() string

type AccountGameCenter

type AccountGameCenter struct {

	// Player ID (generated by GameCenter).
	PlayerId string `protobuf:"bytes,1,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"`
	// Bundle ID (generated by GameCenter).
	BundleId string `protobuf:"bytes,2,opt,name=bundle_id,json=bundleId,proto3" json:"bundle_id,omitempty"`
	// Time since UNIX epoch when the signature was created.
	TimestampSeconds int64 `protobuf:"varint,3,opt,name=timestamp_seconds,json=timestampSeconds,proto3" json:"timestamp_seconds,omitempty"`
	// A random "NSString" used to compute the hash and keep it randomized.
	Salt string `protobuf:"bytes,4,opt,name=salt,proto3" json:"salt,omitempty"`
	// The verification signature data generated.
	Signature string `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"`
	// The URL for the public encryption key.
	PublicKeyUrl string `protobuf:"bytes,6,opt,name=public_key_url,json=publicKeyUrl,proto3" json:"public_key_url,omitempty"`
	// Extra information that will be bundled in the session token.
	Vars map[string]string `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

Send Apple's Game Center account credentials to the server. Used with authenticate/link/unlink.

func (*AccountGameCenter) Descriptor deprecated

func (*AccountGameCenter) Descriptor() ([]byte, []int)

Deprecated: Use AccountGameCenter.ProtoReflect.Descriptor instead.

func (*AccountGameCenter) GetBundleId

func (x *AccountGameCenter) GetBundleId() string

func (*AccountGameCenter) GetPlayerId

func (x *AccountGameCenter) GetPlayerId() string

func (*AccountGameCenter) GetPublicKeyUrl

func (x *AccountGameCenter) GetPublicKeyUrl() string

func (*AccountGameCenter) GetSalt

func (x *AccountGameCenter) GetSalt() string

func (*AccountGameCenter) GetSignature

func (x *AccountGameCenter) GetSignature() string

func (*AccountGameCenter) GetTimestampSeconds

func (x *AccountGameCenter) GetTimestampSeconds() int64

func (*AccountGameCenter) GetVars

func (x *AccountGameCenter) GetVars() map[string]string

func (*AccountGameCenter) ProtoMessage

func (*AccountGameCenter) ProtoMessage()

func (*AccountGameCenter) ProtoReflect

func (x *AccountGameCenter) ProtoReflect() protoreflect.Message

func (*AccountGameCenter) Reset

func (x *AccountGameCenter) Reset()

func (*AccountGameCenter) String

func (x *AccountGameCenter) String() string

type AccountGoogle

type AccountGoogle struct {

	// The OAuth token received from Google to access their profile API.
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// Extra information that will be bundled in the session token.
	Vars map[string]string `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

Send a Google token to the server. Used with authenticate/link/unlink.

func (*AccountGoogle) Descriptor deprecated

func (*AccountGoogle) Descriptor() ([]byte, []int)

Deprecated: Use AccountGoogle.ProtoReflect.Descriptor instead.

func (*AccountGoogle) GetToken

func (x *AccountGoogle) GetToken() string

func (*AccountGoogle) GetVars

func (x *AccountGoogle) GetVars() map[string]string

func (*AccountGoogle) ProtoMessage

func (*AccountGoogle) ProtoMessage()

func (*AccountGoogle) ProtoReflect

func (x *AccountGoogle) ProtoReflect() protoreflect.Message

func (*AccountGoogle) Reset

func (x *AccountGoogle) Reset()

func (*AccountGoogle) String

func (x *AccountGoogle) String() string

type AccountRefresh

type AccountRefresh struct {

	// Refresh token.
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// Extra information that will be bundled in the session token.
	Vars map[string]string `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

Obtain a new authentication token using a refresh token.

func (*AccountRefresh) Descriptor deprecated

func (*AccountRefresh) Descriptor() ([]byte, []int)

Deprecated: Use AccountRefresh.ProtoReflect.Descriptor instead.

func (*AccountRefresh) GetToken

func (x *AccountRefresh) GetToken() string

func (*AccountRefresh) GetVars

func (x *AccountRefresh) GetVars() map[string]string

func (*AccountRefresh) ProtoMessage

func (*AccountRefresh) ProtoMessage()

func (*AccountRefresh) ProtoReflect

func (x *AccountRefresh) ProtoReflect() protoreflect.Message

func (*AccountRefresh) Reset

func (x *AccountRefresh) Reset()

func (*AccountRefresh) String

func (x *AccountRefresh) String() string

type AccountRequest

type AccountRequest struct {
	// contains filtered or unexported fields
}

Account request.

func Account

func Account() *AccountRequest

Account creates a request to retrieve the user's account.

func (*AccountRequest) Async

func (req *AccountRequest) Async(ctx context.Context, cl *Client, f func(*AccountResponse, error))

Async executes the request against the context and client.

func (*AccountRequest) Descriptor deprecated

func (*AccountRequest) Descriptor() ([]byte, []int)

Deprecated: Use AccountRequest.ProtoReflect.Descriptor instead.

func (*AccountRequest) Do

func (req *AccountRequest) Do(ctx context.Context, cl *Client) (*AccountResponse, error)

Do executes the request against the context and client.

func (*AccountRequest) ProtoMessage

func (*AccountRequest) ProtoMessage()

func (*AccountRequest) ProtoReflect

func (x *AccountRequest) ProtoReflect() protoreflect.Message

func (*AccountRequest) Reset

func (x *AccountRequest) Reset()

func (*AccountRequest) String

func (x *AccountRequest) String() string

type AccountResponse

type AccountResponse struct {

	// The user object.
	User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// The user's wallet data.
	Wallet string `protobuf:"bytes,2,opt,name=wallet,proto3" json:"wallet,omitempty"`
	// The email address of the user.
	Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	// The devices which belong to the user's account.
	Devices []*AccountDevice `protobuf:"bytes,4,rep,name=devices,proto3" json:"devices,omitempty"`
	// The custom id in the user's account.
	CustomId string `protobuf:"bytes,5,opt,name=custom_id,json=customId,proto3" json:"custom_id,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's email was verified.
	VerifyTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=verify_time,json=verifyTime,proto3" json:"verify_time,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's account was disabled/banned.
	DisableTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=disable_time,json=disableTime,proto3" json:"disable_time,omitempty"`
	// contains filtered or unexported fields
}

A user with additional account details. Always the current user.

func (*AccountResponse) Descriptor deprecated

func (*AccountResponse) Descriptor() ([]byte, []int)

Deprecated: Use AccountResponse.ProtoReflect.Descriptor instead.

func (*AccountResponse) GetCustomId

func (x *AccountResponse) GetCustomId() string

func (*AccountResponse) GetDevices

func (x *AccountResponse) GetDevices() []*AccountDevice

func (*AccountResponse) GetDisableTime

func (x *AccountResponse) GetDisableTime() *timestamppb.Timestamp

func (*AccountResponse) GetEmail

func (x *AccountResponse) GetEmail() string

func (*AccountResponse) GetUser

func (x *AccountResponse) GetUser() *User

func (*AccountResponse) GetVerifyTime

func (x *AccountResponse) GetVerifyTime() *timestamppb.Timestamp

func (*AccountResponse) GetWallet

func (x *AccountResponse) GetWallet() string

func (*AccountResponse) ProtoMessage

func (*AccountResponse) ProtoMessage()

func (*AccountResponse) ProtoReflect

func (x *AccountResponse) ProtoReflect() protoreflect.Message

func (*AccountResponse) Reset

func (x *AccountResponse) Reset()

func (*AccountResponse) String

func (x *AccountResponse) String() string

type AccountSteam

type AccountSteam struct {

	// The account token received from Steam to access their profile API.
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// Extra information that will be bundled in the session token.
	Vars map[string]string `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

Send a Steam token to the server. Used with authenticate/link/unlink.

func (*AccountSteam) Descriptor deprecated

func (*AccountSteam) Descriptor() ([]byte, []int)

Deprecated: Use AccountSteam.ProtoReflect.Descriptor instead.

func (*AccountSteam) GetToken

func (x *AccountSteam) GetToken() string

func (*AccountSteam) GetVars

func (x *AccountSteam) GetVars() map[string]string

func (*AccountSteam) ProtoMessage

func (*AccountSteam) ProtoMessage()

func (*AccountSteam) ProtoReflect

func (x *AccountSteam) ProtoReflect() protoreflect.Message

func (*AccountSteam) Reset

func (x *AccountSteam) Reset()

func (*AccountSteam) String

func (x *AccountSteam) String() string

type AddFriendsRequest

type AddFriendsRequest struct {

	// The account id of a user.
	Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
	// The account username of a user.
	Usernames []string `protobuf:"bytes,2,rep,name=usernames,proto3" json:"usernames,omitempty"`
	// contains filtered or unexported fields
}

Add one or more friends to the current user.

func AddFriends

func AddFriends(ids ...string) *AddFriendsRequest

AddFriends creates a new request to add friends by ID or username.

func (*AddFriendsRequest) Async

func (req *AddFriendsRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*AddFriendsRequest) Descriptor deprecated

func (*AddFriendsRequest) Descriptor() ([]byte, []int)

Deprecated: Use AddFriendsRequest.ProtoReflect.Descriptor instead.

func (*AddFriendsRequest) Do

func (req *AddFriendsRequest) Do(ctx context.Context, cl *Client) error

Do executes the request against the context and client.

func (*AddFriendsRequest) GetIds

func (x *AddFriendsRequest) GetIds() []string

func (*AddFriendsRequest) GetUsernames

func (x *AddFriendsRequest) GetUsernames() []string

func (*AddFriendsRequest) ProtoMessage

func (*AddFriendsRequest) ProtoMessage()

func (*AddFriendsRequest) ProtoReflect

func (x *AddFriendsRequest) ProtoReflect() protoreflect.Message

func (*AddFriendsRequest) Reset

func (x *AddFriendsRequest) Reset()

func (*AddFriendsRequest) String

func (x *AddFriendsRequest) String() string

func (*AddFriendsRequest) WithUsernames

func (req *AddFriendsRequest) WithUsernames(usernames ...string) *AddFriendsRequest

WithUsernames sets the Usernames on the request.

type AddGroupUsersRequest

type AddGroupUsersRequest struct {

	// The group to add users to.
	GroupId string `protobuf:"bytes,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
	// The users to add.
	UserIds []string `protobuf:"bytes,2,rep,name=user_ids,json=userIds,proto3" json:"user_ids,omitempty"`
	// contains filtered or unexported fields
}

Add users to a group.

func AddGroupUsers

func AddGroupUsers(groupId string, userIds ...string) *AddGroupUsersRequest

AddGroupUsers creates a new request to add users to a group or accepts their join request.

func (*AddGroupUsersRequest) Async

func (req *AddGroupUsersRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*AddGroupUsersRequest) Descriptor deprecated

func (*AddGroupUsersRequest) Descriptor() ([]byte, []int)

Deprecated: Use AddGroupUsersRequest.ProtoReflect.Descriptor instead.

func (*AddGroupUsersRequest) Do

func (req *AddGroupUsersRequest) Do(ctx context.Context, cl *Client) error

Do executes the request against the context and client.

func (*AddGroupUsersRequest) GetGroupId

func (x *AddGroupUsersRequest) GetGroupId() string

func (*AddGroupUsersRequest) GetUserIds

func (x *AddGroupUsersRequest) GetUserIds() []string

func (*AddGroupUsersRequest) ProtoMessage

func (*AddGroupUsersRequest) ProtoMessage()

func (*AddGroupUsersRequest) ProtoReflect

func (x *AddGroupUsersRequest) ProtoReflect() protoreflect.Message

func (*AddGroupUsersRequest) Reset

func (x *AddGroupUsersRequest) Reset()

func (*AddGroupUsersRequest) String

func (x *AddGroupUsersRequest) String() string

type AuthHandler added in v0.5.0

type AuthHandler interface{}

AuthHandler is an empty interface that provides a clean, extensible way to register a type as a handler that is future-proofed. As used by WithAuthHandler, a type that supports the any of the following smuggled interfaces:

AuthHandler(context.Context, *nakama.Client) error

Will have its method added to Client as its respective <MessageType>Handler.

For an overview of Go interface smuggling as a concept, see:

https://utcc.utoronto.ca/~cks/space/blog/programming/GoInterfaceSmuggling

type AuthenticateAppleRequest

type AuthenticateAppleRequest struct {

	// The Apple account details.
	Account *AccountApple `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	// Register the account if the user does not already exist.
	Create *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=create,proto3" json:"create,omitempty"`
	// Set the username on the account at register. Must be unique.
	Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"`
	// contains filtered or unexported fields
}

Authenticate against the server with Apple Sign In.

func AuthenticateApple

func AuthenticateApple(token string) *AuthenticateAppleRequest

AuthenticateApple creates a request to authenticate a user with an Apple token.

func (*AuthenticateAppleRequest) Async

func (req *AuthenticateAppleRequest) Async(ctx context.Context, cl *Client, f func(*SessionResponse, error))

Async executes the request against the context and client.

func (*AuthenticateAppleRequest) Descriptor deprecated

func (*AuthenticateAppleRequest) Descriptor() ([]byte, []int)

Deprecated: Use AuthenticateAppleRequest.ProtoReflect.Descriptor instead.

func (*AuthenticateAppleRequest) Do

Do executes the request against the context and client.

func (*AuthenticateAppleRequest) GetAccount

func (x *AuthenticateAppleRequest) GetAccount() *AccountApple

func (*AuthenticateAppleRequest) GetCreate

func (*AuthenticateAppleRequest) GetUsername

func (x *AuthenticateAppleRequest) GetUsername() string

func (*AuthenticateAppleRequest) ProtoMessage

func (*AuthenticateAppleRequest) ProtoMessage()

func (*AuthenticateAppleRequest) ProtoReflect

func (x *AuthenticateAppleRequest) ProtoReflect() protoreflect.Message

func (*AuthenticateAppleRequest) Reset

func (x *AuthenticateAppleRequest) Reset()

func (*AuthenticateAppleRequest) String

func (x *AuthenticateAppleRequest) String() string

func (*AuthenticateAppleRequest) WithCreate

func (req *AuthenticateAppleRequest) WithCreate(create bool) *AuthenticateAppleRequest

WithCreate sets the create on the request.

func (*AuthenticateAppleRequest) WithUsername

func (req *AuthenticateAppleRequest) WithUsername(username string) *AuthenticateAppleRequest

WithUsername sets the username on the request.

func (*AuthenticateAppleRequest) WithVars

WithVars sets the vars on the request.

type AuthenticateCustomRequest

type AuthenticateCustomRequest struct {

	// The custom account details.
	Account *AccountCustom `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	// Register the account if the user does not already exist.
	Create *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=create,proto3" json:"create,omitempty"`
	// Set the username on the account at register. Must be unique.
	Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"`
	// contains filtered or unexported fields
}

Authenticate against the server with a custom ID.

func AuthenticateCustom

func AuthenticateCustom(id string) *AuthenticateCustomRequest

AuthenticateCustom creates a request to authenicate a user id against the server.

func (*AuthenticateCustomRequest) Async

func (req *AuthenticateCustomRequest) Async(ctx context.Context, cl *Client, f func(*SessionResponse, error))

Async executes the request against the context and client.

func (*AuthenticateCustomRequest) Descriptor deprecated

func (*AuthenticateCustomRequest) Descriptor() ([]byte, []int)

Deprecated: Use AuthenticateCustomRequest.ProtoReflect.Descriptor instead.

func (*AuthenticateCustomRequest) Do

Do executes the request against the context and client.

func (*AuthenticateCustomRequest) GetAccount

func (x *AuthenticateCustomRequest) GetAccount() *AccountCustom

func (*AuthenticateCustomRequest) GetCreate

func (*AuthenticateCustomRequest) GetUsername

func (x *AuthenticateCustomRequest) GetUsername() string

func (*AuthenticateCustomRequest) ProtoMessage

func (*AuthenticateCustomRequest) ProtoMessage()

func (*AuthenticateCustomRequest) ProtoReflect

func (*AuthenticateCustomRequest) Reset

func (x *AuthenticateCustomRequest) Reset()

func (*AuthenticateCustomRequest) String

func (x *AuthenticateCustomRequest) String() string

func (*AuthenticateCustomRequest) WithCreate

func (req *AuthenticateCustomRequest) WithCreate(create bool) *AuthenticateCustomRequest

WithCreate sets the create on the request.

func (*AuthenticateCustomRequest) WithUsername

func (req *AuthenticateCustomRequest) WithUsername(username string) *AuthenticateCustomRequest

WithUsername sets the username on the request.

func (*AuthenticateCustomRequest) WithVars

WithVars sets the vars on the request.

type AuthenticateDeviceRequest

type AuthenticateDeviceRequest struct {

	// The device account details.
	Account *AccountDevice `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	// Register the account if the user does not already exist.
	Create *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=create,proto3" json:"create,omitempty"`
	// Set the username on the account at register. Must be unique.
	Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"`
	// contains filtered or unexported fields
}

Authenticate against the server with a device ID.

func AuthenticateDevice

func AuthenticateDevice(id string) *AuthenticateDeviceRequest

AuthenticateDevice creates a request to authenticate a user with a device id.

func (*AuthenticateDeviceRequest) Async

func (req *AuthenticateDeviceRequest) Async(ctx context.Context, cl *Client, f func(*SessionResponse, error))

Async executes the request against the context and client.

func (*AuthenticateDeviceRequest) Descriptor deprecated

func (*AuthenticateDeviceRequest) Descriptor() ([]byte, []int)

Deprecated: Use AuthenticateDeviceRequest.ProtoReflect.Descriptor instead.

func (*AuthenticateDeviceRequest) Do

Do executes the request against the context and client.

func (*AuthenticateDeviceRequest) GetAccount

func (x *AuthenticateDeviceRequest) GetAccount() *AccountDevice

func (*AuthenticateDeviceRequest) GetCreate

func (*AuthenticateDeviceRequest) GetUsername

func (x *AuthenticateDeviceRequest) GetUsername() string

func (*AuthenticateDeviceRequest) ProtoMessage

func (*AuthenticateDeviceRequest) ProtoMessage()

func (*AuthenticateDeviceRequest) ProtoReflect

func (*AuthenticateDeviceRequest) Reset

func (x *AuthenticateDeviceRequest) Reset()

func (*AuthenticateDeviceRequest) String

func (x *AuthenticateDeviceRequest) String() string

func (*AuthenticateDeviceRequest) WithCreate

func (req *AuthenticateDeviceRequest) WithCreate(create bool) *AuthenticateDeviceRequest

WithCreate sets the create on the request.

func (*AuthenticateDeviceRequest) WithUsername

func (req *AuthenticateDeviceRequest) WithUsername(username string) *AuthenticateDeviceRequest

WithUsername sets the username on the request.

func (*AuthenticateDeviceRequest) WithVars

WithVars sets the vars on the request.

type AuthenticateEmailRequest

type AuthenticateEmailRequest struct {

	// The email account details.
	Account *AccountEmail `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	// Register the account if the user does not already exist.
	Create *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=create,proto3" json:"create,omitempty"`
	// Set the username on the account at register. Must be unique.
	Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"`
	// contains filtered or unexported fields
}

Authenticate against the server with email+password.

func AuthenticateEmail

func AuthenticateEmail(email, password string) *AuthenticateEmailRequest

AuthenticateEmail creates a request to authenticate a user with an email and password.

func (*AuthenticateEmailRequest) Async

func (req *AuthenticateEmailRequest) Async(ctx context.Context, cl *Client, f func(*SessionResponse, error))

Async executes the request against the context and client.

func (*AuthenticateEmailRequest) Descriptor deprecated

func (*AuthenticateEmailRequest) Descriptor() ([]byte, []int)

Deprecated: Use AuthenticateEmailRequest.ProtoReflect.Descriptor instead.

func (*AuthenticateEmailRequest) Do

Do executes the request against the context and client.

func (*AuthenticateEmailRequest) GetAccount

func (x *AuthenticateEmailRequest) GetAccount() *AccountEmail

func (*AuthenticateEmailRequest) GetCreate

func (*AuthenticateEmailRequest) GetUsername

func (x *AuthenticateEmailRequest) GetUsername() string

func (*AuthenticateEmailRequest) ProtoMessage

func (*AuthenticateEmailRequest) ProtoMessage()

func (*AuthenticateEmailRequest) ProtoReflect

func (x *AuthenticateEmailRequest) ProtoReflect() protoreflect.Message

func (*AuthenticateEmailRequest) Reset

func (x *AuthenticateEmailRequest) Reset()

func (*AuthenticateEmailRequest) String

func (x *AuthenticateEmailRequest) String() string

func (*AuthenticateEmailRequest) WithCreate

func (req *AuthenticateEmailRequest) WithCreate(create bool) *AuthenticateEmailRequest

WithCreate sets the create on the request.

func (*AuthenticateEmailRequest) WithUsername

func (req *AuthenticateEmailRequest) WithUsername(username string) *AuthenticateEmailRequest

WithUsername sets the username on the request.

func (*AuthenticateEmailRequest) WithVars

WithVars sets the vars on the request.

type AuthenticateFacebookInstantGameRequest

type AuthenticateFacebookInstantGameRequest struct {

	// The Facebook Instant Game account details.
	Account *AccountFacebookInstantGame `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	// Register the account if the user does not already exist.
	Create *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=create,proto3" json:"create,omitempty"`
	// Set the username on the account at register. Must be unique.
	Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"`
	// contains filtered or unexported fields
}

Authenticate against the server with Facebook Instant Game token.

func AuthenticateFacebookInstantGame

func AuthenticateFacebookInstantGame(signedPlayerInfo string) *AuthenticateFacebookInstantGameRequest

AuthenticateFacebookInstantGame creates a request to authenticate a user with a Facebook Instant Game token.

func (*AuthenticateFacebookInstantGameRequest) Async

Async executes the request against the context and client.

func (*AuthenticateFacebookInstantGameRequest) Descriptor deprecated

func (*AuthenticateFacebookInstantGameRequest) Descriptor() ([]byte, []int)

Deprecated: Use AuthenticateFacebookInstantGameRequest.ProtoReflect.Descriptor instead.

func (*AuthenticateFacebookInstantGameRequest) Do

Do executes the request against the context and client.

func (*AuthenticateFacebookInstantGameRequest) GetAccount

func (*AuthenticateFacebookInstantGameRequest) GetCreate

func (*AuthenticateFacebookInstantGameRequest) GetUsername

func (*AuthenticateFacebookInstantGameRequest) ProtoMessage

func (*AuthenticateFacebookInstantGameRequest) ProtoReflect

func (*AuthenticateFacebookInstantGameRequest) Reset

func (*AuthenticateFacebookInstantGameRequest) String

func (*AuthenticateFacebookInstantGameRequest) WithCreate

WithCreate sets the create on the request.

func (*AuthenticateFacebookInstantGameRequest) WithUsername

WithUsername sets the username on the request.

func (*AuthenticateFacebookInstantGameRequest) WithVars

WithVars sets the vars on the request.

type AuthenticateFacebookRequest

type AuthenticateFacebookRequest struct {

	// The Facebook account details.
	Account *AccountFacebook `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	// Register the account if the user does not already exist.
	Create *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=create,proto3" json:"create,omitempty"`
	// Set the username on the account at register. Must be unique.
	Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"`
	// Import Facebook friends for the user.
	Sync *wrapperspb.BoolValue `protobuf:"bytes,4,opt,name=sync,proto3" json:"sync,omitempty"`
	// contains filtered or unexported fields
}

Authenticate against the server with Facebook.

func AuthenticateFacebook

func AuthenticateFacebook(token string) *AuthenticateFacebookRequest

AuthenticateFacebook creates a request to authenticate a user with a Facebook token.

func (*AuthenticateFacebookRequest) Async

func (req *AuthenticateFacebookRequest) Async(ctx context.Context, cl *Client, f func(*SessionResponse, error))

Async executes the request against the context and client.

func (*AuthenticateFacebookRequest) Descriptor deprecated

func (*AuthenticateFacebookRequest) Descriptor() ([]byte, []int)

Deprecated: Use AuthenticateFacebookRequest.ProtoReflect.Descriptor instead.

func (*AuthenticateFacebookRequest) Do

Do executes the request against the context and client.

func (*AuthenticateFacebookRequest) GetAccount

func (*AuthenticateFacebookRequest) GetCreate

func (*AuthenticateFacebookRequest) GetSync

func (*AuthenticateFacebookRequest) GetUsername

func (x *AuthenticateFacebookRequest) GetUsername() string

func (*AuthenticateFacebookRequest) ProtoMessage

func (*AuthenticateFacebookRequest) ProtoMessage()

func (*AuthenticateFacebookRequest) ProtoReflect

func (*AuthenticateFacebookRequest) Reset

func (x *AuthenticateFacebookRequest) Reset()

func (*AuthenticateFacebookRequest) String

func (x *AuthenticateFacebookRequest) String() string

func (*AuthenticateFacebookRequest) WithCreate

WithCreate sets the create on the request.

func (*AuthenticateFacebookRequest) WithSync

WithSync sets the sync on the request.

func (*AuthenticateFacebookRequest) WithUsername

func (req *AuthenticateFacebookRequest) WithUsername(username string) *AuthenticateFacebookRequest

WithUsername sets the username on the request.

func (*AuthenticateFacebookRequest) WithVars

WithVars sets the vars on the request.

type AuthenticateGameCenterRequest

type AuthenticateGameCenterRequest struct {

	// The Game Center account details.
	Account *AccountGameCenter `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	// Register the account if the user does not already exist.
	Create *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=create,proto3" json:"create,omitempty"`
	// Set the username on the account at register. Must be unique.
	Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"`
	// contains filtered or unexported fields
}

Authenticate against the server with Apple's Game Center.

func AuthenticateGameCenter

func AuthenticateGameCenter() *AuthenticateGameCenterRequest

AuthenticateGameCenter creates a request to authenticate a user with a Apple GameCenter token.

func (*AuthenticateGameCenterRequest) Async

func (req *AuthenticateGameCenterRequest) Async(ctx context.Context, cl *Client, f func(*SessionResponse, error))

Async executes the request against the context and client.

func (*AuthenticateGameCenterRequest) Descriptor deprecated

func (*AuthenticateGameCenterRequest) Descriptor() ([]byte, []int)

Deprecated: Use AuthenticateGameCenterRequest.ProtoReflect.Descriptor instead.

func (*AuthenticateGameCenterRequest) Do

Do executes the request against the context and client.

func (*AuthenticateGameCenterRequest) GetAccount

func (*AuthenticateGameCenterRequest) GetCreate

func (*AuthenticateGameCenterRequest) GetUsername

func (x *AuthenticateGameCenterRequest) GetUsername() string

func (*AuthenticateGameCenterRequest) ProtoMessage

func (*AuthenticateGameCenterRequest) ProtoMessage()

func (*AuthenticateGameCenterRequest) ProtoReflect

func (*AuthenticateGameCenterRequest) Reset

func (x *AuthenticateGameCenterRequest) Reset()

func (*AuthenticateGameCenterRequest) String

func (*AuthenticateGameCenterRequest) WithBundleId

WithBundleId sets the bundleId on the request.

func (*AuthenticateGameCenterRequest) WithCreate

WithCreate sets the create on the request.

func (*AuthenticateGameCenterRequest) WithPlayerId

WithPlayerId sets the playerId on the request.

func (*AuthenticateGameCenterRequest) WithPublicKeyUrl

func (req *AuthenticateGameCenterRequest) WithPublicKeyUrl(publicKeyUrl string) *AuthenticateGameCenterRequest

WithPublicKeyUrl sets the publicKeyUrl on the request.

func (*AuthenticateGameCenterRequest) WithSalt

WithSalt sets the salt on the request.

func (*AuthenticateGameCenterRequest) WithSignature

WithSignature sets the signature on the request.

func (*AuthenticateGameCenterRequest) WithTimestampSeconds

func (req *AuthenticateGameCenterRequest) WithTimestampSeconds(timestampSeconds int64) *AuthenticateGameCenterRequest

WithTimestampSeconds sets the timestampSeconds on the request.

func (*AuthenticateGameCenterRequest) WithUsername

WithUsername sets the username on the request.

func (*AuthenticateGameCenterRequest) WithVars

WithVars sets the vars on the request.

type AuthenticateGoogleRequest

type AuthenticateGoogleRequest struct {

	// The Google account details.
	Account *AccountGoogle `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	// Register the account if the user does not already exist.
	Create *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=create,proto3" json:"create,omitempty"`
	// Set the username on the account at register. Must be unique.
	Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"`
	// contains filtered or unexported fields
}

Authenticate against the server with Google.

func AuthenticateGoogle

func AuthenticateGoogle(token string) *AuthenticateGoogleRequest

AuthenticateGoogle creates a request to authenicate a user with a Google token.

func (*AuthenticateGoogleRequest) Async

func (req *AuthenticateGoogleRequest) Async(ctx context.Context, cl *Client, f func(*SessionResponse, error))

Async executes the request against the context and client.

func (*AuthenticateGoogleRequest) Descriptor deprecated

func (*AuthenticateGoogleRequest) Descriptor() ([]byte, []int)

Deprecated: Use AuthenticateGoogleRequest.ProtoReflect.Descriptor instead.

func (*AuthenticateGoogleRequest) Do

Do executes the request against the context and client.

func (*AuthenticateGoogleRequest) GetAccount

func (x *AuthenticateGoogleRequest) GetAccount() *AccountGoogle

func (*AuthenticateGoogleRequest) GetCreate

func (*AuthenticateGoogleRequest) GetUsername

func (x *AuthenticateGoogleRequest) GetUsername() string

func (*AuthenticateGoogleRequest) ProtoMessage

func (*AuthenticateGoogleRequest) ProtoMessage()

func (*AuthenticateGoogleRequest) ProtoReflect

func (*AuthenticateGoogleRequest) Reset

func (x *AuthenticateGoogleRequest) Reset()

func (*AuthenticateGoogleRequest) String

func (x *AuthenticateGoogleRequest) String() string

func (*AuthenticateGoogleRequest) WithCreate

func (req *AuthenticateGoogleRequest) WithCreate(create bool) *AuthenticateGoogleRequest

WithCreate sets the create on the request.

func (*AuthenticateGoogleRequest) WithUsername

func (req *AuthenticateGoogleRequest) WithUsername(username string) *AuthenticateGoogleRequest

WithUsername sets the username on the request.

func (*AuthenticateGoogleRequest) WithVars

WithVars sets the vars on the request.

type AuthenticateSteamRequest

type AuthenticateSteamRequest struct {

	// The Steam account details.
	Account *AccountSteam `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	// Register the account if the user does not already exist.
	Create *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=create,proto3" json:"create,omitempty"`
	// Set the username on the account at register. Must be unique.
	Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"`
	// Import Steam friends for the user.
	Sync *wrapperspb.BoolValue `protobuf:"bytes,4,opt,name=sync,proto3" json:"sync,omitempty"`
	// contains filtered or unexported fields
}

Authenticate against the server with Steam.

func AuthenticateSteam

func AuthenticateSteam(token string) *AuthenticateSteamRequest

AuthenticateSteam creates a request to authenticate a user with a Steam token.

func (*AuthenticateSteamRequest) Async

func (req *AuthenticateSteamRequest) Async(ctx context.Context, cl *Client, f func(*SessionResponse, error))

Async executes the request against the context and client.

func (*AuthenticateSteamRequest) Descriptor deprecated

func (*AuthenticateSteamRequest) Descriptor() ([]byte, []int)

Deprecated: Use AuthenticateSteamRequest.ProtoReflect.Descriptor instead.

func (*AuthenticateSteamRequest) Do

Do executes the request against the context and client.

func (*AuthenticateSteamRequest) GetAccount

func (x *AuthenticateSteamRequest) GetAccount() *AccountSteam

func (*AuthenticateSteamRequest) GetCreate

func (*AuthenticateSteamRequest) GetSync

func (*AuthenticateSteamRequest) GetUsername

func (x *AuthenticateSteamRequest) GetUsername() string

func (*AuthenticateSteamRequest) ProtoMessage

func (*AuthenticateSteamRequest) ProtoMessage()

func (*AuthenticateSteamRequest) ProtoReflect

func (x *AuthenticateSteamRequest) ProtoReflect() protoreflect.Message

func (*AuthenticateSteamRequest) Reset

func (x *AuthenticateSteamRequest) Reset()

func (*AuthenticateSteamRequest) String

func (x *AuthenticateSteamRequest) String() string

func (*AuthenticateSteamRequest) WithCreate

func (req *AuthenticateSteamRequest) WithCreate(create bool) *AuthenticateSteamRequest

WithCreate sets the create on the request.

func (*AuthenticateSteamRequest) WithSync

WithSync sets the sync on the request.

func (*AuthenticateSteamRequest) WithUsername

func (req *AuthenticateSteamRequest) WithUsername(username string) *AuthenticateSteamRequest

WithUsername sets the username on the request.

func (*AuthenticateSteamRequest) WithVars

WithVars sets the vars on the request.

type BanGroupUsersRequest

type BanGroupUsersRequest struct {

	// The group to ban users from.
	GroupId string `protobuf:"bytes,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
	// The users to ban.
	UserIds []string `protobuf:"bytes,2,rep,name=user_ids,json=userIds,proto3" json:"user_ids,omitempty"`
	// contains filtered or unexported fields
}

Ban users from a group.

func BanGroupUsers

func BanGroupUsers(groupId string, userIds ...string) *BanGroupUsersRequest

BanGroupUsers creates a request to ban users from a group.

func (*BanGroupUsersRequest) Async

func (req *BanGroupUsersRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*BanGroupUsersRequest) Descriptor deprecated

func (*BanGroupUsersRequest) Descriptor() ([]byte, []int)

Deprecated: Use BanGroupUsersRequest.ProtoReflect.Descriptor instead.

func (*BanGroupUsersRequest) Do

func (req *BanGroupUsersRequest) Do(ctx context.Context, cl *Client) error

Do executes the request against the context and client.

func (*BanGroupUsersRequest) GetGroupId

func (x *BanGroupUsersRequest) GetGroupId() string

func (*BanGroupUsersRequest) GetUserIds

func (x *BanGroupUsersRequest) GetUserIds() []string

func (*BanGroupUsersRequest) ProtoMessage

func (*BanGroupUsersRequest) ProtoMessage()

func (*BanGroupUsersRequest) ProtoReflect

func (x *BanGroupUsersRequest) ProtoReflect() protoreflect.Message

func (*BanGroupUsersRequest) Reset

func (x *BanGroupUsersRequest) Reset()

func (*BanGroupUsersRequest) String

func (x *BanGroupUsersRequest) String() string

type BlockFriendsRequest

type BlockFriendsRequest struct {

	// The account id of a user.
	Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
	// The account username of a user.
	Usernames []string `protobuf:"bytes,2,rep,name=usernames,proto3" json:"usernames,omitempty"`
	// contains filtered or unexported fields
}

Block one or more friends for the current user.

func BlockFriends

func BlockFriends(ids ...string) *BlockFriendsRequest

BlockFriends creates a request to block friends by ID or username.

func (*BlockFriendsRequest) Async

func (req *BlockFriendsRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*BlockFriendsRequest) Descriptor deprecated

func (*BlockFriendsRequest) Descriptor() ([]byte, []int)

Deprecated: Use BlockFriendsRequest.ProtoReflect.Descriptor instead.

func (*BlockFriendsRequest) Do

func (req *BlockFriendsRequest) Do(ctx context.Context, cl *Client) error

Do executes the request against the context and client.

func (*BlockFriendsRequest) GetIds

func (x *BlockFriendsRequest) GetIds() []string

func (*BlockFriendsRequest) GetUsernames

func (x *BlockFriendsRequest) GetUsernames() []string

func (*BlockFriendsRequest) ProtoMessage

func (*BlockFriendsRequest) ProtoMessage()

func (*BlockFriendsRequest) ProtoReflect

func (x *BlockFriendsRequest) ProtoReflect() protoreflect.Message

func (*BlockFriendsRequest) Reset

func (x *BlockFriendsRequest) Reset()

func (*BlockFriendsRequest) String

func (x *BlockFriendsRequest) String() string

func (*BlockFriendsRequest) WithUsernames

func (req *BlockFriendsRequest) WithUsernames(usernames ...string) *BlockFriendsRequest

WithUsernames sets the Usernames on the request.

type ChannelJoinMsg

type ChannelJoinMsg struct {

	// The user ID to DM with, group ID to chat with, or room channel name to join.
	Target string `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"`
	// The type of the chat channel.
	Type int32 `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty"` // one of "ChannelId.Type".
	// Whether messages sent on this channel should be persistent.
	Persistence *wrapperspb.BoolValue `protobuf:"bytes,3,opt,name=persistence,proto3" json:"persistence,omitempty"`
	// Whether the user should appear in the channel's presence list and events.
	Hidden *wrapperspb.BoolValue `protobuf:"bytes,4,opt,name=hidden,proto3" json:"hidden,omitempty"`
	// contains filtered or unexported fields
}

Join operation for a realtime chat channel.

func ChannelJoin

func ChannelJoin(target string, typ ChannelType) *ChannelJoinMsg

ChannelJoin creates a realtime message to join a chat channel.

func (*ChannelJoinMsg) Async

func (msg *ChannelJoinMsg) Async(ctx context.Context, conn *Conn, f func(*ChannelMsg, error))

Async sends the message to the connection.

func (*ChannelJoinMsg) BuildEnvelope

func (msg *ChannelJoinMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*ChannelJoinMsg) Descriptor deprecated

func (*ChannelJoinMsg) Descriptor() ([]byte, []int)

Deprecated: Use ChannelJoinMsg.ProtoReflect.Descriptor instead.

func (*ChannelJoinMsg) GetHidden

func (x *ChannelJoinMsg) GetHidden() *wrapperspb.BoolValue

func (*ChannelJoinMsg) GetPersistence

func (x *ChannelJoinMsg) GetPersistence() *wrapperspb.BoolValue

func (*ChannelJoinMsg) GetTarget

func (x *ChannelJoinMsg) GetTarget() string

func (*ChannelJoinMsg) GetType

func (x *ChannelJoinMsg) GetType() int32

func (*ChannelJoinMsg) ProtoMessage

func (*ChannelJoinMsg) ProtoMessage()

func (*ChannelJoinMsg) ProtoReflect

func (x *ChannelJoinMsg) ProtoReflect() protoreflect.Message

func (*ChannelJoinMsg) Reset

func (x *ChannelJoinMsg) Reset()

func (*ChannelJoinMsg) Send

func (msg *ChannelJoinMsg) Send(ctx context.Context, conn *Conn) (*ChannelMsg, error)

Send sends the message to the connection.

func (*ChannelJoinMsg) String

func (x *ChannelJoinMsg) String() string

func (*ChannelJoinMsg) WithHidden

func (msg *ChannelJoinMsg) WithHidden(hidden bool) *ChannelJoinMsg

WithHidden sets the hidden on the message.

func (*ChannelJoinMsg) WithPersistence

func (msg *ChannelJoinMsg) WithPersistence(persistence bool) *ChannelJoinMsg

WithPersistence sets the persistence on the message.

type ChannelLeaveMsg

type ChannelLeaveMsg struct {

	// The ID of the channel to leave.
	ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
	// contains filtered or unexported fields
}

Leave a realtime channel.

func ChannelLeave

func ChannelLeave(channelId string) *ChannelLeaveMsg

ChannelLeave creates a realtime message to leave a chat channel.

func (*ChannelLeaveMsg) Async

func (msg *ChannelLeaveMsg) Async(ctx context.Context, conn *Conn, f func(error))

Async sends the message to the connection.

func (*ChannelLeaveMsg) BuildEnvelope

func (msg *ChannelLeaveMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*ChannelLeaveMsg) Descriptor deprecated

func (*ChannelLeaveMsg) Descriptor() ([]byte, []int)

Deprecated: Use ChannelLeaveMsg.ProtoReflect.Descriptor instead.

func (*ChannelLeaveMsg) GetChannelId

func (x *ChannelLeaveMsg) GetChannelId() string

func (*ChannelLeaveMsg) ProtoMessage

func (*ChannelLeaveMsg) ProtoMessage()

func (*ChannelLeaveMsg) ProtoReflect

func (x *ChannelLeaveMsg) ProtoReflect() protoreflect.Message

func (*ChannelLeaveMsg) Reset

func (x *ChannelLeaveMsg) Reset()

func (*ChannelLeaveMsg) Send

func (msg *ChannelLeaveMsg) Send(ctx context.Context, conn *Conn) error

Send sends the message to the connection.

func (*ChannelLeaveMsg) String

func (x *ChannelLeaveMsg) String() string

type ChannelMessage

type ChannelMessage struct {

	// The channel this message belongs to.
	ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
	// The unique ID of this message.
	MessageId string `protobuf:"bytes,2,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"`
	// The code representing a message type or category.
	Code *wrapperspb.Int32Value `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"`
	// Message sender, usually a user ID.
	SenderId string `protobuf:"bytes,4,opt,name=sender_id,json=senderId,proto3" json:"sender_id,omitempty"`
	// The username of the message sender, if any.
	Username string `protobuf:"bytes,5,opt,name=username,proto3" json:"username,omitempty"`
	// The content payload.
	Content string `protobuf:"bytes,6,opt,name=content,proto3" json:"content,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
	CreateTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was last updated.
	UpdateTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
	// True if the message was persisted to the channel's history, false otherwise.
	Persistent *wrapperspb.BoolValue `protobuf:"bytes,9,opt,name=persistent,proto3" json:"persistent,omitempty"`
	// The name of the chat room, or an empty string if this message was not sent through a chat room.
	RoomName string `protobuf:"bytes,10,opt,name=room_name,json=roomName,proto3" json:"room_name,omitempty"`
	// The ID of the group, or an empty string if this message was not sent through a group channel.
	GroupId string `protobuf:"bytes,11,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
	// The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
	UserIdOne string `protobuf:"bytes,12,opt,name=user_id_one,json=userIdOne,proto3" json:"user_id_one,omitempty"`
	// The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
	UserIdTwo string `protobuf:"bytes,13,opt,name=user_id_two,json=userIdTwo,proto3" json:"user_id_two,omitempty"`
	// contains filtered or unexported fields
}

A message sent on a channel.

func (*ChannelMessage) Descriptor deprecated

func (*ChannelMessage) Descriptor() ([]byte, []int)

Deprecated: Use ChannelMessage.ProtoReflect.Descriptor instead.

func (*ChannelMessage) GetChannelId

func (x *ChannelMessage) GetChannelId() string

func (*ChannelMessage) GetCode

func (x *ChannelMessage) GetCode() *wrapperspb.Int32Value

func (*ChannelMessage) GetContent

func (x *ChannelMessage) GetContent() string

func (*ChannelMessage) GetCreateTime

func (x *ChannelMessage) GetCreateTime() *timestamppb.Timestamp

func (*ChannelMessage) GetGroupId

func (x *ChannelMessage) GetGroupId() string

func (*ChannelMessage) GetMessageId

func (x *ChannelMessage) GetMessageId() string

func (*ChannelMessage) GetPersistent

func (x *ChannelMessage) GetPersistent() *wrapperspb.BoolValue

func (*ChannelMessage) GetRoomName

func (x *ChannelMessage) GetRoomName() string

func (*ChannelMessage) GetSenderId

func (x *ChannelMessage) GetSenderId() string

func (*ChannelMessage) GetUpdateTime

func (x *ChannelMessage) GetUpdateTime() *timestamppb.Timestamp

func (*ChannelMessage) GetUserIdOne

func (x *ChannelMessage) GetUserIdOne() string

func (*ChannelMessage) GetUserIdTwo

func (x *ChannelMessage) GetUserIdTwo() string

func (*ChannelMessage) GetUsername

func (x *ChannelMessage) GetUsername() string

func (*ChannelMessage) ProtoMessage

func (*ChannelMessage) ProtoMessage()

func (*ChannelMessage) ProtoReflect

func (x *ChannelMessage) ProtoReflect() protoreflect.Message

func (*ChannelMessage) Reset

func (x *ChannelMessage) Reset()

func (*ChannelMessage) String

func (x *ChannelMessage) String() string

type ChannelMessageAckMsg

type ChannelMessageAckMsg struct {

	// The channel the message was sent to.
	ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
	// The unique ID assigned to the message.
	MessageId string `protobuf:"bytes,2,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"`
	// The code representing a message type or category.
	Code *wrapperspb.Int32Value `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"`
	// Username of the message sender.
	Username string `protobuf:"bytes,4,opt,name=username,proto3" json:"username,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
	CreateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
	UpdateTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
	// True if the message was persisted to the channel's history, false otherwise.
	Persistent *wrapperspb.BoolValue `protobuf:"bytes,7,opt,name=persistent,proto3" json:"persistent,omitempty"`
	// The name of the chat room, or an empty string if this message was not sent through a chat room.
	RoomName string `protobuf:"bytes,8,opt,name=room_name,json=roomName,proto3" json:"room_name,omitempty"`
	// The ID of the group, or an empty string if this message was not sent through a group channel.
	GroupId string `protobuf:"bytes,9,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
	// The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
	UserIdOne string `protobuf:"bytes,10,opt,name=user_id_one,json=userIdOne,proto3" json:"user_id_one,omitempty"`
	// The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
	UserIdTwo string `protobuf:"bytes,11,opt,name=user_id_two,json=userIdTwo,proto3" json:"user_id_two,omitempty"`
	// contains filtered or unexported fields
}

A receipt reply from a channel message send operation.

func (*ChannelMessageAckMsg) BuildEnvelope

func (msg *ChannelMessageAckMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*ChannelMessageAckMsg) Descriptor deprecated

func (*ChannelMessageAckMsg) Descriptor() ([]byte, []int)

Deprecated: Use ChannelMessageAckMsg.ProtoReflect.Descriptor instead.

func (*ChannelMessageAckMsg) GetChannelId

func (x *ChannelMessageAckMsg) GetChannelId() string

func (*ChannelMessageAckMsg) GetCode

func (*ChannelMessageAckMsg) GetCreateTime

func (x *ChannelMessageAckMsg) GetCreateTime() *timestamppb.Timestamp

func (*ChannelMessageAckMsg) GetGroupId

func (x *ChannelMessageAckMsg) GetGroupId() string

func (*ChannelMessageAckMsg) GetMessageId

func (x *ChannelMessageAckMsg) GetMessageId() string

func (*ChannelMessageAckMsg) GetPersistent

func (x *ChannelMessageAckMsg) GetPersistent() *wrapperspb.BoolValue

func (*ChannelMessageAckMsg) GetRoomName

func (x *ChannelMessageAckMsg) GetRoomName() string

func (*ChannelMessageAckMsg) GetUpdateTime

func (x *ChannelMessageAckMsg) GetUpdateTime() *timestamppb.Timestamp

func (*ChannelMessageAckMsg) GetUserIdOne

func (x *ChannelMessageAckMsg) GetUserIdOne() string

func (*ChannelMessageAckMsg) GetUserIdTwo

func (x *ChannelMessageAckMsg) GetUserIdTwo() string

func (*ChannelMessageAckMsg) GetUsername

func (x *ChannelMessageAckMsg) GetUsername() string

func (*ChannelMessageAckMsg) ProtoMessage

func (*ChannelMessageAckMsg) ProtoMessage()

func (*ChannelMessageAckMsg) ProtoReflect

func (x *ChannelMessageAckMsg) ProtoReflect() protoreflect.Message

func (*ChannelMessageAckMsg) Reset

func (x *ChannelMessageAckMsg) Reset()

func (*ChannelMessageAckMsg) String

func (x *ChannelMessageAckMsg) String() string

type ChannelMessageMsg

type ChannelMessageMsg = ChannelMessage

ChannelMessageMsg is a realtime channel message message.

func (*ChannelMessageMsg) BuildEnvelope

func (msg *ChannelMessageMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

type ChannelMessageRemoveMsg

type ChannelMessageRemoveMsg struct {

	// The channel the message was sent to.
	ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
	// The ID assigned to the message to update.
	MessageId string `protobuf:"bytes,2,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"`
	// contains filtered or unexported fields
}

Remove a message previously sent to a realtime channel.

func ChannelMessageRemove

func ChannelMessageRemove(channelId, messageId string) *ChannelMessageRemoveMsg

ChannelMessageRemove creates a realtime message to remove a message from a channel.

func (*ChannelMessageRemoveMsg) Async

func (msg *ChannelMessageRemoveMsg) Async(ctx context.Context, conn *Conn, f func(*ChannelMessageAckMsg, error))

Async sends the message to the connection.

func (*ChannelMessageRemoveMsg) BuildEnvelope

func (msg *ChannelMessageRemoveMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*ChannelMessageRemoveMsg) Descriptor deprecated

func (*ChannelMessageRemoveMsg) Descriptor() ([]byte, []int)

Deprecated: Use ChannelMessageRemoveMsg.ProtoReflect.Descriptor instead.

func (*ChannelMessageRemoveMsg) GetChannelId

func (x *ChannelMessageRemoveMsg) GetChannelId() string

func (*ChannelMessageRemoveMsg) GetMessageId

func (x *ChannelMessageRemoveMsg) GetMessageId() string

func (*ChannelMessageRemoveMsg) ProtoMessage

func (*ChannelMessageRemoveMsg) ProtoMessage()

func (*ChannelMessageRemoveMsg) ProtoReflect

func (x *ChannelMessageRemoveMsg) ProtoReflect() protoreflect.Message

func (*ChannelMessageRemoveMsg) Reset

func (x *ChannelMessageRemoveMsg) Reset()

func (*ChannelMessageRemoveMsg) Send

Send sends the message to the connection.

func (*ChannelMessageRemoveMsg) String

func (x *ChannelMessageRemoveMsg) String() string

type ChannelMessageSendMsg

type ChannelMessageSendMsg struct {

	// The channel to sent to.
	ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
	// Message content.
	Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

Send a message to a realtime channel.

func ChannelMessageSend

func ChannelMessageSend(channelId string, v interface{}) (*ChannelMessageSendMsg, error)

ChannelMessageSend creates a realtime message to send a message on a channel.

func ChannelMessageSendRaw added in v0.6.4

func ChannelMessageSendRaw(channelId, content string) *ChannelMessageSendMsg

ChannelMessageSendRaw creates a realtime message to send a message on a channel.

func (*ChannelMessageSendMsg) Async

func (msg *ChannelMessageSendMsg) Async(ctx context.Context, conn *Conn, f func(*ChannelMessageAckMsg, error))

Async sends the message to the connection.

func (*ChannelMessageSendMsg) BuildEnvelope

func (msg *ChannelMessageSendMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*ChannelMessageSendMsg) Descriptor deprecated

func (*ChannelMessageSendMsg) Descriptor() ([]byte, []int)

Deprecated: Use ChannelMessageSendMsg.ProtoReflect.Descriptor instead.

func (*ChannelMessageSendMsg) GetChannelId

func (x *ChannelMessageSendMsg) GetChannelId() string

func (*ChannelMessageSendMsg) GetContent

func (x *ChannelMessageSendMsg) GetContent() string

func (*ChannelMessageSendMsg) ProtoMessage

func (*ChannelMessageSendMsg) ProtoMessage()

func (*ChannelMessageSendMsg) ProtoReflect

func (x *ChannelMessageSendMsg) ProtoReflect() protoreflect.Message

func (*ChannelMessageSendMsg) Reset

func (x *ChannelMessageSendMsg) Reset()

func (*ChannelMessageSendMsg) Send

Send sends the message to the connection.

func (*ChannelMessageSendMsg) String

func (x *ChannelMessageSendMsg) String() string

type ChannelMessageUpdateMsg

type ChannelMessageUpdateMsg struct {

	// The channel the message was sent to.
	ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
	// The ID assigned to the message to update.
	MessageId string `protobuf:"bytes,2,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"`
	// New message content.
	Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

Update a message previously sent to a realtime channel.

func ChannelMessageUpdate

func ChannelMessageUpdate(channelId, messageId string, v interface{}) (*ChannelMessageUpdateMsg, error)

ChannelMessageUpdate creates a realtime message to update a message on a channel.

func ChannelMessageUpdateRaw added in v0.6.4

func ChannelMessageUpdateRaw(channelId, messageId, content string) *ChannelMessageUpdateMsg

ChannelMessageUpdateRaw creates a realtime message to update a message on a channel.

func (*ChannelMessageUpdateMsg) Async

func (msg *ChannelMessageUpdateMsg) Async(ctx context.Context, conn *Conn, f func(*ChannelMessageAckMsg, error))

Async sends the message to the connection.

func (*ChannelMessageUpdateMsg) BuildEnvelope

func (msg *ChannelMessageUpdateMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*ChannelMessageUpdateMsg) Descriptor deprecated

func (*ChannelMessageUpdateMsg) Descriptor() ([]byte, []int)

Deprecated: Use ChannelMessageUpdateMsg.ProtoReflect.Descriptor instead.

func (*ChannelMessageUpdateMsg) GetChannelId

func (x *ChannelMessageUpdateMsg) GetChannelId() string

func (*ChannelMessageUpdateMsg) GetContent

func (x *ChannelMessageUpdateMsg) GetContent() string

func (*ChannelMessageUpdateMsg) GetMessageId

func (x *ChannelMessageUpdateMsg) GetMessageId() string

func (*ChannelMessageUpdateMsg) ProtoMessage

func (*ChannelMessageUpdateMsg) ProtoMessage()

func (*ChannelMessageUpdateMsg) ProtoReflect

func (x *ChannelMessageUpdateMsg) ProtoReflect() protoreflect.Message

func (*ChannelMessageUpdateMsg) Reset

func (x *ChannelMessageUpdateMsg) Reset()

func (*ChannelMessageUpdateMsg) Send

Send sends the message to the connection.

func (*ChannelMessageUpdateMsg) String

func (x *ChannelMessageUpdateMsg) String() string

type ChannelMessagesRequest

type ChannelMessagesRequest struct {

	// The channel ID to list from.
	ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
	// Max number of records to return. Between 1 and 100.
	Limit *wrapperspb.Int32Value `protobuf:"bytes,2,opt,name=limit,proto3" json:"limit,omitempty"`
	// True if listing should be older messages to newer, false if reverse.
	Forward *wrapperspb.BoolValue `protobuf:"bytes,3,opt,name=forward,proto3" json:"forward,omitempty"`
	// A pagination cursor, if any.
	Cursor string `protobuf:"bytes,4,opt,name=cursor,proto3" json:"cursor,omitempty"`
	// contains filtered or unexported fields
}

List a channel's message history.

func ChannelMessages

func ChannelMessages(channelId string) *ChannelMessagesRequest

ChannelMessages creates a request to retrieve a channel's messages.

func (*ChannelMessagesRequest) Async

Async executes the request against the context and client.

func (*ChannelMessagesRequest) Descriptor deprecated

func (*ChannelMessagesRequest) Descriptor() ([]byte, []int)

Deprecated: Use ChannelMessagesRequest.ProtoReflect.Descriptor instead.

func (*ChannelMessagesRequest) Do

Do executes the request against the context and client.

func (*ChannelMessagesRequest) GetChannelId

func (x *ChannelMessagesRequest) GetChannelId() string

func (*ChannelMessagesRequest) GetCursor

func (x *ChannelMessagesRequest) GetCursor() string

func (*ChannelMessagesRequest) GetForward

func (x *ChannelMessagesRequest) GetForward() *wrapperspb.BoolValue

func (*ChannelMessagesRequest) GetLimit

func (*ChannelMessagesRequest) ProtoMessage

func (*ChannelMessagesRequest) ProtoMessage()

func (*ChannelMessagesRequest) ProtoReflect

func (x *ChannelMessagesRequest) ProtoReflect() protoreflect.Message

func (*ChannelMessagesRequest) Reset

func (x *ChannelMessagesRequest) Reset()

func (*ChannelMessagesRequest) String

func (x *ChannelMessagesRequest) String() string

func (*ChannelMessagesRequest) WithCursor

func (req *ChannelMessagesRequest) WithCursor(cursor string) *ChannelMessagesRequest

WithCursor sets the cursor on the request.

func (*ChannelMessagesRequest) WithForward

func (req *ChannelMessagesRequest) WithForward(forward bool) *ChannelMessagesRequest

WithForward sets the forward on the request.

func (*ChannelMessagesRequest) WithLimit

func (req *ChannelMessagesRequest) WithLimit(limit int) *ChannelMessagesRequest

WithLimit sets the limit on the request.

type ChannelMessagesResponse

type ChannelMessagesResponse struct {

	// A list of messages.
	Messages []*ChannelMessage `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"`
	// The cursor to send when retrieving the next page, if any.
	NextCursor string `protobuf:"bytes,2,opt,name=next_cursor,json=nextCursor,proto3" json:"next_cursor,omitempty"`
	// The cursor to send when retrieving the previous page, if any.
	PrevCursor string `protobuf:"bytes,3,opt,name=prev_cursor,json=prevCursor,proto3" json:"prev_cursor,omitempty"`
	// Cacheable cursor to list newer messages. Durable and designed to be stored, unlike next/prev cursors.
	CacheableCursor string `protobuf:"bytes,4,opt,name=cacheable_cursor,json=cacheableCursor,proto3" json:"cacheable_cursor,omitempty"`
	// contains filtered or unexported fields
}

A list of channel messages, usually a result of a list operation.

func (*ChannelMessagesResponse) Descriptor deprecated

func (*ChannelMessagesResponse) Descriptor() ([]byte, []int)

Deprecated: Use ChannelMessagesResponse.ProtoReflect.Descriptor instead.

func (*ChannelMessagesResponse) GetCacheableCursor

func (x *ChannelMessagesResponse) GetCacheableCursor() string

func (*ChannelMessagesResponse) GetMessages

func (x *ChannelMessagesResponse) GetMessages() []*ChannelMessage

func (*ChannelMessagesResponse) GetNextCursor

func (x *ChannelMessagesResponse) GetNextCursor() string

func (*ChannelMessagesResponse) GetPrevCursor

func (x *ChannelMessagesResponse) GetPrevCursor() string

func (*ChannelMessagesResponse) ProtoMessage

func (*ChannelMessagesResponse) ProtoMessage()

func (*ChannelMessagesResponse) ProtoReflect

func (x *ChannelMessagesResponse) ProtoReflect() protoreflect.Message

func (*ChannelMessagesResponse) Reset

func (x *ChannelMessagesResponse) Reset()

func (*ChannelMessagesResponse) String

func (x *ChannelMessagesResponse) String() string

type ChannelMsg

type ChannelMsg struct {

	// The ID of the channel.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The users currently in the channel.
	Presences []*UserPresenceMsg `protobuf:"bytes,2,rep,name=presences,proto3" json:"presences,omitempty"`
	// A reference to the current user's presence in the channel.
	Self *UserPresenceMsg `protobuf:"bytes,3,opt,name=self,proto3" json:"self,omitempty"`
	// The name of the chat room, or an empty string if this message was not sent through a chat room.
	RoomName string `protobuf:"bytes,4,opt,name=room_name,json=roomName,proto3" json:"room_name,omitempty"`
	// The ID of the group, or an empty string if this message was not sent through a group channel.
	GroupId string `protobuf:"bytes,5,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
	// The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
	UserIdOne string `protobuf:"bytes,6,opt,name=user_id_one,json=userIdOne,proto3" json:"user_id_one,omitempty"`
	// The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
	UserIdTwo string `protobuf:"bytes,7,opt,name=user_id_two,json=userIdTwo,proto3" json:"user_id_two,omitempty"`
	// contains filtered or unexported fields
}

A realtime chat channel.

func (*ChannelMsg) BuildEnvelope

func (msg *ChannelMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*ChannelMsg) Descriptor deprecated

func (*ChannelMsg) Descriptor() ([]byte, []int)

Deprecated: Use ChannelMsg.ProtoReflect.Descriptor instead.

func (*ChannelMsg) GetGroupId

func (x *ChannelMsg) GetGroupId() string

func (*ChannelMsg) GetId

func (x *ChannelMsg) GetId() string

func (*ChannelMsg) GetPresences

func (x *ChannelMsg) GetPresences() []*UserPresenceMsg

func (*ChannelMsg) GetRoomName

func (x *ChannelMsg) GetRoomName() string

func (*ChannelMsg) GetSelf

func (x *ChannelMsg) GetSelf() *UserPresenceMsg

func (*ChannelMsg) GetUserIdOne

func (x *ChannelMsg) GetUserIdOne() string

func (*ChannelMsg) GetUserIdTwo

func (x *ChannelMsg) GetUserIdTwo() string

func (*ChannelMsg) ProtoMessage

func (*ChannelMsg) ProtoMessage()

func (*ChannelMsg) ProtoReflect

func (x *ChannelMsg) ProtoReflect() protoreflect.Message

func (*ChannelMsg) Reset

func (x *ChannelMsg) Reset()

func (*ChannelMsg) String

func (x *ChannelMsg) String() string

type ChannelPresenceEventMsg

type ChannelPresenceEventMsg struct {

	// The channel identifier this event is for.
	ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
	// Presences joining the channel as part of this event, if any.
	Joins []*UserPresenceMsg `protobuf:"bytes,2,rep,name=joins,proto3" json:"joins,omitempty"`
	// Presences leaving the channel as part of this event, if any.
	Leaves []*UserPresenceMsg `protobuf:"bytes,3,rep,name=leaves,proto3" json:"leaves,omitempty"`
	// The name of the chat room, or an empty string if this message was not sent through a chat room.
	RoomName string `protobuf:"bytes,4,opt,name=room_name,json=roomName,proto3" json:"room_name,omitempty"`
	// The ID of the group, or an empty string if this message was not sent through a group channel.
	GroupId string `protobuf:"bytes,5,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
	// The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
	UserIdOne string `protobuf:"bytes,6,opt,name=user_id_one,json=userIdOne,proto3" json:"user_id_one,omitempty"`
	// The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
	UserIdTwo string `protobuf:"bytes,7,opt,name=user_id_two,json=userIdTwo,proto3" json:"user_id_two,omitempty"`
	// contains filtered or unexported fields
}

A set of joins and leaves on a particular channel.

func (*ChannelPresenceEventMsg) BuildEnvelope

func (msg *ChannelPresenceEventMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*ChannelPresenceEventMsg) Descriptor deprecated

func (*ChannelPresenceEventMsg) Descriptor() ([]byte, []int)

Deprecated: Use ChannelPresenceEventMsg.ProtoReflect.Descriptor instead.

func (*ChannelPresenceEventMsg) GetChannelId

func (x *ChannelPresenceEventMsg) GetChannelId() string

func (*ChannelPresenceEventMsg) GetGroupId

func (x *ChannelPresenceEventMsg) GetGroupId() string

func (*ChannelPresenceEventMsg) GetJoins

func (x *ChannelPresenceEventMsg) GetJoins() []*UserPresenceMsg

func (*ChannelPresenceEventMsg) GetLeaves

func (x *ChannelPresenceEventMsg) GetLeaves() []*UserPresenceMsg

func (*ChannelPresenceEventMsg) GetRoomName

func (x *ChannelPresenceEventMsg) GetRoomName() string

func (*ChannelPresenceEventMsg) GetUserIdOne

func (x *ChannelPresenceEventMsg) GetUserIdOne() string

func (*ChannelPresenceEventMsg) GetUserIdTwo

func (x *ChannelPresenceEventMsg) GetUserIdTwo() string

func (*ChannelPresenceEventMsg) ProtoMessage

func (*ChannelPresenceEventMsg) ProtoMessage()

func (*ChannelPresenceEventMsg) ProtoReflect

func (x *ChannelPresenceEventMsg) ProtoReflect() protoreflect.Message

func (*ChannelPresenceEventMsg) Reset

func (x *ChannelPresenceEventMsg) Reset()

func (*ChannelPresenceEventMsg) String

func (x *ChannelPresenceEventMsg) String() string

type ChannelType

type ChannelType int32

The type of chat channel.

const (
	// Default case. Assumed as ROOM type.
	ChannelType_TYPE_UNSPECIFIED ChannelType = 0
	// A room which anyone can join to chat.
	ChannelType_ROOM ChannelType = 1
	// A private channel for 1-on-1 chat.
	ChannelType_DIRECT_MESSAGE ChannelType = 2
	// A channel for group chat.
	ChannelType_GROUP ChannelType = 3
)

func (ChannelType) Descriptor

func (ChannelType) Enum

func (x ChannelType) Enum() *ChannelType

func (ChannelType) EnumDescriptor deprecated

func (ChannelType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ChannelType.Descriptor instead.

func (ChannelType) Number

func (x ChannelType) Number() protoreflect.EnumNumber

func (ChannelType) String

func (x ChannelType) String() string

func (ChannelType) Type

type Client

type Client struct {
	AuthHandler func(context.Context, *Client) error
	// contains filtered or unexported fields
}

Client is a nakama client.

func New

func New(opts ...Option) *Client

New creates a new nakama client.

func (*Client) Account

func (cl *Client) Account(ctx context.Context) (*AccountResponse, error)

Account retrieves the user's account.

func (*Client) AccountAsync

func (cl *Client) AccountAsync(ctx context.Context, f func(*AccountResponse, error))

AccountAsync retrieves the user's account.

func (*Client) AddFriends

func (cl *Client) AddFriends(ctx context.Context, ids ...string) error

AddFriends adds friends by id.

func (*Client) AddFriendsAsync

func (cl *Client) AddFriendsAsync(ctx context.Context, ids []string, f func(error))

AddFriendsAsync adds friends by id.

func (*Client) AddFriendsUsernames

func (cl *Client) AddFriendsUsernames(ctx context.Context, usernames ...string) error

AddFriendsUsernames adds friends by username.

func (*Client) AddFriendsUsernamesAsync

func (cl *Client) AddFriendsUsernamesAsync(ctx context.Context, usernames []string, f func(error))

AddFriendsUsernamesAsync adds friends by username.

func (*Client) AddGroupUsers

func (cl *Client) AddGroupUsers(ctx context.Context, groupId string, userIds ...string) error

AddGroupUsers adds users to a group, or accepts their join requests.

func (*Client) AddGroupUsersAsync

func (cl *Client) AddGroupUsersAsync(ctx context.Context, groupId string, userIds []string, f func(error))

AddGroupUsersAsync adds users to a group or accepts their join requests.

func (*Client) AuthenticateApple

func (cl *Client) AuthenticateApple(ctx context.Context, token string, create bool, username string) error

AuthenticateApple authenticates a user with a Apple token.

func (*Client) AuthenticateAppleAsync

func (cl *Client) AuthenticateAppleAsync(ctx context.Context, token string, create bool, username string, f func(err error))

AuthenticateAppleAsync authenticates a user with a Apple token.

func (*Client) AuthenticateCustom

func (cl *Client) AuthenticateCustom(ctx context.Context, id string, create bool, username string) error

AuthenticateCustom authenticates a user with a id.

func (*Client) AuthenticateCustomAsync

func (cl *Client) AuthenticateCustomAsync(ctx context.Context, id string, create bool, username string, f func(err error))

AuthenticateCustomAsync authenticates a user with a id.

func (*Client) AuthenticateDevice

func (cl *Client) AuthenticateDevice(ctx context.Context, id string, create bool, username string) error

AuthenticateDevice authenticates a user with a device id.

func (*Client) AuthenticateDeviceAsync

func (cl *Client) AuthenticateDeviceAsync(ctx context.Context, id string, create bool, username string, f func(err error))

AuthenticateDeviceAsync authenticates a user with a device id.

func (*Client) AuthenticateEmail

func (cl *Client) AuthenticateEmail(ctx context.Context, email, password string, create bool, username string) error

AuthenticateEmail authenticates a user with a email/password.

func (*Client) AuthenticateEmailAsync

func (cl *Client) AuthenticateEmailAsync(ctx context.Context, email, password string, create bool, username string, f func(err error))

AuthenticateEmailAsync authenticates a user with a email/password.

func (*Client) AuthenticateFacebook

func (cl *Client) AuthenticateFacebook(ctx context.Context, token string, create bool, username string, sync bool) error

AuthenticateFacebook authenticates a user with a Facebook token.

func (*Client) AuthenticateFacebookAsync

func (cl *Client) AuthenticateFacebookAsync(ctx context.Context, token string, create bool, username string, sync bool, f func(err error))

AuthenticateFacebookAsync authenticates a user with a Facebook token.

func (*Client) AuthenticateFacebookInstantGame

func (cl *Client) AuthenticateFacebookInstantGame(ctx context.Context, token string, create bool, username string) error

AuthenticateFacebookInstantGame authenticates a user with a Facebook Instant Game token.

func (*Client) AuthenticateFacebookInstantGameAsync

func (cl *Client) AuthenticateFacebookInstantGameAsync(ctx context.Context, signedPlayerInfo string, create bool, username string, f func(err error))

AuthenticateFacebookInstantGameAsync authenticates a user with a Facebook Instant Game token.

func (*Client) AuthenticateGameCenter

func (cl *Client) AuthenticateGameCenter(ctx context.Context, req *AuthenticateGameCenterRequest) error

AuthenticateGameCenter authenticates a user with a Apple GameCenter token.

func (*Client) AuthenticateGameCenterAsync

func (cl *Client) AuthenticateGameCenterAsync(ctx context.Context, req *AuthenticateGameCenterRequest, f func(err error))

AuthenticateGameCenterAsync authenticates a user with a Apple GameCenter token.

func (*Client) AuthenticateGoogle

func (cl *Client) AuthenticateGoogle(ctx context.Context, token string, create bool, username string) error

AuthenticateGoogle authenticates a user with a Google token.

func (*Client) AuthenticateGoogleAsync

func (cl *Client) AuthenticateGoogleAsync(ctx context.Context, token string, create bool, username string, f func(err error))

AuthenticateGoogleAsync authenticates a user with a Google token.

func (*Client) AuthenticateSteam

func (cl *Client) AuthenticateSteam(ctx context.Context, token string, create bool, username string, sync bool) error

AuthenticateSteam authenticates a user with a Steam token.

func (*Client) AuthenticateSteamAsync

func (cl *Client) AuthenticateSteamAsync(ctx context.Context, token string, create bool, username string, sync bool, f func(err error))

AuthenticateSteamAsync authenticates a user with a Steam token.

func (*Client) BanGroupUsers

func (cl *Client) BanGroupUsers(ctx context.Context, groupId string, userIds ...string) error

BanGroupUsers bans users from a group.

func (*Client) BanGroupUsersAsync

func (cl *Client) BanGroupUsersAsync(ctx context.Context, groupId string, userIds []string, f func(error))

BanGroupUsersAsync bans users from a group.

func (*Client) BlockFriends

func (cl *Client) BlockFriends(ctx context.Context, ids ...string) error

BlockFriends blocks friends by id.

func (*Client) BlockFriendsAsync

func (cl *Client) BlockFriendsAsync(ctx context.Context, ids []string, f func(error))

BlockFriendsAsync blocks friends by id.

func (*Client) BlockFriendsUsernames

func (cl *Client) BlockFriendsUsernames(ctx context.Context, usernames ...string) error

BlockFriendsUsernames blocks friends by username.

func (*Client) BlockFriendsUsernamesAsync

func (cl *Client) BlockFriendsUsernamesAsync(ctx context.Context, usernames []string, f func(error))

BlockFriendsUsernamesAsync blocks friends by username.

func (*Client) BuildRequest

func (cl *Client) BuildRequest(ctx context.Context, method, typ string, query url.Values, body io.Reader) (*http.Request, error)

BuildRequest builds a http request.

func (*Client) ChannelMessages

func (cl *Client) ChannelMessages(ctx context.Context, req *ChannelMessagesRequest) (*ChannelMessagesResponse, error)

ChannelMessages retrieves a channel's messages.

func (*Client) ChannelMessagesAsync

func (cl *Client) ChannelMessagesAsync(ctx context.Context, req *ChannelMessagesRequest, f func(*ChannelMessagesResponse, error))

ChannelMessagesAsync retrieves a channel's messages.

func (*Client) CreateGroup

func (cl *Client) CreateGroup(ctx context.Context, req *CreateGroupRequest) (*CreateGroupResponse, error)

CreateGroup creates a new group.

func (*Client) CreateGroupAsync

func (cl *Client) CreateGroupAsync(ctx context.Context, req *CreateGroupRequest, f func(*CreateGroupResponse, error))

CreateGroupAsync creates a new group.

func (*Client) DeleteFriends

func (cl *Client) DeleteFriends(ctx context.Context, ids ...string) error

DeleteFriends deletes friends by id.

func (*Client) DeleteFriendsAsync

func (cl *Client) DeleteFriendsAsync(ctx context.Context, ids []string, f func(error))

DeleteFriendsAsync deletes friends by id.

func (*Client) DeleteFriendsUsernames

func (cl *Client) DeleteFriendsUsernames(ctx context.Context, usernames ...string) error

DeleteFriendsUsernames deletes friends by username.

func (*Client) DeleteFriendsUsernamesAsync

func (cl *Client) DeleteFriendsUsernamesAsync(ctx context.Context, usernames []string, f func(error))

DeleteFriendsUsernamesAsync deletes friends by username.

func (*Client) DeleteGroup

func (cl *Client) DeleteGroup(ctx context.Context, groupId string) error

DeleteGroup deletes a group.

func (*Client) DeleteGroupAsync

func (cl *Client) DeleteGroupAsync(ctx context.Context, groupId string, f func(error))

DeleteGroupAsync deletes a group.

func (*Client) DeleteLeaderboardRecord

func (cl *Client) DeleteLeaderboardRecord(ctx context.Context, leaderboardId string) error

DeleteLeaderboardRecord deletes a leaderboardRecord.

func (*Client) DeleteLeaderboardRecordAsync

func (cl *Client) DeleteLeaderboardRecordAsync(ctx context.Context, leaderboardRecordId string, f func(error))

DeleteLeaderboardRecordAsync deletes a leaderboardRecord.

func (*Client) DeleteNotifications

func (cl *Client) DeleteNotifications(ctx context.Context, ids ...string) error

DeleteNotifications deletes notifications.

func (*Client) DeleteNotificationsAsync

func (cl *Client) DeleteNotificationsAsync(ctx context.Context, ids []string, f func(error))

DeleteNotificationsAsync deletes notifications.

func (*Client) DeleteStorageObjects

func (cl *Client) DeleteStorageObjects(ctx context.Context, req *DeleteStorageObjectsRequest) error

DeleteStorageObjects deletes storage objects.

func (*Client) DeleteStorageObjectsAsync

func (cl *Client) DeleteStorageObjectsAsync(ctx context.Context, req *DeleteStorageObjectsRequest, f func(error))

DeleteStorageObjectsAsync deletes storage objects.

func (*Client) DeleteTournamentRecord added in v0.6.6

func (cl *Client) DeleteTournamentRecord(ctx context.Context, tournamentId string) error

DeleteTournamentRecord deletes a tournament record.

func (*Client) DeleteTournamentRecordAsync added in v0.6.6

func (cl *Client) DeleteTournamentRecordAsync(ctx context.Context, tournamentId string, f func(error))

DeleteTournamentRecordAsync deletes a tournament record.

func (*Client) DemoteGroupUsers

func (cl *Client) DemoteGroupUsers(ctx context.Context, groupId string, userIds ...string) error

DemoteGroupUsers demotes users from a group.

func (*Client) DemoteGroupUsersAsync

func (cl *Client) DemoteGroupUsersAsync(ctx context.Context, groupId string, userIds []string, f func(error))

DemoteGroupUsersAsync demotes users from a group.

func (*Client) Do

func (cl *Client) Do(ctx context.Context, method, typ string, auth bool, query url.Values, msg, v interface{}) error

Do executes a http request with method, type and url query values, passing msg as the request body (when not nil), and decoding the response body to v (when not nil). Will attempt to refresh the session token if the session is expired and refresh is true.

Uses Protobuf's google.golang.org/protobuf/encoding/protojson package to encode/decode msg and v when msg/v are a proto.Message. Otherwise uses Go's encoding/json package to encode/decode.

See: Marshal and Unmarshal.

func (*Client) Errf

func (cl *Client) Errf(s string, v ...interface{})

Errf satisfies the handler interface.

func (*Client) Event

func (cl *Client) Event(ctx context.Context, req *EventRequest) error

Event sends an event.

func (*Client) EventAsync

func (cl *Client) EventAsync(ctx context.Context, req *EventRequest, f func(error))

EventAsync sends an event.

func (*Client) Exec

func (cl *Client) Exec(req *http.Request) (*http.Response, error)

Exec executes the request http request.

func (*Client) Friends

func (cl *Client) Friends(ctx context.Context, req *FriendsRequest) (*FriendsResponse, error)

Friends retrieves friends.

func (*Client) FriendsAsync

func (cl *Client) FriendsAsync(ctx context.Context, req *FriendsRequest, f func(*FriendsResponse, error))

FriendsAsync retrieves friends.

func (*Client) GroupUsers

func (cl *Client) GroupUsers(ctx context.Context, req *GroupUsersRequest) (*GroupUsersResponse, error)

GroupUsers retrieves a group's users.

func (*Client) GroupUsersAsync

func (cl *Client) GroupUsersAsync(ctx context.Context, req *GroupUsersRequest, f func(*GroupUsersResponse, error))

GroupUsersAsync retrieves a group's users.

func (*Client) Groups

func (cl *Client) Groups(ctx context.Context, req *GroupsRequest) (*GroupsResponse, error)

Groups retrieves groups.

func (*Client) GroupsAsync

func (cl *Client) GroupsAsync(ctx context.Context, req *GroupsRequest, f func(*GroupsResponse, error))

GroupsAsync retrieves groups.

func (*Client) Healthcheck

func (cl *Client) Healthcheck(ctx context.Context) error

Healthcheck checks the health of the server.

func (*Client) HealthcheckAsync

func (cl *Client) HealthcheckAsync(ctx context.Context, f func(error))

Healthcheck checks the health of the server.

func (*Client) HttpClient

func (cl *Client) HttpClient() *http.Client

HttpClient satisfies the handler interface.

func (*Client) ImportFacebookFriends

func (cl *Client) ImportFacebookFriends(ctx context.Context, token string, reset bool) error

ImportFacebookFriends imports Facebook friends.

func (*Client) ImportFacebookFriendsAsync

func (cl *Client) ImportFacebookFriendsAsync(ctx context.Context, token string, reset bool, f func(error))

ImportFacebookFriendsAsync imports Facebook friends.

func (*Client) ImportSteamFriends

func (cl *Client) ImportSteamFriends(ctx context.Context, token string, reset bool) error

ImportSteamFriends imports Steam friends.

func (*Client) ImportSteamFriendsAsync

func (cl *Client) ImportSteamFriendsAsync(ctx context.Context, token string, reset bool, f func(error))

ImportSteamFriendsAsync imports Steam friends.

func (*Client) JoinGroup

func (cl *Client) JoinGroup(ctx context.Context, groupId string) error

JoinGroup joins a group.

func (*Client) JoinGroupAsync

func (cl *Client) JoinGroupAsync(ctx context.Context, groupId string, f func(error))

JoinGroupAsync joins a group.

func (*Client) JoinTournament

func (cl *Client) JoinTournament(ctx context.Context, tournamentId string) error

JoinTournament joins a tournament.

func (*Client) JoinTournamentAsync

func (cl *Client) JoinTournamentAsync(ctx context.Context, tournamentId string, f func(error))

JoinTournamentAsync joins a tournament.

func (*Client) KickGroupUsers

func (cl *Client) KickGroupUsers(ctx context.Context, groupId string, userIds ...string) error

KickGroupUsers kicks users from a group or decline their join request.

func (*Client) KickGroupUsersAsync

func (cl *Client) KickGroupUsersAsync(ctx context.Context, groupId string, userIds []string, f func(error))

KickGroupUsersAsync kicks users froum a group or decline their join request.

func (*Client) LeaderboardRecords

func (cl *Client) LeaderboardRecords(ctx context.Context, req *LeaderboardRecordsRequest) (*LeaderboardRecordsResponse, error)

LeaderboardRecords retrieves leaderboard records.

func (*Client) LeaderboardRecordsAroundOwner

func (cl *Client) LeaderboardRecordsAroundOwner(ctx context.Context, req *LeaderboardRecordsAroundOwnerRequest) (*LeaderboardRecordsResponse, error)

LeaderboardRecordsAroundOwner retrieves leaderboard records around owner.

func (*Client) LeaderboardRecordsAroundOwnerAsync

func (cl *Client) LeaderboardRecordsAroundOwnerAsync(ctx context.Context, req *LeaderboardRecordsAroundOwnerRequest, f func(*LeaderboardRecordsResponse, error))

LeaderboardRecordsAroundOwnerAsync retrieves leaderboard records around owner.

func (*Client) LeaderboardRecordsAsync

func (cl *Client) LeaderboardRecordsAsync(ctx context.Context, req *LeaderboardRecordsRequest, f func(*LeaderboardRecordsResponse, error))

LeaderboardRecordsAsync retrieves leaderboardRecords.

func (*Client) LeaveGroup

func (cl *Client) LeaveGroup(ctx context.Context, groupId string) error

LeaveGroup leaves a group.

func (*Client) LeaveGroupAsync

func (cl *Client) LeaveGroupAsync(ctx context.Context, groupId string, f func(error))

LeaveGroupAsync leaves a group.

func (*Client) LinkApple

func (cl *Client) LinkApple(ctx context.Context, token string) error

LinkApple adds a Apple token to the user's account.

func (*Client) LinkAppleAsync

func (cl *Client) LinkAppleAsync(ctx context.Context, token string, f func(error))

LinkApple adds a Apple token to the user's account.

func (*Client) LinkCustom

func (cl *Client) LinkCustom(ctx context.Context, id string) error

LinkCustom adds a custom id to the user's account.

func (*Client) LinkCustomAsync

func (cl *Client) LinkCustomAsync(ctx context.Context, id string, f func(error))

LinkCustom adds a custom id to the user's account.

func (*Client) LinkDevice

func (cl *Client) LinkDevice(ctx context.Context, id string) error

LinkDevice adds a device id to the user's account.

func (*Client) LinkDeviceAsync

func (cl *Client) LinkDeviceAsync(ctx context.Context, id string, f func(error))

LinkDevice adds a device id to the user's account.

func (*Client) LinkEmail

func (cl *Client) LinkEmail(ctx context.Context, email, password string) error

LinkEmail adds a email/password to the user's account.

func (*Client) LinkEmailAsync

func (cl *Client) LinkEmailAsync(ctx context.Context, email, password string, f func(error))

LinkEmail adds a email/password to the user's account.

func (*Client) LinkFacebook

func (cl *Client) LinkFacebook(ctx context.Context, token string, sync bool) error

LinkFacebook adds a Facebook token to the user's account.

func (*Client) LinkFacebookAsync

func (cl *Client) LinkFacebookAsync(ctx context.Context, token string, sync bool, f func(error))

LinkFacebook adds a Facebook token to the user's account.

func (*Client) LinkFacebookInstantGame

func (cl *Client) LinkFacebookInstantGame(ctx context.Context, signedPlayerInfo string) error

LinkFacebookInstantGame adds a Facebook Instant Game signedPlayerInfo to the user's account.

func (*Client) LinkFacebookInstantGameAsync

func (cl *Client) LinkFacebookInstantGameAsync(ctx context.Context, signedPlayerInfo string, f func(error))

LinkFacebookInstantGame adds a Facebook Instant Game signedPlayerInfo to the user's account.

func (*Client) LinkGameCenter

func (cl *Client) LinkGameCenter(ctx context.Context, req *LinkGameCenterRequest) error

LinkGameCenter adds a Apple GameCenter token to the user's account.

func (*Client) LinkGameCenterAsync

func (cl *Client) LinkGameCenterAsync(ctx context.Context, req *LinkGameCenterRequest, f func(error))

LinkGameCenter adds a Apple GameCenter token to the user's account.

func (*Client) LinkGoogle

func (cl *Client) LinkGoogle(ctx context.Context, token string) error

LinkGoogle adds a Google token to the user's account.

func (*Client) LinkGoogleAsync

func (cl *Client) LinkGoogleAsync(ctx context.Context, token string, f func(error))

LinkGoogle adds a Google token to the user's account.

func (*Client) LinkSteam

func (cl *Client) LinkSteam(ctx context.Context, token string, sync bool) error

LinkSteam adds a Steam token to the user's account.

func (*Client) LinkSteamAsync

func (cl *Client) LinkSteamAsync(ctx context.Context, token string, sync bool, f func(error))

LinkSteam adds a Steam token to the user's account.

func (*Client) Logf

func (cl *Client) Logf(s string, v ...interface{})

Logf satisfies the Handler interface.

func (*Client) Marshal

func (cl *Client) Marshal(v interface{}) (io.Reader, error)

Marshal marshals v. If v is a proto.Message, will use Protobuf's google.golang.org/protobuf/encoding/protojson package to encode the message, otherwise uses Go's encoding/json package.

func (*Client) Matches

func (cl *Client) Matches(ctx context.Context, req *MatchesRequest) (*MatchesResponse, error)

Matches retrieves matches.

func (*Client) MatchesAsync

func (cl *Client) MatchesAsync(ctx context.Context, req *MatchesRequest, f func(*MatchesResponse, error))

MatchesAsync retrieves matches.

func (*Client) NewConn

func (cl *Client) NewConn(ctx context.Context, opts ...ConnOption) (*Conn, error)

NewConn creates a new a nakama realtime websocket connection, and runs until the context is closed.

func (*Client) Notifications

func (cl *Client) Notifications(ctx context.Context, req *NotificationsRequest) (*NotificationsResponse, error)

Notifications retrieves notifications.

func (*Client) NotificationsAsync

func (cl *Client) NotificationsAsync(ctx context.Context, req *NotificationsRequest, f func(*NotificationsResponse, error))

NotificationsAsync retrieves notifications.

func (*Client) PromoteGroupUsers

func (cl *Client) PromoteGroupUsers(ctx context.Context, groupId string, userIds ...string) error

PromoteGroupUsers promotes users from a group.

func (*Client) PromoteGroupUsersAsync

func (cl *Client) PromoteGroupUsersAsync(ctx context.Context, groupId string, userIds []string, f func(error))

PromoteGroupUsersAsync promotes users from a group.

func (*Client) ReadStorageObjects

func (cl *Client) ReadStorageObjects(ctx context.Context, req *ReadStorageObjectsRequest) (*ReadStorageObjectsResponse, error)

ReadStorageObjects reads storage objects.

func (*Client) ReadStorageObjectsAsync

func (cl *Client) ReadStorageObjectsAsync(ctx context.Context, req *ReadStorageObjectsRequest, f func(*ReadStorageObjectsResponse, error))

ReadStorageObjectsAsync reads storage objects.

func (*Client) Rpc

func (cl *Client) Rpc(ctx context.Context, id string, payload, v interface{}) error

Rpc executes a remote procedure call.

func (*Client) RpcAsync

func (cl *Client) RpcAsync(ctx context.Context, id string, payload, v interface{}, f func(error))

RpcAsync executes a remote procedure call.

func (*Client) SessionEnd added in v0.5.0

func (cl *Client) SessionEnd()

SessionEnd ends a session without logging out. Use SessionLogout to perform a logout on the server.

func (*Client) SessionExpired

func (cl *Client) SessionExpired() bool

SessionExpired returns whether or not the session is expired.

func (*Client) SessionExpiry

func (cl *Client) SessionExpiry() time.Time

SessionExpiry returns the session expiry time.

func (*Client) SessionLogout

func (cl *Client) SessionLogout(ctx context.Context) error

SessionLogout logs out the session.

func (*Client) SessionRefresh

func (cl *Client) SessionRefresh(ctx context.Context) error

SessionRefresh refreshes auth token for the session.

func (*Client) SessionRefreshExpired

func (cl *Client) SessionRefreshExpired() bool

SessionRefreshExpired returns whether or not the session refresh token is expired.

func (*Client) SessionRefreshExpiry

func (cl *Client) SessionRefreshExpiry() time.Time

SessionRefreshExpiry returns the session refresh expiry time.

func (*Client) SessionRefreshToken

func (cl *Client) SessionRefreshToken() string

SessionRefreshToken returns the session refresh token.

func (*Client) SessionStart

func (cl *Client) SessionStart(session *SessionResponse) error

SessionStart starts a session.

func (*Client) SessionToken

func (cl *Client) SessionToken() string

SessionToken returns the session token.

func (*Client) SessionWasCreated added in v0.8.4

func (cl *Client) SessionWasCreated() bool

SessionWasCreated returns whether or not the account was newly created at the beginning of the session.

func (*Client) SocketURL

func (cl *Client) SocketURL() (string, error)

SocketURL satisfies the Handler interface.

func (*Client) StorageObjects

func (cl *Client) StorageObjects(ctx context.Context, req *StorageObjectsRequest) (*StorageObjectsResponse, error)

StorageObjects retrieves storage objects.

func (*Client) StorageObjectsAsync

func (cl *Client) StorageObjectsAsync(ctx context.Context, req *StorageObjectsRequest, f func(*StorageObjectsResponse, error))

StorageObjectsAsync retrieves storage objects.

func (*Client) Subscription

func (cl *Client) Subscription(ctx context.Context, productId string) (*SubscriptionResponse, error)

Subscription retrieves subscription by product id.

func (*Client) SubscriptionAsync

func (cl *Client) SubscriptionAsync(ctx context.Context, productId string, f func(*SubscriptionResponse, error))

SubscriptionAsync retrieves subscription by product id.

func (*Client) Subscriptions

func (cl *Client) Subscriptions(ctx context.Context, req *SubscriptionsRequest) (*SubscriptionsResponse, error)

Subscriptions retrieves subscriptions.

func (*Client) SubscriptionsAsync

func (cl *Client) SubscriptionsAsync(ctx context.Context, req *SubscriptionsRequest, f func(*SubscriptionsResponse, error))

SubscriptionsAsync retrieves subscriptions.

func (*Client) Token

func (cl *Client) Token(ctx context.Context) (string, error)

Token returns the current session token. Satisfies the Handler interface.

func (*Client) TournamentRecords

func (cl *Client) TournamentRecords(ctx context.Context, req *TournamentRecordsRequest) (*TournamentRecordsResponse, error)

TournamentRecords retrieves tournament records.

func (*Client) TournamentRecordsAroundOwner

func (cl *Client) TournamentRecordsAroundOwner(ctx context.Context, req *TournamentRecordsAroundOwnerRequest) (*TournamentRecordsResponse, error)

TournamentRecordsAroundOwner retrieves tournament records around owner.

func (*Client) TournamentRecordsAroundOwnerAsync

func (cl *Client) TournamentRecordsAroundOwnerAsync(ctx context.Context, req *TournamentRecordsAroundOwnerRequest, f func(*TournamentRecordsResponse, error))

TournamentRecordsAroundOwnerAsync retrieves tournament records around owner.

func (*Client) TournamentRecordsAsync

func (cl *Client) TournamentRecordsAsync(ctx context.Context, req *TournamentRecordsRequest, f func(*TournamentRecordsResponse, error))

TournamentRecordsAsync retrieves tournament records.

func (*Client) Tournaments

func (cl *Client) Tournaments(ctx context.Context, req *TournamentsRequest) (*TournamentsResponse, error)

Tournaments retrieves tournaments.

func (*Client) TournamentsAsync

func (cl *Client) TournamentsAsync(ctx context.Context, req *TournamentsRequest, f func(*TournamentsResponse, error))

TournamentsAsync retrieves tournaments.

func (*Client) UnlinkApple

func (cl *Client) UnlinkApple(ctx context.Context, token string) error

UnlinkApple removes a Apple token from the user's account.

func (*Client) UnlinkAppleAsync

func (cl *Client) UnlinkAppleAsync(ctx context.Context, token string, f func(error))

UnlinkApple removes a Apple token from the user's account.

func (*Client) UnlinkCustom

func (cl *Client) UnlinkCustom(ctx context.Context, id string) error

UnlinkCustom removes a custom id from the user's account.

func (*Client) UnlinkCustomAsync

func (cl *Client) UnlinkCustomAsync(ctx context.Context, id string, f func(error))

UnlinkCustom removes a custom id from the user's account.

func (*Client) UnlinkDevice

func (cl *Client) UnlinkDevice(ctx context.Context, id string) error

UnlinkDevice removes a device id from the user's account.

func (*Client) UnlinkDeviceAsync

func (cl *Client) UnlinkDeviceAsync(ctx context.Context, id string, f func(error))

UnlinkDevice removes a device id from the user's account.

func (*Client) UnlinkEmail

func (cl *Client) UnlinkEmail(ctx context.Context, email, password string) error

UnlinkEmail removes a email/password from the user's account.

func (*Client) UnlinkEmailAsync

func (cl *Client) UnlinkEmailAsync(ctx context.Context, email, password string, f func(error))

UnlinkEmail removes a email/password from the user's account.

func (*Client) UnlinkFacebook

func (cl *Client) UnlinkFacebook(ctx context.Context, token string, sync bool) error

UnlinkFacebook removes a Facebook token from the user's account.

func (*Client) UnlinkFacebookAsync

func (cl *Client) UnlinkFacebookAsync(ctx context.Context, token string, sync bool, f func(error))

UnlinkFacebook removes a Facebook token from the user's account.

func (*Client) UnlinkFacebookInstantGame

func (cl *Client) UnlinkFacebookInstantGame(ctx context.Context, signedPlayerInfo string) error

UnlinkFacebookInstantGame removes a Facebook Instant Game signedPlayerInfo to the user's account.

func (*Client) UnlinkFacebookInstantGameAsync

func (cl *Client) UnlinkFacebookInstantGameAsync(ctx context.Context, signedPlayerInfo string, f func(error))

UnlinkFacebookInstantGame removes a Facebook Instant Game signedPlayerInfo to the user's account.

func (*Client) UnlinkGameCenter

func (cl *Client) UnlinkGameCenter(ctx context.Context, req *UnlinkGameCenterRequest) error

UnlinkGameCenter removes a Apple GameCenter token from the user's account.

func (*Client) UnlinkGameCenterAsync

func (cl *Client) UnlinkGameCenterAsync(ctx context.Context, req *UnlinkGameCenterRequest, f func(error))

UnlinkGameCenter removes a Apple GameCenter token from the user's account.

func (*Client) UnlinkGoogle

func (cl *Client) UnlinkGoogle(ctx context.Context, token string) error

UnlinkGoogle removes a Google token from the user's account.

func (*Client) UnlinkGoogleAsync

func (cl *Client) UnlinkGoogleAsync(ctx context.Context, token string, f func(error))

UnlinkGoogle removes a Google token from the user's account.

func (*Client) UnlinkSteam

func (cl *Client) UnlinkSteam(ctx context.Context, token string, sync bool) error

UnlinkSteam removes a Steam token from the user's account.

func (*Client) UnlinkSteamAsync

func (cl *Client) UnlinkSteamAsync(ctx context.Context, token string, sync bool, f func(error))

UnlinkSteam removes a Steam token from the user's account.

func (*Client) Unmarshal

func (cl *Client) Unmarshal(r io.Reader, v interface{}) error

Unmarshal unmarshals r to v. If v is a proto.Message, will use Protobuf's google.golang.org/protobuf/encoding/protojson package to decode the message, otherwise uses Go's encoding/json package.

func (*Client) UpdateAccount

func (cl *Client) UpdateAccount(ctx context.Context, req *UpdateAccountRequest) error

UpdateAccount updates the user's account.

func (*Client) UpdateAccountAsync

func (cl *Client) UpdateAccountAsync(ctx context.Context, req *UpdateAccountRequest, f func(error))

UpdateAccountAsync updates the user's account.

func (*Client) UpdateGroup

func (cl *Client) UpdateGroup(ctx context.Context, req *UpdateGroupRequest) error

UpdateGroup updates a group.

func (*Client) UpdateGroupAsync

func (cl *Client) UpdateGroupAsync(ctx context.Context, req *UpdateGroupRequest, f func(error))

UpdateGroupAsync updates a group.

func (*Client) UserGroups

func (cl *Client) UserGroups(ctx context.Context, userId string) (*UserGroupsResponse, error)

UserGroups retrieves a user's groups.

func (*Client) UserGroupsAsync

func (cl *Client) UserGroupsAsync(ctx context.Context, userId string, f func(*UserGroupsResponse, error))

UserGroupsAsync retrieves a user's groups.

func (*Client) Users

func (cl *Client) Users(ctx context.Context, ids ...string) (*UsersResponse, error)

Users retrieves users by id.

func (*Client) UsersAsync

func (cl *Client) UsersAsync(ctx context.Context, ids []string, f func(*UsersResponse, error))

UsersAsync retrieves users by id.

func (*Client) UsersUsernames

func (cl *Client) UsersUsernames(ctx context.Context, usernames ...string) (*UsersResponse, error)

UsersUsernames retrieves users by username.

func (*Client) UsersUsernamesAsync

func (cl *Client) UsersUsernamesAsync(ctx context.Context, usernames []string, f func(*UsersResponse, error))

UsersUsernamesAsync retrieves users by username.

func (*Client) ValidatePurchaseApple

func (cl *Client) ValidatePurchaseApple(ctx context.Context, receipt string, persist bool) (*ValidatePurchaseResponse, error)

ValidatePurchaseApple validates a Apple purchase.

func (*Client) ValidatePurchaseAppleAsync

func (cl *Client) ValidatePurchaseAppleAsync(ctx context.Context, receipt string, persist bool, f func(*ValidatePurchaseResponse, error))

ValidatePurchaseApple validates a Apple purchase.

func (*Client) ValidatePurchaseGoogle

func (cl *Client) ValidatePurchaseGoogle(ctx context.Context, receipt string, persist bool) (*ValidatePurchaseResponse, error)

ValidatePurchaseGoogle validates a Google purchase.

func (*Client) ValidatePurchaseGoogleAsync

func (cl *Client) ValidatePurchaseGoogleAsync(ctx context.Context, receipt string, persist bool, f func(*ValidatePurchaseResponse, error))

ValidatePurchaseGoogle validates a Google purchase.

func (*Client) ValidatePurchaseHuawei

func (cl *Client) ValidatePurchaseHuawei(ctx context.Context, purchase, signature string, persist bool) (*ValidatePurchaseResponse, error)

ValidatePurchaseHuawei validates a Huawei purchase.

func (*Client) ValidatePurchaseHuaweiAsync

func (cl *Client) ValidatePurchaseHuaweiAsync(ctx context.Context, purchase, signature string, persist bool, f func(*ValidatePurchaseResponse, error))

ValidatePurchaseHuawei validates a Huawei purchase.

func (*Client) ValidateSubscriptionApple

func (cl *Client) ValidateSubscriptionApple(ctx context.Context, receipt string, persist bool) (*ValidateSubscriptionResponse, error)

ValidateSubscriptionApple validates a Apple subscription.

func (*Client) ValidateSubscriptionAppleAsync

func (cl *Client) ValidateSubscriptionAppleAsync(ctx context.Context, receipt string, persist bool, f func(*ValidateSubscriptionResponse, error))

ValidateSubscriptionApple validates a Apple subscription.

func (*Client) ValidateSubscriptionGoogle

func (cl *Client) ValidateSubscriptionGoogle(ctx context.Context, receipt string, persist bool) (*ValidateSubscriptionResponse, error)

ValidateSubscriptionGoogle validates a Google subscription.

func (*Client) ValidateSubscriptionGoogleAsync

func (cl *Client) ValidateSubscriptionGoogleAsync(ctx context.Context, receipt string, persist bool, f func(*ValidateSubscriptionResponse, error))

ValidateSubscriptionGoogle validates a Google subscription.

func (*Client) WriteLeaderboardRecord

func (cl *Client) WriteLeaderboardRecord(ctx context.Context, req *WriteLeaderboardRecordRequest) (*WriteLeaderboardRecordResponse, error)

WriteLeaderboardRecord writes a leaderboard record.

func (*Client) WriteLeaderboardRecordAsync

func (cl *Client) WriteLeaderboardRecordAsync(ctx context.Context, req *WriteLeaderboardRecordRequest, f func(*WriteLeaderboardRecordResponse, error))

WriteLeaderboardRecordAsync writes a leaderboard record.

func (*Client) WriteStorageObjects

func (cl *Client) WriteStorageObjects(ctx context.Context, req *WriteStorageObjectsRequest) (*WriteStorageObjectsResponse, error)

WriteStorageObjects writes a storage objects.

func (*Client) WriteStorageObjectsAsync

func (cl *Client) WriteStorageObjectsAsync(ctx context.Context, req *WriteStorageObjectsRequest, f func(*WriteStorageObjectsResponse, error))

WriteStorageObjectsAsync writes a storage objects.

func (*Client) WriteTournamentRecord

func (cl *Client) WriteTournamentRecord(ctx context.Context, req *WriteTournamentRecordRequest) (*WriteTournamentRecordResponse, error)

WriteTournamentRecord writes a tournament record.

func (*Client) WriteTournamentRecordAsync

func (cl *Client) WriteTournamentRecordAsync(ctx context.Context, req *WriteTournamentRecordRequest, f func(*WriteTournamentRecordResponse, error))

WriteTournamentRecordAsync writes a tournament record.

type ClientError

type ClientError struct {
	StatusCode int
	Code       Code   `json:"code"`
	Message    string `json:"message"`
}

ClientError is a client error.

func (*ClientError) Error

func (err *ClientError) Error() string

Error satisfies the error interface.

type Code added in v0.3.2

type Code uint32

Code is a grpc status code.

See: google.golang.org/grpc/codes

const (
	// OK is returned on success.
	CodeOK Code = 0

	// Canceled indicates the operation was canceled (typically by the caller).
	//
	// The gRPC framework will generate this error code when cancellation
	// is requested.
	CodeCanceled Code = 1

	// Unknown error. An example of where this error may be returned is
	// if a Status value received from another address space belongs to
	// an error-space that is not known in this address space. Also
	// errors raised by APIs that do not return enough error information
	// may be converted to this error.
	//
	// The gRPC framework will generate this error code in the above two
	// mentioned cases.
	CodeUnknown Code = 2

	// InvalidArgument indicates client specified an invalid argument.
	// Note that this differs from FailedPrecondition. It indicates arguments
	// that are problematic regardless of the state of the system
	// (e.g., a malformed file name).
	//
	// This error code will not be generated by the gRPC framework.
	CodeInvalidArgument Code = 3

	// DeadlineExceeded means operation expired before completion.
	// For operations that change the state of the system, this error may be
	// returned even if the operation has completed successfully. For
	// example, a successful response from a server could have been delayed
	// long enough for the deadline to expire.
	//
	// The gRPC framework will generate this error code when the deadline is
	// exceeded.
	CodeDeadlineExceeded Code = 4

	// NotFound means some requested entity (e.g., file or directory) was
	// not found.
	//
	// This error code will not be generated by the gRPC framework.
	CodeNotFound Code = 5

	// AlreadyExists means an attempt to create an entity failed because one
	// already exists.
	//
	// This error code will not be generated by the gRPC framework.
	CodeAlreadyExists Code = 6

	// PermissionDenied indicates the caller does not have permission to
	// execute the specified operation. It must not be used for rejections
	// caused by exhausting some resource (use ResourceExhausted
	// instead for those errors). It must not be
	// used if the caller cannot be identified (use Unauthenticated
	// instead for those errors).
	//
	// This error code will not be generated by the gRPC core framework,
	// but expect authentication middleware to use it.
	CodePermissionDenied Code = 7

	// ResourceExhausted indicates some resource has been exhausted, perhaps
	// a per-user quota, or perhaps the entire file system is out of space.
	//
	// This error code will be generated by the gRPC framework in
	// out-of-memory and server overload situations, or when a message is
	// larger than the configured maximum size.
	CodeResourceExhausted Code = 8

	// FailedPrecondition indicates operation was rejected because the
	// system is not in a state required for the operation's execution.
	// For example, directory to be deleted may be non-empty, an rmdir
	// operation is applied to a non-directory, etc.
	//
	// A litmus test that may help a service implementor in deciding
	// between FailedPrecondition, Aborted, and Unavailable:
	//  (a) Use Unavailable if the client can retry just the failing call.
	//  (b) Use Aborted if the client should retry at a higher-level
	//      (e.g., restarting a read-modify-write sequence).
	//  (c) Use FailedPrecondition if the client should not retry until
	//      the system state has been explicitly fixed. E.g., if an "rmdir"
	//      fails because the directory is non-empty, FailedPrecondition
	//      should be returned since the client should not retry unless
	//      they have first fixed up the directory by deleting files from it.
	//  (d) Use FailedPrecondition if the client performs conditional
	//      REST Get/Update/Delete on a resource and the resource on the
	//      server does not match the condition. E.g., conflicting
	//      read-modify-write on the same resource.
	//
	// This error code will not be generated by the gRPC framework.
	CodeFailedPrecondition Code = 9

	// Aborted indicates the operation was aborted, typically due to a
	// concurrency issue like sequencer check failures, transaction aborts,
	// etc.
	//
	// See litmus test above for deciding between FailedPrecondition,
	// Aborted, and Unavailable.
	//
	// This error code will not be generated by the gRPC framework.
	CodeAborted Code = 10

	// OutOfRange means operation was attempted past the valid range.
	// E.g., seeking or reading past end of file.
	//
	// Unlike InvalidArgument, this error indicates a problem that may
	// be fixed if the system state changes. For example, a 32-bit file
	// system will generate InvalidArgument if asked to read at an
	// offset that is not in the range [0,2^32-1], but it will generate
	// OutOfRange if asked to read from an offset past the current
	// file size.
	//
	// There is a fair bit of overlap between FailedPrecondition and
	// OutOfRange. We recommend using OutOfRange (the more specific
	// error) when it applies so that callers who are iterating through
	// a space can easily look for an OutOfRange error to detect when
	// they are done.
	//
	// This error code will not be generated by the gRPC framework.
	CodeOutOfRange Code = 11

	// Unimplemented indicates operation is not implemented or not
	// supported/enabled in this service.
	//
	// This error code will be generated by the gRPC framework. Most
	// commonly, you will see this error code when a method implementation
	// is missing on the server. It can also be generated for unknown
	// compression algorithms or a disagreement as to whether an RPC should
	// be streaming.
	CodeUnimplemented Code = 12

	// Internal errors. Means some invariants expected by underlying
	// system has been broken. If you see one of these errors,
	// something is very broken.
	//
	// This error code will be generated by the gRPC framework in several
	// internal error conditions.
	CodeInternal Code = 13

	// Unavailable indicates the service is currently unavailable.
	// This is a most likely a transient condition and may be corrected
	// by retrying with a backoff. Note that it is not always safe to retry
	// non-idempotent operations.
	//
	// See litmus test above for deciding between FailedPrecondition,
	// Aborted, and Unavailable.
	//
	// This error code will be generated by the gRPC framework during
	// abrupt shutdown of a server process or network connection.
	CodeUnavailable Code = 14

	// DataLoss indicates unrecoverable data loss or corruption.
	//
	// This error code will not be generated by the gRPC framework.
	CodeDataLoss Code = 15

	// Unauthenticated indicates the request does not have valid
	// authentication credentials for the operation.
	//
	// The gRPC framework will generate this error code when the
	// authentication metadata is invalid or a Credentials callback fails,
	// but also expect authentication middleware to generate it.
	CodeUnauthenticated Code = 16
)

func (Code) String added in v0.3.2

func (i Code) String() string

type Conn

type Conn struct {
	ConnectHandler              func(context.Context)
	DisconnectHandler           func(context.Context, error)
	ErrorHandler                func(context.Context, *ErrorMsg)
	ChannelMessageHandler       func(context.Context, *ChannelMessageMsg)
	ChannelPresenceEventHandler func(context.Context, *ChannelPresenceEventMsg)
	MatchDataHandler            func(context.Context, *MatchDataMsg)
	MatchPresenceEventHandler   func(context.Context, *MatchPresenceEventMsg)
	MatchmakerMatchedHandler    func(context.Context, *MatchmakerMatchedMsg)
	NotificationsHandler        func(context.Context, *NotificationsMsg)
	StatusPresenceEventHandler  func(context.Context, *StatusPresenceEventMsg)
	StreamDataHandler           func(context.Context, *StreamDataMsg)
	StreamPresenceEventHandler  func(context.Context, *StreamPresenceEventMsg)
	// contains filtered or unexported fields
}

Conn is a nakama realtime websocket connection.

func NewConn

func NewConn(ctx context.Context, opts ...ConnOption) (*Conn, error)

NewConn creates a new nakama realtime websocket connection.

func (*Conn) ChannelJoin

func (conn *Conn) ChannelJoin(ctx context.Context, target string, typ ChannelType, persistence, hidden bool) (*ChannelMsg, error)

ChannelJoin sends a message to join a chat channel.

func (*Conn) ChannelJoinAsync

func (conn *Conn) ChannelJoinAsync(ctx context.Context, target string, typ ChannelType, persistence, hidden bool, f func(*ChannelMsg, error))

ChannelJoinAsync sends a message to join a chat channel.

func (*Conn) ChannelLeave

func (conn *Conn) ChannelLeave(ctx context.Context, channelId string) error

ChannelLeave sends a message to leave a chat channel.

func (*Conn) ChannelLeaveAsync

func (conn *Conn) ChannelLeaveAsync(ctx context.Context, channelId string, f func(error))

ChannelLeaveAsync sends a message to leave a chat channel.

func (*Conn) ChannelMessageRemove

func (conn *Conn) ChannelMessageRemove(ctx context.Context, channelId, messageId string) (*ChannelMessageAckMsg, error)

ChannelMessageRemove sends a message to remove a message from a channel.

func (*Conn) ChannelMessageRemoveAsync

func (conn *Conn) ChannelMessageRemoveAsync(ctx context.Context, channelId, messageId string, f func(*ChannelMessageAckMsg, error))

ChannelMessageRemoveAsync sends a message to remove a message from a channel.

func (*Conn) ChannelMessageSend

func (conn *Conn) ChannelMessageSend(ctx context.Context, channelId string, v interface{}) (*ChannelMessageAckMsg, error)

ChannelMessageSend sends a message on a channel.

func (*Conn) ChannelMessageSendAsync

func (conn *Conn) ChannelMessageSendAsync(ctx context.Context, channelId string, v interface{}, f func(*ChannelMessageAckMsg, error))

ChannelMessageSendAsync sends a message on a channel.

func (*Conn) ChannelMessageSendRaw added in v0.6.4

func (conn *Conn) ChannelMessageSendRaw(ctx context.Context, channelId, content string) (*ChannelMessageAckMsg, error)

ChannelMessageSendRaw sends a message on a channel.

func (*Conn) ChannelMessageSendRawAsync added in v0.6.4

func (conn *Conn) ChannelMessageSendRawAsync(ctx context.Context, channelId, content string, f func(*ChannelMessageAckMsg, error))

ChannelMessageSendAsync sends a message on a channel.

func (*Conn) ChannelMessageUpdate

func (conn *Conn) ChannelMessageUpdate(ctx context.Context, channelId, messageId string, v interface{}) (*ChannelMessageAckMsg, error)

ChannelMessageUpdate sends a message to update a message on a channel.

func (*Conn) ChannelMessageUpdateAsync

func (conn *Conn) ChannelMessageUpdateAsync(ctx context.Context, channelId, messageId string, v interface{}, f func(*ChannelMessageAckMsg, error))

ChannelMessageUpdateAsync sends a message to update a message on a channel.

func (*Conn) ChannelMessageUpdateRaw added in v0.6.4

func (conn *Conn) ChannelMessageUpdateRaw(ctx context.Context, channelId, messageId, content string) (*ChannelMessageAckMsg, error)

ChannelMessageUpdateRaw sends a message to update a message on a channel.

func (*Conn) ChannelMessageUpdateRawAsync added in v0.6.4

func (conn *Conn) ChannelMessageUpdateRawAsync(ctx context.Context, channelId, messageId, content string, f func(*ChannelMessageAckMsg, error))

ChannelMessageUpdateRawAsync sends a message to update a message on a channel.

func (*Conn) Close

func (conn *Conn) Close() error

Close closes the websocket connection.

func (*Conn) CloseWithErr added in v0.4.6

func (conn *Conn) CloseWithErr(err error) error

CloseWithErr closes the websocket connection with an error.

func (*Conn) CloseWithStopErr added in v0.5.0

func (conn *Conn) CloseWithStopErr(stop, force bool, err error) error

CloseWithStopErr closes the websocket connection with an error.

func (*Conn) Connected added in v0.4.6

func (conn *Conn) Connected() bool

Connected returns true when the websocket connection is connected to the Nakama server.

func (*Conn) MatchCreate

func (conn *Conn) MatchCreate(ctx context.Context, name string) (*MatchMsg, error)

MatchCreate sends a message to create a multiplayer match.

func (*Conn) MatchCreateAsync

func (conn *Conn) MatchCreateAsync(ctx context.Context, name string, f func(*MatchMsg, error))

MatchCreateAsync sends a message to create a multiplayer match.

func (*Conn) MatchDataSend

func (conn *Conn) MatchDataSend(ctx context.Context, matchId string, opCode int64, data []byte, reliable bool, presences ...*UserPresenceMsg) error

MatchDataSend sends a message to send input to a multiplayer match.

func (*Conn) MatchDataSendAsync

func (conn *Conn) MatchDataSendAsync(ctx context.Context, matchId string, opCode int64, data []byte, reliable bool, presences []*UserPresenceMsg, f func(error))

MatchDataSendAsync sends a message to send input to a multiplayer match.

func (*Conn) MatchJoin

func (conn *Conn) MatchJoin(ctx context.Context, matchId string, metadata map[string]string) (*MatchMsg, error)

MatchJoin sends a message to join a match.

func (*Conn) MatchJoinAsync

func (conn *Conn) MatchJoinAsync(ctx context.Context, matchId string, metadata map[string]string, f func(*MatchMsg, error))

MatchJoinAsync sends a message to join a match.

func (*Conn) MatchJoinToken

func (conn *Conn) MatchJoinToken(ctx context.Context, token string, metadata map[string]string) (*MatchMsg, error)

MatchJoinToken sends a message to join a match with a token.

func (*Conn) MatchJoinTokenAsync

func (conn *Conn) MatchJoinTokenAsync(ctx context.Context, token string, metadata map[string]string, f func(*MatchMsg, error))

MatchJoinTokenAsync sends a message to join a match with a token.

func (*Conn) MatchLeave

func (conn *Conn) MatchLeave(ctx context.Context, matchId string) error

MatchLeave sends a message to leave a multiplayer match.

func (*Conn) MatchLeaveAsync

func (conn *Conn) MatchLeaveAsync(ctx context.Context, matchId string, f func(error))

MatchLeaveAsync sends a message to leave a multiplayer match.

func (*Conn) MatchmakerAdd

func (conn *Conn) MatchmakerAdd(ctx context.Context, msg *MatchmakerAddMsg) (*MatchmakerTicketMsg, error)

MatchmakerAdd sends a message to join the matchmaker pool and search for opponents on the server.

func (*Conn) MatchmakerAddAsync

func (conn *Conn) MatchmakerAddAsync(ctx context.Context, msg *MatchmakerAddMsg, f func(*MatchmakerTicketMsg, error))

MatchmakerAddAsync sends a message to join the matchmaker pool and search for opponents on the server.

func (*Conn) MatchmakerRemove

func (conn *Conn) MatchmakerRemove(ctx context.Context, ticket string) error

MatchmakerRemove sends a message to leave the matchmaker pool for a ticket.

func (*Conn) MatchmakerRemoveAsync

func (conn *Conn) MatchmakerRemoveAsync(ctx context.Context, ticket string, f func(error))

MatchmakerRemoveAsync sends a message to leave the matchmaker pool for a ticket.

func (*Conn) Open added in v0.4.6

func (conn *Conn) Open(ctx context.Context) error

Open opens and persists (when enabled) the websocket connection to the Nakama server.

func (*Conn) PartyAccept

func (conn *Conn) PartyAccept(ctx context.Context, partyId string, presence *UserPresenceMsg) error

PartyAccept sends a message to accept a party member.

func (*Conn) PartyAcceptAsync

func (conn *Conn) PartyAcceptAsync(ctx context.Context, partyId string, presence *UserPresenceMsg, f func(error))

PartyAcceptAsync sends a message to accept a party member.

func (*Conn) PartyClose

func (conn *Conn) PartyClose(ctx context.Context, partyId string) error

PartyClose sends a message closes a party, kicking all party members.

func (*Conn) PartyCloseAsync

func (conn *Conn) PartyCloseAsync(ctx context.Context, partyId string, f func(error))

PartyCloseAsync sends a message closes a party, kicking all party members.

func (*Conn) PartyCreate

func (conn *Conn) PartyCreate(ctx context.Context, open bool, maxSize int) (*PartyMsg, error)

PartyCreate sends a message to create a party.

func (*Conn) PartyCreateAsync

func (conn *Conn) PartyCreateAsync(ctx context.Context, open bool, maxSize int, f func(*PartyMsg, error))

PartyCreateAsync sends a message to create a party.

func (*Conn) PartyDataSend

func (conn *Conn) PartyDataSend(ctx context.Context, partyId string, opCode OpType, data []byte, reliable bool, presences ...*UserPresenceMsg) error

PartyDataSend sends a message to send input to a multiplayer party.

func (*Conn) PartyDataSendAsync

func (conn *Conn) PartyDataSendAsync(ctx context.Context, partyId string, opCode OpType, data []byte, reliable bool, presences []*UserPresenceMsg, f func(error))

PartyDataSendAsync sends a message to send input to a multiplayer party.

func (*Conn) PartyJoin

func (conn *Conn) PartyJoin(ctx context.Context, partyId string) error

PartyJoin sends a message to join a party.

func (*Conn) PartyJoinAsync

func (conn *Conn) PartyJoinAsync(ctx context.Context, partyId string, f func(error))

PartyJoinAsync sends a message to join a party.

func (*Conn) PartyJoinRequests

func (conn *Conn) PartyJoinRequests(ctx context.Context, partyId string) (*PartyJoinRequestMsg, error)

PartyJoinRequests sends a message to request the list of pending join requests for a party.

func (*Conn) PartyJoinRequestsAsync

func (conn *Conn) PartyJoinRequestsAsync(ctx context.Context, partyId string, f func(*PartyJoinRequestMsg, error))

PartyJoinRequestsAsync sends a message to request the list of pending join requests for a party.

func (*Conn) PartyLeave

func (conn *Conn) PartyLeave(ctx context.Context, partyId string) error

PartyLeave sends a message to leave a party.

func (*Conn) PartyLeaveAsync

func (conn *Conn) PartyLeaveAsync(ctx context.Context, partyId string, f func(error))

PartyLeaveAsync sends a message to leave a party.

func (*Conn) PartyMatchmakerAdd

func (conn *Conn) PartyMatchmakerAdd(ctx context.Context, partyId, query string, minCount, maxCount int) (*PartyMatchmakerTicketMsg, error)

PartyMatchmakerAdd sends a message to begin matchmaking as a party.

func (*Conn) PartyMatchmakerAddAsync

func (conn *Conn) PartyMatchmakerAddAsync(ctx context.Context, partyId, query string, minCount, maxCount int, f func(*PartyMatchmakerTicketMsg, error))

PartyMatchmakerAddAsync sends a message to begin matchmaking as a party.

func (*Conn) PartyMatchmakerRemove

func (conn *Conn) PartyMatchmakerRemove(ctx context.Context, partyId, ticket string) error

PartyMatchmakerRemove sends a message to cancel a party matchmaking process for a ticket.

func (*Conn) PartyMatchmakerRemoveAsync

func (conn *Conn) PartyMatchmakerRemoveAsync(ctx context.Context, partyId, ticket string, f func(error))

PartyMatchmakerRemoveAsync sends a message to cancel a party matchmaking process for a ticket.

func (*Conn) PartyPromote

func (conn *Conn) PartyPromote(ctx context.Context, partyId string, presence *UserPresenceMsg) (*PartyLeaderMsg, error)

PartyPromote sends a message to promote a new party leader.

func (*Conn) PartyPromoteAsync

func (conn *Conn) PartyPromoteAsync(ctx context.Context, partyId string, presence *UserPresenceMsg, f func(*PartyLeaderMsg, error))

PartyPromoteAsync sends a message to promote a new party leader.

func (*Conn) PartyRemove

func (conn *Conn) PartyRemove(ctx context.Context, partyId string, presence *UserPresenceMsg) error

PartyRemove sends a message to kick a party member or decline a request to join.

func (*Conn) PartyRemoveAsync

func (conn *Conn) PartyRemoveAsync(ctx context.Context, partyId string, presence *UserPresenceMsg, f func(error))

PartyRemoveAsync sends a message to kick a party member or decline a request to join.

func (*Conn) Ping

func (conn *Conn) Ping(ctx context.Context) error

Ping sends a message to do a ping.

func (*Conn) PingAsync

func (conn *Conn) PingAsync(ctx context.Context, f func(error))

PingAsync sends a message to do a ping.

func (*Conn) Rpc

func (conn *Conn) Rpc(ctx context.Context, id string, payload, v interface{}) error

Rpc sends a message to execute a remote procedure call.

func (*Conn) RpcAsync

func (conn *Conn) RpcAsync(ctx context.Context, id string, payload, v interface{}, f func(error))

RpcAsync sends a message to execute a remote procedure call.

func (*Conn) Send

func (conn *Conn) Send(ctx context.Context, msg, v EnvelopeBuilder) error

Send sends a message.

func (*Conn) StatusFollow

func (conn *Conn) StatusFollow(ctx context.Context, userIds ...string) (*StatusMsg, error)

StatusFollow sends a message to subscribe to user status updates.

func (*Conn) StatusFollowAsync

func (conn *Conn) StatusFollowAsync(ctx context.Context, userIds []string, f func(*StatusMsg, error))

StatusFollowAsync sends a message to subscribe to user status updates.

func (*Conn) StatusUnfollow

func (conn *Conn) StatusUnfollow(ctx context.Context, userIds ...string) error

StatusUnfollow sends a message to unfollow user's status updates.

func (*Conn) StatusUnfollowAsync

func (conn *Conn) StatusUnfollowAsync(ctx context.Context, userIds []string, f func(error))

StatusUnfollowAsync sends a message to unfollow user's status updates.

func (*Conn) StatusUpdate

func (conn *Conn) StatusUpdate(ctx context.Context, status string) error

StatusUpdate sends a message to update the user's status.

func (*Conn) StatusUpdateAsync

func (conn *Conn) StatusUpdateAsync(ctx context.Context, status string, f func(error))

StatusUpdateAsync sends a message to update the user's status.

type ConnClientHandler added in v0.5.0

type ConnClientHandler interface {
	HttpClient() *http.Client
	SocketURL() (string, error)
	Token(context.Context) (string, error)
	SessionEnd()
	Logf(string, ...interface{})
	Errf(string, ...interface{})
}

ConnClientHandler is the interface for connection handlers.

type ConnError added in v0.4.6

type ConnError string

ConnError is a websocket connection error.

const (
	// ErrConnAlreadyOpen is the conn already open error.
	ErrConnAlreadyOpen ConnError = "conn already open"
	// ErrConnReadEmptyMessage is the conn read empty message error.
	ErrConnReadEmptyMessage ConnError = "conn read empty message"
)

func (ConnError) Error added in v0.4.6

func (err ConnError) Error() string

Error satisfies the error interface.

type ConnHandler added in v0.4.6

type ConnHandler interface{}

ConnHandler is an empty interface that provides a clean, extensible way to register a type as a handler that is future-proofed. As used by WithConnHandler, a type that supports the any of the following smuggled interfaces:

ConnectHandler(context.Context)
DisconnectHandler(context.Context, error)
ErrorHandler(context.Context, *nakama.ErrorMsg)
ChannelMessageHandler(context.Context, *nakama.ChannelMessageMsg)
ChannelPresenceEventHandler(context.Context, *nakama.ChannelPresenceEventMsg)
MatchDataHandler(context.Context, *nakama.MatchDataMsg)
MatchPresenceEventHandler(context.Context, *nakama.MatchPresenceEventMsg)
MatchmakerMatchedHandler(context.Context, *nakama.MatchmakerMatchedMsg)
NotificationsHandler(context.Context, *nakama.NotificationsMsg)
StatusPresenceEventHandler(context.Context, *nakama.StatusPresenceEventMsg)
StreamDataHandler(context.Context, *nakama.StreamDataMsg)
StreamPresenceEventHandler(context.Context, *nakama.StreamPresenceEventMsg)

Will have its method added to Conn as its respective <MessageType>Handler.

For an overview of Go interface smuggling as a concept, see:

https://utcc.utoronto.ca/~cks/space/blog/programming/GoInterfaceSmuggling

type ConnOption

type ConnOption func(*Conn)

ConnOption is a nakama realtime websocket connection option.

func WithConnBackoff added in v0.4.7

func WithConnBackoff(backoffMin, backoffMax time.Duration, backoffFactor float64) ConnOption

WithConnBackoff is a nakama websocket connection option to set the connection backoff (retry) settings.

func WithConnBackoffRand added in v0.5.0

func WithConnBackoffRand(backoffRand *rand.Rand) ConnOption

WithConnBackoff is a nakama websocket connection option to set the backoff jitter random source.

func WithConnClientHandler added in v0.2.0

func WithConnClientHandler(h ConnClientHandler) ConnOption

WithConnClientHandler is a nakama websocket connection option to set the ClientHandler used.

func WithConnCreateStatus

func WithConnCreateStatus(status bool) ConnOption

WithConnCreateStatus is a nakama websocket connection option to set the status query param on the websocket URL.

func WithConnFormat

func WithConnFormat(format string) ConnOption

WithConnFormat is a nakama websocket connection option to set the message encoding format (either "json" or "protobuf").

func WithConnHandler

func WithConnHandler(handler ConnHandler) ConnOption

WithConnHandler is a nakama websocket connection option to set the connection's message handlers. See the ConnHandler type for documentation on supported interfaces.

WithConnHandler works by "smuggling" interfaces. That is, WithConnHandler checks via a type cast when the underlying type supports methods of the following format:

interface{
	<MessageType>Handler(context.Context, *<MessageType>Msg)
}

If the ConnHandler's underlying type supports the above, then the ConnHandler's <MessageType>Handler method will be set as Conn.<MessageType>Handler. For example, given the following:

type MyClient struct{}

func (cl *MyClient) MatchDataHandler(context.Context, *nakama.MatchDataMsg) {}
func (cl *MyClient) NotificationsHandler(context.Context, *nakama.NotificationsMsg) {}

The following:

cl := nakama.New(/* ... */)
myClient := &MyClient{}
conn, err := cl.NewConn(ctx, nakama.WithConnHandler(myClient))

Is equivalent to:

cl := nakama.New(/* ... */)
myClient := &MyClient{}
conn, err := cl.NewConn(ctx)
conn.MatchDataHandler = myClient.MatchDataHandler
conn.NotificationsHandler = myClient.NotificationsHandler

For an overview of Go interface smuggling as a concept, see:

https://utcc.utoronto.ca/~cks/space/blog/programming/GoInterfaceSmuggling

func WithConnLang

func WithConnLang(lang string) ConnOption

WithConnLang is a nakama websocket connection option to set the lang query param on the websocket URL.

func WithConnPersist added in v0.4.6

func WithConnPersist(persist bool) ConnOption

WithConnPersist is a nakama websocket connection option to enable keeping open a persistent connection to the Nakama server.

func WithConnQuery

func WithConnQuery(key, value string) ConnOption

WithConnQuery is a nakama websocket connection option to add an additional key/value query param on the websocket URL.

Note: this should not be used to set "token" or "format". Use WithConnToken and WithConnFormat, respectively, to change the token and format query params.

func WithConnToken

func WithConnToken(token string) ConnOption

WithConnToken is a nakama websocket connection option to set the auth token for the websocket.

func WithConnUrl

func WithConnUrl(urlstr string) ConnOption

WithConnUrl is a nakama websocket connection option to set the websocket URL.

type CreateGroupRequest

type CreateGroupRequest struct {

	// A unique name for the group.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// A description for the group.
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// The language expected to be a tag which follows the BCP-47 spec.
	LangTag string `protobuf:"bytes,3,opt,name=lang_tag,json=langTag,proto3" json:"lang_tag,omitempty"`
	// A URL for an avatar image.
	AvatarUrl string `protobuf:"bytes,4,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"`
	// Mark a group as open or not where only admins can accept members.
	Open bool `protobuf:"varint,5,opt,name=open,proto3" json:"open,omitempty"`
	// Maximum number of group members.
	MaxCount int32 `protobuf:"varint,6,opt,name=max_count,json=maxCount,proto3" json:"max_count,omitempty"`
	// contains filtered or unexported fields
}

Create a group with the current user as owner.

func CreateGroup

func CreateGroup() *CreateGroupRequest

CreateGroup creates a request to create a new group.

func (*CreateGroupRequest) Async

func (req *CreateGroupRequest) Async(ctx context.Context, cl *Client, f func(*CreateGroupResponse, error))

Async executes the request against the context and client.

func (*CreateGroupRequest) Descriptor deprecated

func (*CreateGroupRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateGroupRequest.ProtoReflect.Descriptor instead.

func (*CreateGroupRequest) Do

func (req *CreateGroupRequest) Do(ctx context.Context, cl *Client) (*Group, error)

Do executes the request against the context and client.

func (*CreateGroupRequest) GetAvatarUrl

func (x *CreateGroupRequest) GetAvatarUrl() string

func (*CreateGroupRequest) GetDescription

func (x *CreateGroupRequest) GetDescription() string

func (*CreateGroupRequest) GetLangTag

func (x *CreateGroupRequest) GetLangTag() string

func (*CreateGroupRequest) GetMaxCount

func (x *CreateGroupRequest) GetMaxCount() int32

func (*CreateGroupRequest) GetName

func (x *CreateGroupRequest) GetName() string

func (*CreateGroupRequest) GetOpen

func (x *CreateGroupRequest) GetOpen() bool

func (*CreateGroupRequest) ProtoMessage

func (*CreateGroupRequest) ProtoMessage()

func (*CreateGroupRequest) ProtoReflect

func (x *CreateGroupRequest) ProtoReflect() protoreflect.Message

func (*CreateGroupRequest) Reset

func (x *CreateGroupRequest) Reset()

func (*CreateGroupRequest) String

func (x *CreateGroupRequest) String() string

func (*CreateGroupRequest) WithAvatarUrl

func (req *CreateGroupRequest) WithAvatarUrl(avatarUrl string) *CreateGroupRequest

WithAvatarUrl sets the avatarUrl on the request.

func (*CreateGroupRequest) WithDescription

func (req *CreateGroupRequest) WithDescription(description string) *CreateGroupRequest

WithDescription sets the description on the request.

func (*CreateGroupRequest) WithLangTag

func (req *CreateGroupRequest) WithLangTag(langTag string) *CreateGroupRequest

WithLangTag sets the langTag on the request.

func (*CreateGroupRequest) WithMaxCount

func (req *CreateGroupRequest) WithMaxCount(maxCount int) *CreateGroupRequest

WithMaxCount sets the maxCount on the request.

func (*CreateGroupRequest) WithName

func (req *CreateGroupRequest) WithName(name string) *CreateGroupRequest

WithName sets the name on the request.

func (*CreateGroupRequest) WithOpen

func (req *CreateGroupRequest) WithOpen(open bool) *CreateGroupRequest

WithOpen sets the open on the request.

type CreateGroupResponse

type CreateGroupResponse = Group

CreateGroupResponse is the create group response.

type DeleteFriendsRequest

type DeleteFriendsRequest struct {

	// The account id of a user.
	Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
	// The account username of a user.
	Usernames []string `protobuf:"bytes,2,rep,name=usernames,proto3" json:"usernames,omitempty"`
	// contains filtered or unexported fields
}

Delete one or more friends for the current user.

func DeleteFriends

func DeleteFriends(ids ...string) *DeleteFriendsRequest

DeleteFriends creates a request to delete friends by ID or username.

func (*DeleteFriendsRequest) Async

func (req *DeleteFriendsRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*DeleteFriendsRequest) Descriptor deprecated

func (*DeleteFriendsRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeleteFriendsRequest.ProtoReflect.Descriptor instead.

func (*DeleteFriendsRequest) Do

func (req *DeleteFriendsRequest) Do(ctx context.Context, cl *Client) error

Do executes the request against the context and client.

func (*DeleteFriendsRequest) GetIds

func (x *DeleteFriendsRequest) GetIds() []string

func (*DeleteFriendsRequest) GetUsernames

func (x *DeleteFriendsRequest) GetUsernames() []string

func (*DeleteFriendsRequest) ProtoMessage

func (*DeleteFriendsRequest) ProtoMessage()

func (*DeleteFriendsRequest) ProtoReflect

func (x *DeleteFriendsRequest) ProtoReflect() protoreflect.Message

func (*DeleteFriendsRequest) Reset

func (x *DeleteFriendsRequest) Reset()

func (*DeleteFriendsRequest) String

func (x *DeleteFriendsRequest) String() string

func (*DeleteFriendsRequest) WithUsernames

func (req *DeleteFriendsRequest) WithUsernames(usernames ...string) *DeleteFriendsRequest

WithUsernames sets the Usernames on the request.

type DeleteGroupRequest

type DeleteGroupRequest struct {

	// The id of a group.
	GroupId string `protobuf:"bytes,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
	// contains filtered or unexported fields
}

Delete a group the user has access to.

func DeleteGroup

func DeleteGroup(groupId string) *DeleteGroupRequest

DeleteGroup creates a request to delete a group.

func (*DeleteGroupRequest) Async

func (req *DeleteGroupRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*DeleteGroupRequest) Descriptor deprecated

func (*DeleteGroupRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeleteGroupRequest.ProtoReflect.Descriptor instead.

func (*DeleteGroupRequest) Do

func (req *DeleteGroupRequest) Do(ctx context.Context, cl *Client) error

Do executes the request against the context and client.

func (*DeleteGroupRequest) GetGroupId

func (x *DeleteGroupRequest) GetGroupId() string

func (*DeleteGroupRequest) ProtoMessage

func (*DeleteGroupRequest) ProtoMessage()

func (*DeleteGroupRequest) ProtoReflect

func (x *DeleteGroupRequest) ProtoReflect() protoreflect.Message

func (*DeleteGroupRequest) Reset

func (x *DeleteGroupRequest) Reset()

func (*DeleteGroupRequest) String

func (x *DeleteGroupRequest) String() string

type DeleteLeaderboardRecordRequest

type DeleteLeaderboardRecordRequest struct {

	// The leaderboard ID to delete from.
	LeaderboardId string `protobuf:"bytes,1,opt,name=leaderboard_id,json=leaderboardId,proto3" json:"leaderboard_id,omitempty"`
	// contains filtered or unexported fields
}

Delete a leaderboard record.

func DeleteLeaderboardRecord

func DeleteLeaderboardRecord(leaderboardId string) *DeleteLeaderboardRecordRequest

DeleteLeaderboardRecord creates a request to delete a leaderboard.

func (*DeleteLeaderboardRecordRequest) Async

func (req *DeleteLeaderboardRecordRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*DeleteLeaderboardRecordRequest) Descriptor deprecated

func (*DeleteLeaderboardRecordRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeleteLeaderboardRecordRequest.ProtoReflect.Descriptor instead.

func (*DeleteLeaderboardRecordRequest) Do

Do executes the request against the context and client.

func (*DeleteLeaderboardRecordRequest) GetLeaderboardId

func (x *DeleteLeaderboardRecordRequest) GetLeaderboardId() string

func (*DeleteLeaderboardRecordRequest) ProtoMessage

func (*DeleteLeaderboardRecordRequest) ProtoMessage()

func (*DeleteLeaderboardRecordRequest) ProtoReflect

func (*DeleteLeaderboardRecordRequest) Reset

func (x *DeleteLeaderboardRecordRequest) Reset()

func (*DeleteLeaderboardRecordRequest) String

type DeleteNotificationsRequest

type DeleteNotificationsRequest struct {

	// The id of notifications.
	Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
	// contains filtered or unexported fields
}

Delete one or more notifications for the current user.

func DeleteNotifications

func DeleteNotifications(ids ...string) *DeleteNotificationsRequest

DeleteNotifications creates a request to delete notifications.

func (*DeleteNotificationsRequest) Async

func (req *DeleteNotificationsRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*DeleteNotificationsRequest) Descriptor deprecated

func (*DeleteNotificationsRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeleteNotificationsRequest.ProtoReflect.Descriptor instead.

func (*DeleteNotificationsRequest) Do

Do executes the request against the context and client.

func (*DeleteNotificationsRequest) GetIds

func (x *DeleteNotificationsRequest) GetIds() []string

func (*DeleteNotificationsRequest) ProtoMessage

func (*DeleteNotificationsRequest) ProtoMessage()

func (*DeleteNotificationsRequest) ProtoReflect

func (*DeleteNotificationsRequest) Reset

func (x *DeleteNotificationsRequest) Reset()

func (*DeleteNotificationsRequest) String

func (x *DeleteNotificationsRequest) String() string

type DeleteStorageObjectId

type DeleteStorageObjectId struct {

	// The collection which stores the object.
	Collection string `protobuf:"bytes,1,opt,name=collection,proto3" json:"collection,omitempty"`
	// The key of the object within the collection.
	Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	// The version hash of the object.
	Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

Storage objects to delete.

func (*DeleteStorageObjectId) Descriptor deprecated

func (*DeleteStorageObjectId) Descriptor() ([]byte, []int)

Deprecated: Use DeleteStorageObjectId.ProtoReflect.Descriptor instead.

func (*DeleteStorageObjectId) GetCollection

func (x *DeleteStorageObjectId) GetCollection() string

func (*DeleteStorageObjectId) GetKey

func (x *DeleteStorageObjectId) GetKey() string

func (*DeleteStorageObjectId) GetVersion

func (x *DeleteStorageObjectId) GetVersion() string

func (*DeleteStorageObjectId) ProtoMessage

func (*DeleteStorageObjectId) ProtoMessage()

func (*DeleteStorageObjectId) ProtoReflect

func (x *DeleteStorageObjectId) ProtoReflect() protoreflect.Message

func (*DeleteStorageObjectId) Reset

func (x *DeleteStorageObjectId) Reset()

func (*DeleteStorageObjectId) String

func (x *DeleteStorageObjectId) String() string

type DeleteStorageObjectsRequest

type DeleteStorageObjectsRequest struct {

	// Batch of storage objects.
	ObjectIds []*DeleteStorageObjectId `protobuf:"bytes,1,rep,name=object_ids,json=objectIds,proto3" json:"object_ids,omitempty"`
	// contains filtered or unexported fields
}

Batch delete storage objects.

func DeleteStorageObjects

func DeleteStorageObjects() *DeleteStorageObjectsRequest

DeleteStorageObjects creates a request to delete storage objects.

func (*DeleteStorageObjectsRequest) Async

func (req *DeleteStorageObjectsRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*DeleteStorageObjectsRequest) Descriptor deprecated

func (*DeleteStorageObjectsRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeleteStorageObjectsRequest.ProtoReflect.Descriptor instead.

func (*DeleteStorageObjectsRequest) Do

Do executes the request against the context and client.

func (*DeleteStorageObjectsRequest) GetObjectIds

func (*DeleteStorageObjectsRequest) ProtoMessage

func (*DeleteStorageObjectsRequest) ProtoMessage()

func (*DeleteStorageObjectsRequest) ProtoReflect

func (*DeleteStorageObjectsRequest) Reset

func (x *DeleteStorageObjectsRequest) Reset()

func (*DeleteStorageObjectsRequest) String

func (x *DeleteStorageObjectsRequest) String() string

func (*DeleteStorageObjectsRequest) WithObjectId

func (req *DeleteStorageObjectsRequest) WithObjectId(collection, key, version string) *DeleteStorageObjectsRequest

WithObjectId sets the objectId on the request.

type DeleteTournamentRecordRequest added in v0.6.2

type DeleteTournamentRecordRequest struct {

	// The tournament ID to delete from.
	TournamentId string `protobuf:"bytes,1,opt,name=tournament_id,json=tournamentId,proto3" json:"tournament_id,omitempty"`
	// contains filtered or unexported fields
}

Delete a leaderboard record.

func DeleteTournamentRecord added in v0.6.6

func DeleteTournamentRecord(tournamentId string) *DeleteTournamentRecordRequest

DeleteTournamentRecord creates a request to delete a leaderboard record

func (*DeleteTournamentRecordRequest) Async added in v0.6.6

func (req *DeleteTournamentRecordRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*DeleteTournamentRecordRequest) Descriptor deprecated added in v0.6.2

func (*DeleteTournamentRecordRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeleteTournamentRecordRequest.ProtoReflect.Descriptor instead.

func (*DeleteTournamentRecordRequest) Do added in v0.6.6

Do executes the request against the context and client.

func (*DeleteTournamentRecordRequest) GetTournamentId added in v0.6.2

func (x *DeleteTournamentRecordRequest) GetTournamentId() string

func (*DeleteTournamentRecordRequest) ProtoMessage added in v0.6.2

func (*DeleteTournamentRecordRequest) ProtoMessage()

func (*DeleteTournamentRecordRequest) ProtoReflect added in v0.6.2

func (*DeleteTournamentRecordRequest) Reset added in v0.6.2

func (x *DeleteTournamentRecordRequest) Reset()

func (*DeleteTournamentRecordRequest) String added in v0.6.2

type DemoteGroupUsersRequest

type DemoteGroupUsersRequest struct {

	// The group ID to demote in.
	GroupId string `protobuf:"bytes,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
	// The users to demote.
	UserIds []string `protobuf:"bytes,2,rep,name=user_ids,json=userIds,proto3" json:"user_ids,omitempty"`
	// contains filtered or unexported fields
}

Demote a set of users in a group to the next role down.

func DemoteGroupUsers

func DemoteGroupUsers(groupId string, userIds ...string) *DemoteGroupUsersRequest

DemoteGroupUsers creates a request to demote group users.

func (*DemoteGroupUsersRequest) Async

func (req *DemoteGroupUsersRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*DemoteGroupUsersRequest) Descriptor deprecated

func (*DemoteGroupUsersRequest) Descriptor() ([]byte, []int)

Deprecated: Use DemoteGroupUsersRequest.ProtoReflect.Descriptor instead.

func (*DemoteGroupUsersRequest) Do

Do executes the request against the context and client.

func (*DemoteGroupUsersRequest) GetGroupId

func (x *DemoteGroupUsersRequest) GetGroupId() string

func (*DemoteGroupUsersRequest) GetUserIds

func (x *DemoteGroupUsersRequest) GetUserIds() []string

func (*DemoteGroupUsersRequest) ProtoMessage

func (*DemoteGroupUsersRequest) ProtoMessage()

func (*DemoteGroupUsersRequest) ProtoReflect

func (x *DemoteGroupUsersRequest) ProtoReflect() protoreflect.Message

func (*DemoteGroupUsersRequest) Reset

func (x *DemoteGroupUsersRequest) Reset()

func (*DemoteGroupUsersRequest) String

func (x *DemoteGroupUsersRequest) String() string

type Envelope

type Envelope struct {
	Cid string `protobuf:"bytes,1,opt,name=cid,proto3" json:"cid,omitempty"`
	// Types that are assignable to Message:
	//
	//	*Envelope_Channel
	//	*Envelope_ChannelJoin
	//	*Envelope_ChannelLeave
	//	*Envelope_ChannelMessage
	//	*Envelope_ChannelMessageAck
	//	*Envelope_ChannelMessageSend
	//	*Envelope_ChannelMessageUpdate
	//	*Envelope_ChannelMessageRemove
	//	*Envelope_ChannelPresenceEvent
	//	*Envelope_Error
	//	*Envelope_Match
	//	*Envelope_MatchCreate
	//	*Envelope_MatchData
	//	*Envelope_MatchDataSend
	//	*Envelope_MatchJoin
	//	*Envelope_MatchLeave
	//	*Envelope_MatchPresenceEvent
	//	*Envelope_MatchmakerAdd
	//	*Envelope_MatchmakerMatched
	//	*Envelope_MatchmakerRemove
	//	*Envelope_MatchmakerTicket
	//	*Envelope_Notifications
	//	*Envelope_Rpc
	//	*Envelope_Status
	//	*Envelope_StatusFollow
	//	*Envelope_StatusPresenceEvent
	//	*Envelope_StatusUnfollow
	//	*Envelope_StatusUpdate
	//	*Envelope_StreamData
	//	*Envelope_StreamPresenceEvent
	//	*Envelope_Ping
	//	*Envelope_Pong
	//	*Envelope_Party
	//	*Envelope_PartyCreate
	//	*Envelope_PartyJoin
	//	*Envelope_PartyLeave
	//	*Envelope_PartyPromote
	//	*Envelope_PartyLeader
	//	*Envelope_PartyAccept
	//	*Envelope_PartyRemove
	//	*Envelope_PartyClose
	//	*Envelope_PartyJoinRequestList
	//	*Envelope_PartyJoinRequest
	//	*Envelope_PartyMatchmakerAdd
	//	*Envelope_PartyMatchmakerRemove
	//	*Envelope_PartyMatchmakerTicket
	//	*Envelope_PartyData
	//	*Envelope_PartyDataSend
	//	*Envelope_PartyPresenceEvent
	Message isEnvelope_Message `protobuf_oneof:"message"`
	// contains filtered or unexported fields
}

An envelope for a realtime message.

func (*Envelope) Descriptor deprecated

func (*Envelope) Descriptor() ([]byte, []int)

Deprecated: Use Envelope.ProtoReflect.Descriptor instead.

func (*Envelope) GetChannel

func (x *Envelope) GetChannel() *ChannelMsg

func (*Envelope) GetChannelJoin

func (x *Envelope) GetChannelJoin() *ChannelJoinMsg

func (*Envelope) GetChannelLeave

func (x *Envelope) GetChannelLeave() *ChannelLeaveMsg

func (*Envelope) GetChannelMessage

func (x *Envelope) GetChannelMessage() *ChannelMessage

func (*Envelope) GetChannelMessageAck

func (x *Envelope) GetChannelMessageAck() *ChannelMessageAckMsg

func (*Envelope) GetChannelMessageRemove

func (x *Envelope) GetChannelMessageRemove() *ChannelMessageRemoveMsg

func (*Envelope) GetChannelMessageSend

func (x *Envelope) GetChannelMessageSend() *ChannelMessageSendMsg

func (*Envelope) GetChannelMessageUpdate

func (x *Envelope) GetChannelMessageUpdate() *ChannelMessageUpdateMsg

func (*Envelope) GetChannelPresenceEvent

func (x *Envelope) GetChannelPresenceEvent() *ChannelPresenceEventMsg

func (*Envelope) GetCid

func (x *Envelope) GetCid() string

func (*Envelope) GetError

func (x *Envelope) GetError() *ErrorMsg

func (*Envelope) GetMatch

func (x *Envelope) GetMatch() *MatchMsg

func (*Envelope) GetMatchCreate

func (x *Envelope) GetMatchCreate() *MatchCreateMsg

func (*Envelope) GetMatchData

func (x *Envelope) GetMatchData() *MatchDataMsg

func (*Envelope) GetMatchDataSend

func (x *Envelope) GetMatchDataSend() *MatchDataSendMsg

func (*Envelope) GetMatchJoin

func (x *Envelope) GetMatchJoin() *MatchJoinMsg

func (*Envelope) GetMatchLeave

func (x *Envelope) GetMatchLeave() *MatchLeaveMsg

func (*Envelope) GetMatchPresenceEvent

func (x *Envelope) GetMatchPresenceEvent() *MatchPresenceEventMsg

func (*Envelope) GetMatchmakerAdd

func (x *Envelope) GetMatchmakerAdd() *MatchmakerAddMsg

func (*Envelope) GetMatchmakerMatched

func (x *Envelope) GetMatchmakerMatched() *MatchmakerMatchedMsg

func (*Envelope) GetMatchmakerRemove

func (x *Envelope) GetMatchmakerRemove() *MatchmakerRemoveMsg

func (*Envelope) GetMatchmakerTicket

func (x *Envelope) GetMatchmakerTicket() *MatchmakerTicketMsg

func (*Envelope) GetMessage

func (m *Envelope) GetMessage() isEnvelope_Message

func (*Envelope) GetNotifications

func (x *Envelope) GetNotifications() *NotificationsMsg

func (*Envelope) GetParty

func (x *Envelope) GetParty() *PartyMsg

func (*Envelope) GetPartyAccept

func (x *Envelope) GetPartyAccept() *PartyAcceptMsg

func (*Envelope) GetPartyClose

func (x *Envelope) GetPartyClose() *PartyCloseMsg

func (*Envelope) GetPartyCreate

func (x *Envelope) GetPartyCreate() *PartyCreateMsg

func (*Envelope) GetPartyData

func (x *Envelope) GetPartyData() *PartyDataMsg

func (*Envelope) GetPartyDataSend

func (x *Envelope) GetPartyDataSend() *PartyDataSendMsg

func (*Envelope) GetPartyJoin

func (x *Envelope) GetPartyJoin() *PartyJoinMsg

func (*Envelope) GetPartyJoinRequest

func (x *Envelope) GetPartyJoinRequest() *PartyJoinRequestMsg

func (*Envelope) GetPartyJoinRequestList

func (x *Envelope) GetPartyJoinRequestList() *PartyJoinRequestsMsg

func (*Envelope) GetPartyLeader

func (x *Envelope) GetPartyLeader() *PartyLeaderMsg

func (*Envelope) GetPartyLeave

func (x *Envelope) GetPartyLeave() *PartyLeaveMsg

func (*Envelope) GetPartyMatchmakerAdd

func (x *Envelope) GetPartyMatchmakerAdd() *PartyMatchmakerAddMsg

func (*Envelope) GetPartyMatchmakerRemove

func (x *Envelope) GetPartyMatchmakerRemove() *PartyMatchmakerRemoveMsg

func (*Envelope) GetPartyMatchmakerTicket

func (x *Envelope) GetPartyMatchmakerTicket() *PartyMatchmakerTicketMsg

func (*Envelope) GetPartyPresenceEvent

func (x *Envelope) GetPartyPresenceEvent() *PartyPresenceEventMsg

func (*Envelope) GetPartyPromote

func (x *Envelope) GetPartyPromote() *PartyPromoteMsg

func (*Envelope) GetPartyRemove

func (x *Envelope) GetPartyRemove() *PartyRemoveMsg

func (*Envelope) GetPing

func (x *Envelope) GetPing() *PingMsg

func (*Envelope) GetPong

func (x *Envelope) GetPong() *PongMsg

func (*Envelope) GetRpc

func (x *Envelope) GetRpc() *RpcMsg

func (*Envelope) GetStatus

func (x *Envelope) GetStatus() *StatusMsg

func (*Envelope) GetStatusFollow

func (x *Envelope) GetStatusFollow() *StatusFollowMsg

func (*Envelope) GetStatusPresenceEvent

func (x *Envelope) GetStatusPresenceEvent() *StatusPresenceEventMsg

func (*Envelope) GetStatusUnfollow

func (x *Envelope) GetStatusUnfollow() *StatusUnfollowMsg

func (*Envelope) GetStatusUpdate

func (x *Envelope) GetStatusUpdate() *StatusUpdateMsg

func (*Envelope) GetStreamData

func (x *Envelope) GetStreamData() *StreamDataMsg

func (*Envelope) GetStreamPresenceEvent

func (x *Envelope) GetStreamPresenceEvent() *StreamPresenceEventMsg

func (*Envelope) ProtoMessage

func (*Envelope) ProtoMessage()

func (*Envelope) ProtoReflect

func (x *Envelope) ProtoReflect() protoreflect.Message

func (*Envelope) Reset

func (x *Envelope) Reset()

func (*Envelope) String

func (x *Envelope) String() string

type EnvelopeBuilder

type EnvelopeBuilder interface {
	BuildEnvelope() *Envelope
}

EnvelopeBuilder is the shared interface for realtime messages.

type Envelope_Channel

type Envelope_Channel struct {
	// A response from a channel join operation.
	Channel *ChannelMsg `protobuf:"bytes,2,opt,name=channel,proto3,oneof"`
}

type Envelope_ChannelJoin

type Envelope_ChannelJoin struct {
	// Join a realtime chat channel.
	ChannelJoin *ChannelJoinMsg `protobuf:"bytes,3,opt,name=channel_join,json=channelJoin,proto3,oneof"`
}

type Envelope_ChannelLeave

type Envelope_ChannelLeave struct {
	// Leave a realtime chat channel.
	ChannelLeave *ChannelLeaveMsg `protobuf:"bytes,4,opt,name=channel_leave,json=channelLeave,proto3,oneof"`
}

type Envelope_ChannelMessage

type Envelope_ChannelMessage struct {
	// An incoming message on a realtime chat channel.
	ChannelMessage *ChannelMessage `protobuf:"bytes,5,opt,name=channel_message,json=channelMessage,proto3,oneof"`
}

type Envelope_ChannelMessageAck

type Envelope_ChannelMessageAck struct {
	// An acknowledgement received in response to sending a message on a chat channel.
	ChannelMessageAck *ChannelMessageAckMsg `protobuf:"bytes,6,opt,name=channel_message_ack,json=channelMessageAck,proto3,oneof"`
}

type Envelope_ChannelMessageRemove

type Envelope_ChannelMessageRemove struct {
	// Remove a message previously sent to a realtime chat channel.
	ChannelMessageRemove *ChannelMessageRemoveMsg `protobuf:"bytes,9,opt,name=channel_message_remove,json=channelMessageRemove,proto3,oneof"`
}

type Envelope_ChannelMessageSend

type Envelope_ChannelMessageSend struct {
	// Send a message to a realtime chat channel.
	ChannelMessageSend *ChannelMessageSendMsg `protobuf:"bytes,7,opt,name=channel_message_send,json=channelMessageSend,proto3,oneof"`
}

type Envelope_ChannelMessageUpdate

type Envelope_ChannelMessageUpdate struct {
	// Update a message previously sent to a realtime chat channel.
	ChannelMessageUpdate *ChannelMessageUpdateMsg `protobuf:"bytes,8,opt,name=channel_message_update,json=channelMessageUpdate,proto3,oneof"`
}

type Envelope_ChannelPresenceEvent

type Envelope_ChannelPresenceEvent struct {
	// Presence update for a particular realtime chat channel.
	ChannelPresenceEvent *ChannelPresenceEventMsg `protobuf:"bytes,10,opt,name=channel_presence_event,json=channelPresenceEvent,proto3,oneof"`
}

type Envelope_Error

type Envelope_Error struct {
	// Describes an error which occurred on the server.
	Error *ErrorMsg `protobuf:"bytes,11,opt,name=error,proto3,oneof"`
}

type Envelope_Match

type Envelope_Match struct {
	// Incoming information about a realtime match.
	Match *MatchMsg `protobuf:"bytes,12,opt,name=match,proto3,oneof"`
}

type Envelope_MatchCreate

type Envelope_MatchCreate struct {
	// A client to server request to create a realtime match.
	MatchCreate *MatchCreateMsg `protobuf:"bytes,13,opt,name=match_create,json=matchCreate,proto3,oneof"`
}

type Envelope_MatchData

type Envelope_MatchData struct {
	// Incoming realtime match data delivered from the server.
	MatchData *MatchDataMsg `protobuf:"bytes,14,opt,name=match_data,json=matchData,proto3,oneof"`
}

type Envelope_MatchDataSend

type Envelope_MatchDataSend struct {
	// A client to server request to send data to a realtime match.
	MatchDataSend *MatchDataSendMsg `protobuf:"bytes,15,opt,name=match_data_send,json=matchDataSend,proto3,oneof"`
}

type Envelope_MatchJoin

type Envelope_MatchJoin struct {
	// A client to server request to join a realtime match.
	MatchJoin *MatchJoinMsg `protobuf:"bytes,16,opt,name=match_join,json=matchJoin,proto3,oneof"`
}

type Envelope_MatchLeave

type Envelope_MatchLeave struct {
	// A client to server request to leave a realtime match.
	MatchLeave *MatchLeaveMsg `protobuf:"bytes,17,opt,name=match_leave,json=matchLeave,proto3,oneof"`
}

type Envelope_MatchPresenceEvent

type Envelope_MatchPresenceEvent struct {
	// Presence update for a particular realtime match.
	MatchPresenceEvent *MatchPresenceEventMsg `protobuf:"bytes,18,opt,name=match_presence_event,json=matchPresenceEvent,proto3,oneof"`
}

type Envelope_MatchmakerAdd

type Envelope_MatchmakerAdd struct {
	// Submit a new matchmaking process request.
	MatchmakerAdd *MatchmakerAddMsg `protobuf:"bytes,19,opt,name=matchmaker_add,json=matchmakerAdd,proto3,oneof"`
}

type Envelope_MatchmakerMatched

type Envelope_MatchmakerMatched struct {
	// A successful matchmaking result.
	MatchmakerMatched *MatchmakerMatchedMsg `protobuf:"bytes,20,opt,name=matchmaker_matched,json=matchmakerMatched,proto3,oneof"`
}

type Envelope_MatchmakerRemove

type Envelope_MatchmakerRemove struct {
	// Cancel a matchmaking process using a ticket.
	MatchmakerRemove *MatchmakerRemoveMsg `protobuf:"bytes,21,opt,name=matchmaker_remove,json=matchmakerRemove,proto3,oneof"`
}

type Envelope_MatchmakerTicket

type Envelope_MatchmakerTicket struct {
	// A response from starting a new matchmaking process.
	MatchmakerTicket *MatchmakerTicketMsg `protobuf:"bytes,22,opt,name=matchmaker_ticket,json=matchmakerTicket,proto3,oneof"`
}

type Envelope_Notifications

type Envelope_Notifications struct {
	// Notifications send by the server.
	Notifications *NotificationsMsg `protobuf:"bytes,23,opt,name=notifications,proto3,oneof"`
}

type Envelope_Party

type Envelope_Party struct {
	// Incoming information about a party.
	Party *PartyMsg `protobuf:"bytes,34,opt,name=party,proto3,oneof"`
}

type Envelope_PartyAccept

type Envelope_PartyAccept struct {
	// Accept a request to join.
	PartyAccept *PartyAcceptMsg `protobuf:"bytes,40,opt,name=party_accept,json=partyAccept,proto3,oneof"`
}

type Envelope_PartyClose

type Envelope_PartyClose struct {
	// End a party, kicking all party members and closing it.
	PartyClose *PartyCloseMsg `protobuf:"bytes,42,opt,name=party_close,json=partyClose,proto3,oneof"`
}

type Envelope_PartyCreate

type Envelope_PartyCreate struct {
	// Create a party.
	PartyCreate *PartyCreateMsg `protobuf:"bytes,35,opt,name=party_create,json=partyCreate,proto3,oneof"`
}

type Envelope_PartyData

type Envelope_PartyData struct {
	// Incoming party data delivered from the server.
	PartyData *PartyDataMsg `protobuf:"bytes,48,opt,name=party_data,json=partyData,proto3,oneof"`
}

type Envelope_PartyDataSend

type Envelope_PartyDataSend struct {
	// A client to server request to send data to a party.
	PartyDataSend *PartyDataSendMsg `protobuf:"bytes,49,opt,name=party_data_send,json=partyDataSend,proto3,oneof"`
}

type Envelope_PartyJoin

type Envelope_PartyJoin struct {
	// Join a party, or request to join if the party is not open.
	PartyJoin *PartyJoinMsg `protobuf:"bytes,36,opt,name=party_join,json=partyJoin,proto3,oneof"`
}

type Envelope_PartyJoinRequest

type Envelope_PartyJoinRequest struct {
	// Incoming notification for one or more new presences attempting to join the party.
	PartyJoinRequest *PartyJoinRequestMsg `protobuf:"bytes,44,opt,name=party_join_request,json=partyJoinRequest,proto3,oneof"`
}

type Envelope_PartyJoinRequestList

type Envelope_PartyJoinRequestList struct {
	// Request a list of pending join requests for a party.
	PartyJoinRequestList *PartyJoinRequestsMsg `protobuf:"bytes,43,opt,name=party_join_request_list,json=partyJoinRequestList,proto3,oneof"`
}

type Envelope_PartyLeader

type Envelope_PartyLeader struct {
	// Announcement of a new party leader.
	PartyLeader *PartyLeaderMsg `protobuf:"bytes,39,opt,name=party_leader,json=partyLeader,proto3,oneof"`
}

type Envelope_PartyLeave

type Envelope_PartyLeave struct {
	// Leave a party.
	PartyLeave *PartyLeaveMsg `protobuf:"bytes,37,opt,name=party_leave,json=partyLeave,proto3,oneof"`
}

type Envelope_PartyMatchmakerAdd

type Envelope_PartyMatchmakerAdd struct {
	// Begin matchmaking as a party.
	PartyMatchmakerAdd *PartyMatchmakerAddMsg `protobuf:"bytes,45,opt,name=party_matchmaker_add,json=partyMatchmakerAdd,proto3,oneof"`
}

type Envelope_PartyMatchmakerRemove

type Envelope_PartyMatchmakerRemove struct {
	// Cancel a party matchmaking process using a ticket.
	PartyMatchmakerRemove *PartyMatchmakerRemoveMsg `protobuf:"bytes,46,opt,name=party_matchmaker_remove,json=partyMatchmakerRemove,proto3,oneof"`
}

type Envelope_PartyMatchmakerTicket

type Envelope_PartyMatchmakerTicket struct {
	// A response from starting a new party matchmaking process.
	PartyMatchmakerTicket *PartyMatchmakerTicketMsg `protobuf:"bytes,47,opt,name=party_matchmaker_ticket,json=partyMatchmakerTicket,proto3,oneof"`
}

type Envelope_PartyPresenceEvent

type Envelope_PartyPresenceEvent struct {
	// Presence update for a particular party.
	PartyPresenceEvent *PartyPresenceEventMsg `protobuf:"bytes,50,opt,name=party_presence_event,json=partyPresenceEvent,proto3,oneof"`
}

type Envelope_PartyPromote

type Envelope_PartyPromote struct {
	// Promote a new party leader.
	PartyPromote *PartyPromoteMsg `protobuf:"bytes,38,opt,name=party_promote,json=partyPromote,proto3,oneof"`
}

type Envelope_PartyRemove

type Envelope_PartyRemove struct {
	// Kick a party member, or decline a request to join.
	PartyRemove *PartyRemoveMsg `protobuf:"bytes,41,opt,name=party_remove,json=partyRemove,proto3,oneof"`
}

type Envelope_Ping

type Envelope_Ping struct {
	// Application-level heartbeat and connection check.
	Ping *PingMsg `protobuf:"bytes,32,opt,name=ping,proto3,oneof"`
}

type Envelope_Pong

type Envelope_Pong struct {
	// Application-level heartbeat and connection check response.
	Pong *PongMsg `protobuf:"bytes,33,opt,name=pong,proto3,oneof"`
}

type Envelope_Rpc

type Envelope_Rpc struct {
	// RPC call or response.
	Rpc *RpcMsg `protobuf:"bytes,24,opt,name=rpc,proto3,oneof"`
}

type Envelope_Status

type Envelope_Status struct {
	// An incoming status snapshot for some set of users.
	Status *StatusMsg `protobuf:"bytes,25,opt,name=status,proto3,oneof"`
}

type Envelope_StatusFollow

type Envelope_StatusFollow struct {
	// Start following some set of users to receive their status updates.
	StatusFollow *StatusFollowMsg `protobuf:"bytes,26,opt,name=status_follow,json=statusFollow,proto3,oneof"`
}

type Envelope_StatusPresenceEvent

type Envelope_StatusPresenceEvent struct {
	// An incoming status update.
	StatusPresenceEvent *StatusPresenceEventMsg `protobuf:"bytes,27,opt,name=status_presence_event,json=statusPresenceEvent,proto3,oneof"`
}

type Envelope_StatusUnfollow

type Envelope_StatusUnfollow struct {
	// Stop following some set of users to no longer receive their status updates.
	StatusUnfollow *StatusUnfollowMsg `protobuf:"bytes,28,opt,name=status_unfollow,json=statusUnfollow,proto3,oneof"`
}

type Envelope_StatusUpdate

type Envelope_StatusUpdate struct {
	// Set the user's own status.
	StatusUpdate *StatusUpdateMsg `protobuf:"bytes,29,opt,name=status_update,json=statusUpdate,proto3,oneof"`
}

type Envelope_StreamData

type Envelope_StreamData struct {
	// A data message delivered over a stream.
	StreamData *StreamDataMsg `protobuf:"bytes,30,opt,name=stream_data,json=streamData,proto3,oneof"`
}

type Envelope_StreamPresenceEvent

type Envelope_StreamPresenceEvent struct {
	// Presence update for a particular stream.
	StreamPresenceEvent *StreamPresenceEventMsg `protobuf:"bytes,31,opt,name=stream_presence_event,json=streamPresenceEvent,proto3,oneof"`
}

type ErrorCode

type ErrorCode int32

The selection of possible error codes.

const (
	// An unexpected result from the server.
	ErrorCode_RUNTIME_EXCEPTION ErrorCode = 0
	// The server received a message which is not recognised.
	ErrorCode_UNRECOGNIZED_PAYLOAD ErrorCode = 1
	// A message was expected but contains no content.
	ErrorCode_MISSING_PAYLOAD ErrorCode = 2
	// Fields in the message have an invalid format.
	ErrorCode_BAD_INPUT ErrorCode = 3
	// The match id was not found.
	ErrorCode_MATCH_NOT_FOUND ErrorCode = 4
	// The match join was rejected.
	ErrorCode_MATCH_JOIN_REJECTED ErrorCode = 5
	// The runtime function does not exist on the server.
	ErrorCode_RUNTIME_FUNCTION_NOT_FOUND ErrorCode = 6
	// The runtime function executed with an error.
	ErrorCode_RUNTIME_FUNCTION_EXCEPTION ErrorCode = 7
)

func (ErrorCode) Descriptor

func (ErrorCode) Descriptor() protoreflect.EnumDescriptor

func (ErrorCode) Enum

func (x ErrorCode) Enum() *ErrorCode

func (ErrorCode) EnumDescriptor deprecated

func (ErrorCode) EnumDescriptor() ([]byte, []int)

Deprecated: Use ErrorCode.Descriptor instead.

func (ErrorCode) Number

func (x ErrorCode) Number() protoreflect.EnumNumber

func (ErrorCode) String

func (x ErrorCode) String() string

func (ErrorCode) Type

type ErrorMsg

type ErrorMsg struct {

	// The error code which should be one of "Error.Code" enums.
	Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	// A message in English to help developers debug the response.
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// Additional error details which may be different for each response.
	Context map[string]string `` /* 155-byte string literal not displayed */
	// contains filtered or unexported fields
}

A logical error which may occur on the server.

func (*ErrorMsg) BuildEnvelope

func (msg *ErrorMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*ErrorMsg) Descriptor deprecated

func (*ErrorMsg) Descriptor() ([]byte, []int)

Deprecated: Use ErrorMsg.ProtoReflect.Descriptor instead.

func (*ErrorMsg) Error added in v0.4.0

func (err *ErrorMsg) Error() string

Error satisfies the error interface.

func (*ErrorMsg) GetCode

func (x *ErrorMsg) GetCode() int32

func (*ErrorMsg) GetContext

func (x *ErrorMsg) GetContext() map[string]string

func (*ErrorMsg) GetMessage

func (x *ErrorMsg) GetMessage() string

func (*ErrorMsg) ProtoMessage

func (*ErrorMsg) ProtoMessage()

func (*ErrorMsg) ProtoReflect

func (x *ErrorMsg) ProtoReflect() protoreflect.Message

func (*ErrorMsg) Reset

func (x *ErrorMsg) Reset()

func (*ErrorMsg) String

func (x *ErrorMsg) String() string

type EventRequest

type EventRequest struct {

	// An event name, type, category, or identifier.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Arbitrary event property values.
	Properties map[string]string `` /* 161-byte string literal not displayed */
	// The time when the event was triggered.
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// True if the event came directly from a client call, false otherwise.
	External bool `protobuf:"varint,4,opt,name=external,proto3" json:"external,omitempty"`
	// contains filtered or unexported fields
}

Represents an event to be passed through the server to registered event handlers.

func Event

func Event(name string) *EventRequest

Event creates a request to send an event.

func (*EventRequest) Async

func (req *EventRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*EventRequest) Descriptor deprecated

func (*EventRequest) Descriptor() ([]byte, []int)

Deprecated: Use EventRequest.ProtoReflect.Descriptor instead.

func (*EventRequest) Do

func (req *EventRequest) Do(ctx context.Context, cl *Client) error

Do executes the request against the context and client.

func (*EventRequest) GetExternal

func (x *EventRequest) GetExternal() bool

func (*EventRequest) GetName

func (x *EventRequest) GetName() string

func (*EventRequest) GetProperties

func (x *EventRequest) GetProperties() map[string]string

func (*EventRequest) GetTimestamp

func (x *EventRequest) GetTimestamp() *timestamppb.Timestamp

func (*EventRequest) ProtoMessage

func (*EventRequest) ProtoMessage()

func (*EventRequest) ProtoReflect

func (x *EventRequest) ProtoReflect() protoreflect.Message

func (*EventRequest) Reset

func (x *EventRequest) Reset()

func (*EventRequest) String

func (x *EventRequest) String() string

func (*EventRequest) WithExternal

func (req *EventRequest) WithExternal(external bool) *EventRequest

WithExternal sets the external on the request.

func (*EventRequest) WithProperties

func (req *EventRequest) WithProperties(properties map[string]string) *EventRequest

WithProperties sets the properties on the request.

func (*EventRequest) WithTimestamp

func (req *EventRequest) WithTimestamp(t time.Time) *EventRequest

WithTimestamp sets the timestamp on the request.

type Friend

type Friend struct {

	// The user object.
	User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// The friend status. -- use enum FriendState
	State *wrapperspb.Int32Value `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"` // one of "Friend.State".
	// Time of the latest relationship update.
	UpdateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
	// contains filtered or unexported fields
}

A friend of a user.

func (*Friend) Descriptor deprecated

func (*Friend) Descriptor() ([]byte, []int)

Deprecated: Use Friend.ProtoReflect.Descriptor instead.

func (*Friend) GetState

func (x *Friend) GetState() *wrapperspb.Int32Value

func (*Friend) GetUpdateTime

func (x *Friend) GetUpdateTime() *timestamppb.Timestamp

func (*Friend) GetUser

func (x *Friend) GetUser() *User

func (*Friend) ProtoMessage

func (*Friend) ProtoMessage()

func (*Friend) ProtoReflect

func (x *Friend) ProtoReflect() protoreflect.Message

func (*Friend) Reset

func (x *Friend) Reset()

func (*Friend) String

func (x *Friend) String() string

type FriendState

type FriendState int32

The friendship status.

const (
	// The user is a friend of the current user.
	FriendState_FRIEND FriendState = 0
	// The current user has sent an invite to the user.
	FriendState_INVITE_SENT FriendState = 1
	// The current user has received an invite from this user.
	FriendState_INVITE_RECEIVED FriendState = 2
	// The current user has blocked this user.
	FriendState_BLOCKED FriendState = 3
)

func (FriendState) Descriptor

func (FriendState) Enum

func (x FriendState) Enum() *FriendState

func (FriendState) EnumDescriptor deprecated

func (FriendState) EnumDescriptor() ([]byte, []int)

Deprecated: Use FriendState.Descriptor instead.

func (FriendState) Number

func (x FriendState) Number() protoreflect.EnumNumber

func (FriendState) String

func (x FriendState) String() string

func (FriendState) Type

type FriendsRequest

type FriendsRequest struct {

	// Max number of records to return. Between 1 and 100.
	Limit *wrapperspb.Int32Value `protobuf:"bytes,1,opt,name=limit,proto3" json:"limit,omitempty"`
	// The friend state to list. -- use enum UserRoleState
	State *wrapperspb.Int32Value `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"`
	// An optional next page cursor.
	Cursor string `protobuf:"bytes,3,opt,name=cursor,proto3" json:"cursor,omitempty"`
	// contains filtered or unexported fields
}

List friends for a user.

func Friends

func Friends() *FriendsRequest

Friends creates a request to retrieve friends.

func (*FriendsRequest) Async

func (req *FriendsRequest) Async(ctx context.Context, cl *Client, f func(*FriendsResponse, error))

Async executes the request against the context and client.

func (*FriendsRequest) Descriptor deprecated

func (*FriendsRequest) Descriptor() ([]byte, []int)

Deprecated: Use FriendsRequest.ProtoReflect.Descriptor instead.

func (*FriendsRequest) Do

func (req *FriendsRequest) Do(ctx context.Context, cl *Client) (*FriendsResponse, error)

Do executes the request against the context and client.

func (*FriendsRequest) GetCursor

func (x *FriendsRequest) GetCursor() string

func (*FriendsRequest) GetLimit

func (x *FriendsRequest) GetLimit() *wrapperspb.Int32Value

func (*FriendsRequest) GetState

func (x *FriendsRequest) GetState() *wrapperspb.Int32Value

func (*FriendsRequest) ProtoMessage

func (*FriendsRequest) ProtoMessage()

func (*FriendsRequest) ProtoReflect

func (x *FriendsRequest) ProtoReflect() protoreflect.Message

func (*FriendsRequest) Reset

func (x *FriendsRequest) Reset()

func (*FriendsRequest) String

func (x *FriendsRequest) String() string

func (*FriendsRequest) WithCursor

func (req *FriendsRequest) WithCursor(cursor string) *FriendsRequest

WithCursor sets the cursor on the request.

func (*FriendsRequest) WithLimit

func (req *FriendsRequest) WithLimit(limit int) *FriendsRequest

WithLimit sets the limit on the request.

func (*FriendsRequest) WithState

func (req *FriendsRequest) WithState(state FriendState) *FriendsRequest

WithState sets the state on the request.

type FriendsResponse

type FriendsResponse struct {

	// The Friend objects.
	Friends []*Friend `protobuf:"bytes,1,rep,name=friends,proto3" json:"friends,omitempty"`
	// Cursor for the next page of results, if any.
	Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"`
	// contains filtered or unexported fields
}

A collection of zero or more friends of the user.

func (*FriendsResponse) Descriptor deprecated

func (*FriendsResponse) Descriptor() ([]byte, []int)

Deprecated: Use FriendsResponse.ProtoReflect.Descriptor instead.

func (*FriendsResponse) GetCursor

func (x *FriendsResponse) GetCursor() string

func (*FriendsResponse) GetFriends

func (x *FriendsResponse) GetFriends() []*Friend

func (*FriendsResponse) ProtoMessage

func (*FriendsResponse) ProtoMessage()

func (*FriendsResponse) ProtoReflect

func (x *FriendsResponse) ProtoReflect() protoreflect.Message

func (*FriendsResponse) Reset

func (x *FriendsResponse) Reset()

func (*FriendsResponse) String

func (x *FriendsResponse) String() string

type Group

type Group struct {

	// The id of a group.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The id of the user who created the group.
	CreatorId string `protobuf:"bytes,2,opt,name=creator_id,json=creatorId,proto3" json:"creator_id,omitempty"`
	// The unique name of the group.
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// A description for the group.
	Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	// The language expected to be a tag which follows the BCP-47 spec.
	LangTag string `protobuf:"bytes,5,opt,name=lang_tag,json=langTag,proto3" json:"lang_tag,omitempty"`
	// Additional information stored as a JSON object.
	Metadata string `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// A URL for an avatar image.
	AvatarUrl string `protobuf:"bytes,7,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"`
	// Anyone can join open groups, otherwise only admins can accept members.
	Open *wrapperspb.BoolValue `protobuf:"bytes,8,opt,name=open,proto3" json:"open,omitempty"`
	// The current count of all members in the group.
	EdgeCount int32 `protobuf:"varint,9,opt,name=edge_count,json=edgeCount,proto3" json:"edge_count,omitempty"`
	// The maximum number of members allowed.
	MaxCount int32 `protobuf:"varint,10,opt,name=max_count,json=maxCount,proto3" json:"max_count,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the group was created.
	CreateTime *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the group was last updated.
	UpdateTime *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
	// contains filtered or unexported fields
}

A group in the server.

func (*Group) Descriptor deprecated

func (*Group) Descriptor() ([]byte, []int)

Deprecated: Use Group.ProtoReflect.Descriptor instead.

func (*Group) GetAvatarUrl

func (x *Group) GetAvatarUrl() string

func (*Group) GetCreateTime

func (x *Group) GetCreateTime() *timestamppb.Timestamp

func (*Group) GetCreatorId

func (x *Group) GetCreatorId() string

func (*Group) GetDescription

func (x *Group) GetDescription() string

func (*Group) GetEdgeCount

func (x *Group) GetEdgeCount() int32

func (*Group) GetId

func (x *Group) GetId() string

func (*Group) GetLangTag

func (x *Group) GetLangTag() string

func (*Group) GetMaxCount

func (x *Group) GetMaxCount() int32

func (*Group) GetMetadata

func (x *Group) GetMetadata() string

func (*Group) GetName

func (x *Group) GetName() string

func (*Group) GetOpen

func (x *Group) GetOpen() *wrapperspb.BoolValue

func (*Group) GetUpdateTime

func (x *Group) GetUpdateTime() *timestamppb.Timestamp

func (*Group) ProtoMessage

func (*Group) ProtoMessage()

func (*Group) ProtoReflect

func (x *Group) ProtoReflect() protoreflect.Message

func (*Group) Reset

func (x *Group) Reset()

func (*Group) String

func (x *Group) String() string

type GroupUser

type GroupUser struct {

	// User.
	User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// Their relationship to the group. -- use enum UserRoleState
	State *wrapperspb.Int32Value `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"`
	// contains filtered or unexported fields
}

A single user-role pair.

func (*GroupUser) Descriptor deprecated

func (*GroupUser) Descriptor() ([]byte, []int)

Deprecated: Use GroupUser.ProtoReflect.Descriptor instead.

func (*GroupUser) GetState

func (x *GroupUser) GetState() *wrapperspb.Int32Value

func (*GroupUser) GetUser

func (x *GroupUser) GetUser() *User

func (*GroupUser) ProtoMessage

func (*GroupUser) ProtoMessage()

func (*GroupUser) ProtoReflect

func (x *GroupUser) ProtoReflect() protoreflect.Message

func (*GroupUser) Reset

func (x *GroupUser) Reset()

func (*GroupUser) String

func (x *GroupUser) String() string

type GroupUsersRequest

type GroupUsersRequest struct {

	// The group ID to list from.
	GroupId string `protobuf:"bytes,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
	// Max number of records to return. Between 1 and 100.
	Limit *wrapperspb.Int32Value `protobuf:"bytes,2,opt,name=limit,proto3" json:"limit,omitempty"`
	// The group user state to list. -- use enum UserRoleState
	State *wrapperspb.Int32Value `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"`
	// An optional next page cursor.
	Cursor string `protobuf:"bytes,4,opt,name=cursor,proto3" json:"cursor,omitempty"`
	// contains filtered or unexported fields
}

List all users that are part of a group.

func GroupUsers

func GroupUsers(groupId string) *GroupUsersRequest

GroupUsers creates a request to retrieve a group's users.

func (*GroupUsersRequest) Async

func (req *GroupUsersRequest) Async(ctx context.Context, cl *Client, f func(*GroupUsersResponse, error))

Async executes the request against the context and client.

func (*GroupUsersRequest) Descriptor deprecated

func (*GroupUsersRequest) Descriptor() ([]byte, []int)

Deprecated: Use GroupUsersRequest.ProtoReflect.Descriptor instead.

func (*GroupUsersRequest) Do

Do executes the request against the context and client.

func (*GroupUsersRequest) GetCursor

func (x *GroupUsersRequest) GetCursor() string

func (*GroupUsersRequest) GetGroupId

func (x *GroupUsersRequest) GetGroupId() string

func (*GroupUsersRequest) GetLimit

func (x *GroupUsersRequest) GetLimit() *wrapperspb.Int32Value

func (*GroupUsersRequest) GetState

func (x *GroupUsersRequest) GetState() *wrapperspb.Int32Value

func (*GroupUsersRequest) ProtoMessage

func (*GroupUsersRequest) ProtoMessage()

func (*GroupUsersRequest) ProtoReflect

func (x *GroupUsersRequest) ProtoReflect() protoreflect.Message

func (*GroupUsersRequest) Reset

func (x *GroupUsersRequest) Reset()

func (*GroupUsersRequest) String

func (x *GroupUsersRequest) String() string

func (*GroupUsersRequest) WithCursor

func (req *GroupUsersRequest) WithCursor(cursor string) *GroupUsersRequest

WithCursor sets the cursor on the request.

func (*GroupUsersRequest) WithLimit

func (req *GroupUsersRequest) WithLimit(limit int) *GroupUsersRequest

WithLimit sets the limit on the request.

func (*GroupUsersRequest) WithState

func (req *GroupUsersRequest) WithState(state UserRoleState) *GroupUsersRequest

WithState sets the state on the request.

type GroupUsersResponse

type GroupUsersResponse struct {

	// User-role pairs for a group.
	GroupUsers []*GroupUser `protobuf:"bytes,1,rep,name=group_users,json=groupUsers,proto3" json:"group_users,omitempty"`
	// Cursor for the next page of results, if any.
	Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"`
	// contains filtered or unexported fields
}

A list of users belonging to a group, along with their role.

func (*GroupUsersResponse) Descriptor deprecated

func (*GroupUsersResponse) Descriptor() ([]byte, []int)

Deprecated: Use GroupUsersResponse.ProtoReflect.Descriptor instead.

func (*GroupUsersResponse) GetCursor

func (x *GroupUsersResponse) GetCursor() string

func (*GroupUsersResponse) GetGroupUsers

func (x *GroupUsersResponse) GetGroupUsers() []*GroupUser

func (*GroupUsersResponse) ProtoMessage

func (*GroupUsersResponse) ProtoMessage()

func (*GroupUsersResponse) ProtoReflect

func (x *GroupUsersResponse) ProtoReflect() protoreflect.Message

func (*GroupUsersResponse) Reset

func (x *GroupUsersResponse) Reset()

func (*GroupUsersResponse) String

func (x *GroupUsersResponse) String() string

type GroupsRequest

type GroupsRequest struct {

	// List groups that contain this value in their names.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Optional pagination cursor.
	Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"`
	// Max number of groups to return. Between 1 and 100.
	Limit *wrapperspb.Int32Value `protobuf:"bytes,3,opt,name=limit,proto3" json:"limit,omitempty"`
	// Language tag filter
	LangTag string `protobuf:"bytes,4,opt,name=lang_tag,json=langTag,proto3" json:"lang_tag,omitempty"`
	// Number of group members
	Members *wrapperspb.Int32Value `protobuf:"bytes,5,opt,name=members,proto3" json:"members,omitempty"`
	// Optional Open/Closed filter.
	Open *wrapperspb.BoolValue `protobuf:"bytes,6,opt,name=open,proto3" json:"open,omitempty"`
	// contains filtered or unexported fields
}

List groups based on given filters.

func Groups

func Groups() *GroupsRequest

Groups creates a request to retrieve groups.

func (*GroupsRequest) Async

func (req *GroupsRequest) Async(ctx context.Context, cl *Client, f func(*GroupsResponse, error))

Async executes the request against the context and client.

func (*GroupsRequest) Descriptor deprecated

func (*GroupsRequest) Descriptor() ([]byte, []int)

Deprecated: Use GroupsRequest.ProtoReflect.Descriptor instead.

func (*GroupsRequest) Do

func (req *GroupsRequest) Do(ctx context.Context, cl *Client) (*GroupsResponse, error)

Do executes the request against the context and client.

func (*GroupsRequest) GetCursor

func (x *GroupsRequest) GetCursor() string

func (*GroupsRequest) GetLangTag

func (x *GroupsRequest) GetLangTag() string

func (*GroupsRequest) GetLimit

func (x *GroupsRequest) GetLimit() *wrapperspb.Int32Value

func (*GroupsRequest) GetMembers

func (x *GroupsRequest) GetMembers() *wrapperspb.Int32Value

func (*GroupsRequest) GetName

func (x *GroupsRequest) GetName() string

func (*GroupsRequest) GetOpen

func (x *GroupsRequest) GetOpen() *wrapperspb.BoolValue

func (*GroupsRequest) ProtoMessage

func (*GroupsRequest) ProtoMessage()

func (*GroupsRequest) ProtoReflect

func (x *GroupsRequest) ProtoReflect() protoreflect.Message

func (*GroupsRequest) Reset

func (x *GroupsRequest) Reset()

func (*GroupsRequest) String

func (x *GroupsRequest) String() string

func (*GroupsRequest) WithCursor

func (req *GroupsRequest) WithCursor(cursor string) *GroupsRequest

WithCursor sets the cursor on the request.

func (*GroupsRequest) WithLangTag

func (req *GroupsRequest) WithLangTag(langTag string) *GroupsRequest

WithLangTag sets the langTag on the request.

func (*GroupsRequest) WithLimit

func (req *GroupsRequest) WithLimit(limit int) *GroupsRequest

WithLimit sets the limit on the request.

func (*GroupsRequest) WithMembers

func (req *GroupsRequest) WithMembers(members int) *GroupsRequest

WithMembers sets the members on the request.

func (*GroupsRequest) WithName

func (req *GroupsRequest) WithName(name string) *GroupsRequest

WithName sets the name on the request.

func (*GroupsRequest) WithOpen

func (req *GroupsRequest) WithOpen(open bool) *GroupsRequest

WithOpen sets the open on the request.

type GroupsResponse

type GroupsResponse struct {

	// One or more groups.
	Groups []*Group `protobuf:"bytes,1,rep,name=groups,proto3" json:"groups,omitempty"`
	// A cursor used to get the next page.
	Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"`
	// contains filtered or unexported fields
}

One or more groups returned from a listing operation.

func (*GroupsResponse) Descriptor deprecated

func (*GroupsResponse) Descriptor() ([]byte, []int)

Deprecated: Use GroupsResponse.ProtoReflect.Descriptor instead.

func (*GroupsResponse) GetCursor

func (x *GroupsResponse) GetCursor() string

func (*GroupsResponse) GetGroups

func (x *GroupsResponse) GetGroups() []*Group

func (*GroupsResponse) ProtoMessage

func (*GroupsResponse) ProtoMessage()

func (*GroupsResponse) ProtoReflect

func (x *GroupsResponse) ProtoReflect() protoreflect.Message

func (*GroupsResponse) Reset

func (x *GroupsResponse) Reset()

func (*GroupsResponse) String

func (x *GroupsResponse) String() string

type HealthcheckRequest

type HealthcheckRequest struct {
	// contains filtered or unexported fields
}

Healthcheck request.

func Healthcheck

func Healthcheck() *HealthcheckRequest

Healthcheck creates a new healthcheck request.

func (*HealthcheckRequest) Async

func (req *HealthcheckRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*HealthcheckRequest) Descriptor deprecated

func (*HealthcheckRequest) Descriptor() ([]byte, []int)

Deprecated: Use HealthcheckRequest.ProtoReflect.Descriptor instead.

func (*HealthcheckRequest) Do

func (req *HealthcheckRequest) Do(ctx context.Context, cl *Client) error

Do executes the healthcheck request against the context and client.

func (*HealthcheckRequest) ProtoMessage

func (*HealthcheckRequest) ProtoMessage()

func (*HealthcheckRequest) ProtoReflect

func (x *HealthcheckRequest) ProtoReflect() protoreflect.Message

func (*HealthcheckRequest) Reset

func (x *HealthcheckRequest) Reset()

func (*HealthcheckRequest) String

func (x *HealthcheckRequest) String() string

type ImportFacebookFriendsRequest

type ImportFacebookFriendsRequest struct {

	// The Facebook account details.
	Account *AccountFacebook `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	// Reset the current user's friends list.
	Reset_ *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=reset,proto3" json:"reset,omitempty"`
	// contains filtered or unexported fields
}

Import Facebook friends into the current user's account.

func ImportFacebookFriends

func ImportFacebookFriends(token string) *ImportFacebookFriendsRequest

ImportFacebookFriends creates a request to import Facebook friends.

func (*ImportFacebookFriendsRequest) Async

func (req *ImportFacebookFriendsRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*ImportFacebookFriendsRequest) Descriptor deprecated

func (*ImportFacebookFriendsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ImportFacebookFriendsRequest.ProtoReflect.Descriptor instead.

func (*ImportFacebookFriendsRequest) Do

Do executes the request against the context and client.

func (*ImportFacebookFriendsRequest) GetAccount

func (*ImportFacebookFriendsRequest) GetReset_

func (*ImportFacebookFriendsRequest) ProtoMessage

func (*ImportFacebookFriendsRequest) ProtoMessage()

func (*ImportFacebookFriendsRequest) ProtoReflect

func (*ImportFacebookFriendsRequest) Reset

func (x *ImportFacebookFriendsRequest) Reset()

func (*ImportFacebookFriendsRequest) String

func (*ImportFacebookFriendsRequest) WithReset

WithReset sets the reset on the request.

func (*ImportFacebookFriendsRequest) WithVars

WithVars sets the vars on the request.

type ImportSteamFriendsRequest

type ImportSteamFriendsRequest struct {

	// The Facebook account details.
	Account *AccountSteam `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	// Reset the current user's friends list.
	Reset_ *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=reset,proto3" json:"reset,omitempty"`
	// contains filtered or unexported fields
}

Import Facebook friends into the current user's account.

func ImportSteamFriends

func ImportSteamFriends(token string) *ImportSteamFriendsRequest

ImportSteamFriends creates a request to import Steam friends.

func (*ImportSteamFriendsRequest) Async

func (req *ImportSteamFriendsRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*ImportSteamFriendsRequest) Descriptor deprecated

func (*ImportSteamFriendsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ImportSteamFriendsRequest.ProtoReflect.Descriptor instead.

func (*ImportSteamFriendsRequest) Do

Do executes the request against the context and client.

func (*ImportSteamFriendsRequest) GetAccount

func (x *ImportSteamFriendsRequest) GetAccount() *AccountSteam

func (*ImportSteamFriendsRequest) GetReset_

func (*ImportSteamFriendsRequest) ProtoMessage

func (*ImportSteamFriendsRequest) ProtoMessage()

func (*ImportSteamFriendsRequest) ProtoReflect

func (*ImportSteamFriendsRequest) Reset

func (x *ImportSteamFriendsRequest) Reset()

func (*ImportSteamFriendsRequest) String

func (x *ImportSteamFriendsRequest) String() string

func (*ImportSteamFriendsRequest) WithReset

WithReset sets the reset on the request.

func (*ImportSteamFriendsRequest) WithVars

WithVars sets the vars on the request.

type JoinGroupRequest

type JoinGroupRequest struct {

	// The group ID to join. The group must already exist.
	GroupId string `protobuf:"bytes,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
	// contains filtered or unexported fields
}

Immediately join an open group, or request to join a closed one.

func JoinGroup

func JoinGroup(groupId string) *JoinGroupRequest

JoinGroup creates a request to join a group.

func (*JoinGroupRequest) Async

func (req *JoinGroupRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*JoinGroupRequest) Descriptor deprecated

func (*JoinGroupRequest) Descriptor() ([]byte, []int)

Deprecated: Use JoinGroupRequest.ProtoReflect.Descriptor instead.

func (*JoinGroupRequest) Do

func (req *JoinGroupRequest) Do(ctx context.Context, cl *Client) error

Do executes the request against the context and client.

func (*JoinGroupRequest) GetGroupId

func (x *JoinGroupRequest) GetGroupId() string

func (*JoinGroupRequest) ProtoMessage

func (*JoinGroupRequest) ProtoMessage()

func (*JoinGroupRequest) ProtoReflect

func (x *JoinGroupRequest) ProtoReflect() protoreflect.Message

func (*JoinGroupRequest) Reset

func (x *JoinGroupRequest) Reset()

func (*JoinGroupRequest) String

func (x *JoinGroupRequest) String() string

type JoinTournamentRequest

type JoinTournamentRequest struct {

	// The ID of the tournament to join. The tournament must already exist.
	TournamentId string `protobuf:"bytes,1,opt,name=tournament_id,json=tournamentId,proto3" json:"tournament_id,omitempty"`
	// contains filtered or unexported fields
}

The request to join a tournament.

func JoinTournament

func JoinTournament(tournamentId string) *JoinTournamentRequest

JoinTournament creates a request to join a tournament.

func (*JoinTournamentRequest) Async

func (req *JoinTournamentRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*JoinTournamentRequest) Descriptor deprecated

func (*JoinTournamentRequest) Descriptor() ([]byte, []int)

Deprecated: Use JoinTournamentRequest.ProtoReflect.Descriptor instead.

func (*JoinTournamentRequest) Do

func (req *JoinTournamentRequest) Do(ctx context.Context, cl *Client) error

Do executes the request against the context and client.

func (*JoinTournamentRequest) GetTournamentId

func (x *JoinTournamentRequest) GetTournamentId() string

func (*JoinTournamentRequest) ProtoMessage

func (*JoinTournamentRequest) ProtoMessage()

func (*JoinTournamentRequest) ProtoReflect

func (x *JoinTournamentRequest) ProtoReflect() protoreflect.Message

func (*JoinTournamentRequest) Reset

func (x *JoinTournamentRequest) Reset()

func (*JoinTournamentRequest) String

func (x *JoinTournamentRequest) String() string

type KickGroupUsersRequest

type KickGroupUsersRequest struct {

	// The group ID to kick from.
	GroupId string `protobuf:"bytes,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
	// The users to kick.
	UserIds []string `protobuf:"bytes,2,rep,name=user_ids,json=userIds,proto3" json:"user_ids,omitempty"`
	// contains filtered or unexported fields
}

Kick a set of users from a group.

func KickGroupUsers

func KickGroupUsers(groupId string, userIds ...string) *KickGroupUsersRequest

KickGroupUsers creates a request to kick users from a group or decline their join request.

func (*KickGroupUsersRequest) Async

func (req *KickGroupUsersRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*KickGroupUsersRequest) Descriptor deprecated

func (*KickGroupUsersRequest) Descriptor() ([]byte, []int)

Deprecated: Use KickGroupUsersRequest.ProtoReflect.Descriptor instead.

func (*KickGroupUsersRequest) Do

func (req *KickGroupUsersRequest) Do(ctx context.Context, cl *Client) error

Do executes the request against the context and client.

func (*KickGroupUsersRequest) GetGroupId

func (x *KickGroupUsersRequest) GetGroupId() string

func (*KickGroupUsersRequest) GetUserIds

func (x *KickGroupUsersRequest) GetUserIds() []string

func (*KickGroupUsersRequest) ProtoMessage

func (*KickGroupUsersRequest) ProtoMessage()

func (*KickGroupUsersRequest) ProtoReflect

func (x *KickGroupUsersRequest) ProtoReflect() protoreflect.Message

func (*KickGroupUsersRequest) Reset

func (x *KickGroupUsersRequest) Reset()

func (*KickGroupUsersRequest) String

func (x *KickGroupUsersRequest) String() string

type Leaderboard

type Leaderboard struct {

	// The ID of the leaderboard.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// ASC(0) or DESC(1) sort mode of scores in the leaderboard.
	SortOrder uint32 `protobuf:"varint,2,opt,name=sort_order,json=sortOrder,proto3" json:"sort_order,omitempty"`
	// BEST, SET, INCREMENT or DECREMENT operator mode of the leaderboard.
	Operator OpType `protobuf:"varint,3,opt,name=operator,proto3,enum=nakama.OpType" json:"operator,omitempty"`
	// The UNIX time when the leaderboard was previously reset. A computed value.
	PrevReset uint32 `protobuf:"varint,4,opt,name=prev_reset,json=prevReset,proto3" json:"prev_reset,omitempty"`
	// The UNIX time when the leaderboard is next playable. A computed value.
	NextReset uint32 `protobuf:"varint,5,opt,name=next_reset,json=nextReset,proto3" json:"next_reset,omitempty"`
	// Additional information stored as a JSON object.
	Metadata string `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard was created.
	CreateTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// Whether the leaderboard was created authoritatively or not.
	Authoritative bool `protobuf:"varint,8,opt,name=authoritative,proto3" json:"authoritative,omitempty"`
	// contains filtered or unexported fields
}

A leaderboard on the server.

func (*Leaderboard) Descriptor deprecated

func (*Leaderboard) Descriptor() ([]byte, []int)

Deprecated: Use Leaderboard.ProtoReflect.Descriptor instead.

func (*Leaderboard) GetAuthoritative

func (x *Leaderboard) GetAuthoritative() bool

func (*Leaderboard) GetCreateTime

func (x *Leaderboard) GetCreateTime() *timestamppb.Timestamp

func (*Leaderboard) GetId

func (x *Leaderboard) GetId() string

func (*Leaderboard) GetMetadata

func (x *Leaderboard) GetMetadata() string

func (*Leaderboard) GetNextReset

func (x *Leaderboard) GetNextReset() uint32

func (*Leaderboard) GetOperator

func (x *Leaderboard) GetOperator() OpType

func (*Leaderboard) GetPrevReset

func (x *Leaderboard) GetPrevReset() uint32

func (*Leaderboard) GetSortOrder

func (x *Leaderboard) GetSortOrder() uint32

func (*Leaderboard) ProtoMessage

func (*Leaderboard) ProtoMessage()

func (*Leaderboard) ProtoReflect

func (x *Leaderboard) ProtoReflect() protoreflect.Message

func (*Leaderboard) Reset

func (x *Leaderboard) Reset()

func (*Leaderboard) String

func (x *Leaderboard) String() string

type LeaderboardRecord

type LeaderboardRecord struct {

	// The ID of the leaderboard this score belongs to.
	LeaderboardId string `protobuf:"bytes,1,opt,name=leaderboard_id,json=leaderboardId,proto3" json:"leaderboard_id,omitempty"`
	// The ID of the score owner, usually a user or group.
	OwnerId string `protobuf:"bytes,2,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"`
	// The username of the score owner, if the owner is a user.
	Username *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"`
	// The score value.
	Score int64 `protobuf:"varint,4,opt,name=score,proto3" json:"score,omitempty"`
	// An optional subscore value.
	Subscore int64 `protobuf:"varint,5,opt,name=subscore,proto3" json:"subscore,omitempty"`
	// The number of submissions to this score record.
	NumScore int32 `protobuf:"varint,6,opt,name=num_score,json=numScore,proto3" json:"num_score,omitempty"`
	// Metadata.
	Metadata string `protobuf:"bytes,7,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record was created.
	CreateTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record was updated.
	UpdateTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record expires.
	ExpiryTime *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=expiry_time,json=expiryTime,proto3" json:"expiry_time,omitempty"`
	// The rank of this record.
	Rank int64 `protobuf:"varint,11,opt,name=rank,proto3" json:"rank,omitempty"`
	// The maximum number of score updates allowed by the owner.
	MaxNumScore uint32 `protobuf:"varint,12,opt,name=max_num_score,json=maxNumScore,proto3" json:"max_num_score,omitempty"`
	// contains filtered or unexported fields
}

Represents a complete leaderboard record with all scores and associated metadata.

func (*LeaderboardRecord) Descriptor deprecated

func (*LeaderboardRecord) Descriptor() ([]byte, []int)

Deprecated: Use LeaderboardRecord.ProtoReflect.Descriptor instead.

func (*LeaderboardRecord) GetCreateTime

func (x *LeaderboardRecord) GetCreateTime() *timestamppb.Timestamp

func (*LeaderboardRecord) GetExpiryTime

func (x *LeaderboardRecord) GetExpiryTime() *timestamppb.Timestamp

func (*LeaderboardRecord) GetLeaderboardId

func (x *LeaderboardRecord) GetLeaderboardId() string

func (*LeaderboardRecord) GetMaxNumScore

func (x *LeaderboardRecord) GetMaxNumScore() uint32

func (*LeaderboardRecord) GetMetadata

func (x *LeaderboardRecord) GetMetadata() string

func (*LeaderboardRecord) GetNumScore

func (x *LeaderboardRecord) GetNumScore() int32

func (*LeaderboardRecord) GetOwnerId

func (x *LeaderboardRecord) GetOwnerId() string

func (*LeaderboardRecord) GetRank

func (x *LeaderboardRecord) GetRank() int64

func (*LeaderboardRecord) GetScore

func (x *LeaderboardRecord) GetScore() int64

func (*LeaderboardRecord) GetSubscore

func (x *LeaderboardRecord) GetSubscore() int64

func (*LeaderboardRecord) GetUpdateTime

func (x *LeaderboardRecord) GetUpdateTime() *timestamppb.Timestamp

func (*LeaderboardRecord) GetUsername

func (x *LeaderboardRecord) GetUsername() *wrapperspb.StringValue

func (*LeaderboardRecord) ProtoMessage

func (*LeaderboardRecord) ProtoMessage()

func (*LeaderboardRecord) ProtoReflect

func (x *LeaderboardRecord) ProtoReflect() protoreflect.Message

func (*LeaderboardRecord) Reset

func (x *LeaderboardRecord) Reset()

func (*LeaderboardRecord) String

func (x *LeaderboardRecord) String() string

type LeaderboardRecordWrite

type LeaderboardRecordWrite struct {

	// The score value to submit.
	Score int64 `protobuf:"varint,1,opt,name=score,proto3" json:"score,omitempty"`
	// An optional secondary value.
	Subscore int64 `protobuf:"varint,2,opt,name=subscore,proto3" json:"subscore,omitempty"`
	// Optional record metadata.
	Metadata string `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// Operator override.
	Operator OpType `protobuf:"varint,4,opt,name=operator,proto3,enum=nakama.OpType" json:"operator,omitempty"`
	// contains filtered or unexported fields
}

Record values to write.

func (*LeaderboardRecordWrite) Descriptor deprecated

func (*LeaderboardRecordWrite) Descriptor() ([]byte, []int)

Deprecated: Use LeaderboardRecordWrite.ProtoReflect.Descriptor instead.

func (*LeaderboardRecordWrite) GetMetadata

func (x *LeaderboardRecordWrite) GetMetadata() string

func (*LeaderboardRecordWrite) GetOperator

func (x *LeaderboardRecordWrite) GetOperator() OpType

func (*LeaderboardRecordWrite) GetScore

func (x *LeaderboardRecordWrite) GetScore() int64

func (*LeaderboardRecordWrite) GetSubscore

func (x *LeaderboardRecordWrite) GetSubscore() int64

func (*LeaderboardRecordWrite) ProtoMessage

func (*LeaderboardRecordWrite) ProtoMessage()

func (*LeaderboardRecordWrite) ProtoReflect

func (x *LeaderboardRecordWrite) ProtoReflect() protoreflect.Message

func (*LeaderboardRecordWrite) Reset

func (x *LeaderboardRecordWrite) Reset()

func (*LeaderboardRecordWrite) String

func (x *LeaderboardRecordWrite) String() string

type LeaderboardRecordsAroundOwnerRequest

type LeaderboardRecordsAroundOwnerRequest struct {

	// The ID of the tournament to list for.
	LeaderboardId string `protobuf:"bytes,1,opt,name=leaderboard_id,json=leaderboardId,proto3" json:"leaderboard_id,omitempty"`
	// Max number of records to return. Between 1 and 100.
	Limit *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=limit,proto3" json:"limit,omitempty"`
	// The owner to retrieve records around.
	OwnerId string `protobuf:"bytes,3,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"`
	// Expiry in seconds (since epoch) to begin fetching records from.
	Expiry *wrapperspb.Int64Value `protobuf:"bytes,4,opt,name=expiry,proto3" json:"expiry,omitempty"`
	// A next or previous page cursor.
	Cursor string `protobuf:"bytes,5,opt,name=cursor,proto3" json:"cursor,omitempty"`
	// contains filtered or unexported fields
}

List leaerboard records from a given leaderboard around the owner.

func LeaderboardRecordsAroundOwner

func LeaderboardRecordsAroundOwner(leaderboardId, ownerId string) *LeaderboardRecordsAroundOwnerRequest

LeaderboardRecordsAroundOwner creates a request to retrieve leaderboard records around owner.

func (*LeaderboardRecordsAroundOwnerRequest) Async

Async executes the request against the context and client.

func (*LeaderboardRecordsAroundOwnerRequest) Descriptor deprecated

func (*LeaderboardRecordsAroundOwnerRequest) Descriptor() ([]byte, []int)

Deprecated: Use LeaderboardRecordsAroundOwnerRequest.ProtoReflect.Descriptor instead.

func (*LeaderboardRecordsAroundOwnerRequest) Do

Do executes the request against the context and client.

func (*LeaderboardRecordsAroundOwnerRequest) GetCursor

func (*LeaderboardRecordsAroundOwnerRequest) GetExpiry

func (*LeaderboardRecordsAroundOwnerRequest) GetLeaderboardId

func (x *LeaderboardRecordsAroundOwnerRequest) GetLeaderboardId() string

func (*LeaderboardRecordsAroundOwnerRequest) GetLimit

func (*LeaderboardRecordsAroundOwnerRequest) GetOwnerId

func (*LeaderboardRecordsAroundOwnerRequest) ProtoMessage

func (*LeaderboardRecordsAroundOwnerRequest) ProtoMessage()

func (*LeaderboardRecordsAroundOwnerRequest) ProtoReflect

func (*LeaderboardRecordsAroundOwnerRequest) Reset

func (*LeaderboardRecordsAroundOwnerRequest) String

func (*LeaderboardRecordsAroundOwnerRequest) WithExpiry

WithExpiry sets the expiry on the request.

func (*LeaderboardRecordsAroundOwnerRequest) WithLimit

WithLimit sets the limit on the request.

type LeaderboardRecordsRequest

type LeaderboardRecordsRequest struct {

	// The ID of the leaderboard to list for.
	LeaderboardId string `protobuf:"bytes,1,opt,name=leaderboard_id,json=leaderboardId,proto3" json:"leaderboard_id,omitempty"`
	// One or more owners to retrieve records for.
	OwnerIds []string `protobuf:"bytes,2,rep,name=owner_ids,json=ownerIds,proto3" json:"owner_ids,omitempty"`
	// Max number of records to return. Between 1 and 100.
	Limit *wrapperspb.Int32Value `protobuf:"bytes,3,opt,name=limit,proto3" json:"limit,omitempty"`
	// A next or previous page cursor.
	Cursor string `protobuf:"bytes,4,opt,name=cursor,proto3" json:"cursor,omitempty"`
	// Expiry in seconds (since epoch) to begin fetching records from. Optional. 0 means from current time.
	Expiry *wrapperspb.Int64Value `protobuf:"bytes,5,opt,name=expiry,proto3" json:"expiry,omitempty"`
	// contains filtered or unexported fields
}

List leaderboard records from a given leaderboard.

func LeaderboardRecords

func LeaderboardRecords(leaderboardId string) *LeaderboardRecordsRequest

LeaderboardRecords creates a request to retrieve the leaderboard records.

func (*LeaderboardRecordsRequest) Async

Async executes the request against the context and client.

func (*LeaderboardRecordsRequest) Descriptor deprecated

func (*LeaderboardRecordsRequest) Descriptor() ([]byte, []int)

Deprecated: Use LeaderboardRecordsRequest.ProtoReflect.Descriptor instead.

func (*LeaderboardRecordsRequest) Do

Do executes the request against the context and client.

func (*LeaderboardRecordsRequest) GetCursor

func (x *LeaderboardRecordsRequest) GetCursor() string

func (*LeaderboardRecordsRequest) GetExpiry

func (*LeaderboardRecordsRequest) GetLeaderboardId

func (x *LeaderboardRecordsRequest) GetLeaderboardId() string

func (*LeaderboardRecordsRequest) GetLimit

func (*LeaderboardRecordsRequest) GetOwnerIds

func (x *LeaderboardRecordsRequest) GetOwnerIds() []string

func (*LeaderboardRecordsRequest) ProtoMessage

func (*LeaderboardRecordsRequest) ProtoMessage()

func (*LeaderboardRecordsRequest) ProtoReflect

func (*LeaderboardRecordsRequest) Reset

func (x *LeaderboardRecordsRequest) Reset()

func (*LeaderboardRecordsRequest) String

func (x *LeaderboardRecordsRequest) String() string

func (*LeaderboardRecordsRequest) WithCursor

WithCursor sets the cursor on the request.

func (*LeaderboardRecordsRequest) WithExpiry

func (req *LeaderboardRecordsRequest) WithExpiry(expiry int) *LeaderboardRecordsRequest

WithExpiry sets the expiry on the request.

func (*LeaderboardRecordsRequest) WithLimit

WithLimit sets the limit on the request.

func (*LeaderboardRecordsRequest) WithOwnerIds

func (req *LeaderboardRecordsRequest) WithOwnerIds(ownerIds ...string) *LeaderboardRecordsRequest

WithOwnerIds sets the ownerIds on the request.

type LeaderboardRecordsResponse

type LeaderboardRecordsResponse struct {

	// A list of leaderboard records.
	Records []*LeaderboardRecord `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"`
	// A batched set of leaderboard records belonging to specified owners.
	OwnerRecords []*LeaderboardRecord `protobuf:"bytes,2,rep,name=owner_records,json=ownerRecords,proto3" json:"owner_records,omitempty"`
	// The cursor to send when retrieving the next page, if any.
	NextCursor string `protobuf:"bytes,3,opt,name=next_cursor,json=nextCursor,proto3" json:"next_cursor,omitempty"`
	// The cursor to send when retrieving the previous page, if any.
	PrevCursor string `protobuf:"bytes,4,opt,name=prev_cursor,json=prevCursor,proto3" json:"prev_cursor,omitempty"`
	// contains filtered or unexported fields
}

A set of leaderboard records, may be part of a leaderboard records page or a batch of individual records.

func (*LeaderboardRecordsResponse) Descriptor deprecated

func (*LeaderboardRecordsResponse) Descriptor() ([]byte, []int)

Deprecated: Use LeaderboardRecordsResponse.ProtoReflect.Descriptor instead.

func (*LeaderboardRecordsResponse) GetNextCursor

func (x *LeaderboardRecordsResponse) GetNextCursor() string

func (*LeaderboardRecordsResponse) GetOwnerRecords

func (x *LeaderboardRecordsResponse) GetOwnerRecords() []*LeaderboardRecord

func (*LeaderboardRecordsResponse) GetPrevCursor

func (x *LeaderboardRecordsResponse) GetPrevCursor() string

func (*LeaderboardRecordsResponse) GetRecords

func (x *LeaderboardRecordsResponse) GetRecords() []*LeaderboardRecord

func (*LeaderboardRecordsResponse) ProtoMessage

func (*LeaderboardRecordsResponse) ProtoMessage()

func (*LeaderboardRecordsResponse) ProtoReflect

func (*LeaderboardRecordsResponse) Reset

func (x *LeaderboardRecordsResponse) Reset()

func (*LeaderboardRecordsResponse) String

func (x *LeaderboardRecordsResponse) String() string

type LeaderboardsResponse

type LeaderboardsResponse struct {

	// The list of leaderboards returned.
	Leaderboards []*Leaderboard `protobuf:"bytes,1,rep,name=leaderboards,proto3" json:"leaderboards,omitempty"`
	// A pagination cursor (optional).
	Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"`
	// contains filtered or unexported fields
}

A list of leaderboards

func (*LeaderboardsResponse) Descriptor deprecated

func (*LeaderboardsResponse) Descriptor() ([]byte, []int)

Deprecated: Use LeaderboardsResponse.ProtoReflect.Descriptor instead.

func (*LeaderboardsResponse) GetCursor

func (x *LeaderboardsResponse) GetCursor() string

func (*LeaderboardsResponse) GetLeaderboards

func (x *LeaderboardsResponse) GetLeaderboards() []*Leaderboard

func (*LeaderboardsResponse) ProtoMessage

func (*LeaderboardsResponse) ProtoMessage()

func (*LeaderboardsResponse) ProtoReflect

func (x *LeaderboardsResponse) ProtoReflect() protoreflect.Message

func (*LeaderboardsResponse) Reset

func (x *LeaderboardsResponse) Reset()

func (*LeaderboardsResponse) String

func (x *LeaderboardsResponse) String() string

type LeaveGroupRequest

type LeaveGroupRequest struct {

	// The group ID to leave.
	GroupId string `protobuf:"bytes,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
	// contains filtered or unexported fields
}

Leave a group.

func LeaveGroup

func LeaveGroup(groupId string) *LeaveGroupRequest

LeaveGroup creates a request to leave a group.

func (*LeaveGroupRequest) Async

func (req *LeaveGroupRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*LeaveGroupRequest) Descriptor deprecated

func (*LeaveGroupRequest) Descriptor() ([]byte, []int)

Deprecated: Use LeaveGroupRequest.ProtoReflect.Descriptor instead.

func (*LeaveGroupRequest) Do

func (req *LeaveGroupRequest) Do(ctx context.Context, cl *Client) error

Do executes the request against the context and client.

func (*LeaveGroupRequest) GetGroupId

func (x *LeaveGroupRequest) GetGroupId() string

func (*LeaveGroupRequest) ProtoMessage

func (*LeaveGroupRequest) ProtoMessage()

func (*LeaveGroupRequest) ProtoReflect

func (x *LeaveGroupRequest) ProtoReflect() protoreflect.Message

func (*LeaveGroupRequest) Reset

func (x *LeaveGroupRequest) Reset()

func (*LeaveGroupRequest) String

func (x *LeaveGroupRequest) String() string

type LinkAppleRequest

type LinkAppleRequest struct {
	AccountApple
}

LinkAppleRequest is a request to add a Apple token to the user's account.

func LinkApple

func LinkApple(token string) *LinkAppleRequest

LinkApple creates a request to add a Apple token to the user's account.

func (*LinkAppleRequest) Async

func (req *LinkAppleRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*LinkAppleRequest) Do

func (req *LinkAppleRequest) Do(ctx context.Context, cl *Client) error

Do executes the request against the context and client.

func (*LinkAppleRequest) WithToken

func (req *LinkAppleRequest) WithToken(token string) *LinkAppleRequest

WithToken sets the token on the request.

func (*LinkAppleRequest) WithVars

func (req *LinkAppleRequest) WithVars(vars map[string]string) *LinkAppleRequest

WithVars sets the vars on the request.

type LinkCustomRequest

type LinkCustomRequest struct {
	AccountCustom
}

LinkCustomRequest is a request to add a custom id to the user's account.

func LinkCustom

func LinkCustom(id string) *LinkCustomRequest

LinkCustom creates a request to add a custom id to the user's account.

func (*LinkCustomRequest) Async

func (req *LinkCustomRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*LinkCustomRequest) Do

func (req *LinkCustomRequest) Do(ctx context.Context, cl *Client) error

Do executes the request against the context and client.

func (*LinkCustomRequest) WithVars

func (req *LinkCustomRequest) WithVars(vars map[string]string) *LinkCustomRequest

WithVars sets the vars on the request.

type LinkDeviceRequest

type LinkDeviceRequest struct {
	AccountDevice
}

LinkDeviceRequest is a request to add a device id to a user's account.

func LinkDevice

func LinkDevice(id string) *LinkDeviceRequest

LinkDevice creates a request to add a device id to a user's account.

func (*LinkDeviceRequest) Async

func (req *LinkDeviceRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*LinkDeviceRequest) Do

func (req *LinkDeviceRequest) Do(ctx context.Context, cl *Client) error

Do executes the request against the context and client.

func (*LinkDeviceRequest) WithVars

func (req *LinkDeviceRequest) WithVars(vars map[string]string) *LinkDeviceRequest

WithVars sets the vars on the request.

type LinkEmailRequest

type LinkEmailRequest struct {
	AccountEmail
}

LinkEmailRequest is a request to add a email/password to the user's account.

func LinkEmail

func LinkEmail(email, password string) *LinkEmailRequest

LinkEmail creates a request to add a email/password to the user's account.

func (*LinkEmailRequest) Async

func (req *LinkEmailRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*LinkEmailRequest) Do

func (req *LinkEmailRequest) Do(ctx context.Context, cl *Client) error

Do executes the request against the context and client.

func (*LinkEmailRequest) WithVars

func (req *LinkEmailRequest) WithVars(vars map[string]string) *LinkEmailRequest

WithVars sets the vars on the request.

type LinkFacebookInstantGameRequest

type LinkFacebookInstantGameRequest struct {
	AccountFacebookInstantGame
}

LinkFacebookInstantGameRequest is a request to add Facebook Instant Game token to the user's account.

func LinkFacebookInstantGame

func LinkFacebookInstantGame(signedPlayerInfo string) *LinkFacebookInstantGameRequest

LinkFacebookInstantGame creates a request to add Facebook Instant Game token to the user's account.

func (*LinkFacebookInstantGameRequest) Async

func (req *LinkFacebookInstantGameRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*LinkFacebookInstantGameRequest) Do

Do executes the request against the context and client.

func (*LinkFacebookInstantGameRequest) WithVars

WithVars sets the vars on the request.

type LinkFacebookRequest

type LinkFacebookRequest struct {

	// The Facebook account details.
	Account *AccountFacebook `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	// Import Facebook friends for the user.
	Sync *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=sync,proto3" json:"sync,omitempty"`
	// contains filtered or unexported fields
}

Link Facebook to the current user's account.

func LinkFacebook

func LinkFacebook(token string) *LinkFacebookRequest

LinkFacebook creates a request to add a Facebook token to the user's account.

func (*LinkFacebookRequest) Async

func (req *LinkFacebookRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*LinkFacebookRequest) Descriptor deprecated

func (*LinkFacebookRequest) Descriptor() ([]byte, []int)

Deprecated: Use LinkFacebookRequest.ProtoReflect.Descriptor instead.

func (*LinkFacebookRequest) Do

func (req *LinkFacebookRequest) Do(ctx context.Context, cl *Client) error

Do executes the request against the context and client.

func (*LinkFacebookRequest) GetAccount

func (x *LinkFacebookRequest) GetAccount() *AccountFacebook

func (*LinkFacebookRequest) GetSync

func (*LinkFacebookRequest) ProtoMessage

func (*LinkFacebookRequest) ProtoMessage()

func (*LinkFacebookRequest) ProtoReflect

func (x *LinkFacebookRequest) ProtoReflect() protoreflect.Message

func (*LinkFacebookRequest) Reset

func (x *LinkFacebookRequest) Reset()

func (*LinkFacebookRequest) String

func (x *LinkFacebookRequest) String() string

func (*LinkFacebookRequest) WithSync

func (req *LinkFacebookRequest) WithSync(sync bool) *LinkFacebookRequest

WithSync sets the sync on the request.

func (*LinkFacebookRequest) WithVars

func (req *LinkFacebookRequest) WithVars(vars map[string]string) *LinkFacebookRequest

WithVars sets the vars on the request.

type LinkGameCenterRequest

type LinkGameCenterRequest struct {
	AccountGameCenter
}

LinkGameCenterRequest is a request to add a Apple GameCenter token to a user's account.

func LinkGameCenter

func LinkGameCenter() *LinkGameCenterRequest

LinkGameCenter creates a request to add a Apple GameCenter token to a user's account.

func (*LinkGameCenterRequest) Async

func (req *LinkGameCenterRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*LinkGameCenterRequest) Do

func (req *LinkGameCenterRequest) Do(ctx context.Context, cl *Client) error

Do executes the request against the context and client.

func (*LinkGameCenterRequest) WithBundleId

func (req *LinkGameCenterRequest) WithBundleId(bundleId string) *LinkGameCenterRequest

WithBundleId sets the bundleId on the request.

func (*LinkGameCenterRequest) WithPlayerId

func (req *LinkGameCenterRequest) WithPlayerId(playerId string) *LinkGameCenterRequest

WithPlayerId sets the playerId on the request.

func (*LinkGameCenterRequest) WithPublicKeyUrl

func (req *LinkGameCenterRequest) WithPublicKeyUrl(publicKeyUrl string) *LinkGameCenterRequest

WithPublicKeyUrl sets the publicKeyUrl on the request.

func (*LinkGameCenterRequest) WithSalt

func (req *LinkGameCenterRequest) WithSalt(salt string) *LinkGameCenterRequest

WithSalt sets the salt on the request.

func (*LinkGameCenterRequest) WithSignature

func (req *LinkGameCenterRequest) WithSignature(signature string) *LinkGameCenterRequest

WithSignature sets the signature on the request.

func (*LinkGameCenterRequest) WithTimestampSeconds

func (req *LinkGameCenterRequest) WithTimestampSeconds(timestampSeconds int64) *LinkGameCenterRequest

WithTimestampSeconds sets the timestampSeconds on the request.

func (*LinkGameCenterRequest) WithVars

func (req *LinkGameCenterRequest) WithVars(vars map[string]string) *LinkGameCenterRequest

WithVars sets the vars on the request.

type LinkGoogleRequest

type LinkGoogleRequest struct {
	AccountGoogle
}

LinkGoogleRequest is a request to add a Google token to a user's account.

func LinkGoogle

func LinkGoogle(token string) *LinkGoogleRequest

LinkGoogle creates a request to add a Google token to a user's account.

func (*LinkGoogleRequest) Async

func (req *LinkGoogleRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*LinkGoogleRequest) Do

func (req *LinkGoogleRequest) Do(ctx context.Context, cl *Client) error

Do executes the request against the context and client.

func (*LinkGoogleRequest) WithVars

func (req *LinkGoogleRequest) WithVars(vars map[string]string) *LinkGoogleRequest

WithVars sets the vars on the request.

type LinkSteamRequest

type LinkSteamRequest struct {

	// The Facebook account details.
	Account *AccountSteam `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	// Import Steam friends for the user.
	Sync *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=sync,proto3" json:"sync,omitempty"`
	// contains filtered or unexported fields
}

Link Steam to the current user's account.

func LinkSteam

func LinkSteam(token string) *LinkSteamRequest

LinkSteam creates a request adds a Steam token to a user's account.

func (*LinkSteamRequest) Async

func (req *LinkSteamRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*LinkSteamRequest) Descriptor deprecated

func (*LinkSteamRequest) Descriptor() ([]byte, []int)

Deprecated: Use LinkSteamRequest.ProtoReflect.Descriptor instead.

func (*LinkSteamRequest) Do

func (req *LinkSteamRequest) Do(ctx context.Context, cl *Client) error

Do executes the request against the context and client.

func (*LinkSteamRequest) GetAccount

func (x *LinkSteamRequest) GetAccount() *AccountSteam

func (*LinkSteamRequest) GetSync

func (x *LinkSteamRequest) GetSync() *wrapperspb.BoolValue

func (*LinkSteamRequest) ProtoMessage

func (*LinkSteamRequest) ProtoMessage()

func (*LinkSteamRequest) ProtoReflect

func (x *LinkSteamRequest) ProtoReflect() protoreflect.Message

func (*LinkSteamRequest) Reset

func (x *LinkSteamRequest) Reset()

func (*LinkSteamRequest) String

func (x *LinkSteamRequest) String() string

func (*LinkSteamRequest) WithSync

func (req *LinkSteamRequest) WithSync(sync bool) *LinkSteamRequest

WithSync sets the sync on the request.

func (*LinkSteamRequest) WithVars

func (req *LinkSteamRequest) WithVars(vars map[string]string) *LinkSteamRequest

WithVars sets the vars on the request.

type Match

type Match struct {

	// The ID of the match, can be used to join.
	MatchId string `protobuf:"bytes,1,opt,name=match_id,json=matchId,proto3" json:"match_id,omitempty"`
	// True if it's an server-managed authoritative match, false otherwise.
	Authoritative bool `protobuf:"varint,2,opt,name=authoritative,proto3" json:"authoritative,omitempty"`
	// Match label, if any.
	Label *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=label,proto3" json:"label,omitempty"`
	// Current number of users in the match.
	Size int32 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"`
	// Tick Rate
	TickRate int32 `protobuf:"varint,5,opt,name=tick_rate,json=tickRate,proto3" json:"tick_rate,omitempty"`
	// Handler name
	HandlerName string `protobuf:"bytes,6,opt,name=handler_name,json=handlerName,proto3" json:"handler_name,omitempty"`
	// contains filtered or unexported fields
}

Represents a realtime match.

func (*Match) Descriptor deprecated

func (*Match) Descriptor() ([]byte, []int)

Deprecated: Use Match.ProtoReflect.Descriptor instead.

func (*Match) GetAuthoritative

func (x *Match) GetAuthoritative() bool

func (*Match) GetHandlerName

func (x *Match) GetHandlerName() string

func (*Match) GetLabel

func (x *Match) GetLabel() *wrapperspb.StringValue

func (*Match) GetMatchId

func (x *Match) GetMatchId() string

func (*Match) GetSize

func (x *Match) GetSize() int32

func (*Match) GetTickRate

func (x *Match) GetTickRate() int32

func (*Match) ProtoMessage

func (*Match) ProtoMessage()

func (*Match) ProtoReflect

func (x *Match) ProtoReflect() protoreflect.Message

func (*Match) Reset

func (x *Match) Reset()

func (*Match) String

func (x *Match) String() string

type MatchCreateMsg

type MatchCreateMsg struct {

	// Optional name to use when creating the match.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

Create a new realtime match.

func MatchCreate

func MatchCreate(name string) *MatchCreateMsg

MatchCreate creates a realtime message to create a multiplayer match.

func (*MatchCreateMsg) Async

func (msg *MatchCreateMsg) Async(ctx context.Context, conn *Conn, f func(*MatchMsg, error))

Async sends the message to the connection.

func (*MatchCreateMsg) BuildEnvelope

func (msg *MatchCreateMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*MatchCreateMsg) Descriptor deprecated

func (*MatchCreateMsg) Descriptor() ([]byte, []int)

Deprecated: Use MatchCreateMsg.ProtoReflect.Descriptor instead.

func (*MatchCreateMsg) GetName

func (x *MatchCreateMsg) GetName() string

func (*MatchCreateMsg) ProtoMessage

func (*MatchCreateMsg) ProtoMessage()

func (*MatchCreateMsg) ProtoReflect

func (x *MatchCreateMsg) ProtoReflect() protoreflect.Message

func (*MatchCreateMsg) Reset

func (x *MatchCreateMsg) Reset()

func (*MatchCreateMsg) Send

func (msg *MatchCreateMsg) Send(ctx context.Context, conn *Conn) (*MatchMsg, error)

Send sends the message to the connection.

func (*MatchCreateMsg) String

func (x *MatchCreateMsg) String() string

type MatchDataMsg

type MatchDataMsg struct {

	// The match unique ID.
	MatchId string `protobuf:"bytes,1,opt,name=match_id,json=matchId,proto3" json:"match_id,omitempty"`
	// A reference to the user presence that sent this data, if any.
	Presence *UserPresenceMsg `protobuf:"bytes,2,opt,name=presence,proto3" json:"presence,omitempty"`
	// Op code value.
	OpCode int64 `protobuf:"varint,3,opt,name=op_code,json=opCode,proto3" json:"op_code,omitempty"`
	// Data payload, if any.
	Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
	// True if this data was delivered reliably, false otherwise.
	Reliable bool `protobuf:"varint,5,opt,name=reliable,proto3" json:"reliable,omitempty"`
	// contains filtered or unexported fields
}

Realtime match data received from the server.

func (*MatchDataMsg) BuildEnvelope

func (msg *MatchDataMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*MatchDataMsg) Descriptor deprecated

func (*MatchDataMsg) Descriptor() ([]byte, []int)

Deprecated: Use MatchDataMsg.ProtoReflect.Descriptor instead.

func (*MatchDataMsg) GetData

func (x *MatchDataMsg) GetData() []byte

func (*MatchDataMsg) GetMatchId

func (x *MatchDataMsg) GetMatchId() string

func (*MatchDataMsg) GetOpCode

func (x *MatchDataMsg) GetOpCode() int64

func (*MatchDataMsg) GetPresence

func (x *MatchDataMsg) GetPresence() *UserPresenceMsg

func (*MatchDataMsg) GetReliable

func (x *MatchDataMsg) GetReliable() bool

func (*MatchDataMsg) ProtoMessage

func (*MatchDataMsg) ProtoMessage()

func (*MatchDataMsg) ProtoReflect

func (x *MatchDataMsg) ProtoReflect() protoreflect.Message

func (*MatchDataMsg) Reset

func (x *MatchDataMsg) Reset()

func (*MatchDataMsg) String

func (x *MatchDataMsg) String() string

type MatchDataSendMsg

type MatchDataSendMsg struct {

	// The match unique ID.
	MatchId string `protobuf:"bytes,1,opt,name=match_id,json=matchId,proto3" json:"match_id,omitempty"`
	// Op code value.
	OpCode int64 `protobuf:"varint,2,opt,name=op_code,json=opCode,proto3" json:"op_code,omitempty"`
	// Data payload, if any.
	Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	// List of presences in the match to deliver to, if filtering is required. Otherwise deliver to everyone in the match.
	Presences []*UserPresenceMsg `protobuf:"bytes,4,rep,name=presences,proto3" json:"presences,omitempty"`
	// True if the data should be sent reliably, false otherwise.
	Reliable bool `protobuf:"varint,5,opt,name=reliable,proto3" json:"reliable,omitempty"`
	// contains filtered or unexported fields
}

Send realtime match data to the server.

func MatchDataSend

func MatchDataSend(matchId string, opCode int64, data []byte) *MatchDataSendMsg

MatchDataSend creates a realtime message to send input to a multiplayer match.

func (*MatchDataSendMsg) Async

func (msg *MatchDataSendMsg) Async(ctx context.Context, conn *Conn, f func(error))

Async sends the message to the connection.

func (*MatchDataSendMsg) BuildEnvelope

func (msg *MatchDataSendMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*MatchDataSendMsg) Descriptor deprecated

func (*MatchDataSendMsg) Descriptor() ([]byte, []int)

Deprecated: Use MatchDataSendMsg.ProtoReflect.Descriptor instead.

func (*MatchDataSendMsg) GetData

func (x *MatchDataSendMsg) GetData() []byte

func (*MatchDataSendMsg) GetMatchId

func (x *MatchDataSendMsg) GetMatchId() string

func (*MatchDataSendMsg) GetOpCode

func (x *MatchDataSendMsg) GetOpCode() int64

func (*MatchDataSendMsg) GetPresences

func (x *MatchDataSendMsg) GetPresences() []*UserPresenceMsg

func (*MatchDataSendMsg) GetReliable

func (x *MatchDataSendMsg) GetReliable() bool

func (*MatchDataSendMsg) ProtoMessage

func (*MatchDataSendMsg) ProtoMessage()

func (*MatchDataSendMsg) ProtoReflect

func (x *MatchDataSendMsg) ProtoReflect() protoreflect.Message

func (*MatchDataSendMsg) Reset

func (x *MatchDataSendMsg) Reset()

func (*MatchDataSendMsg) Send

func (msg *MatchDataSendMsg) Send(ctx context.Context, conn *Conn) error

Send sends the message to the connection.

func (*MatchDataSendMsg) String

func (x *MatchDataSendMsg) String() string

func (*MatchDataSendMsg) WithPresences

func (msg *MatchDataSendMsg) WithPresences(presences ...*UserPresenceMsg) *MatchDataSendMsg

WithPresences sets the presences on the message.

func (*MatchDataSendMsg) WithReliable

func (msg *MatchDataSendMsg) WithReliable(reliable bool) *MatchDataSendMsg

WithReliable sets the reliable on the message.

type MatchJoinMsg

type MatchJoinMsg struct {

	// Types that are assignable to Id:
	//
	//	*MatchJoinMsg_MatchId
	//	*MatchJoinMsg_Token
	Id isMatchJoinMsg_Id `protobuf_oneof:"id"`
	// An optional set of key-value metadata pairs to be passed to the match handler, if any.
	Metadata map[string]string `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

Join an existing realtime match.

func MatchJoin

func MatchJoin(matchId string) *MatchJoinMsg

MatchJoin creates a realtime message to join a match.

func MatchJoinToken

func MatchJoinToken(token string) *MatchJoinMsg

MatchJoinToken creates a new realtime to join a match with a token.

func (*MatchJoinMsg) Async

func (msg *MatchJoinMsg) Async(ctx context.Context, conn *Conn, f func(*MatchMsg, error))

Async sends the message to the connection.

func (*MatchJoinMsg) BuildEnvelope

func (msg *MatchJoinMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*MatchJoinMsg) Descriptor deprecated

func (*MatchJoinMsg) Descriptor() ([]byte, []int)

Deprecated: Use MatchJoinMsg.ProtoReflect.Descriptor instead.

func (*MatchJoinMsg) GetId

func (m *MatchJoinMsg) GetId() isMatchJoinMsg_Id

func (*MatchJoinMsg) GetMatchId

func (x *MatchJoinMsg) GetMatchId() string

func (*MatchJoinMsg) GetMetadata

func (x *MatchJoinMsg) GetMetadata() map[string]string

func (*MatchJoinMsg) GetToken

func (x *MatchJoinMsg) GetToken() string

func (*MatchJoinMsg) ProtoMessage

func (*MatchJoinMsg) ProtoMessage()

func (*MatchJoinMsg) ProtoReflect

func (x *MatchJoinMsg) ProtoReflect() protoreflect.Message

func (*MatchJoinMsg) Reset

func (x *MatchJoinMsg) Reset()

func (*MatchJoinMsg) Send

func (msg *MatchJoinMsg) Send(ctx context.Context, conn *Conn) (*MatchMsg, error)

Send sends the message to the connection.

func (*MatchJoinMsg) String

func (x *MatchJoinMsg) String() string

func (*MatchJoinMsg) WithMetadata

func (msg *MatchJoinMsg) WithMetadata(metadata map[string]string) *MatchJoinMsg

WithMetadata sets the metadata on the message.

type MatchJoinMsg_MatchId

type MatchJoinMsg_MatchId struct {
	// The match unique ID.
	MatchId string `protobuf:"bytes,1,opt,name=match_id,json=matchId,proto3,oneof"`
}

type MatchJoinMsg_Token

type MatchJoinMsg_Token struct {
	// A matchmaking result token.
	Token string `protobuf:"bytes,2,opt,name=token,proto3,oneof"`
}

type MatchLeaveMsg

type MatchLeaveMsg struct {

	// The match unique ID.
	MatchId string `protobuf:"bytes,1,opt,name=match_id,json=matchId,proto3" json:"match_id,omitempty"`
	// contains filtered or unexported fields
}

Leave a realtime match.

func MatchLeave

func MatchLeave(matchId string) *MatchLeaveMsg

MatchLeave creates a realtime message to leave a multiplayer match.

func (*MatchLeaveMsg) Async

func (msg *MatchLeaveMsg) Async(ctx context.Context, conn *Conn, f func(error))

Async sends the message to the connection.

func (*MatchLeaveMsg) BuildEnvelope

func (msg *MatchLeaveMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*MatchLeaveMsg) Descriptor deprecated

func (*MatchLeaveMsg) Descriptor() ([]byte, []int)

Deprecated: Use MatchLeaveMsg.ProtoReflect.Descriptor instead.

func (*MatchLeaveMsg) GetMatchId

func (x *MatchLeaveMsg) GetMatchId() string

func (*MatchLeaveMsg) ProtoMessage

func (*MatchLeaveMsg) ProtoMessage()

func (*MatchLeaveMsg) ProtoReflect

func (x *MatchLeaveMsg) ProtoReflect() protoreflect.Message

func (*MatchLeaveMsg) Reset

func (x *MatchLeaveMsg) Reset()

func (*MatchLeaveMsg) Send

func (msg *MatchLeaveMsg) Send(ctx context.Context, conn *Conn) error

Send sends the message to the connection.

func (*MatchLeaveMsg) String

func (x *MatchLeaveMsg) String() string

type MatchMsg

type MatchMsg struct {

	// The match unique ID.
	MatchId string `protobuf:"bytes,1,opt,name=match_id,json=matchId,proto3" json:"match_id,omitempty"`
	// True if it's an server-managed authoritative match, false otherwise.
	Authoritative bool `protobuf:"varint,2,opt,name=authoritative,proto3" json:"authoritative,omitempty"`
	// Match label, if any.
	Label *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=label,proto3" json:"label,omitempty"`
	// The number of users currently in the match.
	Size int32 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"`
	// The users currently in the match.
	Presences []*UserPresenceMsg `protobuf:"bytes,5,rep,name=presences,proto3" json:"presences,omitempty"`
	// A reference to the current user's presence in the match.
	Self *UserPresenceMsg `protobuf:"bytes,6,opt,name=self,proto3" json:"self,omitempty"`
	// contains filtered or unexported fields
}

A realtime match.

func (*MatchMsg) BuildEnvelope

func (msg *MatchMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*MatchMsg) Descriptor deprecated

func (*MatchMsg) Descriptor() ([]byte, []int)

Deprecated: Use MatchMsg.ProtoReflect.Descriptor instead.

func (*MatchMsg) GetAuthoritative

func (x *MatchMsg) GetAuthoritative() bool

func (*MatchMsg) GetLabel

func (x *MatchMsg) GetLabel() *wrapperspb.StringValue

func (*MatchMsg) GetMatchId

func (x *MatchMsg) GetMatchId() string

func (*MatchMsg) GetPresences

func (x *MatchMsg) GetPresences() []*UserPresenceMsg

func (*MatchMsg) GetSelf

func (x *MatchMsg) GetSelf() *UserPresenceMsg

func (*MatchMsg) GetSize

func (x *MatchMsg) GetSize() int32

func (*MatchMsg) ProtoMessage

func (*MatchMsg) ProtoMessage()

func (*MatchMsg) ProtoReflect

func (x *MatchMsg) ProtoReflect() protoreflect.Message

func (*MatchMsg) Reset

func (x *MatchMsg) Reset()

func (*MatchMsg) String

func (x *MatchMsg) String() string

type MatchPresenceEventMsg

type MatchPresenceEventMsg struct {

	// The match unique ID.
	MatchId string `protobuf:"bytes,1,opt,name=match_id,json=matchId,proto3" json:"match_id,omitempty"`
	// User presences that have just joined the match.
	Joins []*UserPresenceMsg `protobuf:"bytes,2,rep,name=joins,proto3" json:"joins,omitempty"`
	// User presences that have just left the match.
	Leaves []*UserPresenceMsg `protobuf:"bytes,3,rep,name=leaves,proto3" json:"leaves,omitempty"`
	// contains filtered or unexported fields
}

A set of joins and leaves on a particular realtime match.

func (*MatchPresenceEventMsg) BuildEnvelope

func (msg *MatchPresenceEventMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*MatchPresenceEventMsg) Descriptor deprecated

func (*MatchPresenceEventMsg) Descriptor() ([]byte, []int)

Deprecated: Use MatchPresenceEventMsg.ProtoReflect.Descriptor instead.

func (*MatchPresenceEventMsg) GetJoins

func (x *MatchPresenceEventMsg) GetJoins() []*UserPresenceMsg

func (*MatchPresenceEventMsg) GetLeaves

func (x *MatchPresenceEventMsg) GetLeaves() []*UserPresenceMsg

func (*MatchPresenceEventMsg) GetMatchId

func (x *MatchPresenceEventMsg) GetMatchId() string

func (*MatchPresenceEventMsg) ProtoMessage

func (*MatchPresenceEventMsg) ProtoMessage()

func (*MatchPresenceEventMsg) ProtoReflect

func (x *MatchPresenceEventMsg) ProtoReflect() protoreflect.Message

func (*MatchPresenceEventMsg) Reset

func (x *MatchPresenceEventMsg) Reset()

func (*MatchPresenceEventMsg) String

func (x *MatchPresenceEventMsg) String() string

type MatchesRequest

type MatchesRequest struct {

	// Limit the number of returned matches.
	Limit *wrapperspb.Int32Value `protobuf:"bytes,1,opt,name=limit,proto3" json:"limit,omitempty"`
	// Authoritative or relayed matches.
	Authoritative *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=authoritative,proto3" json:"authoritative,omitempty"`
	// Label filter.
	Label *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=label,proto3" json:"label,omitempty"`
	// Minimum user count.
	MinSize *wrapperspb.Int32Value `protobuf:"bytes,4,opt,name=min_size,json=minSize,proto3" json:"min_size,omitempty"`
	// Maximum user count.
	MaxSize *wrapperspb.Int32Value `protobuf:"bytes,5,opt,name=max_size,json=maxSize,proto3" json:"max_size,omitempty"`
	// Arbitrary label query.
	Query *wrapperspb.StringValue `protobuf:"bytes,6,opt,name=query,proto3" json:"query,omitempty"`
	// contains filtered or unexported fields
}

List realtime matches.

func Matches

func Matches() *MatchesRequest

Matches creates a request to retrieve matches.

func (*MatchesRequest) Async

func (req *MatchesRequest) Async(ctx context.Context, cl *Client, f func(*MatchesResponse, error))

Async executes the request against the context and client.

func (*MatchesRequest) Descriptor deprecated

func (*MatchesRequest) Descriptor() ([]byte, []int)

Deprecated: Use MatchesRequest.ProtoReflect.Descriptor instead.

func (*MatchesRequest) Do

func (req *MatchesRequest) Do(ctx context.Context, cl *Client) (*MatchesResponse, error)

Do executes the request against the context and client.

func (*MatchesRequest) GetAuthoritative

func (x *MatchesRequest) GetAuthoritative() *wrapperspb.BoolValue

func (*MatchesRequest) GetLabel

func (x *MatchesRequest) GetLabel() *wrapperspb.StringValue

func (*MatchesRequest) GetLimit

func (x *MatchesRequest) GetLimit() *wrapperspb.Int32Value

func (*MatchesRequest) GetMaxSize

func (x *MatchesRequest) GetMaxSize() *wrapperspb.Int32Value

func (*MatchesRequest) GetMinSize

func (x *MatchesRequest) GetMinSize() *wrapperspb.Int32Value

func (*MatchesRequest) GetQuery

func (x *MatchesRequest) GetQuery() *wrapperspb.StringValue

func (*MatchesRequest) ProtoMessage

func (*MatchesRequest) ProtoMessage()

func (*MatchesRequest) ProtoReflect

func (x *MatchesRequest) ProtoReflect() protoreflect.Message

func (*MatchesRequest) Reset

func (x *MatchesRequest) Reset()

func (*MatchesRequest) String

func (x *MatchesRequest) String() string

func (*MatchesRequest) WithAuthoritative

func (req *MatchesRequest) WithAuthoritative(authoritative bool) *MatchesRequest

WithAuthoritative sets the authoritative on the request.

func (*MatchesRequest) WithLabel

func (req *MatchesRequest) WithLabel(label string) *MatchesRequest

WithLabel sets the label on the request.

func (*MatchesRequest) WithLimit

func (req *MatchesRequest) WithLimit(limit int) *MatchesRequest

WithLimit sets the limit on the request.

func (*MatchesRequest) WithMaxSize

func (req *MatchesRequest) WithMaxSize(maxSize int) *MatchesRequest

WithMaxSize sets the maxSize on the request.

func (*MatchesRequest) WithMinSize

func (req *MatchesRequest) WithMinSize(minSize int) *MatchesRequest

WithMinSize sets the minSize on the request.

func (*MatchesRequest) WithQuery

func (req *MatchesRequest) WithQuery(query string) *MatchesRequest

WithQuery sets the query on the request.

type MatchesResponse

type MatchesResponse struct {

	// A number of matches corresponding to a list operation.
	Matches []*Match `protobuf:"bytes,1,rep,name=matches,proto3" json:"matches,omitempty"`
	// contains filtered or unexported fields
}

A list of realtime matches.

func (*MatchesResponse) Descriptor deprecated

func (*MatchesResponse) Descriptor() ([]byte, []int)

Deprecated: Use MatchesResponse.ProtoReflect.Descriptor instead.

func (*MatchesResponse) GetMatches

func (x *MatchesResponse) GetMatches() []*Match

func (*MatchesResponse) ProtoMessage

func (*MatchesResponse) ProtoMessage()

func (*MatchesResponse) ProtoReflect

func (x *MatchesResponse) ProtoReflect() protoreflect.Message

func (*MatchesResponse) Reset

func (x *MatchesResponse) Reset()

func (*MatchesResponse) String

func (x *MatchesResponse) String() string

type MatchmakerAddMsg

type MatchmakerAddMsg struct {

	// Minimum total user count to match together.
	MinCount int32 `protobuf:"varint,1,opt,name=min_count,json=minCount,proto3" json:"min_count,omitempty"`
	// Maximum total user count to match together.
	MaxCount int32 `protobuf:"varint,2,opt,name=max_count,json=maxCount,proto3" json:"max_count,omitempty"`
	// Filter query used to identify suitable users.
	Query string `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"`
	// String properties.
	StringProperties map[string]string `` /* 197-byte string literal not displayed */
	// Numeric properties.
	NumericProperties map[string]float64 `` /* 202-byte string literal not displayed */
	// Optional multiple of the count that must be satisfied.
	CountMultiple *wrapperspb.Int32Value `protobuf:"bytes,6,opt,name=count_multiple,json=countMultiple,proto3" json:"count_multiple,omitempty"`
	// contains filtered or unexported fields
}

Start a new matchmaking process.

func MatchmakerAdd

func MatchmakerAdd(query string, minCount, maxCount int) *MatchmakerAddMsg

MatchmakerAdd creates a realtime message to join the matchmaker pool and search for opponents on the server.

func (*MatchmakerAddMsg) Async

func (msg *MatchmakerAddMsg) Async(ctx context.Context, conn *Conn, f func(*MatchmakerTicketMsg, error))

Async sends the message to the connection.

func (*MatchmakerAddMsg) BuildEnvelope

func (msg *MatchmakerAddMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*MatchmakerAddMsg) Descriptor deprecated

func (*MatchmakerAddMsg) Descriptor() ([]byte, []int)

Deprecated: Use MatchmakerAddMsg.ProtoReflect.Descriptor instead.

func (*MatchmakerAddMsg) GetCountMultiple

func (x *MatchmakerAddMsg) GetCountMultiple() *wrapperspb.Int32Value

func (*MatchmakerAddMsg) GetMaxCount

func (x *MatchmakerAddMsg) GetMaxCount() int32

func (*MatchmakerAddMsg) GetMinCount

func (x *MatchmakerAddMsg) GetMinCount() int32

func (*MatchmakerAddMsg) GetNumericProperties

func (x *MatchmakerAddMsg) GetNumericProperties() map[string]float64

func (*MatchmakerAddMsg) GetQuery

func (x *MatchmakerAddMsg) GetQuery() string

func (*MatchmakerAddMsg) GetStringProperties

func (x *MatchmakerAddMsg) GetStringProperties() map[string]string

func (*MatchmakerAddMsg) ProtoMessage

func (*MatchmakerAddMsg) ProtoMessage()

func (*MatchmakerAddMsg) ProtoReflect

func (x *MatchmakerAddMsg) ProtoReflect() protoreflect.Message

func (*MatchmakerAddMsg) Reset

func (x *MatchmakerAddMsg) Reset()

func (*MatchmakerAddMsg) Send

func (msg *MatchmakerAddMsg) Send(ctx context.Context, conn *Conn) (*MatchmakerTicketMsg, error)

Send sends the message to the connection.

func (*MatchmakerAddMsg) String

func (x *MatchmakerAddMsg) String() string

func (*MatchmakerAddMsg) WithCountMultiple

func (msg *MatchmakerAddMsg) WithCountMultiple(countMultiple int) *MatchmakerAddMsg

WithCountMultiple sets the stringProperties on the message.

func (*MatchmakerAddMsg) WithNumericProperties

func (msg *MatchmakerAddMsg) WithNumericProperties(numericProperties map[string]float64) *MatchmakerAddMsg

WithNumericProperties sets the stringProperties on the message.

func (*MatchmakerAddMsg) WithStringProperties

func (msg *MatchmakerAddMsg) WithStringProperties(stringProperties map[string]string) *MatchmakerAddMsg

WithStringProperties sets the stringProperties on the message.

type MatchmakerMatchedMsg

type MatchmakerMatchedMsg struct {

	// The matchmaking ticket that has completed.
	Ticket string `protobuf:"bytes,1,opt,name=ticket,proto3" json:"ticket,omitempty"`
	// The match token or match ID to join.
	//
	// Types that are assignable to Id:
	//
	//	*MatchmakerMatchedMsg_MatchId
	//	*MatchmakerMatchedMsg_Token
	Id isMatchmakerMatchedMsg_Id `protobuf_oneof:"id"`
	// The users that have been matched together, and information about their matchmaking data.
	Users []*MatchmakerUserMsg `protobuf:"bytes,4,rep,name=users,proto3" json:"users,omitempty"`
	// A reference to the current user and their properties.
	Self *MatchmakerUserMsg `protobuf:"bytes,5,opt,name=self,proto3" json:"self,omitempty"`
	// contains filtered or unexported fields
}

A successful matchmaking result.

func (*MatchmakerMatchedMsg) BuildEnvelope

func (msg *MatchmakerMatchedMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*MatchmakerMatchedMsg) Descriptor deprecated

func (*MatchmakerMatchedMsg) Descriptor() ([]byte, []int)

Deprecated: Use MatchmakerMatchedMsg.ProtoReflect.Descriptor instead.

func (*MatchmakerMatchedMsg) GetId

func (m *MatchmakerMatchedMsg) GetId() isMatchmakerMatchedMsg_Id

func (*MatchmakerMatchedMsg) GetMatchId

func (x *MatchmakerMatchedMsg) GetMatchId() string

func (*MatchmakerMatchedMsg) GetSelf

func (*MatchmakerMatchedMsg) GetTicket

func (x *MatchmakerMatchedMsg) GetTicket() string

func (*MatchmakerMatchedMsg) GetToken

func (x *MatchmakerMatchedMsg) GetToken() string

func (*MatchmakerMatchedMsg) GetUsers

func (x *MatchmakerMatchedMsg) GetUsers() []*MatchmakerUserMsg

func (*MatchmakerMatchedMsg) ProtoMessage

func (*MatchmakerMatchedMsg) ProtoMessage()

func (*MatchmakerMatchedMsg) ProtoReflect

func (x *MatchmakerMatchedMsg) ProtoReflect() protoreflect.Message

func (*MatchmakerMatchedMsg) Reset

func (x *MatchmakerMatchedMsg) Reset()

func (*MatchmakerMatchedMsg) String

func (x *MatchmakerMatchedMsg) String() string

type MatchmakerMatchedMsg_MatchId

type MatchmakerMatchedMsg_MatchId struct {
	// Match ID.
	MatchId string `protobuf:"bytes,2,opt,name=match_id,json=matchId,proto3,oneof"`
}

type MatchmakerMatchedMsg_Token

type MatchmakerMatchedMsg_Token struct {
	// Match join token.
	Token string `protobuf:"bytes,3,opt,name=token,proto3,oneof"`
}

type MatchmakerRemoveMsg

type MatchmakerRemoveMsg struct {

	// The ticket to cancel.
	Ticket string `protobuf:"bytes,1,opt,name=ticket,proto3" json:"ticket,omitempty"`
	// contains filtered or unexported fields
}

Cancel an existing ongoing matchmaking process.

func MatchmakerRemove

func MatchmakerRemove(ticket string) *MatchmakerRemoveMsg

MatchmakerRemove creates a realtime message to leave the matchmaker pool for a ticket.

func (*MatchmakerRemoveMsg) Async

func (msg *MatchmakerRemoveMsg) Async(ctx context.Context, conn *Conn, f func(error))

Async sends the message to the connection.

func (*MatchmakerRemoveMsg) BuildEnvelope

func (msg *MatchmakerRemoveMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*MatchmakerRemoveMsg) Descriptor deprecated

func (*MatchmakerRemoveMsg) Descriptor() ([]byte, []int)

Deprecated: Use MatchmakerRemoveMsg.ProtoReflect.Descriptor instead.

func (*MatchmakerRemoveMsg) GetTicket

func (x *MatchmakerRemoveMsg) GetTicket() string

func (*MatchmakerRemoveMsg) ProtoMessage

func (*MatchmakerRemoveMsg) ProtoMessage()

func (*MatchmakerRemoveMsg) ProtoReflect

func (x *MatchmakerRemoveMsg) ProtoReflect() protoreflect.Message

func (*MatchmakerRemoveMsg) Reset

func (x *MatchmakerRemoveMsg) Reset()

func (*MatchmakerRemoveMsg) Send

func (msg *MatchmakerRemoveMsg) Send(ctx context.Context, conn *Conn) error

Send sends the message to the connection.

func (*MatchmakerRemoveMsg) String

func (x *MatchmakerRemoveMsg) String() string

type MatchmakerTicketMsg

type MatchmakerTicketMsg struct {

	// The ticket that can be used to cancel matchmaking.
	Ticket string `protobuf:"bytes,1,opt,name=ticket,proto3" json:"ticket,omitempty"`
	// contains filtered or unexported fields
}

A ticket representing a new matchmaking process.

func (*MatchmakerTicketMsg) BuildEnvelope

func (msg *MatchmakerTicketMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*MatchmakerTicketMsg) Descriptor deprecated

func (*MatchmakerTicketMsg) Descriptor() ([]byte, []int)

Deprecated: Use MatchmakerTicketMsg.ProtoReflect.Descriptor instead.

func (*MatchmakerTicketMsg) GetTicket

func (x *MatchmakerTicketMsg) GetTicket() string

func (*MatchmakerTicketMsg) ProtoMessage

func (*MatchmakerTicketMsg) ProtoMessage()

func (*MatchmakerTicketMsg) ProtoReflect

func (x *MatchmakerTicketMsg) ProtoReflect() protoreflect.Message

func (*MatchmakerTicketMsg) Reset

func (x *MatchmakerTicketMsg) Reset()

func (*MatchmakerTicketMsg) String

func (x *MatchmakerTicketMsg) String() string

type MatchmakerUserMsg

type MatchmakerUserMsg struct {

	// User info.
	Presence *UserPresenceMsg `protobuf:"bytes,1,opt,name=presence,proto3" json:"presence,omitempty"`
	// Party identifier, if this user was matched as a party member.
	PartyId string `protobuf:"bytes,2,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"`
	// String properties.
	StringProperties map[string]string `` /* 197-byte string literal not displayed */
	// Numeric properties.
	NumericProperties map[string]float64 `` /* 202-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*MatchmakerUserMsg) Descriptor deprecated

func (*MatchmakerUserMsg) Descriptor() ([]byte, []int)

Deprecated: Use MatchmakerUserMsg.ProtoReflect.Descriptor instead.

func (*MatchmakerUserMsg) GetNumericProperties

func (x *MatchmakerUserMsg) GetNumericProperties() map[string]float64

func (*MatchmakerUserMsg) GetPartyId

func (x *MatchmakerUserMsg) GetPartyId() string

func (*MatchmakerUserMsg) GetPresence

func (x *MatchmakerUserMsg) GetPresence() *UserPresenceMsg

func (*MatchmakerUserMsg) GetStringProperties

func (x *MatchmakerUserMsg) GetStringProperties() map[string]string

func (*MatchmakerUserMsg) ProtoMessage

func (*MatchmakerUserMsg) ProtoMessage()

func (*MatchmakerUserMsg) ProtoReflect

func (x *MatchmakerUserMsg) ProtoReflect() protoreflect.Message

func (*MatchmakerUserMsg) Reset

func (x *MatchmakerUserMsg) Reset()

func (*MatchmakerUserMsg) String

func (x *MatchmakerUserMsg) String() string

type Notification

type Notification struct {

	// ID of the Notification.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Subject of the notification.
	Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"`
	// Content of the notification in JSON.
	Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
	// Category code for this notification.
	Code int32 `protobuf:"varint,4,opt,name=code,proto3" json:"code,omitempty"`
	// ID of the sender, if a user. Otherwise 'null'.
	SenderId string `protobuf:"bytes,5,opt,name=sender_id,json=senderId,proto3" json:"sender_id,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the notification was created.
	CreateTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// True if this notification was persisted to the database.
	Persistent bool `protobuf:"varint,7,opt,name=persistent,proto3" json:"persistent,omitempty"`
	// contains filtered or unexported fields
}

A notification in the server.

func (*Notification) Descriptor deprecated

func (*Notification) Descriptor() ([]byte, []int)

Deprecated: Use Notification.ProtoReflect.Descriptor instead.

func (*Notification) GetCode

func (x *Notification) GetCode() int32

func (*Notification) GetContent

func (x *Notification) GetContent() string

func (*Notification) GetCreateTime

func (x *Notification) GetCreateTime() *timestamppb.Timestamp

func (*Notification) GetId

func (x *Notification) GetId() string

func (*Notification) GetPersistent

func (x *Notification) GetPersistent() bool

func (*Notification) GetSenderId

func (x *Notification) GetSenderId() string

func (*Notification) GetSubject

func (x *Notification) GetSubject() string

func (*Notification) ProtoMessage

func (*Notification) ProtoMessage()

func (*Notification) ProtoReflect

func (x *Notification) ProtoReflect() protoreflect.Message

func (*Notification) Reset

func (x *Notification) Reset()

func (*Notification) String

func (x *Notification) String() string

type NotificationsMsg

type NotificationsMsg struct {

	// Collection of notifications.
	Notifications []*Notification `protobuf:"bytes,1,rep,name=notifications,proto3" json:"notifications,omitempty"`
	// contains filtered or unexported fields
}

A collection of zero or more notifications.

func (*NotificationsMsg) BuildEnvelope

func (msg *NotificationsMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*NotificationsMsg) Descriptor deprecated

func (*NotificationsMsg) Descriptor() ([]byte, []int)

Deprecated: Use NotificationsMsg.ProtoReflect.Descriptor instead.

func (*NotificationsMsg) GetNotifications

func (x *NotificationsMsg) GetNotifications() []*Notification

func (*NotificationsMsg) ProtoMessage

func (*NotificationsMsg) ProtoMessage()

func (*NotificationsMsg) ProtoReflect

func (x *NotificationsMsg) ProtoReflect() protoreflect.Message

func (*NotificationsMsg) Reset

func (x *NotificationsMsg) Reset()

func (*NotificationsMsg) String

func (x *NotificationsMsg) String() string

type NotificationsRequest

type NotificationsRequest struct {

	// The number of notifications to get. Between 1 and 100.
	Limit *wrapperspb.Int32Value `protobuf:"bytes,1,opt,name=limit,proto3" json:"limit,omitempty"`
	// A cursor to page through notifications. May be cached by clients to get from point in time forwards.
	CacheableCursor string `protobuf:"bytes,2,opt,name=cacheable_cursor,json=cacheableCursor,proto3" json:"cacheable_cursor,omitempty"` // value from NotificationList.cacheable_cursor.
	// contains filtered or unexported fields
}

Get a list of unexpired notifications.

func Notifications

func Notifications() *NotificationsRequest

Notifications creates a request to retrieve notifications.

func (*NotificationsRequest) Async

func (req *NotificationsRequest) Async(ctx context.Context, cl *Client, f func(*NotificationsResponse, error))

Async executes the request against the context and client.

func (*NotificationsRequest) Descriptor deprecated

func (*NotificationsRequest) Descriptor() ([]byte, []int)

Deprecated: Use NotificationsRequest.ProtoReflect.Descriptor instead.

func (*NotificationsRequest) Do

Do executes the request against the context and client.

func (*NotificationsRequest) GetCacheableCursor

func (x *NotificationsRequest) GetCacheableCursor() string

func (*NotificationsRequest) GetLimit

func (*NotificationsRequest) ProtoMessage

func (*NotificationsRequest) ProtoMessage()

func (*NotificationsRequest) ProtoReflect

func (x *NotificationsRequest) ProtoReflect() protoreflect.Message

func (*NotificationsRequest) Reset

func (x *NotificationsRequest) Reset()

func (*NotificationsRequest) String

func (x *NotificationsRequest) String() string

func (*NotificationsRequest) WithCacheableCursor

func (req *NotificationsRequest) WithCacheableCursor(cacheableCursor string) *NotificationsRequest

WithCacheableCursor sets the cacheableCursor on the request.

func (*NotificationsRequest) WithLimit

func (req *NotificationsRequest) WithLimit(limit int) *NotificationsRequest

WithLimit sets the limit on the request to retrieve notifications.

type NotificationsResponse

type NotificationsResponse struct {

	// Collection of notifications.
	Notifications []*Notification `protobuf:"bytes,1,rep,name=notifications,proto3" json:"notifications,omitempty"`
	// Use this cursor to paginate notifications. Cache this to catch up to new notifications.
	CacheableCursor string `protobuf:"bytes,2,opt,name=cacheable_cursor,json=cacheableCursor,proto3" json:"cacheable_cursor,omitempty"`
	// contains filtered or unexported fields
}

A collection of zero or more notifications.

func (*NotificationsResponse) Descriptor deprecated

func (*NotificationsResponse) Descriptor() ([]byte, []int)

Deprecated: Use NotificationsResponse.ProtoReflect.Descriptor instead.

func (*NotificationsResponse) GetCacheableCursor

func (x *NotificationsResponse) GetCacheableCursor() string

func (*NotificationsResponse) GetNotifications

func (x *NotificationsResponse) GetNotifications() []*Notification

func (*NotificationsResponse) ProtoMessage

func (*NotificationsResponse) ProtoMessage()

func (*NotificationsResponse) ProtoReflect

func (x *NotificationsResponse) ProtoReflect() protoreflect.Message

func (*NotificationsResponse) Reset

func (x *NotificationsResponse) Reset()

func (*NotificationsResponse) String

func (x *NotificationsResponse) String() string

type OpType

type OpType int32

Operator that can be used to override the one set in the leaderboard.

const (
	// Do not override the leaderboard operator.
	OpType_NO_OVERRIDE OpType = 0
	// Override the leaderboard operator with BEST.
	OpType_BEST OpType = 1
	// Override the leaderboard operator with SET.
	OpType_SET OpType = 2
	// Override the leaderboard operator with INCREMENT.
	OpType_INCREMENT OpType = 3
	// Override the leaderboard operator with DECREMENT.
	OpType_DECREMENT OpType = 4
)

func (OpType) Descriptor

func (OpType) Descriptor() protoreflect.EnumDescriptor

func (OpType) Enum

func (x OpType) Enum() *OpType

func (OpType) EnumDescriptor deprecated

func (OpType) EnumDescriptor() ([]byte, []int)

Deprecated: Use OpType.Descriptor instead.

func (OpType) Number

func (x OpType) Number() protoreflect.EnumNumber

func (OpType) String

func (x OpType) String() string

func (OpType) Type

func (OpType) Type() protoreflect.EnumType

type Option

type Option func(*Client)

Option is a nakama client option.

func WithAuthHandler added in v0.5.0

func WithAuthHandler(handler AuthHandler) Option

WithAuthHandler is a nakama client option to set a auth hanndler.

func WithExpiryGrace

func WithExpiryGrace(expiryGrace time.Duration) Option

WithExpiryGrace is a nakama client option to set the expiry grace used for session refresh.

func WithHttpClient

func WithHttpClient(httpClient *http.Client) Option

WithHttpClient is a nakama client option to set the underlying http.Client used for requests.

func WithJar

func WithJar(jar http.CookieJar) Option

WithJar is a nakama client option to set the cookie jar used by the underlying http.Client.

func WithLogger

func WithLogger(f func(string, ...interface{})) Option

WithLogger is a nakama client option to set a logger.

func WithPassword

func WithPassword(password string) Option

WithPassword is a nakama client option to set the password used.

func WithRefreshAuto

func WithRefreshAuto(refreshAuto bool) Option

WithRefreshAuto is a nakama client option to set whether or not to automatically refresh the session.

func WithServerKey

func WithServerKey(serverKey string) Option

WithServerKey is a nakama client option to set the server key used.

func WithTransport

func WithTransport(transport http.RoundTripper) Option

WithTransport is a nakama client option to set the transport used by the underlying http.Client.

func WithURL

func WithURL(urlstr string) Option

WithURL is a nakama client option to set the url used.

func WithUsername

func WithUsername(username string) Option

WithUsername is a nakama client option to set the username used.

type PartyAcceptMsg

type PartyAcceptMsg struct {

	// Party ID to accept a join request for.
	PartyId string `protobuf:"bytes,1,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"`
	// The presence to accept as a party member.
	Presence *UserPresenceMsg `protobuf:"bytes,2,opt,name=presence,proto3" json:"presence,omitempty"`
	// contains filtered or unexported fields
}

Accept a request to join.

func PartyAccept

func PartyAccept(partyId string, presence *UserPresenceMsg) *PartyAcceptMsg

PartyAccept creates a realtime message to accept a party member.

func (*PartyAcceptMsg) Async

func (msg *PartyAcceptMsg) Async(ctx context.Context, conn *Conn, f func(error))

Async sends the message to the connection.

func (*PartyAcceptMsg) BuildEnvelope

func (msg *PartyAcceptMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*PartyAcceptMsg) Descriptor deprecated

func (*PartyAcceptMsg) Descriptor() ([]byte, []int)

Deprecated: Use PartyAcceptMsg.ProtoReflect.Descriptor instead.

func (*PartyAcceptMsg) GetPartyId

func (x *PartyAcceptMsg) GetPartyId() string

func (*PartyAcceptMsg) GetPresence

func (x *PartyAcceptMsg) GetPresence() *UserPresenceMsg

func (*PartyAcceptMsg) ProtoMessage

func (*PartyAcceptMsg) ProtoMessage()

func (*PartyAcceptMsg) ProtoReflect

func (x *PartyAcceptMsg) ProtoReflect() protoreflect.Message

func (*PartyAcceptMsg) Reset

func (x *PartyAcceptMsg) Reset()

func (*PartyAcceptMsg) Send

func (msg *PartyAcceptMsg) Send(ctx context.Context, conn *Conn) error

Send sends the message to the connection.

func (*PartyAcceptMsg) String

func (x *PartyAcceptMsg) String() string

type PartyCloseMsg

type PartyCloseMsg struct {

	// Party ID to close.
	PartyId string `protobuf:"bytes,1,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"`
	// contains filtered or unexported fields
}

End a party, kicking all party members and closing it.

func PartyClose

func PartyClose(partyId string) *PartyCloseMsg

PartyClose creates a realtime message to close a party, kicking all party members.

func (*PartyCloseMsg) Async

func (msg *PartyCloseMsg) Async(ctx context.Context, conn *Conn, f func(error))

Async sends the message to the connection.

func (*PartyCloseMsg) BuildEnvelope

func (msg *PartyCloseMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*PartyCloseMsg) Descriptor deprecated

func (*PartyCloseMsg) Descriptor() ([]byte, []int)

Deprecated: Use PartyCloseMsg.ProtoReflect.Descriptor instead.

func (*PartyCloseMsg) GetPartyId

func (x *PartyCloseMsg) GetPartyId() string

func (*PartyCloseMsg) ProtoMessage

func (*PartyCloseMsg) ProtoMessage()

func (*PartyCloseMsg) ProtoReflect

func (x *PartyCloseMsg) ProtoReflect() protoreflect.Message

func (*PartyCloseMsg) Reset

func (x *PartyCloseMsg) Reset()

func (*PartyCloseMsg) Send

func (msg *PartyCloseMsg) Send(ctx context.Context, conn *Conn) error

Send sends the message to the connection.

func (*PartyCloseMsg) String

func (x *PartyCloseMsg) String() string

type PartyCreateMsg

type PartyCreateMsg struct {

	// Whether or not the party will require join requests to be approved by the party leader.
	Open bool `protobuf:"varint,1,opt,name=open,proto3" json:"open,omitempty"`
	// Maximum number of party members.
	MaxSize int32 `protobuf:"varint,2,opt,name=max_size,json=maxSize,proto3" json:"max_size,omitempty"`
	// contains filtered or unexported fields
}

Create a party.

func PartyCreate

func PartyCreate(open bool, maxSize int) *PartyCreateMsg

PartyCreate creates a realtime message to create a party.

func (*PartyCreateMsg) Async

func (msg *PartyCreateMsg) Async(ctx context.Context, conn *Conn, f func(*PartyMsg, error))

Async sends the message to the connection.

func (*PartyCreateMsg) BuildEnvelope

func (msg *PartyCreateMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*PartyCreateMsg) Descriptor deprecated

func (*PartyCreateMsg) Descriptor() ([]byte, []int)

Deprecated: Use PartyCreateMsg.ProtoReflect.Descriptor instead.

func (*PartyCreateMsg) GetMaxSize

func (x *PartyCreateMsg) GetMaxSize() int32

func (*PartyCreateMsg) GetOpen

func (x *PartyCreateMsg) GetOpen() bool

func (*PartyCreateMsg) ProtoMessage

func (*PartyCreateMsg) ProtoMessage()

func (*PartyCreateMsg) ProtoReflect

func (x *PartyCreateMsg) ProtoReflect() protoreflect.Message

func (*PartyCreateMsg) Reset

func (x *PartyCreateMsg) Reset()

func (*PartyCreateMsg) Send

func (msg *PartyCreateMsg) Send(ctx context.Context, conn *Conn) (*PartyMsg, error)

Send sends the message to the connection.

func (*PartyCreateMsg) String

func (x *PartyCreateMsg) String() string

type PartyDataMsg

type PartyDataMsg struct {

	// The party ID.
	PartyId string `protobuf:"bytes,1,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"`
	// A reference to the user presence that sent this data, if any.
	Presence *UserPresenceMsg `protobuf:"bytes,2,opt,name=presence,proto3" json:"presence,omitempty"`
	// Op code value.
	OpCode int64 `protobuf:"varint,3,opt,name=op_code,json=opCode,proto3" json:"op_code,omitempty"`
	// Data payload, if any.
	Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

Incoming party data delivered from the server.

func (*PartyDataMsg) Descriptor deprecated

func (*PartyDataMsg) Descriptor() ([]byte, []int)

Deprecated: Use PartyDataMsg.ProtoReflect.Descriptor instead.

func (*PartyDataMsg) GetData

func (x *PartyDataMsg) GetData() []byte

func (*PartyDataMsg) GetOpCode

func (x *PartyDataMsg) GetOpCode() int64

func (*PartyDataMsg) GetPartyId

func (x *PartyDataMsg) GetPartyId() string

func (*PartyDataMsg) GetPresence

func (x *PartyDataMsg) GetPresence() *UserPresenceMsg

func (*PartyDataMsg) ProtoMessage

func (*PartyDataMsg) ProtoMessage()

func (*PartyDataMsg) ProtoReflect

func (x *PartyDataMsg) ProtoReflect() protoreflect.Message

func (*PartyDataMsg) Reset

func (x *PartyDataMsg) Reset()

func (*PartyDataMsg) String

func (x *PartyDataMsg) String() string

type PartyDataSendMsg

type PartyDataSendMsg struct {

	// Party ID to send to.
	PartyId string `protobuf:"bytes,1,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"`
	// Op code value.
	OpCode int64 `protobuf:"varint,2,opt,name=op_code,json=opCode,proto3" json:"op_code,omitempty"`
	// Data payload, if any.
	Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

Send data to a party.

func PartyDataSend

func PartyDataSend(partyId string, opCode OpType, data []byte) *PartyDataSendMsg

PartyDataSend creates a realtime message to send data to a party.

func (*PartyDataSendMsg) Async

func (msg *PartyDataSendMsg) Async(ctx context.Context, conn *Conn, f func(error))

Async sends the message to the connection.

func (*PartyDataSendMsg) BuildEnvelope

func (msg *PartyDataSendMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*PartyDataSendMsg) Descriptor deprecated

func (*PartyDataSendMsg) Descriptor() ([]byte, []int)

Deprecated: Use PartyDataSendMsg.ProtoReflect.Descriptor instead.

func (*PartyDataSendMsg) GetData

func (x *PartyDataSendMsg) GetData() []byte

func (*PartyDataSendMsg) GetOpCode

func (x *PartyDataSendMsg) GetOpCode() int64

func (*PartyDataSendMsg) GetPartyId

func (x *PartyDataSendMsg) GetPartyId() string

func (*PartyDataSendMsg) ProtoMessage

func (*PartyDataSendMsg) ProtoMessage()

func (*PartyDataSendMsg) ProtoReflect

func (x *PartyDataSendMsg) ProtoReflect() protoreflect.Message

func (*PartyDataSendMsg) Reset

func (x *PartyDataSendMsg) Reset()

func (*PartyDataSendMsg) Send

func (msg *PartyDataSendMsg) Send(ctx context.Context, conn *Conn) error

Send sends the message to the connection.

func (*PartyDataSendMsg) String

func (x *PartyDataSendMsg) String() string

type PartyJoinMsg

type PartyJoinMsg struct {

	// Party ID to join.
	PartyId string `protobuf:"bytes,1,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"`
	// contains filtered or unexported fields
}

Join a party, or request to join if the party is not open.

func PartyJoin

func PartyJoin(partyId string) *PartyJoinMsg

PartyJoin creates a realtime message to join a party.

func (*PartyJoinMsg) Async

func (msg *PartyJoinMsg) Async(ctx context.Context, conn *Conn, f func(error))

Async sends the message to the connection.

func (*PartyJoinMsg) BuildEnvelope

func (msg *PartyJoinMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*PartyJoinMsg) Descriptor deprecated

func (*PartyJoinMsg) Descriptor() ([]byte, []int)

Deprecated: Use PartyJoinMsg.ProtoReflect.Descriptor instead.

func (*PartyJoinMsg) GetPartyId

func (x *PartyJoinMsg) GetPartyId() string

func (*PartyJoinMsg) ProtoMessage

func (*PartyJoinMsg) ProtoMessage()

func (*PartyJoinMsg) ProtoReflect

func (x *PartyJoinMsg) ProtoReflect() protoreflect.Message

func (*PartyJoinMsg) Reset

func (x *PartyJoinMsg) Reset()

func (*PartyJoinMsg) Send

func (msg *PartyJoinMsg) Send(ctx context.Context, conn *Conn) error

Send sends the message to the connection.

func (*PartyJoinMsg) String

func (x *PartyJoinMsg) String() string

type PartyJoinRequestMsg

type PartyJoinRequestMsg struct {

	// Party ID these presences are attempting to join.
	PartyId string `protobuf:"bytes,1,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"`
	// Presences attempting to join.
	Presences []*UserPresenceMsg `protobuf:"bytes,2,rep,name=presences,proto3" json:"presences,omitempty"`
	// contains filtered or unexported fields
}

Incoming notification for one or more new presences attempting to join the party.

func (*PartyJoinRequestMsg) BuildEnvelope

func (msg *PartyJoinRequestMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*PartyJoinRequestMsg) Descriptor deprecated

func (*PartyJoinRequestMsg) Descriptor() ([]byte, []int)

Deprecated: Use PartyJoinRequestMsg.ProtoReflect.Descriptor instead.

func (*PartyJoinRequestMsg) GetPartyId

func (x *PartyJoinRequestMsg) GetPartyId() string

func (*PartyJoinRequestMsg) GetPresences

func (x *PartyJoinRequestMsg) GetPresences() []*UserPresenceMsg

func (*PartyJoinRequestMsg) ProtoMessage

func (*PartyJoinRequestMsg) ProtoMessage()

func (*PartyJoinRequestMsg) ProtoReflect

func (x *PartyJoinRequestMsg) ProtoReflect() protoreflect.Message

func (*PartyJoinRequestMsg) Reset

func (x *PartyJoinRequestMsg) Reset()

func (*PartyJoinRequestMsg) String

func (x *PartyJoinRequestMsg) String() string

type PartyJoinRequestsMsg

type PartyJoinRequestsMsg struct {

	// Party ID to get a list of join requests for.
	PartyId string `protobuf:"bytes,1,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"`
	// contains filtered or unexported fields
}

Request a list of pending join requests for a party.

func PartyJoinRequests

func PartyJoinRequests(partyId string) *PartyJoinRequestsMsg

PartyJoinRequests creates a realtime message to request the list of pending join requests for a party.

func (*PartyJoinRequestsMsg) Async

func (msg *PartyJoinRequestsMsg) Async(ctx context.Context, conn *Conn, f func(*PartyJoinRequestMsg, error))

Async sends the message to the connection.

func (*PartyJoinRequestsMsg) BuildEnvelope

func (msg *PartyJoinRequestsMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*PartyJoinRequestsMsg) Descriptor deprecated

func (*PartyJoinRequestsMsg) Descriptor() ([]byte, []int)

Deprecated: Use PartyJoinRequestsMsg.ProtoReflect.Descriptor instead.

func (*PartyJoinRequestsMsg) GetPartyId

func (x *PartyJoinRequestsMsg) GetPartyId() string

func (*PartyJoinRequestsMsg) ProtoMessage

func (*PartyJoinRequestsMsg) ProtoMessage()

func (*PartyJoinRequestsMsg) ProtoReflect

func (x *PartyJoinRequestsMsg) ProtoReflect() protoreflect.Message

func (*PartyJoinRequestsMsg) Reset

func (x *PartyJoinRequestsMsg) Reset()

func (*PartyJoinRequestsMsg) Send

Send sends the message to the connection.

func (*PartyJoinRequestsMsg) String

func (x *PartyJoinRequestsMsg) String() string

type PartyLeaderMsg

type PartyLeaderMsg struct {

	// Party ID to announce the new leader for.
	PartyId string `protobuf:"bytes,1,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"`
	// The presence of the new party leader.
	Presence *UserPresenceMsg `protobuf:"bytes,2,opt,name=presence,proto3" json:"presence,omitempty"`
	// contains filtered or unexported fields
}

Announcement of a new party leader.

func (*PartyLeaderMsg) BuildEnvelope

func (msg *PartyLeaderMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*PartyLeaderMsg) Descriptor deprecated

func (*PartyLeaderMsg) Descriptor() ([]byte, []int)

Deprecated: Use PartyLeaderMsg.ProtoReflect.Descriptor instead.

func (*PartyLeaderMsg) GetPartyId

func (x *PartyLeaderMsg) GetPartyId() string

func (*PartyLeaderMsg) GetPresence

func (x *PartyLeaderMsg) GetPresence() *UserPresenceMsg

func (*PartyLeaderMsg) ProtoMessage

func (*PartyLeaderMsg) ProtoMessage()

func (*PartyLeaderMsg) ProtoReflect

func (x *PartyLeaderMsg) ProtoReflect() protoreflect.Message

func (*PartyLeaderMsg) Reset

func (x *PartyLeaderMsg) Reset()

func (*PartyLeaderMsg) String

func (x *PartyLeaderMsg) String() string

type PartyLeaveMsg

type PartyLeaveMsg struct {

	// Party ID to leave.
	PartyId string `protobuf:"bytes,1,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"`
	// contains filtered or unexported fields
}

Leave a party.

func PartyLeave

func PartyLeave(partyId string) *PartyLeaveMsg

PartyLeave creates a realtime message to leave a party.

func (*PartyLeaveMsg) Async

func (msg *PartyLeaveMsg) Async(ctx context.Context, conn *Conn, f func(error))

Async sends the message to the connection.

func (*PartyLeaveMsg) BuildEnvelope

func (msg *PartyLeaveMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*PartyLeaveMsg) Descriptor deprecated

func (*PartyLeaveMsg) Descriptor() ([]byte, []int)

Deprecated: Use PartyLeaveMsg.ProtoReflect.Descriptor instead.

func (*PartyLeaveMsg) GetPartyId

func (x *PartyLeaveMsg) GetPartyId() string

func (*PartyLeaveMsg) ProtoMessage

func (*PartyLeaveMsg) ProtoMessage()

func (*PartyLeaveMsg) ProtoReflect

func (x *PartyLeaveMsg) ProtoReflect() protoreflect.Message

func (*PartyLeaveMsg) Reset

func (x *PartyLeaveMsg) Reset()

func (*PartyLeaveMsg) Send

func (msg *PartyLeaveMsg) Send(ctx context.Context, conn *Conn) error

Send sends the message to the connection.

func (*PartyLeaveMsg) String

func (x *PartyLeaveMsg) String() string

type PartyMatchmakerAddMsg

type PartyMatchmakerAddMsg struct {

	// Party ID.
	PartyId string `protobuf:"bytes,1,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"`
	// Minimum total user count to match together.
	MinCount int32 `protobuf:"varint,2,opt,name=min_count,json=minCount,proto3" json:"min_count,omitempty"`
	// Maximum total user count to match together.
	MaxCount int32 `protobuf:"varint,3,opt,name=max_count,json=maxCount,proto3" json:"max_count,omitempty"`
	// Filter query used to identify suitable users.
	Query string `protobuf:"bytes,4,opt,name=query,proto3" json:"query,omitempty"`
	// String properties.
	StringProperties map[string]string `` /* 197-byte string literal not displayed */
	// Numeric properties.
	NumericProperties map[string]float64 `` /* 202-byte string literal not displayed */
	// Optional multiple of the count that must be satisfied.
	CountMultiple *wrapperspb.Int32Value `protobuf:"bytes,7,opt,name=count_multiple,json=countMultiple,proto3" json:"count_multiple,omitempty"`
	// contains filtered or unexported fields
}

Begin matchmaking as a party.

func PartyMatchmakerAdd

func PartyMatchmakerAdd(partyId, query string, minCount, maxCount int) *PartyMatchmakerAddMsg

PartyMatchmakerAdd creates a realtime message to begin matchmaking as a party.

func (*PartyMatchmakerAddMsg) Async

func (msg *PartyMatchmakerAddMsg) Async(ctx context.Context, conn *Conn, f func(*PartyMatchmakerTicketMsg, error))

Async sends the message to the connection.

func (*PartyMatchmakerAddMsg) BuildEnvelope

func (msg *PartyMatchmakerAddMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*PartyMatchmakerAddMsg) Descriptor deprecated

func (*PartyMatchmakerAddMsg) Descriptor() ([]byte, []int)

Deprecated: Use PartyMatchmakerAddMsg.ProtoReflect.Descriptor instead.

func (*PartyMatchmakerAddMsg) GetCountMultiple

func (x *PartyMatchmakerAddMsg) GetCountMultiple() *wrapperspb.Int32Value

func (*PartyMatchmakerAddMsg) GetMaxCount

func (x *PartyMatchmakerAddMsg) GetMaxCount() int32

func (*PartyMatchmakerAddMsg) GetMinCount

func (x *PartyMatchmakerAddMsg) GetMinCount() int32

func (*PartyMatchmakerAddMsg) GetNumericProperties

func (x *PartyMatchmakerAddMsg) GetNumericProperties() map[string]float64

func (*PartyMatchmakerAddMsg) GetPartyId

func (x *PartyMatchmakerAddMsg) GetPartyId() string

func (*PartyMatchmakerAddMsg) GetQuery

func (x *PartyMatchmakerAddMsg) GetQuery() string

func (*PartyMatchmakerAddMsg) GetStringProperties

func (x *PartyMatchmakerAddMsg) GetStringProperties() map[string]string

func (*PartyMatchmakerAddMsg) ProtoMessage

func (*PartyMatchmakerAddMsg) ProtoMessage()

func (*PartyMatchmakerAddMsg) ProtoReflect

func (x *PartyMatchmakerAddMsg) ProtoReflect() protoreflect.Message

func (*PartyMatchmakerAddMsg) Reset

func (x *PartyMatchmakerAddMsg) Reset()

func (*PartyMatchmakerAddMsg) Send

Send sends the message to the connection.

func (*PartyMatchmakerAddMsg) String

func (x *PartyMatchmakerAddMsg) String() string

func (*PartyMatchmakerAddMsg) WithCountMultiple

func (msg *PartyMatchmakerAddMsg) WithCountMultiple(countMultiple int) *PartyMatchmakerAddMsg

WithCountMultiple sets the stringProperties on the message.

func (*PartyMatchmakerAddMsg) WithNumericProperties

func (msg *PartyMatchmakerAddMsg) WithNumericProperties(numericProperties map[string]float64) *PartyMatchmakerAddMsg

WithNumericProperties sets the stringProperties on the message.

func (*PartyMatchmakerAddMsg) WithStringProperties

func (msg *PartyMatchmakerAddMsg) WithStringProperties(stringProperties map[string]string) *PartyMatchmakerAddMsg

WithStringProperties sets the stringProperties on the message.

type PartyMatchmakerRemoveMsg

type PartyMatchmakerRemoveMsg struct {

	// Party ID.
	PartyId string `protobuf:"bytes,1,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"`
	// The ticket to cancel.
	Ticket string `protobuf:"bytes,2,opt,name=ticket,proto3" json:"ticket,omitempty"`
	// contains filtered or unexported fields
}

Cancel a party matchmaking process using a ticket.

func PartyMatchmakerRemove

func PartyMatchmakerRemove(partyId, ticket string) *PartyMatchmakerRemoveMsg

PartyMatchmakerRemove creates a realtime message to cancel a party matchmaking process for a ticket.

func (*PartyMatchmakerRemoveMsg) Async

func (msg *PartyMatchmakerRemoveMsg) Async(ctx context.Context, conn *Conn, f func(error))

Async sends the message to the connection.

func (*PartyMatchmakerRemoveMsg) BuildEnvelope

func (msg *PartyMatchmakerRemoveMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*PartyMatchmakerRemoveMsg) Descriptor deprecated

func (*PartyMatchmakerRemoveMsg) Descriptor() ([]byte, []int)

Deprecated: Use PartyMatchmakerRemoveMsg.ProtoReflect.Descriptor instead.

func (*PartyMatchmakerRemoveMsg) GetPartyId

func (x *PartyMatchmakerRemoveMsg) GetPartyId() string

func (*PartyMatchmakerRemoveMsg) GetTicket

func (x *PartyMatchmakerRemoveMsg) GetTicket() string

func (*PartyMatchmakerRemoveMsg) ProtoMessage

func (*PartyMatchmakerRemoveMsg) ProtoMessage()

func (*PartyMatchmakerRemoveMsg) ProtoReflect

func (x *PartyMatchmakerRemoveMsg) ProtoReflect() protoreflect.Message

func (*PartyMatchmakerRemoveMsg) Reset

func (x *PartyMatchmakerRemoveMsg) Reset()

func (*PartyMatchmakerRemoveMsg) Send

func (msg *PartyMatchmakerRemoveMsg) Send(ctx context.Context, conn *Conn) error

Send sends the message to the connection.

func (*PartyMatchmakerRemoveMsg) String

func (x *PartyMatchmakerRemoveMsg) String() string

type PartyMatchmakerTicketMsg

type PartyMatchmakerTicketMsg struct {

	// Party ID.
	PartyId string `protobuf:"bytes,1,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"`
	// The ticket that can be used to cancel matchmaking.
	Ticket string `protobuf:"bytes,2,opt,name=ticket,proto3" json:"ticket,omitempty"`
	// contains filtered or unexported fields
}

A response from starting a new party matchmaking process.

func (*PartyMatchmakerTicketMsg) BuildEnvelope

func (msg *PartyMatchmakerTicketMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*PartyMatchmakerTicketMsg) Descriptor deprecated

func (*PartyMatchmakerTicketMsg) Descriptor() ([]byte, []int)

Deprecated: Use PartyMatchmakerTicketMsg.ProtoReflect.Descriptor instead.

func (*PartyMatchmakerTicketMsg) GetPartyId

func (x *PartyMatchmakerTicketMsg) GetPartyId() string

func (*PartyMatchmakerTicketMsg) GetTicket

func (x *PartyMatchmakerTicketMsg) GetTicket() string

func (*PartyMatchmakerTicketMsg) ProtoMessage

func (*PartyMatchmakerTicketMsg) ProtoMessage()

func (*PartyMatchmakerTicketMsg) ProtoReflect

func (x *PartyMatchmakerTicketMsg) ProtoReflect() protoreflect.Message

func (*PartyMatchmakerTicketMsg) Reset

func (x *PartyMatchmakerTicketMsg) Reset()

func (*PartyMatchmakerTicketMsg) String

func (x *PartyMatchmakerTicketMsg) String() string

type PartyMsg

type PartyMsg struct {

	// Unique party identifier.
	PartyId string `protobuf:"bytes,1,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"`
	// Open flag.
	Open bool `protobuf:"varint,2,opt,name=open,proto3" json:"open,omitempty"`
	// Maximum number of party members.
	MaxSize int32 `protobuf:"varint,3,opt,name=max_size,json=maxSize,proto3" json:"max_size,omitempty"`
	// Self.
	Self *UserPresenceMsg `protobuf:"bytes,4,opt,name=self,proto3" json:"self,omitempty"`
	// Leader.
	Leader *UserPresenceMsg `protobuf:"bytes,5,opt,name=leader,proto3" json:"leader,omitempty"`
	// All current party members.
	Presences []*UserPresenceMsg `protobuf:"bytes,6,rep,name=presences,proto3" json:"presences,omitempty"`
	// contains filtered or unexported fields
}

Incoming information about a party.

func (*PartyMsg) BuildEnvelope

func (msg *PartyMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*PartyMsg) Descriptor deprecated

func (*PartyMsg) Descriptor() ([]byte, []int)

Deprecated: Use PartyMsg.ProtoReflect.Descriptor instead.

func (*PartyMsg) GetLeader

func (x *PartyMsg) GetLeader() *UserPresenceMsg

func (*PartyMsg) GetMaxSize

func (x *PartyMsg) GetMaxSize() int32

func (*PartyMsg) GetOpen

func (x *PartyMsg) GetOpen() bool

func (*PartyMsg) GetPartyId

func (x *PartyMsg) GetPartyId() string

func (*PartyMsg) GetPresences

func (x *PartyMsg) GetPresences() []*UserPresenceMsg

func (*PartyMsg) GetSelf

func (x *PartyMsg) GetSelf() *UserPresenceMsg

func (*PartyMsg) ProtoMessage

func (*PartyMsg) ProtoMessage()

func (*PartyMsg) ProtoReflect

func (x *PartyMsg) ProtoReflect() protoreflect.Message

func (*PartyMsg) Reset

func (x *PartyMsg) Reset()

func (*PartyMsg) String

func (x *PartyMsg) String() string

type PartyPresenceEventMsg

type PartyPresenceEventMsg struct {

	// The party ID.
	PartyId string `protobuf:"bytes,1,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"`
	// User presences that have just joined the party.
	Joins []*UserPresenceMsg `protobuf:"bytes,2,rep,name=joins,proto3" json:"joins,omitempty"`
	// User presences that have just left the party.
	Leaves []*UserPresenceMsg `protobuf:"bytes,3,rep,name=leaves,proto3" json:"leaves,omitempty"`
	// contains filtered or unexported fields
}

Presence update for a particular party.

func (*PartyPresenceEventMsg) Descriptor deprecated

func (*PartyPresenceEventMsg) Descriptor() ([]byte, []int)

Deprecated: Use PartyPresenceEventMsg.ProtoReflect.Descriptor instead.

func (*PartyPresenceEventMsg) GetJoins

func (x *PartyPresenceEventMsg) GetJoins() []*UserPresenceMsg

func (*PartyPresenceEventMsg) GetLeaves

func (x *PartyPresenceEventMsg) GetLeaves() []*UserPresenceMsg

func (*PartyPresenceEventMsg) GetPartyId

func (x *PartyPresenceEventMsg) GetPartyId() string

func (*PartyPresenceEventMsg) ProtoMessage

func (*PartyPresenceEventMsg) ProtoMessage()

func (*PartyPresenceEventMsg) ProtoReflect

func (x *PartyPresenceEventMsg) ProtoReflect() protoreflect.Message

func (*PartyPresenceEventMsg) Reset

func (x *PartyPresenceEventMsg) Reset()

func (*PartyPresenceEventMsg) String

func (x *PartyPresenceEventMsg) String() string

type PartyPromoteMsg

type PartyPromoteMsg struct {

	// Party ID to promote a new leader for.
	PartyId string `protobuf:"bytes,1,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"`
	// The presence of an existing party member to promote as the new leader.
	Presence *UserPresenceMsg `protobuf:"bytes,2,opt,name=presence,proto3" json:"presence,omitempty"`
	// contains filtered or unexported fields
}

Promote a new party leader.

func PartyPromote

func PartyPromote(partyId string, presence *UserPresenceMsg) *PartyPromoteMsg

PartyPromote creates a realtime message to promote a new party leader.

func (*PartyPromoteMsg) Async

func (msg *PartyPromoteMsg) Async(ctx context.Context, conn *Conn, f func(*PartyLeaderMsg, error))

Async sends the message to the connection.

func (*PartyPromoteMsg) BuildEnvelope

func (msg *PartyPromoteMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*PartyPromoteMsg) Descriptor deprecated

func (*PartyPromoteMsg) Descriptor() ([]byte, []int)

Deprecated: Use PartyPromoteMsg.ProtoReflect.Descriptor instead.

func (*PartyPromoteMsg) GetPartyId

func (x *PartyPromoteMsg) GetPartyId() string

func (*PartyPromoteMsg) GetPresence

func (x *PartyPromoteMsg) GetPresence() *UserPresenceMsg

func (*PartyPromoteMsg) ProtoMessage

func (*PartyPromoteMsg) ProtoMessage()

func (*PartyPromoteMsg) ProtoReflect

func (x *PartyPromoteMsg) ProtoReflect() protoreflect.Message

func (*PartyPromoteMsg) Reset

func (x *PartyPromoteMsg) Reset()

func (*PartyPromoteMsg) Send

func (msg *PartyPromoteMsg) Send(ctx context.Context, conn *Conn) (*PartyLeaderMsg, error)

Send sends the message to the connection.

func (*PartyPromoteMsg) String

func (x *PartyPromoteMsg) String() string

type PartyRemoveMsg

type PartyRemoveMsg struct {

	// Party ID to remove/reject from.
	PartyId string `protobuf:"bytes,1,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"`
	// The presence to remove or reject.
	Presence *UserPresenceMsg `protobuf:"bytes,2,opt,name=presence,proto3" json:"presence,omitempty"`
	// contains filtered or unexported fields
}

Kick a party member, or decline a request to join.

func PartyRemove

func PartyRemove(partyId string, presence *UserPresenceMsg) *PartyRemoveMsg

PartyRemove creates a realtime message to kick a party member or decline a request to join.

func (*PartyRemoveMsg) Async

func (msg *PartyRemoveMsg) Async(ctx context.Context, conn *Conn, f func(error))

Async sends the message to the connection.

func (*PartyRemoveMsg) BuildEnvelope

func (msg *PartyRemoveMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*PartyRemoveMsg) Descriptor deprecated

func (*PartyRemoveMsg) Descriptor() ([]byte, []int)

Deprecated: Use PartyRemoveMsg.ProtoReflect.Descriptor instead.

func (*PartyRemoveMsg) GetPartyId

func (x *PartyRemoveMsg) GetPartyId() string

func (*PartyRemoveMsg) GetPresence

func (x *PartyRemoveMsg) GetPresence() *UserPresenceMsg

func (*PartyRemoveMsg) ProtoMessage

func (*PartyRemoveMsg) ProtoMessage()

func (*PartyRemoveMsg) ProtoReflect

func (x *PartyRemoveMsg) ProtoReflect() protoreflect.Message

func (*PartyRemoveMsg) Reset

func (x *PartyRemoveMsg) Reset()

func (*PartyRemoveMsg) Send

func (msg *PartyRemoveMsg) Send(ctx context.Context, conn *Conn) error

Send sends the message to the connection.

func (*PartyRemoveMsg) String

func (x *PartyRemoveMsg) String() string

type PingMsg

type PingMsg struct {
	// contains filtered or unexported fields
}

Application-level heartbeat and connection check.

func Ping

func Ping() *PingMsg

Ping creates a realtime message to do a ping.

func (*PingMsg) Async

func (msg *PingMsg) Async(ctx context.Context, conn *Conn, f func(error))

Async sends the message to the connection.

func (*PingMsg) BuildEnvelope

func (msg *PingMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*PingMsg) Descriptor deprecated

func (*PingMsg) Descriptor() ([]byte, []int)

Deprecated: Use PingMsg.ProtoReflect.Descriptor instead.

func (*PingMsg) ProtoMessage

func (*PingMsg) ProtoMessage()

func (*PingMsg) ProtoReflect

func (x *PingMsg) ProtoReflect() protoreflect.Message

func (*PingMsg) Reset

func (x *PingMsg) Reset()

func (*PingMsg) Send

func (msg *PingMsg) Send(ctx context.Context, conn *Conn) error

Send sends the message to the connection.

func (*PingMsg) String

func (x *PingMsg) String() string

type PongMsg

type PongMsg struct {
	// contains filtered or unexported fields
}

Application-level heartbeat and connection check response.

func (*PongMsg) Descriptor deprecated

func (*PongMsg) Descriptor() ([]byte, []int)

Deprecated: Use PongMsg.ProtoReflect.Descriptor instead.

func (*PongMsg) ProtoMessage

func (*PongMsg) ProtoMessage()

func (*PongMsg) ProtoReflect

func (x *PongMsg) ProtoReflect() protoreflect.Message

func (*PongMsg) Reset

func (x *PongMsg) Reset()

func (*PongMsg) String

func (x *PongMsg) String() string

type PromoteGroupUsersRequest

type PromoteGroupUsersRequest struct {

	// The group ID to promote in.
	GroupId string `protobuf:"bytes,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
	// The users to promote.
	UserIds []string `protobuf:"bytes,2,rep,name=user_ids,json=userIds,proto3" json:"user_ids,omitempty"`
	// contains filtered or unexported fields
}

Promote a set of users in a group to the next role up.

func PromoteGroupUsers

func PromoteGroupUsers(groupId string, userIds ...string) *PromoteGroupUsersRequest

PromoteGroupUsers creates a request to promote users in a group to the next role up.

func (*PromoteGroupUsersRequest) Async

func (req *PromoteGroupUsersRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*PromoteGroupUsersRequest) Descriptor deprecated

func (*PromoteGroupUsersRequest) Descriptor() ([]byte, []int)

Deprecated: Use PromoteGroupUsersRequest.ProtoReflect.Descriptor instead.

func (*PromoteGroupUsersRequest) Do

Do executes the request against the context and client.

func (*PromoteGroupUsersRequest) GetGroupId

func (x *PromoteGroupUsersRequest) GetGroupId() string

func (*PromoteGroupUsersRequest) GetUserIds

func (x *PromoteGroupUsersRequest) GetUserIds() []string

func (*PromoteGroupUsersRequest) ProtoMessage

func (*PromoteGroupUsersRequest) ProtoMessage()

func (*PromoteGroupUsersRequest) ProtoReflect

func (x *PromoteGroupUsersRequest) ProtoReflect() protoreflect.Message

func (*PromoteGroupUsersRequest) Reset

func (x *PromoteGroupUsersRequest) Reset()

func (*PromoteGroupUsersRequest) String

func (x *PromoteGroupUsersRequest) String() string

type PurchasesResponse

type PurchasesResponse struct {

	// Stored validated purchases.
	ValidatedPurchases []*ValidatedPurchase `protobuf:"bytes,1,rep,name=validated_purchases,json=validatedPurchases,proto3" json:"validated_purchases,omitempty"`
	// The cursor to send when retrieving the next page, if any.
	Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"`
	// The cursor to send when retrieving the previous page, if any.
	PrevCursor string `protobuf:"bytes,3,opt,name=prev_cursor,json=prevCursor,proto3" json:"prev_cursor,omitempty"`
	// contains filtered or unexported fields
}

A list of validated purchases stored by Nakama.

func (*PurchasesResponse) Descriptor deprecated

func (*PurchasesResponse) Descriptor() ([]byte, []int)

Deprecated: Use PurchasesResponse.ProtoReflect.Descriptor instead.

func (*PurchasesResponse) GetCursor

func (x *PurchasesResponse) GetCursor() string

func (*PurchasesResponse) GetPrevCursor

func (x *PurchasesResponse) GetPrevCursor() string

func (*PurchasesResponse) GetValidatedPurchases

func (x *PurchasesResponse) GetValidatedPurchases() []*ValidatedPurchase

func (*PurchasesResponse) ProtoMessage

func (*PurchasesResponse) ProtoMessage()

func (*PurchasesResponse) ProtoReflect

func (x *PurchasesResponse) ProtoReflect() protoreflect.Message

func (*PurchasesResponse) Reset

func (x *PurchasesResponse) Reset()

func (*PurchasesResponse) String

func (x *PurchasesResponse) String() string

type ReadStorageObjectId

type ReadStorageObjectId struct {

	// The collection which stores the object.
	Collection string `protobuf:"bytes,1,opt,name=collection,proto3" json:"collection,omitempty"`
	// The key of the object within the collection.
	Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	// The user owner of the object.
	UserId string `protobuf:"bytes,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// contains filtered or unexported fields
}

Storage objects to get.

func (*ReadStorageObjectId) Descriptor deprecated

func (*ReadStorageObjectId) Descriptor() ([]byte, []int)

Deprecated: Use ReadStorageObjectId.ProtoReflect.Descriptor instead.

func (*ReadStorageObjectId) GetCollection

func (x *ReadStorageObjectId) GetCollection() string

func (*ReadStorageObjectId) GetKey

func (x *ReadStorageObjectId) GetKey() string

func (*ReadStorageObjectId) GetUserId

func (x *ReadStorageObjectId) GetUserId() string

func (*ReadStorageObjectId) ProtoMessage

func (*ReadStorageObjectId) ProtoMessage()

func (*ReadStorageObjectId) ProtoReflect

func (x *ReadStorageObjectId) ProtoReflect() protoreflect.Message

func (*ReadStorageObjectId) Reset

func (x *ReadStorageObjectId) Reset()

func (*ReadStorageObjectId) String

func (x *ReadStorageObjectId) String() string

type ReadStorageObjectsRequest

type ReadStorageObjectsRequest struct {

	// Batch of storage objects.
	ObjectIds []*ReadStorageObjectId `protobuf:"bytes,1,rep,name=object_ids,json=objectIds,proto3" json:"object_ids,omitempty"`
	// contains filtered or unexported fields
}

Batch get storage objects.

func ReadStorageObjects

func ReadStorageObjects() *ReadStorageObjectsRequest

ReadStorageObjects creates a request to read storage objects.

func (*ReadStorageObjectsRequest) Async

Async executes the request against the context and client.

func (*ReadStorageObjectsRequest) Descriptor deprecated

func (*ReadStorageObjectsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ReadStorageObjectsRequest.ProtoReflect.Descriptor instead.

func (*ReadStorageObjectsRequest) Do

Do executes the request against the context and client.

func (*ReadStorageObjectsRequest) GetObjectIds

func (x *ReadStorageObjectsRequest) GetObjectIds() []*ReadStorageObjectId

func (*ReadStorageObjectsRequest) ProtoMessage

func (*ReadStorageObjectsRequest) ProtoMessage()

func (*ReadStorageObjectsRequest) ProtoReflect

func (*ReadStorageObjectsRequest) Reset

func (x *ReadStorageObjectsRequest) Reset()

func (*ReadStorageObjectsRequest) String

func (x *ReadStorageObjectsRequest) String() string

func (*ReadStorageObjectsRequest) WithObjectId

func (req *ReadStorageObjectsRequest) WithObjectId(collection, key, userId string) *ReadStorageObjectsRequest

WithObjectId sets the objectId on the request.

type ReadStorageObjectsResponse

type ReadStorageObjectsResponse struct {

	// The batch of storage objects.
	Objects []*StorageObject `protobuf:"bytes,1,rep,name=objects,proto3" json:"objects,omitempty"`
	// contains filtered or unexported fields
}

Batch of storage objects.

func (*ReadStorageObjectsResponse) Descriptor deprecated

func (*ReadStorageObjectsResponse) Descriptor() ([]byte, []int)

Deprecated: Use ReadStorageObjectsResponse.ProtoReflect.Descriptor instead.

func (*ReadStorageObjectsResponse) GetObjects

func (x *ReadStorageObjectsResponse) GetObjects() []*StorageObject

func (*ReadStorageObjectsResponse) ProtoMessage

func (*ReadStorageObjectsResponse) ProtoMessage()

func (*ReadStorageObjectsResponse) ProtoReflect

func (*ReadStorageObjectsResponse) Reset

func (x *ReadStorageObjectsResponse) Reset()

func (*ReadStorageObjectsResponse) String

func (x *ReadStorageObjectsResponse) String() string

type RpcMsg

type RpcMsg struct {

	// The identifier of the function.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The payload of the function which must be a JSON object.
	Payload string `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
	// The authentication key used when executed as a non-client HTTP request.
	HttpKey string `protobuf:"bytes,3,opt,name=http_key,json=httpKey,proto3" json:"http_key,omitempty"`
	// contains filtered or unexported fields
}

Execute an Lua function on the server.

func (*RpcMsg) BuildEnvelope

func (msg *RpcMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*RpcMsg) Descriptor deprecated

func (*RpcMsg) Descriptor() ([]byte, []int)

Deprecated: Use RpcMsg.ProtoReflect.Descriptor instead.

func (*RpcMsg) GetHttpKey

func (x *RpcMsg) GetHttpKey() string

func (*RpcMsg) GetId

func (x *RpcMsg) GetId() string

func (*RpcMsg) GetPayload

func (x *RpcMsg) GetPayload() string

func (*RpcMsg) ProtoMessage

func (*RpcMsg) ProtoMessage()

func (*RpcMsg) ProtoReflect

func (x *RpcMsg) ProtoReflect() protoreflect.Message

func (*RpcMsg) Reset

func (x *RpcMsg) Reset()

func (*RpcMsg) String

func (x *RpcMsg) String() string

type RpcRequest

type RpcRequest struct {
	// contains filtered or unexported fields
}

RpcRequest is a request/message to execute a remote procedure call.

func Rpc

func Rpc(id string, payload, v interface{}) *RpcRequest

Rpc creates a request to execute a remote procedure call.

Example
const amount = 1000
type rewards struct {
	Rewards int64 `json:"rewards,omitempty"`
}
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
// create client
cl := nakama.New(nakama.WithServerKey("nakama-go_server"))
// create request and response
res := new(rewards)
req := nakama.Rpc("dailyRewards", rewards{Rewards: amount}, res)
// execute rpc with http key
if err := req.WithHttpKey("nakama-go").Do(ctx, cl); err != nil {
	log.Fatal(err)
}
fmt.Println("rewards:", res.Rewards)
Output:

rewards: 2000

func (*RpcRequest) Async

func (req *RpcRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*RpcRequest) BuildEnvelope

func (req *RpcRequest) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*RpcRequest) Do

func (req *RpcRequest) Do(ctx context.Context, cl *Client) error

Do executes the request against the context and client.

func (*RpcRequest) Send

func (req *RpcRequest) Send(ctx context.Context, conn *Conn) error

Send sends the message to the connection.

func (*RpcRequest) SendAsync

func (req *RpcRequest) SendAsync(ctx context.Context, conn *Conn, f func(error))

SendAsync sends the message to the connection.

func (*RpcRequest) WithHttpKey

func (req *RpcRequest) WithHttpKey(httpKey string) *RpcRequest

WithHttpKey sets the httpKey on the request.

func (*RpcRequest) WithProto

func (req *RpcRequest) WithProto(proto bool) *RpcRequest

WithProto sets the Protobuf encoding toggle for the realtime message.

type SessionLogoutRequest

type SessionLogoutRequest struct {

	// Session token to log out.
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// Refresh token to invalidate.
	RefreshToken string `protobuf:"bytes,2,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"`
	// contains filtered or unexported fields
}

Log out a session, invalidate a refresh token, or log out all sessions/refresh tokens for a user.

func SessionLogout

func SessionLogout(token, refreshToken string) *SessionLogoutRequest

SessionLogout creates a request to logout of the session.

func (*SessionLogoutRequest) Async

func (req *SessionLogoutRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*SessionLogoutRequest) Descriptor deprecated

func (*SessionLogoutRequest) Descriptor() ([]byte, []int)

Deprecated: Use SessionLogoutRequest.ProtoReflect.Descriptor instead.

func (*SessionLogoutRequest) Do

func (req *SessionLogoutRequest) Do(ctx context.Context, cl *Client) error

Do executes the request against the context and client.

func (*SessionLogoutRequest) GetRefreshToken

func (x *SessionLogoutRequest) GetRefreshToken() string

func (*SessionLogoutRequest) GetToken

func (x *SessionLogoutRequest) GetToken() string

func (*SessionLogoutRequest) ProtoMessage

func (*SessionLogoutRequest) ProtoMessage()

func (*SessionLogoutRequest) ProtoReflect

func (x *SessionLogoutRequest) ProtoReflect() protoreflect.Message

func (*SessionLogoutRequest) Reset

func (x *SessionLogoutRequest) Reset()

func (*SessionLogoutRequest) String

func (x *SessionLogoutRequest) String() string

type SessionRefreshRequest

type SessionRefreshRequest struct {

	// Refresh token.
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// Extra information that will be bundled in the session token.
	Vars map[string]string `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

Authenticate against the server with a refresh token.

func SessionRefresh

func SessionRefresh(refreshToken string) *SessionRefreshRequest

SessionRefresh creates a request to refresh the session token.

func (*SessionRefreshRequest) Async

func (req *SessionRefreshRequest) Async(ctx context.Context, cl *Client, f func(*SessionResponse, error))

Async executes the request against the context and client.

func (*SessionRefreshRequest) Descriptor deprecated

func (*SessionRefreshRequest) Descriptor() ([]byte, []int)

Deprecated: Use SessionRefreshRequest.ProtoReflect.Descriptor instead.

func (*SessionRefreshRequest) Do

Do executes the request against the context and client.

func (*SessionRefreshRequest) GetToken

func (x *SessionRefreshRequest) GetToken() string

func (*SessionRefreshRequest) GetVars

func (x *SessionRefreshRequest) GetVars() map[string]string

func (*SessionRefreshRequest) ProtoMessage

func (*SessionRefreshRequest) ProtoMessage()

func (*SessionRefreshRequest) ProtoReflect

func (x *SessionRefreshRequest) ProtoReflect() protoreflect.Message

func (*SessionRefreshRequest) Reset

func (x *SessionRefreshRequest) Reset()

func (*SessionRefreshRequest) String

func (x *SessionRefreshRequest) String() string

func (*SessionRefreshRequest) WithVars

func (req *SessionRefreshRequest) WithVars(vars map[string]string) *SessionRefreshRequest

WithVars sets the vars on the request.

type SessionResponse

type SessionResponse struct {

	// True if the corresponding account was just created, false otherwise.
	Created bool `protobuf:"varint,1,opt,name=created,proto3" json:"created,omitempty"`
	// Authentication credentials.
	Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
	// Refresh token that can be used for session token renewal.
	RefreshToken string `protobuf:"bytes,3,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"`
	// contains filtered or unexported fields
}

A user's session used to authenticate messages.

func (*SessionResponse) Descriptor deprecated

func (*SessionResponse) Descriptor() ([]byte, []int)

Deprecated: Use SessionResponse.ProtoReflect.Descriptor instead.

func (*SessionResponse) GetCreated

func (x *SessionResponse) GetCreated() bool

func (*SessionResponse) GetRefreshToken

func (x *SessionResponse) GetRefreshToken() string

func (*SessionResponse) GetToken

func (x *SessionResponse) GetToken() string

func (*SessionResponse) ProtoMessage

func (*SessionResponse) ProtoMessage()

func (*SessionResponse) ProtoReflect

func (x *SessionResponse) ProtoReflect() protoreflect.Message

func (*SessionResponse) Reset

func (x *SessionResponse) Reset()

func (*SessionResponse) String

func (x *SessionResponse) String() string

type StatusFollowMsg

type StatusFollowMsg struct {

	// User IDs to follow.
	UserIds []string `protobuf:"bytes,1,rep,name=user_ids,json=userIds,proto3" json:"user_ids,omitempty"`
	// Usernames to follow.
	Usernames []string `protobuf:"bytes,2,rep,name=usernames,proto3" json:"usernames,omitempty"`
	// contains filtered or unexported fields
}

Start receiving status updates for some set of users.

func StatusFollow

func StatusFollow(userIds ...string) *StatusFollowMsg

StatusFollow creates a realtime message to subscribe to user status updates.

func (*StatusFollowMsg) Async

func (msg *StatusFollowMsg) Async(ctx context.Context, conn *Conn, f func(*StatusMsg, error))

Async sends the message to the connection.

func (*StatusFollowMsg) BuildEnvelope

func (msg *StatusFollowMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*StatusFollowMsg) Descriptor deprecated

func (*StatusFollowMsg) Descriptor() ([]byte, []int)

Deprecated: Use StatusFollowMsg.ProtoReflect.Descriptor instead.

func (*StatusFollowMsg) GetUserIds

func (x *StatusFollowMsg) GetUserIds() []string

func (*StatusFollowMsg) GetUsernames

func (x *StatusFollowMsg) GetUsernames() []string

func (*StatusFollowMsg) ProtoMessage

func (*StatusFollowMsg) ProtoMessage()

func (*StatusFollowMsg) ProtoReflect

func (x *StatusFollowMsg) ProtoReflect() protoreflect.Message

func (*StatusFollowMsg) Reset

func (x *StatusFollowMsg) Reset()

func (*StatusFollowMsg) Send

func (msg *StatusFollowMsg) Send(ctx context.Context, conn *Conn) (*StatusMsg, error)

Send sends the message to the connection.

func (*StatusFollowMsg) String

func (x *StatusFollowMsg) String() string

func (*StatusFollowMsg) WithUsernames

func (msg *StatusFollowMsg) WithUsernames(usernames ...string) *StatusFollowMsg

WithUsernames sets the usernames on the message.

type StatusMsg

type StatusMsg struct {

	// User statuses.
	Presences []*UserPresenceMsg `protobuf:"bytes,1,rep,name=presences,proto3" json:"presences,omitempty"`
	// contains filtered or unexported fields
}

A snapshot of statuses for some set of users.

func (*StatusMsg) BuildEnvelope

func (msg *StatusMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*StatusMsg) Descriptor deprecated

func (*StatusMsg) Descriptor() ([]byte, []int)

Deprecated: Use StatusMsg.ProtoReflect.Descriptor instead.

func (*StatusMsg) GetPresences

func (x *StatusMsg) GetPresences() []*UserPresenceMsg

func (*StatusMsg) ProtoMessage

func (*StatusMsg) ProtoMessage()

func (*StatusMsg) ProtoReflect

func (x *StatusMsg) ProtoReflect() protoreflect.Message

func (*StatusMsg) Reset

func (x *StatusMsg) Reset()

func (*StatusMsg) String

func (x *StatusMsg) String() string

type StatusPresenceEventMsg

type StatusPresenceEventMsg struct {

	// New statuses for the user.
	Joins []*UserPresenceMsg `protobuf:"bytes,2,rep,name=joins,proto3" json:"joins,omitempty"`
	// Previous statuses for the user.
	Leaves []*UserPresenceMsg `protobuf:"bytes,3,rep,name=leaves,proto3" json:"leaves,omitempty"`
	// contains filtered or unexported fields
}

A batch of status updates for a given user.

func (*StatusPresenceEventMsg) BuildEnvelope

func (msg *StatusPresenceEventMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*StatusPresenceEventMsg) Descriptor deprecated

func (*StatusPresenceEventMsg) Descriptor() ([]byte, []int)

Deprecated: Use StatusPresenceEventMsg.ProtoReflect.Descriptor instead.

func (*StatusPresenceEventMsg) GetJoins

func (x *StatusPresenceEventMsg) GetJoins() []*UserPresenceMsg

func (*StatusPresenceEventMsg) GetLeaves

func (x *StatusPresenceEventMsg) GetLeaves() []*UserPresenceMsg

func (*StatusPresenceEventMsg) ProtoMessage

func (*StatusPresenceEventMsg) ProtoMessage()

func (*StatusPresenceEventMsg) ProtoReflect

func (x *StatusPresenceEventMsg) ProtoReflect() protoreflect.Message

func (*StatusPresenceEventMsg) Reset

func (x *StatusPresenceEventMsg) Reset()

func (*StatusPresenceEventMsg) String

func (x *StatusPresenceEventMsg) String() string

type StatusUnfollowMsg

type StatusUnfollowMsg struct {

	// Users to unfollow.
	UserIds []string `protobuf:"bytes,1,rep,name=user_ids,json=userIds,proto3" json:"user_ids,omitempty"`
	// contains filtered or unexported fields
}

Stop receiving status updates for some set of users.

func StatusUnfollow

func StatusUnfollow(userIds ...string) *StatusUnfollowMsg

StatusUnfollow creates a realtime message to unfollow user's status updates.

func (*StatusUnfollowMsg) Async

func (msg *StatusUnfollowMsg) Async(ctx context.Context, conn *Conn, f func(error))

Async sends the message to the connection.

func (*StatusUnfollowMsg) BuildEnvelope

func (msg *StatusUnfollowMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*StatusUnfollowMsg) Descriptor deprecated

func (*StatusUnfollowMsg) Descriptor() ([]byte, []int)

Deprecated: Use StatusUnfollowMsg.ProtoReflect.Descriptor instead.

func (*StatusUnfollowMsg) GetUserIds

func (x *StatusUnfollowMsg) GetUserIds() []string

func (*StatusUnfollowMsg) ProtoMessage

func (*StatusUnfollowMsg) ProtoMessage()

func (*StatusUnfollowMsg) ProtoReflect

func (x *StatusUnfollowMsg) ProtoReflect() protoreflect.Message

func (*StatusUnfollowMsg) Reset

func (x *StatusUnfollowMsg) Reset()

func (*StatusUnfollowMsg) Send

func (msg *StatusUnfollowMsg) Send(ctx context.Context, conn *Conn) error

Send sends the message to the connection.

func (*StatusUnfollowMsg) String

func (x *StatusUnfollowMsg) String() string

type StatusUpdateMsg

type StatusUpdateMsg struct {

	// Status string to set, if not present the user will appear offline.
	Status *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

Set the user's own status.

func StatusUpdate

func StatusUpdate() *StatusUpdateMsg

StatusUpdate creates a realtime message to update the user's status.

func (*StatusUpdateMsg) Async

func (msg *StatusUpdateMsg) Async(ctx context.Context, conn *Conn, f func(error))

Async sends the message to the connection.

func (*StatusUpdateMsg) BuildEnvelope

func (msg *StatusUpdateMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*StatusUpdateMsg) Descriptor deprecated

func (*StatusUpdateMsg) Descriptor() ([]byte, []int)

Deprecated: Use StatusUpdateMsg.ProtoReflect.Descriptor instead.

func (*StatusUpdateMsg) GetStatus

func (x *StatusUpdateMsg) GetStatus() *wrapperspb.StringValue

func (*StatusUpdateMsg) ProtoMessage

func (*StatusUpdateMsg) ProtoMessage()

func (*StatusUpdateMsg) ProtoReflect

func (x *StatusUpdateMsg) ProtoReflect() protoreflect.Message

func (*StatusUpdateMsg) Reset

func (x *StatusUpdateMsg) Reset()

func (*StatusUpdateMsg) Send

func (msg *StatusUpdateMsg) Send(ctx context.Context, conn *Conn) error

Send sends the message to the connection.

func (*StatusUpdateMsg) String

func (x *StatusUpdateMsg) String() string

func (*StatusUpdateMsg) WithStatus

func (msg *StatusUpdateMsg) WithStatus(status string) *StatusUpdateMsg

WithStatus sets the status on the message.

type StorageObject

type StorageObject struct {

	// The collection which stores the object.
	Collection string `protobuf:"bytes,1,opt,name=collection,proto3" json:"collection,omitempty"`
	// The key of the object within the collection.
	Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	// The user owner of the object.
	UserId string `protobuf:"bytes,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// The value of the object.
	Value string `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"`
	// The version hash of the object.
	Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"`
	// The read access permissions for the object.
	PermissionRead int32 `protobuf:"varint,6,opt,name=permission_read,json=permissionRead,proto3" json:"permission_read,omitempty"`
	// The write access permissions for the object.
	PermissionWrite int32 `protobuf:"varint,7,opt,name=permission_write,json=permissionWrite,proto3" json:"permission_write,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was created.
	CreateTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was last updated.
	UpdateTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
	// contains filtered or unexported fields
}

An object within the storage engine.

func (*StorageObject) Descriptor deprecated

func (*StorageObject) Descriptor() ([]byte, []int)

Deprecated: Use StorageObject.ProtoReflect.Descriptor instead.

func (*StorageObject) GetCollection

func (x *StorageObject) GetCollection() string

func (*StorageObject) GetCreateTime

func (x *StorageObject) GetCreateTime() *timestamppb.Timestamp

func (*StorageObject) GetKey

func (x *StorageObject) GetKey() string

func (*StorageObject) GetPermissionRead

func (x *StorageObject) GetPermissionRead() int32

func (*StorageObject) GetPermissionWrite

func (x *StorageObject) GetPermissionWrite() int32

func (*StorageObject) GetUpdateTime

func (x *StorageObject) GetUpdateTime() *timestamppb.Timestamp

func (*StorageObject) GetUserId

func (x *StorageObject) GetUserId() string

func (*StorageObject) GetValue

func (x *StorageObject) GetValue() string

func (*StorageObject) GetVersion

func (x *StorageObject) GetVersion() string

func (*StorageObject) ProtoMessage

func (*StorageObject) ProtoMessage()

func (*StorageObject) ProtoReflect

func (x *StorageObject) ProtoReflect() protoreflect.Message

func (*StorageObject) Reset

func (x *StorageObject) Reset()

func (*StorageObject) String

func (x *StorageObject) String() string

type StorageObjectAck

type StorageObjectAck struct {

	// The collection which stores the object.
	Collection string `protobuf:"bytes,1,opt,name=collection,proto3" json:"collection,omitempty"`
	// The key of the object within the collection.
	Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	// The version hash of the object.
	Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	// The owner of the object.
	UserId string `protobuf:"bytes,4,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// contains filtered or unexported fields
}

A storage acknowledgement.

func (*StorageObjectAck) Descriptor deprecated

func (*StorageObjectAck) Descriptor() ([]byte, []int)

Deprecated: Use StorageObjectAck.ProtoReflect.Descriptor instead.

func (*StorageObjectAck) GetCollection

func (x *StorageObjectAck) GetCollection() string

func (*StorageObjectAck) GetKey

func (x *StorageObjectAck) GetKey() string

func (*StorageObjectAck) GetUserId

func (x *StorageObjectAck) GetUserId() string

func (*StorageObjectAck) GetVersion

func (x *StorageObjectAck) GetVersion() string

func (*StorageObjectAck) ProtoMessage

func (*StorageObjectAck) ProtoMessage()

func (*StorageObjectAck) ProtoReflect

func (x *StorageObjectAck) ProtoReflect() protoreflect.Message

func (*StorageObjectAck) Reset

func (x *StorageObjectAck) Reset()

func (*StorageObjectAck) String

func (x *StorageObjectAck) String() string

type StorageObjectsRequest

type StorageObjectsRequest struct {

	// ID of the user.
	UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// The collection which stores the object.
	Collection string `protobuf:"bytes,2,opt,name=collection,proto3" json:"collection,omitempty"`
	// The number of storage objects to list. Between 1 and 100.
	Limit *wrapperspb.Int32Value `protobuf:"bytes,3,opt,name=limit,proto3" json:"limit,omitempty"`
	// The cursor to page through results from.
	Cursor string `protobuf:"bytes,4,opt,name=cursor,proto3" json:"cursor,omitempty"` // value from StorageObjectList.cursor.
	// contains filtered or unexported fields
}

List publicly readable storage objects in a given collection.

func StorageObjects

func StorageObjects(collection string) *StorageObjectsRequest

StorageObjects creates a request to retrieve storage objects.

func (*StorageObjectsRequest) Async

func (req *StorageObjectsRequest) Async(ctx context.Context, cl *Client, f func(*StorageObjectsResponse, error))

Async executes the request against the context and client.

func (*StorageObjectsRequest) Descriptor deprecated

func (*StorageObjectsRequest) Descriptor() ([]byte, []int)

Deprecated: Use StorageObjectsRequest.ProtoReflect.Descriptor instead.

func (*StorageObjectsRequest) Do

Do executes the request against the context and client.

func (*StorageObjectsRequest) GetCollection

func (x *StorageObjectsRequest) GetCollection() string

func (*StorageObjectsRequest) GetCursor

func (x *StorageObjectsRequest) GetCursor() string

func (*StorageObjectsRequest) GetLimit

func (*StorageObjectsRequest) GetUserId

func (x *StorageObjectsRequest) GetUserId() string

func (*StorageObjectsRequest) ProtoMessage

func (*StorageObjectsRequest) ProtoMessage()

func (*StorageObjectsRequest) ProtoReflect

func (x *StorageObjectsRequest) ProtoReflect() protoreflect.Message

func (*StorageObjectsRequest) Reset

func (x *StorageObjectsRequest) Reset()

func (*StorageObjectsRequest) String

func (x *StorageObjectsRequest) String() string

func (*StorageObjectsRequest) WithCursor

func (req *StorageObjectsRequest) WithCursor(cursor string) *StorageObjectsRequest

WithCursor sets the cursor on the request.

func (*StorageObjectsRequest) WithLimit

func (req *StorageObjectsRequest) WithLimit(limit int) *StorageObjectsRequest

WithLimit sets the limit on the request.

func (*StorageObjectsRequest) WithUserId

func (req *StorageObjectsRequest) WithUserId(userId string) *StorageObjectsRequest

WithUserId sets the userId on the request.

type StorageObjectsResponse

type StorageObjectsResponse struct {

	// The list of storage objects.
	Objects []*StorageObject `protobuf:"bytes,1,rep,name=objects,proto3" json:"objects,omitempty"`
	// The cursor for the next page of results, if any.
	Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"`
	// contains filtered or unexported fields
}

List of storage objects.

func (*StorageObjectsResponse) Descriptor deprecated

func (*StorageObjectsResponse) Descriptor() ([]byte, []int)

Deprecated: Use StorageObjectsResponse.ProtoReflect.Descriptor instead.

func (*StorageObjectsResponse) GetCursor

func (x *StorageObjectsResponse) GetCursor() string

func (*StorageObjectsResponse) GetObjects

func (x *StorageObjectsResponse) GetObjects() []*StorageObject

func (*StorageObjectsResponse) ProtoMessage

func (*StorageObjectsResponse) ProtoMessage()

func (*StorageObjectsResponse) ProtoReflect

func (x *StorageObjectsResponse) ProtoReflect() protoreflect.Message

func (*StorageObjectsResponse) Reset

func (x *StorageObjectsResponse) Reset()

func (*StorageObjectsResponse) String

func (x *StorageObjectsResponse) String() string

type StoreEnvironment

type StoreEnvironment int32

Environment where a purchase/subscription took place,

const (
	// Unknown environment.
	StoreEnvironment_UNKNOWN StoreEnvironment = 0
	// Sandbox/test environment.
	StoreEnvironment_SANDBOX StoreEnvironment = 1
	// Production environment.
	StoreEnvironment_PRODUCTION StoreEnvironment = 2
)

func (StoreEnvironment) Descriptor

func (StoreEnvironment) Enum

func (StoreEnvironment) EnumDescriptor deprecated

func (StoreEnvironment) EnumDescriptor() ([]byte, []int)

Deprecated: Use StoreEnvironment.Descriptor instead.

func (StoreEnvironment) Number

func (StoreEnvironment) String

func (x StoreEnvironment) String() string

func (StoreEnvironment) Type

type StoreProvider

type StoreProvider int32

Validation Provider,

const (
	// Apple App Store
	StoreProvider_APPLE_APP_STORE StoreProvider = 0
	// Google Play Store
	StoreProvider_GOOGLE_PLAY_STORE StoreProvider = 1
	// Huawei App Gallery
	StoreProvider_HUAWEI_APP_GALLERY StoreProvider = 2
)

func (StoreProvider) Descriptor

func (StoreProvider) Enum

func (x StoreProvider) Enum() *StoreProvider

func (StoreProvider) EnumDescriptor deprecated

func (StoreProvider) EnumDescriptor() ([]byte, []int)

Deprecated: Use StoreProvider.Descriptor instead.

func (StoreProvider) Number

func (StoreProvider) String

func (x StoreProvider) String() string

func (StoreProvider) Type

type StreamDataMsg

type StreamDataMsg struct {

	// The stream this data message relates to.
	Stream *StreamMsg `protobuf:"bytes,1,opt,name=stream,proto3" json:"stream,omitempty"`
	// The sender, if any.
	Sender *UserPresenceMsg `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"`
	// Arbitrary contents of the data message.
	Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	// True if this data was delivered reliably, false otherwise.
	Reliable bool `protobuf:"varint,4,opt,name=reliable,proto3" json:"reliable,omitempty"`
	// contains filtered or unexported fields
}

A data message delivered over a stream.

func (*StreamDataMsg) BuildEnvelope

func (msg *StreamDataMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*StreamDataMsg) Descriptor deprecated

func (*StreamDataMsg) Descriptor() ([]byte, []int)

Deprecated: Use StreamDataMsg.ProtoReflect.Descriptor instead.

func (*StreamDataMsg) GetData

func (x *StreamDataMsg) GetData() string

func (*StreamDataMsg) GetReliable

func (x *StreamDataMsg) GetReliable() bool

func (*StreamDataMsg) GetSender

func (x *StreamDataMsg) GetSender() *UserPresenceMsg

func (*StreamDataMsg) GetStream

func (x *StreamDataMsg) GetStream() *StreamMsg

func (*StreamDataMsg) ProtoMessage

func (*StreamDataMsg) ProtoMessage()

func (*StreamDataMsg) ProtoReflect

func (x *StreamDataMsg) ProtoReflect() protoreflect.Message

func (*StreamDataMsg) Reset

func (x *StreamDataMsg) Reset()

func (*StreamDataMsg) String

func (x *StreamDataMsg) String() string

type StreamMsg

type StreamMsg struct {

	// Mode identifies the type of stream.
	Mode int32 `protobuf:"varint,1,opt,name=mode,proto3" json:"mode,omitempty"`
	// Subject is the primary identifier, if any.
	Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"`
	// Subcontext is a secondary identifier, if any.
	Subcontext string `protobuf:"bytes,3,opt,name=subcontext,proto3" json:"subcontext,omitempty"`
	// The label is an arbitrary identifying string, if the stream has one.
	Label string `protobuf:"bytes,4,opt,name=label,proto3" json:"label,omitempty"`
	// contains filtered or unexported fields
}

Represents identifying information for a stream.

func (*StreamMsg) Descriptor deprecated

func (*StreamMsg) Descriptor() ([]byte, []int)

Deprecated: Use StreamMsg.ProtoReflect.Descriptor instead.

func (*StreamMsg) GetLabel

func (x *StreamMsg) GetLabel() string

func (*StreamMsg) GetMode

func (x *StreamMsg) GetMode() int32

func (*StreamMsg) GetSubcontext

func (x *StreamMsg) GetSubcontext() string

func (*StreamMsg) GetSubject

func (x *StreamMsg) GetSubject() string

func (*StreamMsg) ProtoMessage

func (*StreamMsg) ProtoMessage()

func (*StreamMsg) ProtoReflect

func (x *StreamMsg) ProtoReflect() protoreflect.Message

func (*StreamMsg) Reset

func (x *StreamMsg) Reset()

func (*StreamMsg) String

func (x *StreamMsg) String() string

type StreamPresenceEventMsg

type StreamPresenceEventMsg struct {

	// The stream this event relates to.
	Stream *StreamMsg `protobuf:"bytes,1,opt,name=stream,proto3" json:"stream,omitempty"`
	// Presences joining the stream as part of this event, if any.
	Joins []*UserPresenceMsg `protobuf:"bytes,2,rep,name=joins,proto3" json:"joins,omitempty"`
	// Presences leaving the stream as part of this event, if any.
	Leaves []*UserPresenceMsg `protobuf:"bytes,3,rep,name=leaves,proto3" json:"leaves,omitempty"`
	// contains filtered or unexported fields
}

A set of joins and leaves on a particular stream.

func (*StreamPresenceEventMsg) BuildEnvelope

func (msg *StreamPresenceEventMsg) BuildEnvelope() *Envelope

BuildEnvelope satisfies the EnvelopeBuilder interface.

func (*StreamPresenceEventMsg) Descriptor deprecated

func (*StreamPresenceEventMsg) Descriptor() ([]byte, []int)

Deprecated: Use StreamPresenceEventMsg.ProtoReflect.Descriptor instead.

func (*StreamPresenceEventMsg) GetJoins

func (x *StreamPresenceEventMsg) GetJoins() []*UserPresenceMsg

func (*StreamPresenceEventMsg) GetLeaves

func (x *StreamPresenceEventMsg) GetLeaves() []*UserPresenceMsg

func (*StreamPresenceEventMsg) GetStream

func (x *StreamPresenceEventMsg) GetStream() *StreamMsg

func (*StreamPresenceEventMsg) ProtoMessage

func (*StreamPresenceEventMsg) ProtoMessage()

func (*StreamPresenceEventMsg) ProtoReflect

func (x *StreamPresenceEventMsg) ProtoReflect() protoreflect.Message

func (*StreamPresenceEventMsg) Reset

func (x *StreamPresenceEventMsg) Reset()

func (*StreamPresenceEventMsg) String

func (x *StreamPresenceEventMsg) String() string

type SubscriptionRequest

type SubscriptionRequest struct {

	// Product id of the subscription
	ProductId string `protobuf:"bytes,1,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"`
	// contains filtered or unexported fields
}

Fetch a subscription by product id.

func Subscription

func Subscription(productId string) *SubscriptionRequest

func (*SubscriptionRequest) Async

func (req *SubscriptionRequest) Async(ctx context.Context, cl *Client, f func(*SubscriptionResponse, error))

Async executes the request against the context and client.

func (*SubscriptionRequest) Descriptor deprecated

func (*SubscriptionRequest) Descriptor() ([]byte, []int)

Deprecated: Use SubscriptionRequest.ProtoReflect.Descriptor instead.

func (*SubscriptionRequest) Do

Do executes the request against the context and client.

func (*SubscriptionRequest) GetProductId

func (x *SubscriptionRequest) GetProductId() string

func (*SubscriptionRequest) ProtoMessage

func (*SubscriptionRequest) ProtoMessage()

func (*SubscriptionRequest) ProtoReflect

func (x *SubscriptionRequest) ProtoReflect() protoreflect.Message

func (*SubscriptionRequest) Reset

func (x *SubscriptionRequest) Reset()

func (*SubscriptionRequest) String

func (x *SubscriptionRequest) String() string

type SubscriptionResponse

type SubscriptionResponse = ValidatedSubscription

SubscriptionResponse is a Subscription response.

type SubscriptionsRequest

type SubscriptionsRequest struct {

	// Max number of results per page
	Limit *wrapperspb.Int32Value `protobuf:"bytes,1,opt,name=limit,proto3" json:"limit,omitempty"`
	// Cursor to retrieve a page of records from
	Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"`
	// contains filtered or unexported fields
}

List user subscriptions.

func Subscriptions

func Subscriptions(groupId string) *SubscriptionsRequest

Subscriptions creates a request to retrieve subscriptions.

func (*SubscriptionsRequest) Async

func (req *SubscriptionsRequest) Async(ctx context.Context, cl *Client, f func(*SubscriptionsResponse, error))

Async executes the request against the context and client.

func (*SubscriptionsRequest) Descriptor deprecated

func (*SubscriptionsRequest) Descriptor() ([]byte, []int)

Deprecated: Use SubscriptionsRequest.ProtoReflect.Descriptor instead.

func (*SubscriptionsRequest) Do

Do executes the request against the context and client.

func (*SubscriptionsRequest) GetCursor

func (x *SubscriptionsRequest) GetCursor() string

func (*SubscriptionsRequest) GetLimit

func (*SubscriptionsRequest) ProtoMessage

func (*SubscriptionsRequest) ProtoMessage()

func (*SubscriptionsRequest) ProtoReflect

func (x *SubscriptionsRequest) ProtoReflect() protoreflect.Message

func (*SubscriptionsRequest) Reset

func (x *SubscriptionsRequest) Reset()

func (*SubscriptionsRequest) String

func (x *SubscriptionsRequest) String() string

func (*SubscriptionsRequest) WithCursor

func (req *SubscriptionsRequest) WithCursor(cursor string) *SubscriptionsRequest

WithCursor sets the cursor on the request.

func (*SubscriptionsRequest) WithLimit

func (req *SubscriptionsRequest) WithLimit(limit int) *SubscriptionsRequest

WithLimit sets the limit on the request.

type SubscriptionsResponse

type SubscriptionsResponse struct {

	// Stored validated subscriptions.
	ValidatedSubscriptions []*ValidatedSubscription `` /* 127-byte string literal not displayed */
	// The cursor to send when retrieving the next page, if any.
	Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"`
	// The cursor to send when retrieving the previous page, if any.
	PrevCursor string `protobuf:"bytes,3,opt,name=prev_cursor,json=prevCursor,proto3" json:"prev_cursor,omitempty"`
	// contains filtered or unexported fields
}

A list of validated subscriptions stored by Nakama.

func (*SubscriptionsResponse) Descriptor deprecated

func (*SubscriptionsResponse) Descriptor() ([]byte, []int)

Deprecated: Use SubscriptionsResponse.ProtoReflect.Descriptor instead.

func (*SubscriptionsResponse) GetCursor

func (x *SubscriptionsResponse) GetCursor() string

func (*SubscriptionsResponse) GetPrevCursor

func (x *SubscriptionsResponse) GetPrevCursor() string

func (*SubscriptionsResponse) GetValidatedSubscriptions

func (x *SubscriptionsResponse) GetValidatedSubscriptions() []*ValidatedSubscription

func (*SubscriptionsResponse) ProtoMessage

func (*SubscriptionsResponse) ProtoMessage()

func (*SubscriptionsResponse) ProtoReflect

func (x *SubscriptionsResponse) ProtoReflect() protoreflect.Message

func (*SubscriptionsResponse) Reset

func (x *SubscriptionsResponse) Reset()

func (*SubscriptionsResponse) String

func (x *SubscriptionsResponse) String() string

type Test

type Test struct {

	// AString is a test field.
	AString string `protobuf:"bytes,1,opt,name=AString,proto3" json:"AString,omitempty"`
	// AInt is a test int64.
	AInt int64 `protobuf:"varint,2,opt,name=AInt,proto3" json:"AInt,omitempty"`
	// contains filtered or unexported fields
}

func (*Test) Descriptor deprecated

func (*Test) Descriptor() ([]byte, []int)

Deprecated: Use Test.ProtoReflect.Descriptor instead.

func (*Test) GetAInt

func (x *Test) GetAInt() int64

func (*Test) GetAString

func (x *Test) GetAString() string

func (*Test) ProtoMessage

func (*Test) ProtoMessage()

func (*Test) ProtoReflect

func (x *Test) ProtoReflect() protoreflect.Message

func (*Test) Reset

func (x *Test) Reset()

func (*Test) String

func (x *Test) String() string

type Tournament

type Tournament struct {

	// The ID of the tournament.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The title for the tournament.
	Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	// The description of the tournament. May be blank.
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// The category of the tournament. e.g. "vip" could be category 1.
	Category uint32 `protobuf:"varint,4,opt,name=category,proto3" json:"category,omitempty"`
	// ASC (0) or DESC (1) sort mode of scores in the tournament.
	SortOrder uint32 `protobuf:"varint,5,opt,name=sort_order,json=sortOrder,proto3" json:"sort_order,omitempty"`
	// The current number of players in the tournament.
	Size uint32 `protobuf:"varint,6,opt,name=size,proto3" json:"size,omitempty"`
	// The maximum number of players for the tournament.
	MaxSize uint32 `protobuf:"varint,7,opt,name=max_size,json=maxSize,proto3" json:"max_size,omitempty"`
	// The maximum score updates allowed per player for the current tournament.
	MaxNumScore uint32 `protobuf:"varint,8,opt,name=max_num_score,json=maxNumScore,proto3" json:"max_num_score,omitempty"`
	// True if the tournament is active and can enter. A computed value.
	CanEnter bool `protobuf:"varint,9,opt,name=can_enter,json=canEnter,proto3" json:"can_enter,omitempty"`
	// The UNIX time when the tournament stops being active until next reset. A computed value.
	EndActive uint32 `protobuf:"varint,10,opt,name=end_active,json=endActive,proto3" json:"end_active,omitempty"`
	// The UNIX time when the tournament is next playable. A computed value.
	NextReset uint32 `protobuf:"varint,11,opt,name=next_reset,json=nextReset,proto3" json:"next_reset,omitempty"`
	// Additional information stored as a JSON object.
	Metadata string `protobuf:"bytes,12,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament was created.
	CreateTime *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament will start.
	StartTime *timestamppb.Timestamp `protobuf:"bytes,14,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament will be stopped.
	EndTime *timestamppb.Timestamp `protobuf:"bytes,15,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
	// Duration of the tournament in seconds.
	Duration uint32 `protobuf:"varint,16,opt,name=duration,proto3" json:"duration,omitempty"`
	// The UNIX time when the tournament start being active. A computed value.
	StartActive uint32 `protobuf:"varint,17,opt,name=start_active,json=startActive,proto3" json:"start_active,omitempty"`
	// The UNIX time when the tournament was last reset. A computed value.
	PrevReset uint32 `protobuf:"varint,18,opt,name=prev_reset,json=prevReset,proto3" json:"prev_reset,omitempty"`
	// Operator.
	Operator OpType `protobuf:"varint,19,opt,name=operator,proto3,enum=nakama.OpType" json:"operator,omitempty"`
	// Whether the leaderboard was created authoritatively or not.
	Authoritative bool `protobuf:"varint,20,opt,name=authoritative,proto3" json:"authoritative,omitempty"`
	// contains filtered or unexported fields
}

A tournament on the server.

func (*Tournament) Descriptor deprecated

func (*Tournament) Descriptor() ([]byte, []int)

Deprecated: Use Tournament.ProtoReflect.Descriptor instead.

func (*Tournament) GetAuthoritative

func (x *Tournament) GetAuthoritative() bool

func (*Tournament) GetCanEnter

func (x *Tournament) GetCanEnter() bool

func (*Tournament) GetCategory

func (x *Tournament) GetCategory() uint32

func (*Tournament) GetCreateTime

func (x *Tournament) GetCreateTime() *timestamppb.Timestamp

func (*Tournament) GetDescription

func (x *Tournament) GetDescription() string

func (*Tournament) GetDuration

func (x *Tournament) GetDuration() uint32

func (*Tournament) GetEndActive

func (x *Tournament) GetEndActive() uint32

func (*Tournament) GetEndTime

func (x *Tournament) GetEndTime() *timestamppb.Timestamp

func (*Tournament) GetId

func (x *Tournament) GetId() string

func (*Tournament) GetMaxNumScore

func (x *Tournament) GetMaxNumScore() uint32

func (*Tournament) GetMaxSize

func (x *Tournament) GetMaxSize() uint32

func (*Tournament) GetMetadata

func (x *Tournament) GetMetadata() string

func (*Tournament) GetNextReset

func (x *Tournament) GetNextReset() uint32

func (*Tournament) GetOperator

func (x *Tournament) GetOperator() OpType

func (*Tournament) GetPrevReset

func (x *Tournament) GetPrevReset() uint32

func (*Tournament) GetSize

func (x *Tournament) GetSize() uint32

func (*Tournament) GetSortOrder

func (x *Tournament) GetSortOrder() uint32

func (*Tournament) GetStartActive

func (x *Tournament) GetStartActive() uint32

func (*Tournament) GetStartTime

func (x *Tournament) GetStartTime() *timestamppb.Timestamp

func (*Tournament) GetTitle

func (x *Tournament) GetTitle() string

func (*Tournament) ProtoMessage

func (*Tournament) ProtoMessage()

func (*Tournament) ProtoReflect

func (x *Tournament) ProtoReflect() protoreflect.Message

func (*Tournament) Reset

func (x *Tournament) Reset()

func (*Tournament) String

func (x *Tournament) String() string

type TournamentRecordWrite

type TournamentRecordWrite struct {

	// The score value to submit.
	Score int64 `protobuf:"varint,1,opt,name=score,proto3" json:"score,omitempty"`
	// An optional secondary value.
	Subscore int64 `protobuf:"varint,2,opt,name=subscore,proto3" json:"subscore,omitempty"`
	// A JSON object of additional properties (optional).
	Metadata string `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// Operator override.
	Operator OpType `protobuf:"varint,4,opt,name=operator,proto3,enum=nakama.OpType" json:"operator,omitempty"`
	// contains filtered or unexported fields
}

Record values to write.

func (*TournamentRecordWrite) Descriptor deprecated

func (*TournamentRecordWrite) Descriptor() ([]byte, []int)

Deprecated: Use TournamentRecordWrite.ProtoReflect.Descriptor instead.

func (*TournamentRecordWrite) GetMetadata

func (x *TournamentRecordWrite) GetMetadata() string

func (*TournamentRecordWrite) GetOperator

func (x *TournamentRecordWrite) GetOperator() OpType

func (*TournamentRecordWrite) GetScore

func (x *TournamentRecordWrite) GetScore() int64

func (*TournamentRecordWrite) GetSubscore

func (x *TournamentRecordWrite) GetSubscore() int64

func (*TournamentRecordWrite) ProtoMessage

func (*TournamentRecordWrite) ProtoMessage()

func (*TournamentRecordWrite) ProtoReflect

func (x *TournamentRecordWrite) ProtoReflect() protoreflect.Message

func (*TournamentRecordWrite) Reset

func (x *TournamentRecordWrite) Reset()

func (*TournamentRecordWrite) String

func (x *TournamentRecordWrite) String() string

type TournamentRecordsAroundOwnerRequest

type TournamentRecordsAroundOwnerRequest struct {

	// The ID of the tournament to list for.
	TournamentId string `protobuf:"bytes,1,opt,name=tournament_id,json=tournamentId,proto3" json:"tournament_id,omitempty"`
	// Max number of records to return. Between 1 and 100.
	Limit *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=limit,proto3" json:"limit,omitempty"`
	// The owner to retrieve records around.
	OwnerId string `protobuf:"bytes,3,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"`
	// Expiry in seconds (since epoch) to begin fetching records from.
	Expiry *wrapperspb.Int64Value `protobuf:"bytes,4,opt,name=expiry,proto3" json:"expiry,omitempty"`
	// A next or previous page cursor.
	Cursor string `protobuf:"bytes,5,opt,name=cursor,proto3" json:"cursor,omitempty"`
	// contains filtered or unexported fields
}

List tournament records from a given tournament around the owner.

func TournamentRecordsAroundOwner

func TournamentRecordsAroundOwner(tournamentId, ownerId string) *TournamentRecordsAroundOwnerRequest

TournamentRecordsAroundOwner creates a request to retrieve tournament records around owner.

func (*TournamentRecordsAroundOwnerRequest) Async

Async executes the request against the context and client.

func (*TournamentRecordsAroundOwnerRequest) Descriptor deprecated

func (*TournamentRecordsAroundOwnerRequest) Descriptor() ([]byte, []int)

Deprecated: Use TournamentRecordsAroundOwnerRequest.ProtoReflect.Descriptor instead.

func (*TournamentRecordsAroundOwnerRequest) Do

Do executes the request against the context and client.

func (*TournamentRecordsAroundOwnerRequest) GetCursor

func (*TournamentRecordsAroundOwnerRequest) GetExpiry

func (*TournamentRecordsAroundOwnerRequest) GetLimit

func (*TournamentRecordsAroundOwnerRequest) GetOwnerId

func (*TournamentRecordsAroundOwnerRequest) GetTournamentId

func (x *TournamentRecordsAroundOwnerRequest) GetTournamentId() string

func (*TournamentRecordsAroundOwnerRequest) ProtoMessage

func (*TournamentRecordsAroundOwnerRequest) ProtoMessage()

func (*TournamentRecordsAroundOwnerRequest) ProtoReflect

func (*TournamentRecordsAroundOwnerRequest) Reset

func (*TournamentRecordsAroundOwnerRequest) String

func (*TournamentRecordsAroundOwnerRequest) WithExpiry

WithExpiry sets the expiry on the request.

func (*TournamentRecordsAroundOwnerRequest) WithLimit

WithLimit sets the limit on the request.

type TournamentRecordsRequest

type TournamentRecordsRequest struct {

	// The ID of the tournament to list for.
	TournamentId string `protobuf:"bytes,1,opt,name=tournament_id,json=tournamentId,proto3" json:"tournament_id,omitempty"`
	// One or more owners to retrieve records for.
	OwnerIds []string `protobuf:"bytes,2,rep,name=owner_ids,json=ownerIds,proto3" json:"owner_ids,omitempty"`
	// Max number of records to return. Between 1 and 100.
	Limit *wrapperspb.Int32Value `protobuf:"bytes,3,opt,name=limit,proto3" json:"limit,omitempty"`
	// A next or previous page cursor.
	Cursor string `protobuf:"bytes,4,opt,name=cursor,proto3" json:"cursor,omitempty"`
	// Expiry in seconds (since epoch) to begin fetching records from.
	Expiry *wrapperspb.Int64Value `protobuf:"bytes,5,opt,name=expiry,proto3" json:"expiry,omitempty"`
	// contains filtered or unexported fields
}

List tournament records from a given tournament.

func TournamentRecords

func TournamentRecords(tournamentId string) *TournamentRecordsRequest

TournamentRecords creates a request to retrieve tournament records.

func (*TournamentRecordsRequest) Async

Async executes the request against the context and client.

func (*TournamentRecordsRequest) Descriptor deprecated

func (*TournamentRecordsRequest) Descriptor() ([]byte, []int)

Deprecated: Use TournamentRecordsRequest.ProtoReflect.Descriptor instead.

func (*TournamentRecordsRequest) Do

Do executes the request against the context and client.

func (*TournamentRecordsRequest) GetCursor

func (x *TournamentRecordsRequest) GetCursor() string

func (*TournamentRecordsRequest) GetExpiry

func (*TournamentRecordsRequest) GetLimit

func (*TournamentRecordsRequest) GetOwnerIds

func (x *TournamentRecordsRequest) GetOwnerIds() []string

func (*TournamentRecordsRequest) GetTournamentId

func (x *TournamentRecordsRequest) GetTournamentId() string

func (*TournamentRecordsRequest) ProtoMessage

func (*TournamentRecordsRequest) ProtoMessage()

func (*TournamentRecordsRequest) ProtoReflect

func (x *TournamentRecordsRequest) ProtoReflect() protoreflect.Message

func (*TournamentRecordsRequest) Reset

func (x *TournamentRecordsRequest) Reset()

func (*TournamentRecordsRequest) String

func (x *TournamentRecordsRequest) String() string

func (*TournamentRecordsRequest) WithCursor

func (req *TournamentRecordsRequest) WithCursor(cursor string) *TournamentRecordsRequest

WithCursor sets the cursor on the request.

func (*TournamentRecordsRequest) WithExpiry

func (req *TournamentRecordsRequest) WithExpiry(expiry int64) *TournamentRecordsRequest

WithExpiry sets the expiry on the request.

func (*TournamentRecordsRequest) WithLimit

func (req *TournamentRecordsRequest) WithLimit(limit int) *TournamentRecordsRequest

WithLimit sets the limit on the request.

func (*TournamentRecordsRequest) WithOwnerIds

func (req *TournamentRecordsRequest) WithOwnerIds(ownerIds ...string) *TournamentRecordsRequest

WithOwnerIds sets the ownerIds on the request.

type TournamentRecordsResponse

type TournamentRecordsResponse struct {

	// A list of tournament records.
	Records []*LeaderboardRecord `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"`
	// A batched set of tournament records belonging to specified owners.
	OwnerRecords []*LeaderboardRecord `protobuf:"bytes,2,rep,name=owner_records,json=ownerRecords,proto3" json:"owner_records,omitempty"`
	// The cursor to send when retireving the next page (optional).
	NextCursor string `protobuf:"bytes,3,opt,name=next_cursor,json=nextCursor,proto3" json:"next_cursor,omitempty"`
	// The cursor to send when retrieving the previous page (optional).
	PrevCursor string `protobuf:"bytes,4,opt,name=prev_cursor,json=prevCursor,proto3" json:"prev_cursor,omitempty"`
	// contains filtered or unexported fields
}

A set of tournament records which may be part of a tournament records page or a batch of individual records.

func (*TournamentRecordsResponse) Descriptor deprecated

func (*TournamentRecordsResponse) Descriptor() ([]byte, []int)

Deprecated: Use TournamentRecordsResponse.ProtoReflect.Descriptor instead.

func (*TournamentRecordsResponse) GetNextCursor

func (x *TournamentRecordsResponse) GetNextCursor() string

func (*TournamentRecordsResponse) GetOwnerRecords

func (x *TournamentRecordsResponse) GetOwnerRecords() []*LeaderboardRecord

func (*TournamentRecordsResponse) GetPrevCursor

func (x *TournamentRecordsResponse) GetPrevCursor() string

func (*TournamentRecordsResponse) GetRecords

func (x *TournamentRecordsResponse) GetRecords() []*LeaderboardRecord

func (*TournamentRecordsResponse) ProtoMessage

func (*TournamentRecordsResponse) ProtoMessage()

func (*TournamentRecordsResponse) ProtoReflect

func (*TournamentRecordsResponse) Reset

func (x *TournamentRecordsResponse) Reset()

func (*TournamentRecordsResponse) String

func (x *TournamentRecordsResponse) String() string

type TournamentsRequest

type TournamentsRequest struct {

	// The start of the categories to include. Defaults to 0.
	CategoryStart *wrapperspb.UInt32Value `protobuf:"bytes,1,opt,name=category_start,json=categoryStart,proto3" json:"category_start,omitempty"`
	// The end of the categories to include. Defaults to 128.
	CategoryEnd *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=category_end,json=categoryEnd,proto3" json:"category_end,omitempty"`
	// The start time for tournaments. Defaults to epoch.
	StartTime *wrapperspb.UInt32Value `protobuf:"bytes,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	// The end time for tournaments. Defaults to +1 year from current Unix time.
	EndTime *wrapperspb.UInt32Value `protobuf:"bytes,4,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
	// Max number of records to return. Between 1 and 100.
	Limit *wrapperspb.Int32Value `protobuf:"bytes,6,opt,name=limit,proto3" json:"limit,omitempty"`
	// A next page cursor for listings (optional).
	Cursor string `protobuf:"bytes,8,opt,name=cursor,proto3" json:"cursor,omitempty"`
	// contains filtered or unexported fields
}

List active/upcoming tournaments based on given filters.

func Tournaments

func Tournaments() *TournamentsRequest

Tournaments creates a request to retrieve tournaments.

func (*TournamentsRequest) Async

func (req *TournamentsRequest) Async(ctx context.Context, cl *Client, f func(*TournamentsResponse, error))

Async executes the request against the context and client.

func (*TournamentsRequest) Descriptor deprecated

func (*TournamentsRequest) Descriptor() ([]byte, []int)

Deprecated: Use TournamentsRequest.ProtoReflect.Descriptor instead.

func (*TournamentsRequest) Do

Do executes the request against the context and client.

func (*TournamentsRequest) GetCategoryEnd

func (x *TournamentsRequest) GetCategoryEnd() *wrapperspb.UInt32Value

func (*TournamentsRequest) GetCategoryStart

func (x *TournamentsRequest) GetCategoryStart() *wrapperspb.UInt32Value

func (*TournamentsRequest) GetCursor

func (x *TournamentsRequest) GetCursor() string

func (*TournamentsRequest) GetEndTime

func (x *TournamentsRequest) GetEndTime() *wrapperspb.UInt32Value

func (*TournamentsRequest) GetLimit

func (x *TournamentsRequest) GetLimit() *wrapperspb.Int32Value

func (*TournamentsRequest) GetStartTime

func (x *TournamentsRequest) GetStartTime() *wrapperspb.UInt32Value

func (*TournamentsRequest) ProtoMessage

func (*TournamentsRequest) ProtoMessage()

func (*TournamentsRequest) ProtoReflect

func (x *TournamentsRequest) ProtoReflect() protoreflect.Message

func (*TournamentsRequest) Reset

func (x *TournamentsRequest) Reset()

func (*TournamentsRequest) String

func (x *TournamentsRequest) String() string

func (*TournamentsRequest) WithCategoryEnd

func (req *TournamentsRequest) WithCategoryEnd(categoryEnd uint32) *TournamentsRequest

WithCategoryEnd sets the categoryEnd on the request.

func (*TournamentsRequest) WithCategoryStart

func (req *TournamentsRequest) WithCategoryStart(categoryStart uint32) *TournamentsRequest

WithCategoryStart sets the categoryStart on the request.

func (*TournamentsRequest) WithCursor

func (req *TournamentsRequest) WithCursor(cursor string) *TournamentsRequest

WithCursor sets the cursor on the request.

func (*TournamentsRequest) WithEndTime

func (req *TournamentsRequest) WithEndTime(endTime uint32) *TournamentsRequest

WithEndTime sets the endTime on the request.

func (*TournamentsRequest) WithLimit

func (req *TournamentsRequest) WithLimit(limit int) *TournamentsRequest

WithLimit sets the limit on the request.

func (*TournamentsRequest) WithStartTime

func (req *TournamentsRequest) WithStartTime(startTime uint32) *TournamentsRequest

WithStartTime sets the startTime on the request.

type TournamentsResponse

type TournamentsResponse struct {

	// The list of tournaments returned.
	Tournaments []*Tournament `protobuf:"bytes,1,rep,name=tournaments,proto3" json:"tournaments,omitempty"`
	// A pagination cursor (optional).
	Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"`
	// contains filtered or unexported fields
}

A list of tournaments.

func (*TournamentsResponse) Descriptor deprecated

func (*TournamentsResponse) Descriptor() ([]byte, []int)

Deprecated: Use TournamentsResponse.ProtoReflect.Descriptor instead.

func (*TournamentsResponse) GetCursor

func (x *TournamentsResponse) GetCursor() string

func (*TournamentsResponse) GetTournaments

func (x *TournamentsResponse) GetTournaments() []*Tournament

func (*TournamentsResponse) ProtoMessage

func (*TournamentsResponse) ProtoMessage()

func (*TournamentsResponse) ProtoReflect

func (x *TournamentsResponse) ProtoReflect() protoreflect.Message

func (*TournamentsResponse) Reset

func (x *TournamentsResponse) Reset()

func (*TournamentsResponse) String

func (x *TournamentsResponse) String() string

type UnlinkAppleRequest

type UnlinkAppleRequest struct {
	AccountApple
}

UnlinkAppleRequest is a request to remove a Apple token from a user's account.

func UnlinkApple

func UnlinkApple(token string) *UnlinkAppleRequest

UnlinkApple creates a request to remove a Apple token from a user's account.

func (*UnlinkAppleRequest) Async

func (req *UnlinkAppleRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*UnlinkAppleRequest) Do

func (req *UnlinkAppleRequest) Do(ctx context.Context, cl *Client) error

Do executes the request against the context and client.

func (*UnlinkAppleRequest) WithVars

func (req *UnlinkAppleRequest) WithVars(vars map[string]string) *UnlinkAppleRequest

WithVars sets the vars on the request.

type UnlinkCustomRequest

type UnlinkCustomRequest struct {
	AccountCustom
}

UnlinkCustomRequest is a request to remove a custom id from the user's account.

func UnlinkCustom

func UnlinkCustom(id string) *UnlinkCustomRequest

UnlinkCustom creates a request to remove a custom id from the user's account.

func (*UnlinkCustomRequest) Async

func (req *UnlinkCustomRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*UnlinkCustomRequest) Do

func (req *UnlinkCustomRequest) Do(ctx context.Context, cl *Client) error

Do executes the request against the context and client.

func (*UnlinkCustomRequest) WithVars

func (req *UnlinkCustomRequest) WithVars(vars map[string]string) *UnlinkCustomRequest

WithVars sets the vars on the request.

type UnlinkDeviceRequest

type UnlinkDeviceRequest struct {
	AccountDevice
}

UnlinkDeviceRequest is a request to remove a device id from a user's account.

func UnlinkDevice

func UnlinkDevice(id string) *UnlinkDeviceRequest

UnlinkDevice creates a request to remove a device id from a user's account.

func (*UnlinkDeviceRequest) Async

func (req *UnlinkDeviceRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*UnlinkDeviceRequest) Do

func (req *UnlinkDeviceRequest) Do(ctx context.Context, cl *Client) error

Do executes the request against the context and client.

func (*UnlinkDeviceRequest) WithVars

func (req *UnlinkDeviceRequest) WithVars(vars map[string]string) *UnlinkDeviceRequest

WithVars sets the vars on the request.

type UnlinkEmailRequest

type UnlinkEmailRequest struct {
	AccountEmail
}

UnlinkEmailRequest is a request to remove a email/password from a user's account.

func UnlinkEmail

func UnlinkEmail(email, password string) *UnlinkEmailRequest

UnlinkEmail creates a request to remove a email/password from a user's account.

func (*UnlinkEmailRequest) Async

func (req *UnlinkEmailRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*UnlinkEmailRequest) Do

func (req *UnlinkEmailRequest) Do(ctx context.Context, cl *Client) error

Do executes the request against the context and client.

func (*UnlinkEmailRequest) WithVars

func (req *UnlinkEmailRequest) WithVars(vars map[string]string) *UnlinkEmailRequest

WithVars sets the vars on the request.

type UnlinkFacebookInstantGameRequest

type UnlinkFacebookInstantGameRequest struct {
	AccountFacebookInstantGame
}

UnlinkFacebookInstantGameRequest is a request to remove Facebook Instant Game signedPlayerInfo from the user's account.

func UnlinkFacebookInstantGame

func UnlinkFacebookInstantGame(signedPlayerInfo string) *UnlinkFacebookInstantGameRequest

UnlinkFacebookInstantGame creates a request to remove Facebook Instant Game signedPlayerInfo from the user's account.

func (*UnlinkFacebookInstantGameRequest) Async

func (req *UnlinkFacebookInstantGameRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*UnlinkFacebookInstantGameRequest) Do

Do executes the request against the context and client.

func (*UnlinkFacebookInstantGameRequest) WithVars

WithVars sets the vars on the request.

type UnlinkFacebookRequest

type UnlinkFacebookRequest struct {
	AccountFacebook
}

UnlinkFacebookRequest is a request to remove a Facebook token from a user's account.

func UnlinkFacebook

func UnlinkFacebook(token string) *UnlinkFacebookRequest

UnlinkFacebook creates a request to remove a Facebook token from a user's account.

func (*UnlinkFacebookRequest) Async

func (req *UnlinkFacebookRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*UnlinkFacebookRequest) Do

func (req *UnlinkFacebookRequest) Do(ctx context.Context, cl *Client) error

Do executes the request against the context and client.

func (*UnlinkFacebookRequest) WithVars

func (req *UnlinkFacebookRequest) WithVars(vars map[string]string) *UnlinkFacebookRequest

WithVars sets the vars on the request.

type UnlinkGameCenterRequest

type UnlinkGameCenterRequest struct {
	AccountGameCenter
}

UnlinkGameCenterRequest is a request to remove a Apple GameCenter token from a user's account.

func UnlinkGameCenter

func UnlinkGameCenter() *UnlinkGameCenterRequest

UnlinkGameCenter creates a request to remove a Apple GameCenter token from a user's account.

func (*UnlinkGameCenterRequest) Async

func (req *UnlinkGameCenterRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*UnlinkGameCenterRequest) Do

Do executes the request against the context and client.

func (*UnlinkGameCenterRequest) WithBundleId

func (req *UnlinkGameCenterRequest) WithBundleId(bundleId string) *UnlinkGameCenterRequest

WithBundleId sets the bundleId on the request.

func (*UnlinkGameCenterRequest) WithPlayerId

func (req *UnlinkGameCenterRequest) WithPlayerId(playerId string) *UnlinkGameCenterRequest

WithPlayerId sets the playerId on the request.

func (*UnlinkGameCenterRequest) WithPublicKeyUrl

func (req *UnlinkGameCenterRequest) WithPublicKeyUrl(publicKeyUrl string) *UnlinkGameCenterRequest

WithPublicKeyUrl sets the publicKeyUrl on the request.

func (*UnlinkGameCenterRequest) WithSalt

WithSalt sets the salt on the request.

func (*UnlinkGameCenterRequest) WithSignature

func (req *UnlinkGameCenterRequest) WithSignature(signature string) *UnlinkGameCenterRequest

WithSignature sets the signature on the request.

func (*UnlinkGameCenterRequest) WithTimestampSeconds

func (req *UnlinkGameCenterRequest) WithTimestampSeconds(timestampSeconds int64) *UnlinkGameCenterRequest

WithTimestampSeconds sets the timestampSeconds on the request.

func (*UnlinkGameCenterRequest) WithVars

WithVars sets the vars on the request.

type UnlinkGoogleRequest

type UnlinkGoogleRequest struct {
	AccountGoogle
}

UnlinkGoogleRequest is a request to remove a Google token from a user's account.

func UnlinkGoogle

func UnlinkGoogle(token string) *UnlinkGoogleRequest

UnlinkGoogle creates a request to remove a Google token from a user's account.

func (*UnlinkGoogleRequest) Async

func (req *UnlinkGoogleRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*UnlinkGoogleRequest) Do

func (req *UnlinkGoogleRequest) Do(ctx context.Context, cl *Client) error

Do executes the request against the context and client.

func (*UnlinkGoogleRequest) WithVars

func (req *UnlinkGoogleRequest) WithVars(vars map[string]string) *UnlinkGoogleRequest

WithVars sets the vars on the request.

type UnlinkSteamRequest

type UnlinkSteamRequest struct {
	AccountSteam
}

UnlinkSteamRequest is a request to remove a Steam token from a user's account.

func UnlinkSteam

func UnlinkSteam(token string) *UnlinkSteamRequest

UnlinkSteam creates a request to remove a Steam token from a user's account.

func (*UnlinkSteamRequest) Async

func (req *UnlinkSteamRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*UnlinkSteamRequest) Do

func (req *UnlinkSteamRequest) Do(ctx context.Context, cl *Client) error

Do executes the request against the context and client.

func (*UnlinkSteamRequest) WithVars

func (req *UnlinkSteamRequest) WithVars(vars map[string]string) *UnlinkSteamRequest

WithVars sets the vars on the request.

type UpdateAccountRequest

type UpdateAccountRequest struct {

	// The username of the user's account.
	Username *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	// The display name of the user.
	DisplayName *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	// A URL for an avatar image.
	AvatarUrl *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"`
	// The language expected to be a tag which follows the BCP-47 spec.
	LangTag *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=lang_tag,json=langTag,proto3" json:"lang_tag,omitempty"`
	// The location set by the user.
	Location *wrapperspb.StringValue `protobuf:"bytes,5,opt,name=location,proto3" json:"location,omitempty"`
	// The timezone set by the user.
	Timezone *wrapperspb.StringValue `protobuf:"bytes,6,opt,name=timezone,proto3" json:"timezone,omitempty"`
	// contains filtered or unexported fields
}

Update a user's account details.

func UpdateAccount

func UpdateAccount() *UpdateAccountRequest

UpdateAccount creates a request to update the user's account.

func (*UpdateAccountRequest) Async

func (req *UpdateAccountRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*UpdateAccountRequest) Descriptor deprecated

func (*UpdateAccountRequest) Descriptor() ([]byte, []int)

Deprecated: Use UpdateAccountRequest.ProtoReflect.Descriptor instead.

func (*UpdateAccountRequest) Do

func (req *UpdateAccountRequest) Do(ctx context.Context, cl *Client) error

Do executes the request against the context and client.

func (*UpdateAccountRequest) GetAvatarUrl

func (x *UpdateAccountRequest) GetAvatarUrl() *wrapperspb.StringValue

func (*UpdateAccountRequest) GetDisplayName

func (x *UpdateAccountRequest) GetDisplayName() *wrapperspb.StringValue

func (*UpdateAccountRequest) GetLangTag

func (x *UpdateAccountRequest) GetLangTag() *wrapperspb.StringValue

func (*UpdateAccountRequest) GetLocation

func (x *UpdateAccountRequest) GetLocation() *wrapperspb.StringValue

func (*UpdateAccountRequest) GetTimezone

func (x *UpdateAccountRequest) GetTimezone() *wrapperspb.StringValue

func (*UpdateAccountRequest) GetUsername

func (x *UpdateAccountRequest) GetUsername() *wrapperspb.StringValue

func (*UpdateAccountRequest) ProtoMessage

func (*UpdateAccountRequest) ProtoMessage()

func (*UpdateAccountRequest) ProtoReflect

func (x *UpdateAccountRequest) ProtoReflect() protoreflect.Message

func (*UpdateAccountRequest) Reset

func (x *UpdateAccountRequest) Reset()

func (*UpdateAccountRequest) String

func (x *UpdateAccountRequest) String() string

func (*UpdateAccountRequest) WithAvatarUrl

func (req *UpdateAccountRequest) WithAvatarUrl(avatarUrl string) *UpdateAccountRequest

WithAvatarUrl sets the avatarUrl on the request.

func (*UpdateAccountRequest) WithDisplayName

func (req *UpdateAccountRequest) WithDisplayName(displayName string) *UpdateAccountRequest

WithDisplayName sets the displayName on the request.

func (*UpdateAccountRequest) WithLangTag

func (req *UpdateAccountRequest) WithLangTag(langTag string) *UpdateAccountRequest

WithLangTag sets the langTag on the request.

func (*UpdateAccountRequest) WithLocation

func (req *UpdateAccountRequest) WithLocation(location string) *UpdateAccountRequest

WithLocation sets the location on the request.

func (*UpdateAccountRequest) WithTimezone

func (req *UpdateAccountRequest) WithTimezone(timezone string) *UpdateAccountRequest

WithTimezone sets the timezone on the request.

func (*UpdateAccountRequest) WithUsername

func (req *UpdateAccountRequest) WithUsername(username string) *UpdateAccountRequest

WithUsername sets the username on the request.

type UpdateGroupRequest

type UpdateGroupRequest struct {

	// The ID of the group to update.
	GroupId string `protobuf:"bytes,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
	// Name.
	Name *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// Description string.
	Description *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// Lang tag.
	LangTag *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=lang_tag,json=langTag,proto3" json:"lang_tag,omitempty"`
	// Avatar URL.
	AvatarUrl *wrapperspb.StringValue `protobuf:"bytes,5,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"`
	// Open is true if anyone should be allowed to join, or false if joins must be approved by a group admin.
	Open *wrapperspb.BoolValue `protobuf:"bytes,6,opt,name=open,proto3" json:"open,omitempty"`
	// contains filtered or unexported fields
}

Update fields in a given group.

func UpdateGroup

func UpdateGroup(groupId string) *UpdateGroupRequest

UpdateGroup creates a request to update a group.

func (*UpdateGroupRequest) Async

func (req *UpdateGroupRequest) Async(ctx context.Context, cl *Client, f func(error))

Async executes the request against the context and client.

func (*UpdateGroupRequest) Descriptor deprecated

func (*UpdateGroupRequest) Descriptor() ([]byte, []int)

Deprecated: Use UpdateGroupRequest.ProtoReflect.Descriptor instead.

func (*UpdateGroupRequest) Do

func (req *UpdateGroupRequest) Do(ctx context.Context, cl *Client) error

Do executes the request against the context and client.

func (*UpdateGroupRequest) GetAvatarUrl

func (x *UpdateGroupRequest) GetAvatarUrl() *wrapperspb.StringValue

func (*UpdateGroupRequest) GetDescription

func (x *UpdateGroupRequest) GetDescription() *wrapperspb.StringValue

func (*UpdateGroupRequest) GetGroupId

func (x *UpdateGroupRequest) GetGroupId() string

func (*UpdateGroupRequest) GetLangTag

func (x *UpdateGroupRequest) GetLangTag() *wrapperspb.StringValue

func (*UpdateGroupRequest) GetName

func (*UpdateGroupRequest) GetOpen

func (x *UpdateGroupRequest) GetOpen() *wrapperspb.BoolValue

func (*UpdateGroupRequest) ProtoMessage

func (*UpdateGroupRequest) ProtoMessage()

func (*UpdateGroupRequest) ProtoReflect

func (x *UpdateGroupRequest) ProtoReflect() protoreflect.Message

func (*UpdateGroupRequest) Reset

func (x *UpdateGroupRequest) Reset()

func (*UpdateGroupRequest) String

func (x *UpdateGroupRequest) String() string

func (*UpdateGroupRequest) WithAvatarUrl

func (req *UpdateGroupRequest) WithAvatarUrl(avatarUrl string) *UpdateGroupRequest

WithAvatarUrl sets the avatarUrl on the request.

func (*UpdateGroupRequest) WithDescription

func (req *UpdateGroupRequest) WithDescription(description string) *UpdateGroupRequest

WithDescription sets the description on the request.

func (*UpdateGroupRequest) WithLangTag

func (req *UpdateGroupRequest) WithLangTag(langTag string) *UpdateGroupRequest

WithLangTag sets the langTag on the request.

func (*UpdateGroupRequest) WithName

func (req *UpdateGroupRequest) WithName(name string) *UpdateGroupRequest

WithName sets the name on the request.

func (*UpdateGroupRequest) WithOpen

func (req *UpdateGroupRequest) WithOpen(open bool) *UpdateGroupRequest

WithOpen sets the open on the request.

type User

type User struct {

	// The id of the user's account.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The username of the user's account.
	Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	// The display name of the user.
	DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	// A URL for an avatar image.
	AvatarUrl string `protobuf:"bytes,4,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"`
	// The language expected to be a tag which follows the BCP-47 spec.
	LangTag string `protobuf:"bytes,5,opt,name=lang_tag,json=langTag,proto3" json:"lang_tag,omitempty"`
	// The location set by the user.
	Location string `protobuf:"bytes,6,opt,name=location,proto3" json:"location,omitempty"`
	// The timezone set by the user.
	Timezone string `protobuf:"bytes,7,opt,name=timezone,proto3" json:"timezone,omitempty"`
	// Additional information stored as a JSON object.
	Metadata string `protobuf:"bytes,8,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// The Facebook id in the user's account.
	FacebookId string `protobuf:"bytes,9,opt,name=facebook_id,json=facebookId,proto3" json:"facebook_id,omitempty"`
	// The Google id in the user's account.
	GoogleId string `protobuf:"bytes,10,opt,name=google_id,json=googleId,proto3" json:"google_id,omitempty"`
	// The Apple Game Center in of the user's account.
	GamecenterId string `protobuf:"bytes,11,opt,name=gamecenter_id,json=gamecenterId,proto3" json:"gamecenter_id,omitempty"`
	// The Steam id in the user's account.
	SteamId string `protobuf:"bytes,12,opt,name=steam_id,json=steamId,proto3" json:"steam_id,omitempty"`
	// Indicates whether the user is currently online.
	Online bool `protobuf:"varint,13,opt,name=online,proto3" json:"online,omitempty"`
	// Number of related edges to this user.
	EdgeCount int32 `protobuf:"varint,14,opt,name=edge_count,json=edgeCount,proto3" json:"edge_count,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user was created.
	CreateTime *timestamppb.Timestamp `protobuf:"bytes,15,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user was last updated.
	UpdateTime *timestamppb.Timestamp `protobuf:"bytes,16,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
	// The Facebook Instant Game ID in the user's account.
	FacebookInstantGameId string `` /* 129-byte string literal not displayed */
	// The Apple Sign In ID in the user's account.
	AppleId string `protobuf:"bytes,18,opt,name=apple_id,json=appleId,proto3" json:"apple_id,omitempty"`
	// contains filtered or unexported fields
}

A user in the server.

func (*User) Descriptor deprecated

func (*User) Descriptor() ([]byte, []int)

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetAppleId

func (x *User) GetAppleId() string

func (*User) GetAvatarUrl

func (x *User) GetAvatarUrl() string

func (*User) GetCreateTime

func (x *User) GetCreateTime() *timestamppb.Timestamp

func (*User) GetDisplayName

func (x *User) GetDisplayName() string

func (*User) GetEdgeCount

func (x *User) GetEdgeCount() int32

func (*User) GetFacebookId

func (x *User) GetFacebookId() string

func (*User) GetFacebookInstantGameId

func (x *User) GetFacebookInstantGameId() string

func (*User) GetGamecenterId

func (x *User) GetGamecenterId() string

func (*User) GetGoogleId

func (x *User) GetGoogleId() string

func (*User) GetId

func (x *User) GetId() string

func (*User) GetLangTag

func (x *User) GetLangTag() string

func (*User) GetLocation

func (x *User) GetLocation() string

func (*User) GetMetadata

func (x *User) GetMetadata() string

func (*User) GetOnline

func (x *User) GetOnline() bool

func (*User) GetSteamId

func (x *User) GetSteamId() string

func (*User) GetTimezone

func (x *User) GetTimezone() string

func (*User) GetUpdateTime

func (x *User) GetUpdateTime() *timestamppb.Timestamp

func (*User) GetUsername

func (x *User) GetUsername() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

func (x *User) ProtoReflect() protoreflect.Message

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

type UserGroup

type UserGroup struct {

	// Group.
	Group *Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"`
	// The user's relationship to the group. -- use enum UserRoleState
	State *wrapperspb.Int32Value `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"`
	// contains filtered or unexported fields
}

A single group-role pair.

func (*UserGroup) Descriptor deprecated

func (*UserGroup) Descriptor() ([]byte, []int)

Deprecated: Use UserGroup.ProtoReflect.Descriptor instead.

func (*UserGroup) GetGroup

func (x *UserGroup) GetGroup() *Group

func (*UserGroup) GetState

func (x *UserGroup) GetState() *wrapperspb.Int32Value

func (*UserGroup) ProtoMessage

func (*UserGroup) ProtoMessage()

func (*UserGroup) ProtoReflect

func (x *UserGroup) ProtoReflect() protoreflect.Message

func (*UserGroup) Reset

func (x *UserGroup) Reset()

func (*UserGroup) String

func (x *UserGroup) String() string

type UserGroupsRequest

type UserGroupsRequest struct {

	// ID of the user.
	UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// Max number of records to return. Between 1 and 100.
	Limit *wrapperspb.Int32Value `protobuf:"bytes,2,opt,name=limit,proto3" json:"limit,omitempty"`
	// The user group state to list. -- use enum UserRoleState
	State *wrapperspb.Int32Value `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"`
	// An optional next page cursor.
	Cursor string `protobuf:"bytes,4,opt,name=cursor,proto3" json:"cursor,omitempty"`
	// contains filtered or unexported fields
}

List the groups a user is part of, and their relationship to each.

func UserGroups

func UserGroups(userId string) *UserGroupsRequest

UserGroups creates a request to retrieve a user's groups.

func (*UserGroupsRequest) Async

func (req *UserGroupsRequest) Async(ctx context.Context, cl *Client, f func(*UserGroupsResponse, error))

Async executes the request against the context and client.

func (*UserGroupsRequest) Descriptor deprecated

func (*UserGroupsRequest) Descriptor() ([]byte, []int)

Deprecated: Use UserGroupsRequest.ProtoReflect.Descriptor instead.

func (*UserGroupsRequest) Do

Do executes the request against the context and client.

func (*UserGroupsRequest) GetCursor

func (x *UserGroupsRequest) GetCursor() string

func (*UserGroupsRequest) GetLimit

func (x *UserGroupsRequest) GetLimit() *wrapperspb.Int32Value

func (*UserGroupsRequest) GetState

func (x *UserGroupsRequest) GetState() *wrapperspb.Int32Value

func (*UserGroupsRequest) GetUserId

func (x *UserGroupsRequest) GetUserId() string

func (*UserGroupsRequest) ProtoMessage

func (*UserGroupsRequest) ProtoMessage()

func (*UserGroupsRequest) ProtoReflect

func (x *UserGroupsRequest) ProtoReflect() protoreflect.Message

func (*UserGroupsRequest) Reset

func (x *UserGroupsRequest) Reset()

func (*UserGroupsRequest) String

func (x *UserGroupsRequest) String() string

func (*UserGroupsRequest) WithCursor

func (req *UserGroupsRequest) WithCursor(cursor string) *UserGroupsRequest

WithCursor sets the cursor on the request.

func (*UserGroupsRequest) WithLimit

func (req *UserGroupsRequest) WithLimit(limit int) *UserGroupsRequest

WithLimit sets the limit on the request.

func (*UserGroupsRequest) WithState

func (req *UserGroupsRequest) WithState(state UserRoleState) *UserGroupsRequest

WithState sets the state on the request.

type UserGroupsResponse

type UserGroupsResponse struct {

	// Group-role pairs for a user.
	UserGroups []*UserGroup `protobuf:"bytes,1,rep,name=user_groups,json=userGroups,proto3" json:"user_groups,omitempty"`
	// Cursor for the next page of results, if any.
	Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"`
	// contains filtered or unexported fields
}

A list of groups belonging to a user, along with the user's role in each group.

func (*UserGroupsResponse) Descriptor deprecated

func (*UserGroupsResponse) Descriptor() ([]byte, []int)

Deprecated: Use UserGroupsResponse.ProtoReflect.Descriptor instead.

func (*UserGroupsResponse) GetCursor

func (x *UserGroupsResponse) GetCursor() string

func (*UserGroupsResponse) GetUserGroups

func (x *UserGroupsResponse) GetUserGroups() []*UserGroup

func (*UserGroupsResponse) ProtoMessage

func (*UserGroupsResponse) ProtoMessage()

func (*UserGroupsResponse) ProtoReflect

func (x *UserGroupsResponse) ProtoReflect() protoreflect.Message

func (*UserGroupsResponse) Reset

func (x *UserGroupsResponse) Reset()

func (*UserGroupsResponse) String

func (x *UserGroupsResponse) String() string

type UserPresenceMsg

type UserPresenceMsg struct {

	// The user this presence belongs to.
	UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// A unique session ID identifying the particular connection, because the user may have many.
	SessionId string `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	// The username for display purposes.
	Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"`
	// Whether this presence generates persistent data/messages, if applicable for the stream type.
	Persistence bool `protobuf:"varint,4,opt,name=persistence,proto3" json:"persistence,omitempty"`
	// A user-set status message for this stream, if applicable.
	Status *wrapperspb.StringValue `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

A user session associated to a stream, usually through a list operation or a join/leave event.

func UserPresence

func UserPresence() *UserPresenceMsg

UserPresence creates a new realtime user presence message.

func (*UserPresenceMsg) Descriptor deprecated

func (*UserPresenceMsg) Descriptor() ([]byte, []int)

Deprecated: Use UserPresenceMsg.ProtoReflect.Descriptor instead.

func (*UserPresenceMsg) GetPersistence

func (x *UserPresenceMsg) GetPersistence() bool

func (*UserPresenceMsg) GetSessionId

func (x *UserPresenceMsg) GetSessionId() string

func (*UserPresenceMsg) GetStatus

func (x *UserPresenceMsg) GetStatus() *wrapperspb.StringValue

func (*UserPresenceMsg) GetUserId

func (x *UserPresenceMsg) GetUserId() string

func (*UserPresenceMsg) GetUsername

func (x *UserPresenceMsg) GetUsername() string

func (*UserPresenceMsg) ProtoMessage

func (*UserPresenceMsg) ProtoMessage()

func (*UserPresenceMsg) ProtoReflect

func (x *UserPresenceMsg) ProtoReflect() protoreflect.Message

func (*UserPresenceMsg) Reset

func (x *UserPresenceMsg) Reset()

func (*UserPresenceMsg) String

func (x *UserPresenceMsg) String() string

func (*UserPresenceMsg) WithPersistence

func (msg *UserPresenceMsg) WithPersistence(persistence bool) *UserPresenceMsg

WithPersistence sets the persistence on the message.

func (*UserPresenceMsg) WithSessionId

func (msg *UserPresenceMsg) WithSessionId(sessionId string) *UserPresenceMsg

WithSessionId sets the session id on the message.

func (*UserPresenceMsg) WithStatus

func (msg *UserPresenceMsg) WithStatus(status string) *UserPresenceMsg

WithStatus sets the status on the message.

func (*UserPresenceMsg) WithUserId

func (msg *UserPresenceMsg) WithUserId(userId string) *UserPresenceMsg

WithUserId sets the user id on the message.

func (*UserPresenceMsg) WithUsername

func (msg *UserPresenceMsg) WithUsername(username string) *UserPresenceMsg

WithUsername sets the username on the message.

type UserRoleState

type UserRoleState int32

The group role status.

const (
	// The user is a superadmin with full control of the group.
	UserRoleState_SUPERADMIN UserRoleState = 0
	// The user is an admin with additional privileges.
	UserRoleState_ADMIN UserRoleState = 1
	// The user is a regular member.
	UserRoleState_MEMBER UserRoleState = 2
	// The user has requested to join the group
	UserRoleState_JOIN_REQUEST UserRoleState = 3
)

func (UserRoleState) Descriptor

func (UserRoleState) Enum

func (x UserRoleState) Enum() *UserRoleState

func (UserRoleState) EnumDescriptor deprecated

func (UserRoleState) EnumDescriptor() ([]byte, []int)

Deprecated: Use UserRoleState.Descriptor instead.

func (UserRoleState) Number

func (UserRoleState) String

func (x UserRoleState) String() string

func (UserRoleState) Type

type UsersRequest

type UsersRequest struct {

	// The account id of a user.
	Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
	// The account username of a user.
	Usernames []string `protobuf:"bytes,2,rep,name=usernames,proto3" json:"usernames,omitempty"`
	// The Facebook ID of a user.
	FacebookIds []string `protobuf:"bytes,3,rep,name=facebook_ids,json=facebookIds,proto3" json:"facebook_ids,omitempty"`
	// contains filtered or unexported fields
}

Fetch a batch of zero or more users from the server.

func Users

func Users(ids ...string) *UsersRequest

Users creates a request to retrieve users.

func (*UsersRequest) Async

func (req *UsersRequest) Async(ctx context.Context, cl *Client, f func(*UsersResponse, error))

Async executes the request against the context and client.

func (*UsersRequest) Descriptor deprecated

func (*UsersRequest) Descriptor() ([]byte, []int)

Deprecated: Use UsersRequest.ProtoReflect.Descriptor instead.

func (*UsersRequest) Do

func (req *UsersRequest) Do(ctx context.Context, cl *Client) (*UsersResponse, error)

Do executes the request against the context and client.

func (*UsersRequest) GetFacebookIds

func (x *UsersRequest) GetFacebookIds() []string

func (*UsersRequest) GetIds

func (x *UsersRequest) GetIds() []string

func (*UsersRequest) GetUsernames

func (x *UsersRequest) GetUsernames() []string

func (*UsersRequest) ProtoMessage

func (*UsersRequest) ProtoMessage()

func (*UsersRequest) ProtoReflect

func (x *UsersRequest) ProtoReflect() protoreflect.Message

func (*UsersRequest) Reset

func (x *UsersRequest) Reset()

func (*UsersRequest) String

func (x *UsersRequest) String() string

func (*UsersRequest) WithFacebookIds

func (req *UsersRequest) WithFacebookIds(facebookIds ...string) *UsersRequest

WithFacebookIds sets the facebookIds on the request.

func (*UsersRequest) WithUsernames

func (req *UsersRequest) WithUsernames(usernames ...string) *UsersRequest

WithUsernames sets the usernames on the request.

type UsersResponse

type UsersResponse struct {

	// The User objects.
	Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
	// contains filtered or unexported fields
}

A collection of zero or more users.

func (*UsersResponse) Descriptor deprecated

func (*UsersResponse) Descriptor() ([]byte, []int)

Deprecated: Use UsersResponse.ProtoReflect.Descriptor instead.

func (*UsersResponse) GetUsers

func (x *UsersResponse) GetUsers() []*User

func (*UsersResponse) ProtoMessage

func (*UsersResponse) ProtoMessage()

func (*UsersResponse) ProtoReflect

func (x *UsersResponse) ProtoReflect() protoreflect.Message

func (*UsersResponse) Reset

func (x *UsersResponse) Reset()

func (*UsersResponse) String

func (x *UsersResponse) String() string

type ValidatePurchaseAppleRequest

type ValidatePurchaseAppleRequest struct {

	// Base64 encoded Apple receipt data payload.
	Receipt string `protobuf:"bytes,1,opt,name=receipt,proto3" json:"receipt,omitempty"`
	// Persist the purchase
	Persist *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=persist,proto3" json:"persist,omitempty"`
	// contains filtered or unexported fields
}

Apple IAP Purchases validation request

func ValidatePurchaseApple

func ValidatePurchaseApple(receipt string) *ValidatePurchaseAppleRequest

ValidatePurchaseApple creates a request to validate a Apple purchase.

func (*ValidatePurchaseAppleRequest) Async

Async executes the request against the context and client.

func (*ValidatePurchaseAppleRequest) Descriptor deprecated

func (*ValidatePurchaseAppleRequest) Descriptor() ([]byte, []int)

Deprecated: Use ValidatePurchaseAppleRequest.ProtoReflect.Descriptor instead.

func (*ValidatePurchaseAppleRequest) Do

Do executes the request against the context and client.

func (*ValidatePurchaseAppleRequest) GetPersist

func (*ValidatePurchaseAppleRequest) GetReceipt

func (x *ValidatePurchaseAppleRequest) GetReceipt() string

func (*ValidatePurchaseAppleRequest) ProtoMessage

func (*ValidatePurchaseAppleRequest) ProtoMessage()

func (*ValidatePurchaseAppleRequest) ProtoReflect

func (*ValidatePurchaseAppleRequest) Reset

func (x *ValidatePurchaseAppleRequest) Reset()

func (*ValidatePurchaseAppleRequest) String

func (*ValidatePurchaseAppleRequest) WithPersist

WithPersist sets the persist on the request.

type ValidatePurchaseGoogleRequest

type ValidatePurchaseGoogleRequest struct {

	// JSON encoded Google purchase payload.
	Purchase string `protobuf:"bytes,1,opt,name=purchase,proto3" json:"purchase,omitempty"`
	// Persist the purchase
	Persist *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=persist,proto3" json:"persist,omitempty"`
	// contains filtered or unexported fields
}

Google IAP Purchase validation request

func ValidatePurchaseGoogle

func ValidatePurchaseGoogle(purchase string) *ValidatePurchaseGoogleRequest

ValidatePurchaseGoogle creates a request to validate a Google purchase.

func (*ValidatePurchaseGoogleRequest) Async

Async executes the request against the context and client.

func (*ValidatePurchaseGoogleRequest) Descriptor deprecated

func (*ValidatePurchaseGoogleRequest) Descriptor() ([]byte, []int)

Deprecated: Use ValidatePurchaseGoogleRequest.ProtoReflect.Descriptor instead.

func (*ValidatePurchaseGoogleRequest) Do

Do executes the request against the context and client.

func (*ValidatePurchaseGoogleRequest) GetPersist

func (*ValidatePurchaseGoogleRequest) GetPurchase

func (x *ValidatePurchaseGoogleRequest) GetPurchase() string

func (*ValidatePurchaseGoogleRequest) ProtoMessage

func (*ValidatePurchaseGoogleRequest) ProtoMessage()

func (*ValidatePurchaseGoogleRequest) ProtoReflect

func (*ValidatePurchaseGoogleRequest) Reset

func (x *ValidatePurchaseGoogleRequest) Reset()

func (*ValidatePurchaseGoogleRequest) String

func (*ValidatePurchaseGoogleRequest) WithPersist

WithPersist sets the persist on the request.

type ValidatePurchaseHuaweiRequest

type ValidatePurchaseHuaweiRequest struct {

	// JSON encoded Huawei InAppPurchaseData.
	Purchase string `protobuf:"bytes,1,opt,name=purchase,proto3" json:"purchase,omitempty"`
	// InAppPurchaseData signature.
	Signature string `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
	// Persist the purchase
	Persist *wrapperspb.BoolValue `protobuf:"bytes,3,opt,name=persist,proto3" json:"persist,omitempty"`
	// contains filtered or unexported fields
}

Huawei IAP Purchase validation request

func ValidatePurchaseHuawei

func ValidatePurchaseHuawei(purchase, signature string) *ValidatePurchaseHuaweiRequest

ValidatePurchaseHuawei creates a request to validate a Huawei purchase.

func (*ValidatePurchaseHuaweiRequest) Async

Async executes the request against the context and client.

func (*ValidatePurchaseHuaweiRequest) Descriptor deprecated

func (*ValidatePurchaseHuaweiRequest) Descriptor() ([]byte, []int)

Deprecated: Use ValidatePurchaseHuaweiRequest.ProtoReflect.Descriptor instead.

func (*ValidatePurchaseHuaweiRequest) Do

Do executes the request against the context and client.

func (*ValidatePurchaseHuaweiRequest) GetPersist

func (*ValidatePurchaseHuaweiRequest) GetPurchase

func (x *ValidatePurchaseHuaweiRequest) GetPurchase() string

func (*ValidatePurchaseHuaweiRequest) GetSignature

func (x *ValidatePurchaseHuaweiRequest) GetSignature() string

func (*ValidatePurchaseHuaweiRequest) ProtoMessage

func (*ValidatePurchaseHuaweiRequest) ProtoMessage()

func (*ValidatePurchaseHuaweiRequest) ProtoReflect

func (*ValidatePurchaseHuaweiRequest) Reset

func (x *ValidatePurchaseHuaweiRequest) Reset()

func (*ValidatePurchaseHuaweiRequest) String

func (*ValidatePurchaseHuaweiRequest) WithPersist

WithPersist sets the persist on the request.

type ValidatePurchaseResponse

type ValidatePurchaseResponse struct {

	// Newly seen validated purchases.
	ValidatedPurchases []*ValidatedPurchase `protobuf:"bytes,1,rep,name=validated_purchases,json=validatedPurchases,proto3" json:"validated_purchases,omitempty"`
	// contains filtered or unexported fields
}

Validate IAP response.

func (*ValidatePurchaseResponse) Descriptor deprecated

func (*ValidatePurchaseResponse) Descriptor() ([]byte, []int)

Deprecated: Use ValidatePurchaseResponse.ProtoReflect.Descriptor instead.

func (*ValidatePurchaseResponse) GetValidatedPurchases

func (x *ValidatePurchaseResponse) GetValidatedPurchases() []*ValidatedPurchase

func (*ValidatePurchaseResponse) ProtoMessage

func (*ValidatePurchaseResponse) ProtoMessage()

func (*ValidatePurchaseResponse) ProtoReflect

func (x *ValidatePurchaseResponse) ProtoReflect() protoreflect.Message

func (*ValidatePurchaseResponse) Reset

func (x *ValidatePurchaseResponse) Reset()

func (*ValidatePurchaseResponse) String

func (x *ValidatePurchaseResponse) String() string

type ValidateSubscriptionAppleRequest

type ValidateSubscriptionAppleRequest struct {

	// Base64 encoded Apple receipt data payload.
	Receipt string `protobuf:"bytes,1,opt,name=receipt,proto3" json:"receipt,omitempty"`
	// Persist the subscription.
	Persist *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=persist,proto3" json:"persist,omitempty"`
	// contains filtered or unexported fields
}

Apple Subscription validation request

func ValidateSubscriptionApple

func ValidateSubscriptionApple(receipt string) *ValidateSubscriptionAppleRequest

ValidateSubscriptionApple creates a request to validate Apple subscriptions.

func (*ValidateSubscriptionAppleRequest) Async

Async executes the request against the context and client.

func (*ValidateSubscriptionAppleRequest) Descriptor deprecated

func (*ValidateSubscriptionAppleRequest) Descriptor() ([]byte, []int)

Deprecated: Use ValidateSubscriptionAppleRequest.ProtoReflect.Descriptor instead.

func (*ValidateSubscriptionAppleRequest) Do

Do executes the request against the context and client.

func (*ValidateSubscriptionAppleRequest) GetPersist

func (*ValidateSubscriptionAppleRequest) GetReceipt

func (x *ValidateSubscriptionAppleRequest) GetReceipt() string

func (*ValidateSubscriptionAppleRequest) ProtoMessage

func (*ValidateSubscriptionAppleRequest) ProtoMessage()

func (*ValidateSubscriptionAppleRequest) ProtoReflect

func (*ValidateSubscriptionAppleRequest) Reset

func (*ValidateSubscriptionAppleRequest) String

func (*ValidateSubscriptionAppleRequest) WithPersist

WithPersist sets the persist on the request.

type ValidateSubscriptionGoogleRequest

type ValidateSubscriptionGoogleRequest struct {

	// JSON encoded Google purchase payload.
	Receipt string `protobuf:"bytes,1,opt,name=receipt,proto3" json:"receipt,omitempty"`
	// Persist the subscription.
	Persist *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=persist,proto3" json:"persist,omitempty"`
	// contains filtered or unexported fields
}

Google Subscription validation request

func ValidateSubscriptionGoogle

func ValidateSubscriptionGoogle(receipt string) *ValidateSubscriptionGoogleRequest

ValidateSubscriptionGoogle creates a request to validate a Google subscription.

func (*ValidateSubscriptionGoogleRequest) Async

Async executes the request against the context and client.

func (*ValidateSubscriptionGoogleRequest) Descriptor deprecated

func (*ValidateSubscriptionGoogleRequest) Descriptor() ([]byte, []int)

Deprecated: Use ValidateSubscriptionGoogleRequest.ProtoReflect.Descriptor instead.

func (*ValidateSubscriptionGoogleRequest) Do

Do executes the request against the context and client.

func (*ValidateSubscriptionGoogleRequest) GetPersist

func (*ValidateSubscriptionGoogleRequest) GetReceipt

func (x *ValidateSubscriptionGoogleRequest) GetReceipt() string

func (*ValidateSubscriptionGoogleRequest) ProtoMessage

func (*ValidateSubscriptionGoogleRequest) ProtoMessage()

func (*ValidateSubscriptionGoogleRequest) ProtoReflect

func (*ValidateSubscriptionGoogleRequest) Reset

func (*ValidateSubscriptionGoogleRequest) String

func (*ValidateSubscriptionGoogleRequest) WithPersist

WithPersist sets the persist on the request.

type ValidateSubscriptionResponse

type ValidateSubscriptionResponse struct {
	ValidatedSubscription *ValidatedSubscription `protobuf:"bytes,1,opt,name=validated_subscription,json=validatedSubscription,proto3" json:"validated_subscription,omitempty"`
	// contains filtered or unexported fields
}

Validate Subscription response.

func (*ValidateSubscriptionResponse) Descriptor deprecated

func (*ValidateSubscriptionResponse) Descriptor() ([]byte, []int)

Deprecated: Use ValidateSubscriptionResponse.ProtoReflect.Descriptor instead.

func (*ValidateSubscriptionResponse) GetValidatedSubscription

func (x *ValidateSubscriptionResponse) GetValidatedSubscription() *ValidatedSubscription

func (*ValidateSubscriptionResponse) ProtoMessage

func (*ValidateSubscriptionResponse) ProtoMessage()

func (*ValidateSubscriptionResponse) ProtoReflect

func (*ValidateSubscriptionResponse) Reset

func (x *ValidateSubscriptionResponse) Reset()

func (*ValidateSubscriptionResponse) String

type ValidatedPurchase

type ValidatedPurchase struct {

	// Purchase User ID.
	UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// Purchase Product ID.
	ProductId string `protobuf:"bytes,2,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"`
	// Purchase Transaction ID.
	TransactionId string `protobuf:"bytes,3,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"`
	// Store identifier
	Store StoreProvider `protobuf:"varint,4,opt,name=store,proto3,enum=nakama.StoreProvider" json:"store,omitempty"`
	// Timestamp when the purchase was done.
	PurchaseTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=purchase_time,json=purchaseTime,proto3" json:"purchase_time,omitempty"`
	// Timestamp when the receipt validation was stored in DB.
	CreateTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// Timestamp when the receipt validation was updated in DB.
	UpdateTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
	// Timestamp when the purchase was refunded. Set to UNIX
	RefundTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=refund_time,json=refundTime,proto3" json:"refund_time,omitempty"`
	// Raw provider validation response.
	ProviderResponse string `protobuf:"bytes,9,opt,name=provider_response,json=providerResponse,proto3" json:"provider_response,omitempty"`
	// Whether the purchase was done in production or sandbox environment.
	Environment StoreEnvironment `protobuf:"varint,10,opt,name=environment,proto3,enum=nakama.StoreEnvironment" json:"environment,omitempty"`
	// Whether the purchase had already been validated by Nakama before.
	SeenBefore bool `protobuf:"varint,11,opt,name=seen_before,json=seenBefore,proto3" json:"seen_before,omitempty"`
	// contains filtered or unexported fields
}

Validated Purchase stored by Nakama.

func (*ValidatedPurchase) Descriptor deprecated

func (*ValidatedPurchase) Descriptor() ([]byte, []int)

Deprecated: Use ValidatedPurchase.ProtoReflect.Descriptor instead.

func (*ValidatedPurchase) GetCreateTime

func (x *ValidatedPurchase) GetCreateTime() *timestamppb.Timestamp

func (*ValidatedPurchase) GetEnvironment

func (x *ValidatedPurchase) GetEnvironment() StoreEnvironment

func (*ValidatedPurchase) GetProductId

func (x *ValidatedPurchase) GetProductId() string

func (*ValidatedPurchase) GetProviderResponse

func (x *ValidatedPurchase) GetProviderResponse() string

func (*ValidatedPurchase) GetPurchaseTime

func (x *ValidatedPurchase) GetPurchaseTime() *timestamppb.Timestamp

func (*ValidatedPurchase) GetRefundTime

func (x *ValidatedPurchase) GetRefundTime() *timestamppb.Timestamp

func (*ValidatedPurchase) GetSeenBefore

func (x *ValidatedPurchase) GetSeenBefore() bool

func (*ValidatedPurchase) GetStore

func (x *ValidatedPurchase) GetStore() StoreProvider

func (*ValidatedPurchase) GetTransactionId

func (x *ValidatedPurchase) GetTransactionId() string

func (*ValidatedPurchase) GetUpdateTime

func (x *ValidatedPurchase) GetUpdateTime() *timestamppb.Timestamp

func (*ValidatedPurchase) GetUserId

func (x *ValidatedPurchase) GetUserId() string

func (*ValidatedPurchase) ProtoMessage

func (*ValidatedPurchase) ProtoMessage()

func (*ValidatedPurchase) ProtoReflect

func (x *ValidatedPurchase) ProtoReflect() protoreflect.Message

func (*ValidatedPurchase) Reset

func (x *ValidatedPurchase) Reset()

func (*ValidatedPurchase) String

func (x *ValidatedPurchase) String() string

type ValidatedSubscription

type ValidatedSubscription struct {

	// Subscription User ID.
	UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// Purchase Product ID.
	ProductId string `protobuf:"bytes,2,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"`
	// Purchase Original transaction ID (we only keep track of the original subscription, not subsequent renewals).
	OriginalTransactionId string `` /* 126-byte string literal not displayed */
	// Store identifier
	Store StoreProvider `protobuf:"varint,4,opt,name=store,proto3,enum=nakama.StoreProvider" json:"store,omitempty"`
	// UNIX Timestamp when the purchase was done.
	PurchaseTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=purchase_time,json=purchaseTime,proto3" json:"purchase_time,omitempty"`
	// UNIX Timestamp when the receipt validation was stored in DB.
	CreateTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// UNIX Timestamp when the receipt validation was updated in DB.
	UpdateTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
	// Whether the purchase was done in production or sandbox environment.
	Environment StoreEnvironment `protobuf:"varint,8,opt,name=environment,proto3,enum=nakama.StoreEnvironment" json:"environment,omitempty"`
	// Subscription expiration time. The subscription can still be auto-renewed to extend the expiration time further.
	ExpiryTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=expiry_time,json=expiryTime,proto3" json:"expiry_time,omitempty"`
	// Subscription refund time. If this time is set, the subscription was refunded.
	RefundTime *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=refund_time,json=refundTime,proto3" json:"refund_time,omitempty"`
	// Raw provider validation response body.
	ProviderResponse string `protobuf:"bytes,11,opt,name=provider_response,json=providerResponse,proto3" json:"provider_response,omitempty"`
	// Raw provider notification body.
	ProviderNotification string `protobuf:"bytes,12,opt,name=provider_notification,json=providerNotification,proto3" json:"provider_notification,omitempty"`
	// Whether the subscription is currently active or not.
	Active bool `protobuf:"varint,13,opt,name=active,proto3" json:"active,omitempty"`
	// contains filtered or unexported fields
}

func (*ValidatedSubscription) Descriptor deprecated

func (*ValidatedSubscription) Descriptor() ([]byte, []int)

Deprecated: Use ValidatedSubscription.ProtoReflect.Descriptor instead.

func (*ValidatedSubscription) GetActive

func (x *ValidatedSubscription) GetActive() bool

func (*ValidatedSubscription) GetCreateTime

func (x *ValidatedSubscription) GetCreateTime() *timestamppb.Timestamp

func (*ValidatedSubscription) GetEnvironment

func (x *ValidatedSubscription) GetEnvironment() StoreEnvironment

func (*ValidatedSubscription) GetExpiryTime

func (x *ValidatedSubscription) GetExpiryTime() *timestamppb.Timestamp

func (*ValidatedSubscription) GetOriginalTransactionId

func (x *ValidatedSubscription) GetOriginalTransactionId() string

func (*ValidatedSubscription) GetProductId

func (x *ValidatedSubscription) GetProductId() string

func (*ValidatedSubscription) GetProviderNotification

func (x *ValidatedSubscription) GetProviderNotification() string

func (*ValidatedSubscription) GetProviderResponse

func (x *ValidatedSubscription) GetProviderResponse() string

func (*ValidatedSubscription) GetPurchaseTime

func (x *ValidatedSubscription) GetPurchaseTime() *timestamppb.Timestamp

func (*ValidatedSubscription) GetRefundTime

func (x *ValidatedSubscription) GetRefundTime() *timestamppb.Timestamp

func (*ValidatedSubscription) GetStore

func (x *ValidatedSubscription) GetStore() StoreProvider

func (*ValidatedSubscription) GetUpdateTime

func (x *ValidatedSubscription) GetUpdateTime() *timestamppb.Timestamp

func (*ValidatedSubscription) GetUserId

func (x *ValidatedSubscription) GetUserId() string

func (*ValidatedSubscription) ProtoMessage

func (*ValidatedSubscription) ProtoMessage()

func (*ValidatedSubscription) ProtoReflect

func (x *ValidatedSubscription) ProtoReflect() protoreflect.Message

func (*ValidatedSubscription) Reset

func (x *ValidatedSubscription) Reset()

func (*ValidatedSubscription) String

func (x *ValidatedSubscription) String() string

type WriteLeaderboardRecordRequest

type WriteLeaderboardRecordRequest struct {

	// The ID of the leaderboard to write to.
	LeaderboardId string `protobuf:"bytes,1,opt,name=leaderboard_id,json=leaderboardId,proto3" json:"leaderboard_id,omitempty"`
	// Record input.
	Record *LeaderboardRecordWrite `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"`
	// contains filtered or unexported fields
}

A request to submit a score to a leaderboard.

func WriteLeaderboardRecord

func WriteLeaderboardRecord(leaderboardId string) *WriteLeaderboardRecordRequest

WriteLeaderboardRecord creates a request to write a leaderboard record.

func (*WriteLeaderboardRecordRequest) Async

Async executes the request against the context and client.

func (*WriteLeaderboardRecordRequest) Descriptor deprecated

func (*WriteLeaderboardRecordRequest) Descriptor() ([]byte, []int)

Deprecated: Use WriteLeaderboardRecordRequest.ProtoReflect.Descriptor instead.

func (*WriteLeaderboardRecordRequest) Do

Do executes the request against the context and client.

func (*WriteLeaderboardRecordRequest) GetLeaderboardId

func (x *WriteLeaderboardRecordRequest) GetLeaderboardId() string

func (*WriteLeaderboardRecordRequest) GetRecord

func (*WriteLeaderboardRecordRequest) ProtoMessage

func (*WriteLeaderboardRecordRequest) ProtoMessage()

func (*WriteLeaderboardRecordRequest) ProtoReflect

func (*WriteLeaderboardRecordRequest) Reset

func (x *WriteLeaderboardRecordRequest) Reset()

func (*WriteLeaderboardRecordRequest) String

func (*WriteLeaderboardRecordRequest) WithMetadata

WithMetadata sets the metadata on the request.

func (*WriteLeaderboardRecordRequest) WithOperator

WithOperator sets the operator on the request.

func (*WriteLeaderboardRecordRequest) WithScore

WithScore sets the score on the request.

func (*WriteLeaderboardRecordRequest) WithSubscore

WithSubscore sets the subscore on the request.

type WriteLeaderboardRecordResponse

type WriteLeaderboardRecordResponse = LeaderboardRecord

WriteLeaderboardRecordResponse is the WriteLeaderboardRecord response.

type WriteStorageObject

type WriteStorageObject struct {

	// The collection to store the object.
	Collection string `protobuf:"bytes,1,opt,name=collection,proto3" json:"collection,omitempty"`
	// The key for the object within the collection.
	Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	// The value of the object.
	Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	// The version hash of the object to check. Possible values are: ["", "*", "#hash#"].
	Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` // if-match and if-none-match
	// The read access permissions for the object.
	PermissionRead *wrapperspb.Int32Value `protobuf:"bytes,5,opt,name=permission_read,json=permissionRead,proto3" json:"permission_read,omitempty"`
	// The write access permissions for the object.
	PermissionWrite *wrapperspb.Int32Value `protobuf:"bytes,6,opt,name=permission_write,json=permissionWrite,proto3" json:"permission_write,omitempty"`
	// contains filtered or unexported fields
}

The object to store.

func (*WriteStorageObject) Descriptor deprecated

func (*WriteStorageObject) Descriptor() ([]byte, []int)

Deprecated: Use WriteStorageObject.ProtoReflect.Descriptor instead.

func (*WriteStorageObject) GetCollection

func (x *WriteStorageObject) GetCollection() string

func (*WriteStorageObject) GetKey

func (x *WriteStorageObject) GetKey() string

func (*WriteStorageObject) GetPermissionRead

func (x *WriteStorageObject) GetPermissionRead() *wrapperspb.Int32Value

func (*WriteStorageObject) GetPermissionWrite

func (x *WriteStorageObject) GetPermissionWrite() *wrapperspb.Int32Value

func (*WriteStorageObject) GetValue

func (x *WriteStorageObject) GetValue() string

func (*WriteStorageObject) GetVersion

func (x *WriteStorageObject) GetVersion() string

func (*WriteStorageObject) ProtoMessage

func (*WriteStorageObject) ProtoMessage()

func (*WriteStorageObject) ProtoReflect

func (x *WriteStorageObject) ProtoReflect() protoreflect.Message

func (*WriteStorageObject) Reset

func (x *WriteStorageObject) Reset()

func (*WriteStorageObject) String

func (x *WriteStorageObject) String() string

type WriteStorageObjectsRequest

type WriteStorageObjectsRequest struct {

	// The objects to store on the server.
	Objects []*WriteStorageObject `protobuf:"bytes,1,rep,name=objects,proto3" json:"objects,omitempty"`
	// contains filtered or unexported fields
}

Write objects to the storage engine.

func WriteStorageObjects

func WriteStorageObjects() *WriteStorageObjectsRequest

WriteStorageObjects creates a request to write storage objects.

func (*WriteStorageObjectsRequest) Async

Async executes the request against the context and client.

func (*WriteStorageObjectsRequest) Descriptor deprecated

func (*WriteStorageObjectsRequest) Descriptor() ([]byte, []int)

Deprecated: Use WriteStorageObjectsRequest.ProtoReflect.Descriptor instead.

func (*WriteStorageObjectsRequest) Do

Do executes the request against the context and client.

func (*WriteStorageObjectsRequest) GetObjects

func (*WriteStorageObjectsRequest) ProtoMessage

func (*WriteStorageObjectsRequest) ProtoMessage()

func (*WriteStorageObjectsRequest) ProtoReflect

func (*WriteStorageObjectsRequest) Reset

func (x *WriteStorageObjectsRequest) Reset()

func (*WriteStorageObjectsRequest) String

func (x *WriteStorageObjectsRequest) String() string

func (*WriteStorageObjectsRequest) WithObject

WithObject sets the object on the request.

type WriteStorageObjectsResponse

type WriteStorageObjectsResponse struct {

	// Batch of storage write acknowledgements.
	Acks []*StorageObjectAck `protobuf:"bytes,1,rep,name=acks,proto3" json:"acks,omitempty"`
	// contains filtered or unexported fields
}

Batch of acknowledgements for the storage object write.

func (*WriteStorageObjectsResponse) Descriptor deprecated

func (*WriteStorageObjectsResponse) Descriptor() ([]byte, []int)

Deprecated: Use WriteStorageObjectsResponse.ProtoReflect.Descriptor instead.

func (*WriteStorageObjectsResponse) GetAcks

func (*WriteStorageObjectsResponse) ProtoMessage

func (*WriteStorageObjectsResponse) ProtoMessage()

func (*WriteStorageObjectsResponse) ProtoReflect

func (*WriteStorageObjectsResponse) Reset

func (x *WriteStorageObjectsResponse) Reset()

func (*WriteStorageObjectsResponse) String

func (x *WriteStorageObjectsResponse) String() string

type WriteTournamentRecordRequest

type WriteTournamentRecordRequest struct {

	// The tournament ID to write the record for.
	TournamentId string `protobuf:"bytes,1,opt,name=tournament_id,json=tournamentId,proto3" json:"tournament_id,omitempty"`
	// Record input.
	Record *TournamentRecordWrite `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"`
	// contains filtered or unexported fields
}

A request to submit a score to a tournament.

func WriteTournamentRecord

func WriteTournamentRecord(tournamentId string) *WriteTournamentRecordRequest

WriteTournamentRecord creates a request to write a tournament record.

func (*WriteTournamentRecordRequest) Async

Async executes the request against the context and client.

func (*WriteTournamentRecordRequest) Descriptor deprecated

func (*WriteTournamentRecordRequest) Descriptor() ([]byte, []int)

Deprecated: Use WriteTournamentRecordRequest.ProtoReflect.Descriptor instead.

func (*WriteTournamentRecordRequest) Do

Do executes the request against the context and client.

func (*WriteTournamentRecordRequest) GetRecord

func (*WriteTournamentRecordRequest) GetTournamentId

func (x *WriteTournamentRecordRequest) GetTournamentId() string

func (*WriteTournamentRecordRequest) ProtoMessage

func (*WriteTournamentRecordRequest) ProtoMessage()

func (*WriteTournamentRecordRequest) ProtoReflect

func (*WriteTournamentRecordRequest) Reset

func (x *WriteTournamentRecordRequest) Reset()

func (*WriteTournamentRecordRequest) String

func (*WriteTournamentRecordRequest) WithMetadata

WithMetadata sets the metadata on the request.

func (*WriteTournamentRecordRequest) WithOperator

WithOperator sets the operator on the request.

func (*WriteTournamentRecordRequest) WithScore

WithScore sets the score on the request.

func (*WriteTournamentRecordRequest) WithSubscore

WithSubscore sets the subscore on the request.

type WriteTournamentRecordResponse

type WriteTournamentRecordResponse = LeaderboardRecord

WriteTournamentRecordResponse is the WriteTournamentRecord response.

Directories

Path Synopsis
apitest module

Jump to

Keyboard shortcuts

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