Files
rudder-module-go/abi/abi_gen.go
T
2026-09-24 17:59:23 +03:00

1191 lines
32 KiB
Go

// Code generated by apigen. DO NOT EDIT.
package abi
import "encoding/json"
const ABIVersion = "rudder_v1"
const (
OpCatalogActive = "catalog.active"
OpCatalogGet = "catalog.get"
OpCatalogList = "catalog.list"
OpCounterAdd = "counter.add"
OpCounterAggregate = "counter.aggregate"
OpCounterGet = "counter.get"
OpCounterList = "counter.list"
OpCounterSet = "counter.set"
OpCounterWindows = "counter.windows"
OpDataExec = "data.exec"
OpDocDelete = "doc.delete"
OpDocGet = "doc.get"
OpDocList = "doc.list"
OpDocPut = "doc.put"
OpDocUpsert = "doc.upsert"
OpEventsEmit = "events.emit"
OpInventoryConsume = "inventory.consume"
OpInventoryGet = "inventory.get"
OpInventoryGrant = "inventory.grant"
OpInventoryHas = "inventory.has"
OpInventoryList = "inventory.list"
OpLedgerBalance = "ledger.balance"
OpLedgerBalances = "ledger.balances"
OpLedgerCredit = "ledger.credit"
OpLedgerDebit = "ledger.debit"
OpLedgerHistory = "ledger.history"
OpModulesCall = "modules.call"
OpProjectStorageGet = "projectStorage.get"
OpProjectStorageSet = "projectStorage.set"
OpQueueLength = "queue.length"
OpQueuePeek = "queue.peek"
OpQueuePop = "queue.pop"
OpQueuePush = "queue.push"
OpQueueRemove = "queue.remove"
OpRegenFill = "regen.fill"
OpRegenGet = "regen.get"
OpRegenRefill = "regen.refill"
OpRegenSpend = "regen.spend"
OpRewardGrant = "reward.grant"
OpSegmentsBucket = "segments.bucket"
OpSegmentsMatch = "segments.match"
OpSortedSetAmong = "sortedSet.among"
OpSortedSetAround = "sortedSet.around"
OpSortedSetInfo = "sortedSet.info"
OpSortedSetPage = "sortedSet.page"
OpSortedSetPrevious = "sortedSet.previous"
OpSortedSetRank = "sortedSet.rank"
OpSortedSetRemove = "sortedSet.remove"
OpSortedSetReset = "sortedSet.reset"
OpSortedSetSubmit = "sortedSet.submit"
OpStorageGet = "storage.get"
OpStorageSet = "storage.set"
OpTimerArm = "timer.arm"
OpTimerDisarm = "timer.disarm"
OpTimerPeek = "timer.peek"
)
const (
ErrorCodeCallDepthExceeded = "call_depth_exceeded"
ErrorCodeCatalogInvalidField = "catalog_invalid_field"
ErrorCodeCatalogNotFound = "catalog_not_found"
ErrorCodeCatalogRefInvalid = "catalog_ref_invalid"
ErrorCodeCounterAboveMax = "counter_above_max"
ErrorCodeCounterBelowMin = "counter_below_min"
ErrorCodeCurrencyUnknown = "currency_unknown"
ErrorCodeDependencyNotDeclared = "dependency_not_declared"
ErrorCodeFunctionNotCallable = "function_not_callable"
ErrorCodeFunctionNotFound = "function_not_found"
ErrorCodeInsufficientFunds = "insufficient_funds"
ErrorCodeInsufficientItems = "insufficient_items"
ErrorCodeInternal = "internal"
ErrorCodeInvalidParameters = "invalid_parameters"
ErrorCodeModuleNotInstalled = "module_not_installed"
ErrorCodePlayerNotFound = "player_not_found"
ErrorCodePlayerRequired = "player_required"
ErrorCodePrimitiveNotDeclared = "primitive_not_declared"
ErrorCodeRegenInsufficient = "regen_insufficient"
ErrorCodeReservedEvent = "reserved_event"
ErrorCodeSortedSetOrderChanged = "sorted_set_order_changed"
ErrorCodeStorageKeyLimitExceeded = "storage_key_limit_exceeded"
ErrorCodeUnknownOperation = "unknown_operation"
ErrorCodeVersionConflict = "version_conflict"
)
var ErrorCodes = []string{
ErrorCodeCallDepthExceeded,
ErrorCodeCatalogInvalidField,
ErrorCodeCatalogNotFound,
ErrorCodeCatalogRefInvalid,
ErrorCodeCounterAboveMax,
ErrorCodeCounterBelowMin,
ErrorCodeCurrencyUnknown,
ErrorCodeDependencyNotDeclared,
ErrorCodeFunctionNotCallable,
ErrorCodeFunctionNotFound,
ErrorCodeInsufficientFunds,
ErrorCodeInsufficientItems,
ErrorCodeInternal,
ErrorCodeInvalidParameters,
ErrorCodeModuleNotInstalled,
ErrorCodePlayerNotFound,
ErrorCodePlayerRequired,
ErrorCodePrimitiveNotDeclared,
ErrorCodeRegenInsufficient,
ErrorCodeReservedEvent,
ErrorCodeSortedSetOrderChanged,
ErrorCodeStorageKeyLimitExceeded,
ErrorCodeUnknownOperation,
ErrorCodeVersionConflict,
}
type Amount struct {
Amount int64 `json:"amount"`
Currency string `json:"currency"`
}
type CallResponse struct {
Error *ErrorBody `json:"error,omitempty"`
Result json.RawMessage `json:"result,omitempty"`
}
type Context struct {
Config json.RawMessage `json:"config"`
Environment string `json:"environment"`
Module string `json:"module"`
Now string `json:"now"`
Player *Player `json:"player"`
Trigger string `json:"trigger"`
}
type CounterEntry struct {
Key string `json:"key"`
Value int64 `json:"value"`
}
type CounterWindow struct {
UpdatedAt string `json:"updatedAt"`
Value int64 `json:"value"`
Window string `json:"window"`
}
type Describe struct {
DataHash string `json:"dataHash,omitempty"`
Functions []DescribedFunction `json:"functions"`
}
type DescribedFunction struct {
Errors []string `json:"errors"`
Input json.RawMessage `json:"input"`
Name string `json:"name"`
Output json.RawMessage `json:"output"`
}
type DocEntry struct {
Key string `json:"key"`
UpdatedAt string `json:"updatedAt"`
Value json.RawMessage `json:"value"`
Version int64 `json:"version"`
}
type ErrorBody struct {
Code string `json:"code"`
Message string `json:"message"`
}
type Input struct {
Arguments json.RawMessage `json:"args"`
Context Context `json:"context"`
Function string `json:"fn"`
}
type LedgerEntry struct {
Amount int64 `json:"amount"`
BalanceAfter int64 `json:"balanceAfter"`
CreatedAt string `json:"createdAt"`
Currency string `json:"currency"`
ID string `json:"id"`
Reason string `json:"reason"`
}
type Output struct {
Error *ErrorBody `json:"error,omitempty"`
Result json.RawMessage `json:"result,omitempty"`
}
type Owner struct {
ID string `json:"id"`
Kind string `json:"kind"`
}
type Player struct {
ID string `json:"id"`
}
type QueueItem struct {
Data json.RawMessage `json:"data"`
ReadyAt *string `json:"readyAt"`
Seq int64 `json:"seq"`
}
type SortedSetEntry struct {
AvatarURL string `json:"avatarUrl,omitempty"`
Nickname string `json:"nickname"`
Owner Owner `json:"owner"`
Rank int64 `json:"rank"`
Score int64 `json:"score"`
UpdatedAt string `json:"updatedAt"`
}
type Stack struct {
Item string `json:"item"`
Quantity int64 `json:"quantity"`
}
type StorageItem struct {
Data json.RawMessage `json:"data"`
Type string `json:"type"`
UpdatedAt string `json:"updatedAt"`
Version int64 `json:"version"`
}
type CatalogActiveParameters struct {
Op string `json:"op"`
Eq json.RawMessage `json:"eq,omitempty"`
Field string `json:"field,omitempty"`
Limit int64 `json:"limit"`
Owner Owner `json:"owner"`
Primitive string `json:"primitive"`
}
func (parameters CatalogActiveParameters) MarshalJSON() ([]byte, error) {
type plain CatalogActiveParameters
parameters.Op = OpCatalogActive
return json.Marshal(plain(parameters))
}
type CatalogActiveResult struct {
Rows []json.RawMessage `json:"rows"`
Truncated bool `json:"truncated"`
}
type CatalogGetParameters struct {
Op string `json:"op"`
Eq json.RawMessage `json:"eq"`
Field string `json:"field"`
Primitive string `json:"primitive"`
}
func (parameters CatalogGetParameters) MarshalJSON() ([]byte, error) {
type plain CatalogGetParameters
parameters.Op = OpCatalogGet
return json.Marshal(plain(parameters))
}
type CatalogGetResult struct {
Found bool `json:"found"`
Row json.RawMessage `json:"row"`
}
type CatalogListParameters struct {
Op string `json:"op"`
Eq json.RawMessage `json:"eq,omitempty"`
Field string `json:"field,omitempty"`
Limit int64 `json:"limit"`
Primitive string `json:"primitive"`
}
func (parameters CatalogListParameters) MarshalJSON() ([]byte, error) {
type plain CatalogListParameters
parameters.Op = OpCatalogList
return json.Marshal(plain(parameters))
}
type CatalogListResult struct {
Rows []json.RawMessage `json:"rows"`
Truncated bool `json:"truncated"`
}
type CounterAddParameters struct {
Op string `json:"op"`
Delta int64 `json:"delta"`
Key string `json:"key"`
OpKey string `json:"opKey,omitempty"`
Owner Owner `json:"owner"`
Primitive string `json:"primitive"`
}
func (parameters CounterAddParameters) MarshalJSON() ([]byte, error) {
type plain CounterAddParameters
parameters.Op = OpCounterAdd
return json.Marshal(plain(parameters))
}
type CounterAddResult struct {
Value int64 `json:"value"`
Window string `json:"window"`
}
type CounterAggregateParameters struct {
Op string `json:"op"`
Key string `json:"key,omitempty"`
Primitive string `json:"primitive"`
}
func (parameters CounterAggregateParameters) MarshalJSON() ([]byte, error) {
type plain CounterAggregateParameters
parameters.Op = OpCounterAggregate
return json.Marshal(plain(parameters))
}
type CounterAggregateResult struct {
Owners int64 `json:"owners"`
Value int64 `json:"value"`
}
type CounterGetParameters struct {
Op string `json:"op"`
Key string `json:"key"`
Owner Owner `json:"owner"`
Primitive string `json:"primitive"`
}
func (parameters CounterGetParameters) MarshalJSON() ([]byte, error) {
type plain CounterGetParameters
parameters.Op = OpCounterGet
return json.Marshal(plain(parameters))
}
type CounterGetResult struct {
Value int64 `json:"value"`
Window string `json:"window"`
}
type CounterListParameters struct {
Op string `json:"op"`
Limit int64 `json:"limit"`
Owner Owner `json:"owner"`
Primitive string `json:"primitive"`
}
func (parameters CounterListParameters) MarshalJSON() ([]byte, error) {
type plain CounterListParameters
parameters.Op = OpCounterList
return json.Marshal(plain(parameters))
}
type CounterListResult struct {
Entries []CounterEntry `json:"entries"`
}
type CounterSetParameters struct {
Op string `json:"op"`
Key string `json:"key"`
OpKey string `json:"opKey,omitempty"`
Owner Owner `json:"owner"`
Primitive string `json:"primitive"`
Value int64 `json:"value"`
}
func (parameters CounterSetParameters) MarshalJSON() ([]byte, error) {
type plain CounterSetParameters
parameters.Op = OpCounterSet
return json.Marshal(plain(parameters))
}
type CounterSetResult struct {
Value int64 `json:"value"`
Window string `json:"window"`
}
type CounterWindowsParameters struct {
Op string `json:"op"`
Key string `json:"key"`
Last int64 `json:"last"`
Owner Owner `json:"owner"`
Primitive string `json:"primitive"`
}
func (parameters CounterWindowsParameters) MarshalJSON() ([]byte, error) {
type plain CounterWindowsParameters
parameters.Op = OpCounterWindows
return json.Marshal(plain(parameters))
}
type CounterWindowsResult struct {
Entries []CounterWindow `json:"entries"`
}
type DataExecParameters struct {
Op string `json:"op"`
Commands []json.RawMessage `json:"commands"`
}
func (parameters DataExecParameters) MarshalJSON() ([]byte, error) {
type plain DataExecParameters
parameters.Op = OpDataExec
return json.Marshal(plain(parameters))
}
type DataExecResult struct {
Results []json.RawMessage `json:"results"`
}
type DocDeleteParameters struct {
Op string `json:"op"`
Key string `json:"key"`
OpKey string `json:"opKey,omitempty"`
Owner Owner `json:"owner"`
Primitive string `json:"primitive"`
}
func (parameters DocDeleteParameters) MarshalJSON() ([]byte, error) {
type plain DocDeleteParameters
parameters.Op = OpDocDelete
return json.Marshal(plain(parameters))
}
type DocGetParameters struct {
Op string `json:"op"`
Key string `json:"key"`
Owner Owner `json:"owner"`
Primitive string `json:"primitive"`
}
func (parameters DocGetParameters) MarshalJSON() ([]byte, error) {
type plain DocGetParameters
parameters.Op = OpDocGet
return json.Marshal(plain(parameters))
}
type DocGetResult struct {
Found bool `json:"found"`
Key string `json:"key"`
UpdatedAt string `json:"updatedAt"`
Value json.RawMessage `json:"value"`
Version int64 `json:"version"`
}
type DocListParameters struct {
Op string `json:"op"`
Limit int64 `json:"limit"`
Owner Owner `json:"owner"`
Primitive string `json:"primitive"`
}
func (parameters DocListParameters) MarshalJSON() ([]byte, error) {
type plain DocListParameters
parameters.Op = OpDocList
return json.Marshal(plain(parameters))
}
type DocListResult struct {
Entries []DocEntry `json:"entries"`
}
type DocPutParameters struct {
Op string `json:"op"`
Data json.RawMessage `json:"data"`
Key string `json:"key"`
OpKey string `json:"opKey,omitempty"`
Owner Owner `json:"owner"`
Primitive string `json:"primitive"`
Version int64 `json:"version"`
}
func (parameters DocPutParameters) MarshalJSON() ([]byte, error) {
type plain DocPutParameters
parameters.Op = OpDocPut
return json.Marshal(plain(parameters))
}
type DocPutResult struct {
Version int64 `json:"version"`
}
type DocUpsertParameters struct {
Op string `json:"op"`
Data json.RawMessage `json:"data"`
Key string `json:"key"`
OpKey string `json:"opKey,omitempty"`
Owner Owner `json:"owner"`
Primitive string `json:"primitive"`
}
func (parameters DocUpsertParameters) MarshalJSON() ([]byte, error) {
type plain DocUpsertParameters
parameters.Op = OpDocUpsert
return json.Marshal(plain(parameters))
}
type DocUpsertResult struct {
Version int64 `json:"version"`
}
type EventsEmitParameters struct {
Op string `json:"op"`
Name string `json:"name"`
Payload json.RawMessage `json:"payload,omitempty"`
}
func (parameters EventsEmitParameters) MarshalJSON() ([]byte, error) {
type plain EventsEmitParameters
parameters.Op = OpEventsEmit
return json.Marshal(plain(parameters))
}
type InventoryConsumeParameters struct {
Op string `json:"op"`
Items []Stack `json:"items"`
OpKey string `json:"opKey,omitempty"`
Owner Owner `json:"owner"`
}
func (parameters InventoryConsumeParameters) MarshalJSON() ([]byte, error) {
type plain InventoryConsumeParameters
parameters.Op = OpInventoryConsume
return json.Marshal(plain(parameters))
}
type InventoryGetParameters struct {
Op string `json:"op"`
Item string `json:"item"`
Owner Owner `json:"owner"`
}
func (parameters InventoryGetParameters) MarshalJSON() ([]byte, error) {
type plain InventoryGetParameters
parameters.Op = OpInventoryGet
return json.Marshal(plain(parameters))
}
type InventoryGetResult struct {
Quantity int64 `json:"quantity"`
}
type InventoryGrantParameters struct {
Op string `json:"op"`
Items []Stack `json:"items"`
OpKey string `json:"opKey,omitempty"`
Owner Owner `json:"owner"`
}
func (parameters InventoryGrantParameters) MarshalJSON() ([]byte, error) {
type plain InventoryGrantParameters
parameters.Op = OpInventoryGrant
return json.Marshal(plain(parameters))
}
type InventoryHasParameters struct {
Op string `json:"op"`
Items []Stack `json:"items"`
Owner Owner `json:"owner"`
}
func (parameters InventoryHasParameters) MarshalJSON() ([]byte, error) {
type plain InventoryHasParameters
parameters.Op = OpInventoryHas
return json.Marshal(plain(parameters))
}
type InventoryHasResult struct {
Holds bool `json:"holds"`
}
type InventoryListParameters struct {
Op string `json:"op"`
Owner Owner `json:"owner"`
}
func (parameters InventoryListParameters) MarshalJSON() ([]byte, error) {
type plain InventoryListParameters
parameters.Op = OpInventoryList
return json.Marshal(plain(parameters))
}
type InventoryListResult struct {
Items []Stack `json:"items"`
}
type LedgerBalanceParameters struct {
Op string `json:"op"`
Currency string `json:"currency"`
Owner Owner `json:"owner"`
}
func (parameters LedgerBalanceParameters) MarshalJSON() ([]byte, error) {
type plain LedgerBalanceParameters
parameters.Op = OpLedgerBalance
return json.Marshal(plain(parameters))
}
type LedgerBalanceResult struct {
Balance int64 `json:"balance"`
}
type LedgerBalancesParameters struct {
Op string `json:"op"`
Owner Owner `json:"owner"`
}
func (parameters LedgerBalancesParameters) MarshalJSON() ([]byte, error) {
type plain LedgerBalancesParameters
parameters.Op = OpLedgerBalances
return json.Marshal(plain(parameters))
}
type LedgerBalancesResult struct {
Accounts []Amount `json:"accounts"`
}
type LedgerCreditParameters struct {
Op string `json:"op"`
Amount int64 `json:"amount"`
Currency string `json:"currency"`
OpKey string `json:"opKey,omitempty"`
Owner Owner `json:"owner"`
Reason string `json:"reason"`
}
func (parameters LedgerCreditParameters) MarshalJSON() ([]byte, error) {
type plain LedgerCreditParameters
parameters.Op = OpLedgerCredit
return json.Marshal(plain(parameters))
}
type LedgerCreditResult struct {
Balance int64 `json:"balance"`
}
type LedgerDebitParameters struct {
Op string `json:"op"`
Amount int64 `json:"amount"`
Currency string `json:"currency"`
OpKey string `json:"opKey,omitempty"`
Owner Owner `json:"owner"`
Reason string `json:"reason"`
}
func (parameters LedgerDebitParameters) MarshalJSON() ([]byte, error) {
type plain LedgerDebitParameters
parameters.Op = OpLedgerDebit
return json.Marshal(plain(parameters))
}
type LedgerDebitResult struct {
Balance int64 `json:"balance"`
}
type LedgerHistoryParameters struct {
Op string `json:"op"`
Currency string `json:"currency,omitempty"`
Limit int64 `json:"limit"`
Owner Owner `json:"owner"`
}
func (parameters LedgerHistoryParameters) MarshalJSON() ([]byte, error) {
type plain LedgerHistoryParameters
parameters.Op = OpLedgerHistory
return json.Marshal(plain(parameters))
}
type LedgerHistoryResult struct {
Entries []LedgerEntry `json:"entries"`
}
type ModulesCallParameters struct {
Op string `json:"op"`
Arguments json.RawMessage `json:"args,omitempty"`
Function string `json:"fn"`
Module string `json:"module"`
}
func (parameters ModulesCallParameters) MarshalJSON() ([]byte, error) {
type plain ModulesCallParameters
parameters.Op = OpModulesCall
return json.Marshal(plain(parameters))
}
type ModulesCallResult struct {
Value json.RawMessage `json:"value"`
}
type ProjectStorageGetParameters struct {
Op string `json:"op"`
Type string `json:"type"`
}
func (parameters ProjectStorageGetParameters) MarshalJSON() ([]byte, error) {
type plain ProjectStorageGetParameters
parameters.Op = OpProjectStorageGet
return json.Marshal(plain(parameters))
}
type ProjectStorageGetResult struct {
Item *StorageItem `json:"item"`
}
type ProjectStorageSetParameters struct {
Op string `json:"op"`
Data json.RawMessage `json:"data"`
OpKey string `json:"opKey,omitempty"`
Type string `json:"type"`
}
func (parameters ProjectStorageSetParameters) MarshalJSON() ([]byte, error) {
type plain ProjectStorageSetParameters
parameters.Op = OpProjectStorageSet
return json.Marshal(plain(parameters))
}
type QueueLengthParameters struct {
Op string `json:"op"`
Owner Owner `json:"owner"`
Primitive string `json:"primitive"`
}
func (parameters QueueLengthParameters) MarshalJSON() ([]byte, error) {
type plain QueueLengthParameters
parameters.Op = OpQueueLength
return json.Marshal(plain(parameters))
}
type QueueLengthResult struct {
Length int64 `json:"length"`
Ready int64 `json:"ready"`
}
type QueuePeekParameters struct {
Op string `json:"op"`
Limit int64 `json:"limit"`
Owner Owner `json:"owner"`
Primitive string `json:"primitive"`
}
func (parameters QueuePeekParameters) MarshalJSON() ([]byte, error) {
type plain QueuePeekParameters
parameters.Op = OpQueuePeek
return json.Marshal(plain(parameters))
}
type QueuePeekResult struct {
Items []QueueItem `json:"items"`
}
type QueuePopParameters struct {
Op string `json:"op"`
OpKey string `json:"opKey,omitempty"`
Owner Owner `json:"owner"`
Primitive string `json:"primitive"`
}
func (parameters QueuePopParameters) MarshalJSON() ([]byte, error) {
type plain QueuePopParameters
parameters.Op = OpQueuePop
return json.Marshal(plain(parameters))
}
type QueuePopResult struct {
Item *QueueItem `json:"item"`
}
type QueuePushParameters struct {
Op string `json:"op"`
Data json.RawMessage `json:"data"`
OpKey string `json:"opKey,omitempty"`
Owner Owner `json:"owner"`
Primitive string `json:"primitive"`
ReadyAt *string `json:"readyAt,omitempty"`
}
func (parameters QueuePushParameters) MarshalJSON() ([]byte, error) {
type plain QueuePushParameters
parameters.Op = OpQueuePush
return json.Marshal(plain(parameters))
}
type QueuePushResult struct {
Seq int64 `json:"seq"`
}
type QueueRemoveParameters struct {
Op string `json:"op"`
OpKey string `json:"opKey,omitempty"`
Owner Owner `json:"owner"`
Primitive string `json:"primitive"`
Seq int64 `json:"seq"`
}
func (parameters QueueRemoveParameters) MarshalJSON() ([]byte, error) {
type plain QueueRemoveParameters
parameters.Op = OpQueueRemove
return json.Marshal(plain(parameters))
}
type QueueRemoveResult struct {
Removed bool `json:"removed"`
}
type RegenFillParameters struct {
Op string `json:"op"`
Key string `json:"key"`
OpKey string `json:"opKey,omitempty"`
Owner Owner `json:"owner"`
Primitive string `json:"primitive"`
}
func (parameters RegenFillParameters) MarshalJSON() ([]byte, error) {
type plain RegenFillParameters
parameters.Op = OpRegenFill
return json.Marshal(plain(parameters))
}
type RegenFillResult struct {
Cap int64 `json:"cap"`
FullAt *string `json:"fullAt"`
NextAt *string `json:"nextAt"`
Value int64 `json:"value"`
}
type RegenGetParameters struct {
Op string `json:"op"`
Key string `json:"key"`
Owner Owner `json:"owner"`
Primitive string `json:"primitive"`
}
func (parameters RegenGetParameters) MarshalJSON() ([]byte, error) {
type plain RegenGetParameters
parameters.Op = OpRegenGet
return json.Marshal(plain(parameters))
}
type RegenGetResult struct {
Cap int64 `json:"cap"`
FullAt *string `json:"fullAt"`
NextAt *string `json:"nextAt"`
Value int64 `json:"value"`
}
type RegenRefillParameters struct {
Op string `json:"op"`
Amount int64 `json:"amount"`
Key string `json:"key"`
OpKey string `json:"opKey,omitempty"`
Owner Owner `json:"owner"`
Primitive string `json:"primitive"`
}
func (parameters RegenRefillParameters) MarshalJSON() ([]byte, error) {
type plain RegenRefillParameters
parameters.Op = OpRegenRefill
return json.Marshal(plain(parameters))
}
type RegenRefillResult struct {
Cap int64 `json:"cap"`
FullAt *string `json:"fullAt"`
NextAt *string `json:"nextAt"`
Value int64 `json:"value"`
}
type RegenSpendParameters struct {
Op string `json:"op"`
Amount int64 `json:"amount"`
Key string `json:"key"`
OpKey string `json:"opKey,omitempty"`
Owner Owner `json:"owner"`
Primitive string `json:"primitive"`
}
func (parameters RegenSpendParameters) MarshalJSON() ([]byte, error) {
type plain RegenSpendParameters
parameters.Op = OpRegenSpend
return json.Marshal(plain(parameters))
}
type RegenSpendResult struct {
Cap int64 `json:"cap"`
FullAt *string `json:"fullAt"`
NextAt *string `json:"nextAt"`
Value int64 `json:"value"`
}
type RewardGrantParameters struct {
Op string `json:"op"`
Currencies []Amount `json:"currencies,omitempty"`
Items []Stack `json:"items,omitempty"`
OpKey string `json:"opKey,omitempty"`
Owner Owner `json:"owner"`
Reason string `json:"reason,omitempty"`
}
func (parameters RewardGrantParameters) MarshalJSON() ([]byte, error) {
type plain RewardGrantParameters
parameters.Op = OpRewardGrant
return json.Marshal(plain(parameters))
}
type SegmentsBucketParameters struct {
Op string `json:"op"`
PlayerID string `json:"playerId"`
Salt string `json:"salt"`
}
func (parameters SegmentsBucketParameters) MarshalJSON() ([]byte, error) {
type plain SegmentsBucketParameters
parameters.Op = OpSegmentsBucket
return json.Marshal(plain(parameters))
}
type SegmentsBucketResult struct {
Bucket int64 `json:"bucket"`
}
type SegmentsMatchParameters struct {
Op string `json:"op"`
PlayerID string `json:"playerId"`
Segment json.RawMessage `json:"segment"`
}
func (parameters SegmentsMatchParameters) MarshalJSON() ([]byte, error) {
type plain SegmentsMatchParameters
parameters.Op = OpSegmentsMatch
return json.Marshal(plain(parameters))
}
type SegmentsMatchResult struct {
Match bool `json:"match"`
}
type SortedSetAmongParameters struct {
Op string `json:"op"`
Key string `json:"key"`
Owners []Owner `json:"owners"`
Primitive string `json:"primitive"`
}
func (parameters SortedSetAmongParameters) MarshalJSON() ([]byte, error) {
type plain SortedSetAmongParameters
parameters.Op = OpSortedSetAmong
return json.Marshal(plain(parameters))
}
type SortedSetAmongResult struct {
Entries []SortedSetEntry `json:"entries"`
Total int64 `json:"total"`
}
type SortedSetAroundParameters struct {
Op string `json:"op"`
After int64 `json:"after"`
Before int64 `json:"before"`
Key string `json:"key"`
Owner Owner `json:"owner"`
Primitive string `json:"primitive"`
}
func (parameters SortedSetAroundParameters) MarshalJSON() ([]byte, error) {
type plain SortedSetAroundParameters
parameters.Op = OpSortedSetAround
return json.Marshal(plain(parameters))
}
type SortedSetAroundResult struct {
Entries []SortedSetEntry `json:"entries"`
Total int64 `json:"total"`
}
type SortedSetInfoParameters struct {
Op string `json:"op"`
Key string `json:"key"`
Primitive string `json:"primitive"`
}
func (parameters SortedSetInfoParameters) MarshalJSON() ([]byte, error) {
type plain SortedSetInfoParameters
parameters.Op = OpSortedSetInfo
return json.Marshal(plain(parameters))
}
type SortedSetInfoResult struct {
Archived []string `json:"archived"`
Entries int64 `json:"entries"`
LastResetAt *string `json:"lastResetAt"`
MaxEntries int64 `json:"maxEntries"`
NextResetAt *string `json:"nextResetAt"`
Order string `json:"order"`
Pending bool `json:"pending"`
Period string `json:"period"`
PeriodStart string `json:"periodStart"`
}
type SortedSetPageParameters struct {
Op string `json:"op"`
Key string `json:"key"`
Limit int64 `json:"limit"`
Offset int64 `json:"offset"`
Primitive string `json:"primitive"`
}
func (parameters SortedSetPageParameters) MarshalJSON() ([]byte, error) {
type plain SortedSetPageParameters
parameters.Op = OpSortedSetPage
return json.Marshal(plain(parameters))
}
type SortedSetPageResult struct {
Entries []SortedSetEntry `json:"entries"`
Total int64 `json:"total"`
}
type SortedSetPreviousParameters struct {
Op string `json:"op"`
Back int64 `json:"back"`
Key string `json:"key"`
Limit int64 `json:"limit"`
Primitive string `json:"primitive"`
}
func (parameters SortedSetPreviousParameters) MarshalJSON() ([]byte, error) {
type plain SortedSetPreviousParameters
parameters.Op = OpSortedSetPrevious
return json.Marshal(plain(parameters))
}
type SortedSetPreviousResult struct {
Entries []SortedSetEntry `json:"entries"`
PeriodEnd string `json:"periodEnd"`
Total int64 `json:"total"`
}
type SortedSetRankParameters struct {
Op string `json:"op"`
Key string `json:"key"`
Owner Owner `json:"owner"`
Primitive string `json:"primitive"`
}
func (parameters SortedSetRankParameters) MarshalJSON() ([]byte, error) {
type plain SortedSetRankParameters
parameters.Op = OpSortedSetRank
return json.Marshal(plain(parameters))
}
type SortedSetRankResult struct {
Entry SortedSetEntry `json:"entry"`
Found bool `json:"found"`
Ranked bool `json:"ranked"`
Total int64 `json:"total"`
}
type SortedSetRemoveParameters struct {
Op string `json:"op"`
Key string `json:"key"`
OpKey string `json:"opKey,omitempty"`
Owner Owner `json:"owner"`
Primitive string `json:"primitive"`
}
func (parameters SortedSetRemoveParameters) MarshalJSON() ([]byte, error) {
type plain SortedSetRemoveParameters
parameters.Op = OpSortedSetRemove
return json.Marshal(plain(parameters))
}
type SortedSetResetParameters struct {
Op string `json:"op"`
Key string `json:"key"`
OpKey string `json:"opKey,omitempty"`
Primitive string `json:"primitive"`
}
func (parameters SortedSetResetParameters) MarshalJSON() ([]byte, error) {
type plain SortedSetResetParameters
parameters.Op = OpSortedSetReset
return json.Marshal(plain(parameters))
}
type SortedSetSubmitParameters struct {
Op string `json:"op"`
Key string `json:"key"`
OpKey string `json:"opKey,omitempty"`
Owner Owner `json:"owner"`
Primitive string `json:"primitive"`
Score int64 `json:"score"`
}
func (parameters SortedSetSubmitParameters) MarshalJSON() ([]byte, error) {
type plain SortedSetSubmitParameters
parameters.Op = OpSortedSetSubmit
return json.Marshal(plain(parameters))
}
type SortedSetSubmitResult struct {
Changed bool `json:"changed"`
Previous int64 `json:"previous"`
Score int64 `json:"score"`
}
type StorageGetParameters struct {
Op string `json:"op"`
PlayerID string `json:"playerId"`
Type string `json:"type"`
}
func (parameters StorageGetParameters) MarshalJSON() ([]byte, error) {
type plain StorageGetParameters
parameters.Op = OpStorageGet
return json.Marshal(plain(parameters))
}
type StorageGetResult struct {
Item *StorageItem `json:"item"`
}
type StorageSetParameters struct {
Op string `json:"op"`
Data json.RawMessage `json:"data"`
OpKey string `json:"opKey,omitempty"`
PlayerID string `json:"playerId"`
Type string `json:"type"`
}
func (parameters StorageSetParameters) MarshalJSON() ([]byte, error) {
type plain StorageSetParameters
parameters.Op = OpStorageSet
return json.Marshal(plain(parameters))
}
type TimerArmParameters struct {
Op string `json:"op"`
FireAt string `json:"fireAt"`
Key string `json:"key"`
OpKey string `json:"opKey,omitempty"`
Owner Owner `json:"owner"`
Payload json.RawMessage `json:"payload,omitempty"`
Primitive string `json:"primitive"`
}
func (parameters TimerArmParameters) MarshalJSON() ([]byte, error) {
type plain TimerArmParameters
parameters.Op = OpTimerArm
return json.Marshal(plain(parameters))
}
type TimerDisarmParameters struct {
Op string `json:"op"`
Key string `json:"key"`
OpKey string `json:"opKey,omitempty"`
Owner Owner `json:"owner"`
Primitive string `json:"primitive"`
}
func (parameters TimerDisarmParameters) MarshalJSON() ([]byte, error) {
type plain TimerDisarmParameters
parameters.Op = OpTimerDisarm
return json.Marshal(plain(parameters))
}
type TimerDisarmResult struct {
Disarmed bool `json:"disarmed"`
}
type TimerPeekParameters struct {
Op string `json:"op"`
Key string `json:"key"`
Owner Owner `json:"owner"`
Primitive string `json:"primitive"`
}
func (parameters TimerPeekParameters) MarshalJSON() ([]byte, error) {
type plain TimerPeekParameters
parameters.Op = OpTimerPeek
return json.Marshal(plain(parameters))
}
type TimerPeekResult struct {
Armed bool `json:"armed"`
FireAt *string `json:"fireAt"`
Payload json.RawMessage `json:"payload"`
}