Documentation
¶
Index ¶
- Variables
- func MarshalCharacterOrPanic(inst *Character) []byte
- func MarshalPlayerOrPanic(inst *Player) []byte
- type Character
- func (*Character) Descriptor() ([]byte, []int)deprecated
- func (x *Character) GetActive() bool
- func (x *Character) GetCurrency() *Character_Currency
- func (x *Character) GetFullname() string
- func (x *Character) GetId() string
- func (x *Character) GetItems() []*Character_Item
- func (x *Character) GetPlayerId() string
- func (inst *Character) Key() string
- func (inst *Character) PreValidateCreate(ctx context.Context) error
- func (inst *Character) PreValidateUpdate(ctx context.Context, updated *Character) error
- func (*Character) ProtoMessage()
- func (x *Character) ProtoReflect() protoreflect.Message
- func (inst *Character) RequestRelatedSteps(instBytes []byte, relBytes []byte) ([]*rkcypb.ApecsTxn_Step, error)
- func (x *Character) Reset()
- func (inst *Character) SetKey(key string)
- func (x *Character) String() string
- type CharacterConcernHandler
- func (*CharacterConcernHandler) ConcernName() string
- func (cncHdlr *CharacterConcernHandler) DecodeArg(ctx context.Context, system rkcypb.System, command string, buffer []byte) (*rkcy.ResultProto, error)
- func (*CharacterConcernHandler) DecodeInstance(ctx context.Context, buffer []byte) (*rkcy.ResultProto, error)
- func (cncHdlr *CharacterConcernHandler) DecodeRelatedRequest(ctx context.Context, relReq *rkcypb.RelatedRequest) (*rkcy.ResultProto, error)
- func (cncHdlr *CharacterConcernHandler) DecodeResult(ctx context.Context, system rkcypb.System, command string, buffer []byte) (*rkcy.ResultProto, error)
- func (cncHdlr *CharacterConcernHandler) HandleCrudCommand(ctx context.Context, wg *sync.WaitGroup, system rkcypb.System, command string, ...) (*rkcypb.ApecsTxn_Step_Result, []*rkcypb.ApecsTxn_Step)
- func (cncHdlr *CharacterConcernHandler) HandleLogicCommand(ctx context.Context, system rkcypb.System, command string, ...) (*rkcypb.ApecsTxn_Step_Result, []*rkcypb.ApecsTxn_Step)
- func (cncHdlr *CharacterConcernHandler) SetCrudHandler(storageType string, handler interface{}) error
- func (cncHdlr *CharacterConcernHandler) SetLogicHandler(handler interface{}) error
- func (cncHdlr *CharacterConcernHandler) SetStorageTargets(storageTargets map[string]*rkcy.StorageTargetInit)
- func (cncHdlr *CharacterConcernHandler) ValidateHandlers() bool
- type CharacterCrudHandler
- type CharacterCrudHandlerRamDb
- func (ch *CharacterCrudHandlerRamDb) Create(ctx context.Context, inst *Character, cmpdOffset *rkcypb.CompoundOffset) (*Character, error)
- func (ch *CharacterCrudHandlerRamDb) Delete(ctx context.Context, key string, cmpdOffset *rkcypb.CompoundOffset) error
- func (ch *CharacterCrudHandlerRamDb) Read(ctx context.Context, key string) (*Character, *CharacterRelated, *rkcypb.CompoundOffset, error)
- func (ch *CharacterCrudHandlerRamDb) Update(ctx context.Context, inst *Character, rel *CharacterRelated, ...) error
- type CharacterLogicHandler
- type CharacterRelated
- func (*CharacterRelated) Descriptor() ([]byte, []int)deprecated
- func (x *CharacterRelated) GetId() string
- func (x *CharacterRelated) GetPlayer() *Player
- func (rel *CharacterRelated) HandleRefreshRelated(relRsp *rkcypb.RelatedResponse) (bool, error)
- func (rel *CharacterRelated) HandleRequestRelated(relReq *rkcypb.RelatedRequest) (bool, error)
- func (rel *CharacterRelated) Key() string
- func (*CharacterRelated) ProtoMessage()
- func (x *CharacterRelated) ProtoReflect() protoreflect.Message
- func (rel *CharacterRelated) RefreshRelatedSteps(instKey string, instBytes []byte, relBytes []byte) ([]*rkcypb.ApecsTxn_Step, error)
- func (x *CharacterRelated) Reset()
- func (x *CharacterRelated) String() string
- type Character_Currency
- func (*Character_Currency) Descriptor() ([]byte, []int)deprecated
- func (x *Character_Currency) GetFaction_0() int32
- func (x *Character_Currency) GetFaction_1() int32
- func (x *Character_Currency) GetFaction_2() int32
- func (x *Character_Currency) GetGold() int32
- func (*Character_Currency) ProtoMessage()
- func (x *Character_Currency) ProtoReflect() protoreflect.Message
- func (x *Character_Currency) Reset()
- func (x *Character_Currency) String() string
- type Character_Item
- func (*Character_Item) Descriptor() ([]byte, []int)deprecated
- func (x *Character_Item) GetDescription() string
- func (x *Character_Item) GetId() string
- func (*Character_Item) ProtoMessage()
- func (x *Character_Item) ProtoReflect() protoreflect.Message
- func (x *Character_Item) Reset()
- func (x *Character_Item) String() string
- type FundingRequest
- func (*FundingRequest) Descriptor() ([]byte, []int)deprecated
- func (x *FundingRequest) GetCharacterId() string
- func (x *FundingRequest) GetCurrency() *Character_Currency
- func (*FundingRequest) ProtoMessage()
- func (x *FundingRequest) ProtoReflect() protoreflect.Message
- func (x *FundingRequest) Reset()
- func (x *FundingRequest) String() string
- type Limits
- func (*Limits) Descriptor() ([]byte, []int)deprecated
- func (x *Limits) GetId() string
- func (x *Limits) GetMaxCharactersPerPlayer() int32
- func (conf *Limits) Key() string
- func (*Limits) ProtoMessage()
- func (x *Limits) ProtoReflect() protoreflect.Message
- func (x *Limits) Reset()
- func (x *Limits) String() string
- type LimitsConfigHandler
- type Player
- func (*Player) Descriptor() ([]byte, []int)deprecated
- func (x *Player) GetActive() bool
- func (x *Player) GetId() string
- func (x *Player) GetLimitsId() string
- func (x *Player) GetUsername() string
- func (inst *Player) Key() string
- func (inst *Player) PreValidateCreate(ctx context.Context) error
- func (inst *Player) PreValidateUpdate(ctx context.Context, updated *Player) error
- func (*Player) ProtoMessage()
- func (x *Player) ProtoReflect() protoreflect.Message
- func (inst *Player) RequestRelatedSteps(instBytes []byte, relBytes []byte) ([]*rkcypb.ApecsTxn_Step, error)
- func (x *Player) Reset()
- func (inst *Player) SetKey(key string)
- func (x *Player) String() string
- type PlayerConcernHandler
- func (*PlayerConcernHandler) ConcernName() string
- func (cncHdlr *PlayerConcernHandler) DecodeArg(ctx context.Context, system rkcypb.System, command string, buffer []byte) (*rkcy.ResultProto, error)
- func (*PlayerConcernHandler) DecodeInstance(ctx context.Context, buffer []byte) (*rkcy.ResultProto, error)
- func (cncHdlr *PlayerConcernHandler) DecodeRelatedRequest(ctx context.Context, relReq *rkcypb.RelatedRequest) (*rkcy.ResultProto, error)
- func (cncHdlr *PlayerConcernHandler) DecodeResult(ctx context.Context, system rkcypb.System, command string, buffer []byte) (*rkcy.ResultProto, error)
- func (cncHdlr *PlayerConcernHandler) HandleCrudCommand(ctx context.Context, wg *sync.WaitGroup, system rkcypb.System, command string, ...) (*rkcypb.ApecsTxn_Step_Result, []*rkcypb.ApecsTxn_Step)
- func (cncHdlr *PlayerConcernHandler) HandleLogicCommand(ctx context.Context, system rkcypb.System, command string, ...) (*rkcypb.ApecsTxn_Step_Result, []*rkcypb.ApecsTxn_Step)
- func (cncHdlr *PlayerConcernHandler) SetCrudHandler(storageType string, handler interface{}) error
- func (cncHdlr *PlayerConcernHandler) SetLogicHandler(handler interface{}) error
- func (cncHdlr *PlayerConcernHandler) SetStorageTargets(storageTargets map[string]*rkcy.StorageTargetInit)
- func (cncHdlr *PlayerConcernHandler) ValidateHandlers() bool
- type PlayerCrudHandler
- type PlayerCrudHandlerRamDb
- func (ch *PlayerCrudHandlerRamDb) Create(ctx context.Context, inst *Player, cmpdOffset *rkcypb.CompoundOffset) (*Player, error)
- func (ch *PlayerCrudHandlerRamDb) Delete(ctx context.Context, key string, cmpdOffset *rkcypb.CompoundOffset) error
- func (ch *PlayerCrudHandlerRamDb) Read(ctx context.Context, key string) (*Player, *PlayerRelated, *rkcypb.CompoundOffset, error)
- func (ch *PlayerCrudHandlerRamDb) Update(ctx context.Context, inst *Player, rel *PlayerRelated, ...) error
- type PlayerLogicHandler
- type PlayerRelated
- func (*PlayerRelated) Descriptor() ([]byte, []int)deprecated
- func (x *PlayerRelated) GetCharacters() []*Character
- func (x *PlayerRelated) GetId() string
- func (x *PlayerRelated) GetLimits() *Limits
- func (rel *PlayerRelated) HandleRefreshRelated(relRsp *rkcypb.RelatedResponse) (bool, error)
- func (rel *PlayerRelated) HandleRequestRelated(relReq *rkcypb.RelatedRequest) (bool, error)
- func (rel *PlayerRelated) Key() string
- func (*PlayerRelated) ProtoMessage()
- func (x *PlayerRelated) ProtoReflect() protoreflect.Message
- func (rel *PlayerRelated) RefreshRelatedSteps(instKey string, instBytes []byte, relBytes []byte) ([]*rkcypb.ApecsTxn_Step, error)
- func (x *PlayerRelated) Reset()
- func (x *PlayerRelated) String() string
- func (rel *PlayerRelated) UpsertRelatedCharacters(msg *Character)
- type TradeCategory
- func (*TradeCategory) Descriptor() ([]byte, []int)deprecated
- func (x *TradeCategory) GetId() string
- func (x *TradeCategory) GetMaxCharactersPerPlayer() int32
- func (conf *TradeCategory) Key() string
- func (*TradeCategory) ProtoMessage()
- func (x *TradeCategory) ProtoReflect() protoreflect.Message
- func (x *TradeCategory) Reset()
- func (x *TradeCategory) String() string
- type TradeCategoryConfigHandler
- type TradeRequest
- func (*TradeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TradeRequest) GetLhs() *FundingRequest
- func (x *TradeRequest) GetRhs() *FundingRequest
- func (*TradeRequest) ProtoMessage()
- func (x *TradeRequest) ProtoReflect() protoreflect.Message
- func (x *TradeRequest) Reset()
- func (x *TradeRequest) String() string
Constants ¶
This section is empty.
Variables ¶
var File_character_proto protoreflect.FileDescriptor
var File_player_proto protoreflect.FileDescriptor
var File_relationships_proto protoreflect.FileDescriptor
var File_trade_proto protoreflect.FileDescriptor
Functions ¶
func MarshalCharacterOrPanic ¶
func MarshalPlayerOrPanic ¶
Types ¶
type Character ¶
type Character struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` PlayerId string `protobuf:"bytes,2,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"` Fullname string `protobuf:"bytes,3,opt,name=fullname,proto3" json:"fullname,omitempty"` Active bool `protobuf:"varint,4,opt,name=active,proto3" json:"active,omitempty"` Currency *Character_Currency `protobuf:"bytes,5,opt,name=currency,proto3" json:"currency,omitempty"` Items []*Character_Item `protobuf:"bytes,6,rep,name=items,proto3" json:"items,omitempty"` // contains filtered or unexported fields }
func (*Character) Descriptor
deprecated
func (*Character) GetCurrency ¶
func (x *Character) GetCurrency() *Character_Currency
func (*Character) GetFullname ¶
func (*Character) GetItems ¶
func (x *Character) GetItems() []*Character_Item
func (*Character) GetPlayerId ¶
func (*Character) PreValidateCreate ¶
func (*Character) PreValidateUpdate ¶
func (*Character) ProtoMessage ¶
func (*Character) ProtoMessage()
func (*Character) ProtoReflect ¶
func (x *Character) ProtoReflect() protoreflect.Message
func (*Character) RequestRelatedSteps ¶
type CharacterConcernHandler ¶
type CharacterConcernHandler struct {
// contains filtered or unexported fields
}
Concern Handler
func (*CharacterConcernHandler) ConcernName ¶
func (*CharacterConcernHandler) ConcernName() string
func (*CharacterConcernHandler) DecodeArg ¶
func (cncHdlr *CharacterConcernHandler) DecodeArg( ctx context.Context, system rkcypb.System, command string, buffer []byte, ) (*rkcy.ResultProto, error)
func (*CharacterConcernHandler) DecodeInstance ¶
func (*CharacterConcernHandler) DecodeInstance( ctx context.Context, buffer []byte, ) (*rkcy.ResultProto, error)
func (*CharacterConcernHandler) DecodeRelatedRequest ¶
func (cncHdlr *CharacterConcernHandler) DecodeRelatedRequest( ctx context.Context, relReq *rkcypb.RelatedRequest, ) (*rkcy.ResultProto, error)
func (*CharacterConcernHandler) DecodeResult ¶
func (cncHdlr *CharacterConcernHandler) DecodeResult( ctx context.Context, system rkcypb.System, command string, buffer []byte, ) (*rkcy.ResultProto, error)
func (*CharacterConcernHandler) HandleCrudCommand ¶
func (*CharacterConcernHandler) HandleLogicCommand ¶
func (cncHdlr *CharacterConcernHandler) HandleLogicCommand( ctx context.Context, system rkcypb.System, command string, direction rkcypb.Direction, args *rkcy.StepArgs, instanceStore *rkcy.InstanceStore, confRdr rkcy.ConfigRdr, ) (*rkcypb.ApecsTxn_Step_Result, []*rkcypb.ApecsTxn_Step)
func (*CharacterConcernHandler) SetCrudHandler ¶
func (cncHdlr *CharacterConcernHandler) SetCrudHandler(storageType string, handler interface{}) error
func (*CharacterConcernHandler) SetLogicHandler ¶
func (cncHdlr *CharacterConcernHandler) SetLogicHandler(handler interface{}) error
func (*CharacterConcernHandler) SetStorageTargets ¶
func (cncHdlr *CharacterConcernHandler) SetStorageTargets(storageTargets map[string]*rkcy.StorageTargetInit)
func (*CharacterConcernHandler) ValidateHandlers ¶
func (cncHdlr *CharacterConcernHandler) ValidateHandlers() bool
type CharacterCrudHandler ¶
type CharacterCrudHandler interface { Read(ctx context.Context, key string) (*Character, *CharacterRelated, *rkcypb.CompoundOffset, error) Create(ctx context.Context, inst *Character, cmpdOffset *rkcypb.CompoundOffset) (*Character, error) Update(ctx context.Context, inst *Character, rel *CharacterRelated, cmpdOffset *rkcypb.CompoundOffset) error Delete(ctx context.Context, key string, cmpdOffset *rkcypb.CompoundOffset) error }
CrudHandler Interface
type CharacterCrudHandlerRamDb ¶
type CharacterCrudHandlerRamDb struct {
// contains filtered or unexported fields
}
RamDb CrudHandler typically used in offline tests
func NewCharacterCrudHandlerRamDb ¶
func NewCharacterCrudHandlerRamDb(db *ramdb.RamDb) *CharacterCrudHandlerRamDb
func (*CharacterCrudHandlerRamDb) Create ¶
func (ch *CharacterCrudHandlerRamDb) Create(ctx context.Context, inst *Character, cmpdOffset *rkcypb.CompoundOffset) (*Character, error)
func (*CharacterCrudHandlerRamDb) Delete ¶
func (ch *CharacterCrudHandlerRamDb) Delete(ctx context.Context, key string, cmpdOffset *rkcypb.CompoundOffset) error
func (*CharacterCrudHandlerRamDb) Read ¶
func (ch *CharacterCrudHandlerRamDb) Read(ctx context.Context, key string) (*Character, *CharacterRelated, *rkcypb.CompoundOffset, error)
func (*CharacterCrudHandlerRamDb) Update ¶
func (ch *CharacterCrudHandlerRamDb) Update(ctx context.Context, inst *Character, rel *CharacterRelated, cmpdOffset *rkcypb.CompoundOffset) error
type CharacterLogicHandler ¶
type CharacterLogicHandler interface { ValidateCreate(ctx context.Context, inst *Character) (*Character, error) ValidateUpdate(ctx context.Context, original *Character, updated *Character) (*Character, error) Fund(ctx context.Context, inst *Character, rel *CharacterRelated, payload *FundingRequest) (*Character, error) DebitFunds(ctx context.Context, inst *Character, rel *CharacterRelated, payload *FundingRequest) (*Character, error) CreditFunds(ctx context.Context, inst *Character, rel *CharacterRelated, payload *FundingRequest) (*Character, error) }
LogicHandler Interface
type CharacterRelated ¶
type CharacterRelated struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Player *Player `protobuf:"bytes,2,opt,name=player,proto3" json:"player,omitempty"` // contains filtered or unexported fields }
func CharacterGetRelated ¶
func CharacterGetRelated(instKey string, instanceStore *rkcy.InstanceStore) (*CharacterRelated, []byte, error)
func (*CharacterRelated) Descriptor
deprecated
func (*CharacterRelated) Descriptor() ([]byte, []int)
Deprecated: Use CharacterRelated.ProtoReflect.Descriptor instead.
func (*CharacterRelated) GetId ¶
func (x *CharacterRelated) GetId() string
func (*CharacterRelated) GetPlayer ¶
func (x *CharacterRelated) GetPlayer() *Player
func (*CharacterRelated) HandleRefreshRelated ¶
func (rel *CharacterRelated) HandleRefreshRelated(relRsp *rkcypb.RelatedResponse) (bool, error)
func (*CharacterRelated) HandleRequestRelated ¶
func (rel *CharacterRelated) HandleRequestRelated(relReq *rkcypb.RelatedRequest) (bool, error)
func (*CharacterRelated) Key ¶
func (rel *CharacterRelated) Key() string
----------------------------------------------------------------------------- Related handling -----------------------------------------------------------------------------
func (*CharacterRelated) ProtoMessage ¶
func (*CharacterRelated) ProtoMessage()
func (*CharacterRelated) ProtoReflect ¶
func (x *CharacterRelated) ProtoReflect() protoreflect.Message
func (*CharacterRelated) RefreshRelatedSteps ¶
func (rel *CharacterRelated) RefreshRelatedSteps(instKey string, instBytes []byte, relBytes []byte) ([]*rkcypb.ApecsTxn_Step, error)
func (*CharacterRelated) Reset ¶
func (x *CharacterRelated) Reset()
func (*CharacterRelated) String ¶
func (x *CharacterRelated) String() string
type Character_Currency ¶
type Character_Currency struct { Gold int32 `protobuf:"varint,1,opt,name=gold,proto3" json:"gold,omitempty"` Faction_0 int32 `protobuf:"varint,2,opt,name=faction_0,json=faction0,proto3" json:"faction_0,omitempty"` Faction_1 int32 `protobuf:"varint,3,opt,name=faction_1,json=faction1,proto3" json:"faction_1,omitempty"` Faction_2 int32 `protobuf:"varint,4,opt,name=faction_2,json=faction2,proto3" json:"faction_2,omitempty"` // contains filtered or unexported fields }
func (*Character_Currency) Descriptor
deprecated
func (*Character_Currency) Descriptor() ([]byte, []int)
Deprecated: Use Character_Currency.ProtoReflect.Descriptor instead.
func (*Character_Currency) GetFaction_0 ¶
func (x *Character_Currency) GetFaction_0() int32
func (*Character_Currency) GetFaction_1 ¶
func (x *Character_Currency) GetFaction_1() int32
func (*Character_Currency) GetFaction_2 ¶
func (x *Character_Currency) GetFaction_2() int32
func (*Character_Currency) GetGold ¶
func (x *Character_Currency) GetGold() int32
func (*Character_Currency) ProtoMessage ¶
func (*Character_Currency) ProtoMessage()
func (*Character_Currency) ProtoReflect ¶
func (x *Character_Currency) ProtoReflect() protoreflect.Message
func (*Character_Currency) Reset ¶
func (x *Character_Currency) Reset()
func (*Character_Currency) String ¶
func (x *Character_Currency) String() string
type Character_Item ¶
type Character_Item struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` // contains filtered or unexported fields }
func (*Character_Item) Descriptor
deprecated
func (*Character_Item) Descriptor() ([]byte, []int)
Deprecated: Use Character_Item.ProtoReflect.Descriptor instead.
func (*Character_Item) GetDescription ¶
func (x *Character_Item) GetDescription() string
func (*Character_Item) GetId ¶
func (x *Character_Item) GetId() string
func (*Character_Item) ProtoMessage ¶
func (*Character_Item) ProtoMessage()
func (*Character_Item) ProtoReflect ¶
func (x *Character_Item) ProtoReflect() protoreflect.Message
func (*Character_Item) Reset ¶
func (x *Character_Item) Reset()
func (*Character_Item) String ¶
func (x *Character_Item) String() string
type FundingRequest ¶
type FundingRequest struct { CharacterId string `protobuf:"bytes,1,opt,name=character_id,json=characterId,proto3" json:"character_id,omitempty"` Currency *Character_Currency `protobuf:"bytes,2,opt,name=currency,proto3" json:"currency,omitempty"` // contains filtered or unexported fields }
func (*FundingRequest) Descriptor
deprecated
func (*FundingRequest) Descriptor() ([]byte, []int)
Deprecated: Use FundingRequest.ProtoReflect.Descriptor instead.
func (*FundingRequest) GetCharacterId ¶
func (x *FundingRequest) GetCharacterId() string
func (*FundingRequest) GetCurrency ¶
func (x *FundingRequest) GetCurrency() *Character_Currency
func (*FundingRequest) ProtoMessage ¶
func (*FundingRequest) ProtoMessage()
func (*FundingRequest) ProtoReflect ¶
func (x *FundingRequest) ProtoReflect() protoreflect.Message
func (*FundingRequest) Reset ¶
func (x *FundingRequest) Reset()
func (*FundingRequest) String ¶
func (x *FundingRequest) String() string
type Limits ¶
type Limits struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` MaxCharactersPerPlayer int32 `` /* 132-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Limits) Descriptor
deprecated
func (*Limits) GetMaxCharactersPerPlayer ¶
func (*Limits) ProtoMessage ¶
func (*Limits) ProtoMessage()
func (*Limits) ProtoReflect ¶
func (x *Limits) ProtoReflect() protoreflect.Message
type LimitsConfigHandler ¶
type LimitsConfigHandler struct{}
----------------------------------------------------------------------------- Config Limits -----------------------------------------------------------------------------
func (*LimitsConfigHandler) Unmarshal ¶
func (*LimitsConfigHandler) Unmarshal(b []byte) (proto.Message, error)
func (*LimitsConfigHandler) UnmarshalJson ¶
func (*LimitsConfigHandler) UnmarshalJson(b []byte) (proto.Message, error)
type Player ¶
type Player struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` Active bool `protobuf:"varint,3,opt,name=active,proto3" json:"active,omitempty"` LimitsId string `protobuf:"bytes,4,opt,name=limits_id,json=limitsId,proto3" json:"limits_id,omitempty"` // contains filtered or unexported fields }
func (*Player) Descriptor
deprecated
func (*Player) GetLimitsId ¶
func (*Player) GetUsername ¶
func (*Player) PreValidateUpdate ¶
func (*Player) ProtoMessage ¶
func (*Player) ProtoMessage()
func (*Player) ProtoReflect ¶
func (x *Player) ProtoReflect() protoreflect.Message
func (*Player) RequestRelatedSteps ¶
type PlayerConcernHandler ¶
type PlayerConcernHandler struct {
// contains filtered or unexported fields
}
Concern Handler
func (*PlayerConcernHandler) ConcernName ¶
func (*PlayerConcernHandler) ConcernName() string
func (*PlayerConcernHandler) DecodeArg ¶
func (cncHdlr *PlayerConcernHandler) DecodeArg( ctx context.Context, system rkcypb.System, command string, buffer []byte, ) (*rkcy.ResultProto, error)
func (*PlayerConcernHandler) DecodeInstance ¶
func (*PlayerConcernHandler) DecodeInstance( ctx context.Context, buffer []byte, ) (*rkcy.ResultProto, error)
func (*PlayerConcernHandler) DecodeRelatedRequest ¶
func (cncHdlr *PlayerConcernHandler) DecodeRelatedRequest( ctx context.Context, relReq *rkcypb.RelatedRequest, ) (*rkcy.ResultProto, error)
func (*PlayerConcernHandler) DecodeResult ¶
func (cncHdlr *PlayerConcernHandler) DecodeResult( ctx context.Context, system rkcypb.System, command string, buffer []byte, ) (*rkcy.ResultProto, error)
func (*PlayerConcernHandler) HandleCrudCommand ¶
func (*PlayerConcernHandler) HandleLogicCommand ¶
func (cncHdlr *PlayerConcernHandler) HandleLogicCommand( ctx context.Context, system rkcypb.System, command string, direction rkcypb.Direction, args *rkcy.StepArgs, instanceStore *rkcy.InstanceStore, confRdr rkcy.ConfigRdr, ) (*rkcypb.ApecsTxn_Step_Result, []*rkcypb.ApecsTxn_Step)
func (*PlayerConcernHandler) SetCrudHandler ¶
func (cncHdlr *PlayerConcernHandler) SetCrudHandler(storageType string, handler interface{}) error
func (*PlayerConcernHandler) SetLogicHandler ¶
func (cncHdlr *PlayerConcernHandler) SetLogicHandler(handler interface{}) error
func (*PlayerConcernHandler) SetStorageTargets ¶
func (cncHdlr *PlayerConcernHandler) SetStorageTargets(storageTargets map[string]*rkcy.StorageTargetInit)
func (*PlayerConcernHandler) ValidateHandlers ¶
func (cncHdlr *PlayerConcernHandler) ValidateHandlers() bool
type PlayerCrudHandler ¶
type PlayerCrudHandler interface { Read(ctx context.Context, key string) (*Player, *PlayerRelated, *rkcypb.CompoundOffset, error) Create(ctx context.Context, inst *Player, cmpdOffset *rkcypb.CompoundOffset) (*Player, error) Update(ctx context.Context, inst *Player, rel *PlayerRelated, cmpdOffset *rkcypb.CompoundOffset) error Delete(ctx context.Context, key string, cmpdOffset *rkcypb.CompoundOffset) error }
CrudHandler Interface
type PlayerCrudHandlerRamDb ¶
type PlayerCrudHandlerRamDb struct {
// contains filtered or unexported fields
}
RamDb CrudHandler typically used in offline tests
func NewPlayerCrudHandlerRamDb ¶
func NewPlayerCrudHandlerRamDb(db *ramdb.RamDb) *PlayerCrudHandlerRamDb
func (*PlayerCrudHandlerRamDb) Create ¶
func (ch *PlayerCrudHandlerRamDb) Create(ctx context.Context, inst *Player, cmpdOffset *rkcypb.CompoundOffset) (*Player, error)
func (*PlayerCrudHandlerRamDb) Delete ¶
func (ch *PlayerCrudHandlerRamDb) Delete(ctx context.Context, key string, cmpdOffset *rkcypb.CompoundOffset) error
func (*PlayerCrudHandlerRamDb) Read ¶
func (ch *PlayerCrudHandlerRamDb) Read(ctx context.Context, key string) (*Player, *PlayerRelated, *rkcypb.CompoundOffset, error)
func (*PlayerCrudHandlerRamDb) Update ¶
func (ch *PlayerCrudHandlerRamDb) Update(ctx context.Context, inst *Player, rel *PlayerRelated, cmpdOffset *rkcypb.CompoundOffset) error
type PlayerLogicHandler ¶
type PlayerLogicHandler interface { ValidateCreate(ctx context.Context, inst *Player) (*Player, error) ValidateUpdate(ctx context.Context, original *Player, updated *Player) (*Player, error) }
LogicHandler Interface
type PlayerRelated ¶
type PlayerRelated struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Characters []*Character `protobuf:"bytes,2,rep,name=characters,proto3" json:"characters,omitempty"` Limits *Limits `protobuf:"bytes,3,opt,name=limits,proto3" json:"limits,omitempty"` // contains filtered or unexported fields }
func PlayerGetRelated ¶
func PlayerGetRelated(instKey string, instanceStore *rkcy.InstanceStore) (*PlayerRelated, []byte, error)
func (*PlayerRelated) Descriptor
deprecated
func (*PlayerRelated) Descriptor() ([]byte, []int)
Deprecated: Use PlayerRelated.ProtoReflect.Descriptor instead.
func (*PlayerRelated) GetCharacters ¶
func (x *PlayerRelated) GetCharacters() []*Character
func (*PlayerRelated) GetId ¶
func (x *PlayerRelated) GetId() string
func (*PlayerRelated) GetLimits ¶
func (x *PlayerRelated) GetLimits() *Limits
func (*PlayerRelated) HandleRefreshRelated ¶
func (rel *PlayerRelated) HandleRefreshRelated(relRsp *rkcypb.RelatedResponse) (bool, error)
func (*PlayerRelated) HandleRequestRelated ¶
func (rel *PlayerRelated) HandleRequestRelated(relReq *rkcypb.RelatedRequest) (bool, error)
func (*PlayerRelated) Key ¶
func (rel *PlayerRelated) Key() string
----------------------------------------------------------------------------- Related handling -----------------------------------------------------------------------------
func (*PlayerRelated) ProtoMessage ¶
func (*PlayerRelated) ProtoMessage()
func (*PlayerRelated) ProtoReflect ¶
func (x *PlayerRelated) ProtoReflect() protoreflect.Message
func (*PlayerRelated) RefreshRelatedSteps ¶
func (rel *PlayerRelated) RefreshRelatedSteps(instKey string, instBytes []byte, relBytes []byte) ([]*rkcypb.ApecsTxn_Step, error)
func (*PlayerRelated) Reset ¶
func (x *PlayerRelated) Reset()
func (*PlayerRelated) String ¶
func (x *PlayerRelated) String() string
func (*PlayerRelated) UpsertRelatedCharacters ¶
func (rel *PlayerRelated) UpsertRelatedCharacters(msg *Character)
type TradeCategory ¶
type TradeCategory struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` MaxCharactersPerPlayer int32 `` /* 132-byte string literal not displayed */ // contains filtered or unexported fields }
func (*TradeCategory) Descriptor
deprecated
func (*TradeCategory) Descriptor() ([]byte, []int)
Deprecated: Use TradeCategory.ProtoReflect.Descriptor instead.
func (*TradeCategory) GetId ¶
func (x *TradeCategory) GetId() string
func (*TradeCategory) GetMaxCharactersPerPlayer ¶
func (x *TradeCategory) GetMaxCharactersPerPlayer() int32
func (*TradeCategory) Key ¶
func (conf *TradeCategory) Key() string
func (*TradeCategory) ProtoMessage ¶
func (*TradeCategory) ProtoMessage()
func (*TradeCategory) ProtoReflect ¶
func (x *TradeCategory) ProtoReflect() protoreflect.Message
func (*TradeCategory) Reset ¶
func (x *TradeCategory) Reset()
func (*TradeCategory) String ¶
func (x *TradeCategory) String() string
type TradeCategoryConfigHandler ¶
type TradeCategoryConfigHandler struct{}
----------------------------------------------------------------------------- Config TradeCategory -----------------------------------------------------------------------------
func (*TradeCategoryConfigHandler) GetKey ¶
func (*TradeCategoryConfigHandler) GetKey(msg proto.Message) string
func (*TradeCategoryConfigHandler) Unmarshal ¶
func (*TradeCategoryConfigHandler) Unmarshal(b []byte) (proto.Message, error)
func (*TradeCategoryConfigHandler) UnmarshalJson ¶
func (*TradeCategoryConfigHandler) UnmarshalJson(b []byte) (proto.Message, error)
type TradeRequest ¶
type TradeRequest struct { Lhs *FundingRequest `protobuf:"bytes,1,opt,name=lhs,proto3" json:"lhs,omitempty"` Rhs *FundingRequest `protobuf:"bytes,2,opt,name=rhs,proto3" json:"rhs,omitempty"` // contains filtered or unexported fields }
func (*TradeRequest) Descriptor
deprecated
func (*TradeRequest) Descriptor() ([]byte, []int)
Deprecated: Use TradeRequest.ProtoReflect.Descriptor instead.
func (*TradeRequest) GetLhs ¶
func (x *TradeRequest) GetLhs() *FundingRequest
func (*TradeRequest) GetRhs ¶
func (x *TradeRequest) GetRhs() *FundingRequest
func (*TradeRequest) ProtoMessage ¶
func (*TradeRequest) ProtoMessage()
func (*TradeRequest) ProtoReflect ¶
func (x *TradeRequest) ProtoReflect() protoreflect.Message
func (*TradeRequest) Reset ¶
func (x *TradeRequest) Reset()
func (*TradeRequest) String ¶
func (x *TradeRequest) String() string