Create your own cloud save validator Extend Override app
Overview
This article explains the API contract (Protobuf) used in the Extend Override app for cloud save validator.
service CloudsaveValidatorService {
// game record
rpc BeforeWriteGameRecord(GameRecord) returns (GameRecordValidationResult);
rpc AfterReadGameRecord(GameRecord) returns (GameRecordValidationResult);
rpc AfterBulkReadGameRecord(BulkGameRecord) returns (BulkGameRecordValidationResult);
// player record
rpc BeforeWritePlayerRecord(PlayerRecord) returns (PlayerRecordValidationResult);
rpc AfterReadPlayerRecord(PlayerRecord) returns (PlayerRecordValidationResult);
rpc AfterBulkReadPlayerRecord(BulkPlayerRecord) returns (BulkPlayerRecordValidationResult);
// admin game record
rpc BeforeWriteAdminGameRecord(AdminGameRecord) returns (GameRecordValidationResult);
// admin player record
rpc BeforeWriteAdminPlayerRecord(AdminPlayerRecord) returns (PlayerRecordValidationResult);
}
API Contract
BeforeWriteGameRecord
This method will be called by AccelByte Gaming Services (AGS) before a game record is written into Cloud Save.
- C#
- Go
- Java
- Python
In the app, the following function can be found in src/AccelByte.PluginArch.CloudsaveValidator.Demo.Server/Services/CloudSaveValidatorService.cs
.
public override Task<GameRecordValidationResult> BeforeWriteGameRecord(GameRecord request, ServerCallContext context)
{
...
}
In the app, the following function can be found in src/master/pkg/server/cloudsave_validator_service.go
.
func (s *CloudsaveValidatorServer) BeforeWriteGameRecord(ctx context.Context, request *pb.GameRecord) (*pb.GameRecordValidationResult, error) {
...
}
In the app, the following function can be found in src/main/java/net/accelbyte/cloudsave/validator/service/CloudsaveValidatorService.java
.
@Override
public void beforeWriteGameRecord(GameRecord request, StreamObserver<GameRecordValidationResult> responseObserver) {
...
}
In the app, the following function can be found in src/app/services/cloudsave_validator_service.py
.
async def BeforeWriteGameRecord(
self, request: GameRecord, context: Any
) -> GameRecordValidationResult:
...
AfterReadGameRecord
This method will be called by AGS after a game record is read from Cloud Save.
- C#
- Go
- Java
- Python
In the app, the following function can be found in src/AccelByte.PluginArch.CloudsaveValidator.Demo.Server/Services/CloudSaveValidatorService.cs
.
public override Task<GameRecordValidationResult> AfterReadGameRecord(GameRecord request, ServerCallContext context)
{
...
}
In the app, the following function can be found in src/master/pkg/server/cloudsave_validator_service.go
.
func (s *CloudsaveValidatorServer) AfterReadGameRecord(ctx context.Context, gameRecord *pb.GameRecord) (*pb.GameRecordValidationResult, error) {
...
}
In the app, the following function can be found in src/main/java/net/accelbyte/cloudsave/validator/service/CloudsaveValidatorService.java
.
@Override
public void afterReadGameRecord(GameRecord request, StreamObserver<GameRecordValidationResult> responseObserver) {
...
}
In the app, the following function can be found in src/app/services/cloudsave_validator_service.py
.
async def AfterReadGameRecord(
self, request: GameRecord, context: Any
) -> GameRecordValidationResult:
...
AfterBulkReadGameRecord
This method will be called by AGS after bulk reading game record from Cloud Save.
- C#
- Go
- Java
- Python
In the app, the following function can be found in src/AccelByte.PluginArch.CloudsaveValidator.Demo.Server/Services/CloudSaveValidatorService.cs
.
public override Task<BulkGameRecordValidationResult> AfterBulkReadGameRecord(BulkGameRecord request, ServerCallContext context)
{
...
}
In the app, the following function can be found in src/master/pkg/server/cloudsave_validator_service.go
.
func (s *CloudsaveValidatorServer) AfterBulkReadGameRecord(ctx context.Context, gameRecords *pb.BulkGameRecord) (*pb.BulkGameRecordValidationResult, error) {
...
}
In the app, the following function can be found in src/main/java/net/accelbyte/cloudsave/validator/service/CloudsaveValidatorService.java
.
@Override
public void afterBulkReadGameRecord(BulkGameRecord request, StreamObserver<BulkGameRecordValidationResult> responseObserver) {
...
In the app, the following function can be found in src/app/services/cloudsave_validator_service.py
.
async def AfterBulkReadGameRecord(
self, request: BulkGameRecord, context
) -> BulkGameRecordValidationResult:
...
BeforeWritePlayerRecord
This method will be called by AGS before a player record is written into Cloud Save.
- C#
- Go
- Java
- Python
In the app, the following function can be found in src/AccelByte.PluginArch.CloudsaveValidator.Demo.Server/Services/CloudSaveValidatorService.cs
.
public override Task<PlayerRecordValidationResult> BeforeWritePlayerRecord(PlayerRecord request, ServerCallContext context)
{
...
}
In the app, the following function can be found in src/master/pkg/server/cloudsave_validator_service.go
.
func (s *CloudsaveValidatorServer) BeforeWritePlayerRecord(ctx context.Context, request *pb.PlayerRecord) (*pb.PlayerRecordValidationResult, error) {
...
}
In the app, the following function can be found in src/main/java/net/accelbyte/cloudsave/validator/service/CloudsaveValidatorService.java
.
@Override
public void beforeWritePlayerRecord(PlayerRecord request, StreamObserver<PlayerRecordValidationResult> responseObserver) {
...
}
In the app, the following function can be found in src/app/services/cloudsave_validator_service.py
.
async def BeforeWritePlayerRecord(
self, request: PlayerRecord, context: Any
) -> PlayerRecordValidationResult:
...
AfterReadPlayerRecord
This method will be called by AGS after a player record is read from Cloud Save.
- C#
- Go
- Java
- Python
In the app, the following function can be found in src/AccelByte.PluginArch.CloudsaveValidator.Demo.Server/Services/CloudSaveValidatorService.cs
.
public override Task<PlayerRecordValidationResult> AfterReadPlayerRecord(PlayerRecord request, ServerCallContext context)
{
...
}
In the app, the following function can be found in src/master/pkg/server/cloudsave_validator_service.go
.
func (s *CloudsaveValidatorServer) AfterReadPlayerRecord(ctx context.Context, playerRecord *pb.PlayerRecord) (*pb.PlayerRecordValidationResult, error) {
...
}
In the app, the following function can be found in src/main/java/net/accelbyte/cloudsave/validator/service/CloudsaveValidatorService.java
.
@Override
public void afterReadPlayerRecord(PlayerRecord request, StreamObserver<PlayerRecordValidationResult> responseObserver) {
...
}
In the app, the following function can be found in src/app/services/cloudsave_validator_service.py
.
async def AfterReadPlayerRecord(
self, request: PlayerRecord, context: Any
) -> PlayerRecordValidationResult:
...
AfterBulkReadPlayerRecord
This method will be called by AGS after bulk reading player record from Cloud Save.
- C#
- Go
- Java
- Python
In the app, the following function can be found in src/AccelByte.PluginArch.CloudsaveValidator.Demo.Server/Services/CloudSaveValidatorService.cs
.
public override Task<BulkPlayerRecordValidationResult> AfterBulkReadPlayerRecord(BulkPlayerRecord request, ServerCallContext context)
{
...
}
In the app, the following function can be found in pkg/server/cloudsave_validator_service.go
.
func (s *CloudsaveValidatorServer) AfterBulkReadPlayerRecord(ctx context.Context, playerRecords *pb.BulkPlayerRecord) (*pb.BulkPlayerRecordValidationResult, error) {
...
}
In the app, the following function can be found in src/main/java/net/accelbyte/cloudsave/validator/service/CloudsaveValidatorService.java
.
@Override
public void afterBulkReadPlayerRecord(BulkPlayerRecord request, StreamObserver<BulkPlayerRecordValidationResult> responseObserver) {
...
}
In the app, the following function can be found in src/app/services/cloudsave_validator_service.py
.
async def AfterBulkReadPlayerRecord(
self, request: BulkPlayerRecord, context: Any
) -> BulkPlayerRecordValidationResult:
...
BeforeWriteAdminGameRecord
This method will be called by AGS before an admin game record is written to Cloud Save.
- C#
- Go
- Java
- Python
In the app, the following function can be found in src/AccelByte.PluginArch.CloudsaveValidator.Demo.Server/Services/CloudSaveValidatorService.cs
.
public override Task<GameRecordValidationResult> BeforeWriteAdminGameRecord(AdminGameRecord request, ServerCallContext context)
{
...
}
In the app, the following function can be found in src/master/pkg/server/cloudsave_validator_service.go
.
func (s *CloudsaveValidatorServer) BeforeWriteAdminGameRecord(ctx context.Context, request *pb.AdminGameRecord) (*pb.GameRecordValidationResult, error) {
...
}
In the app, the following function can be found in src/main/java/net/accelbyte/cloudsave/validator/service/CloudsaveValidatorService.java
.
@Override
public void beforeWriteAdminGameRecord(AdminGameRecord request, StreamObserver<GameRecordValidationResult> responseObserver) {
...
}
In the app, the following function can be found in src/app/services/cloudsave_validator_service.py
.
async def BeforeWriteAdminGameRecord(
self, request: AdminGameRecord, context: Any
) -> GameRecordValidationResult:
...
BeforeWriteAdminPlayerRecord
This method will be called by AGS before an admin player record is written to Cloud Save.
- C#
- Go
- Java
- Python
In the app, the following function can be found in src/AccelByte.PluginArch.CloudsaveValidator.Demo.Server/Services/CloudSaveValidatorService.cs
.
public override Task<PlayerRecordValidationResult> BeforeWriteAdminPlayerRecord(AdminPlayerRecord request, ServerCallContext context)
{
...
}
In the app, the following function can be found in src/master/pkg/server/cloudsave_validator_service.go
.
func (s *CloudsaveValidatorServer) BeforeWriteAdminPlayerRecord(ctx context.Context, request *pb.AdminPlayerRecord) (*pb.PlayerRecordValidationResult, error) {
}
In the app, the following function can be found in src/main/java/net/accelbyte/cloudsave/validator/service/CloudsaveValidatorService.java
.
@Override
public void beforeWriteAdminPlayerRecord(AdminPlayerRecord request, StreamObserver<PlayerRecordValidationResult> responseObserver) {
...
}
In the app, the following function can be found in src/app/services/cloudsave_validator_service.py
.
async def BeforeWriteAdminPlayerRecord(
self, request: AdminPlayerRecord, context: Any
) -> PlayerRecordValidationResult:
...
You could find more information about gRPC request handling here.