Protocol Documentation
Table of Contents
Top
apemanager/service.proto
Service "frost.fs.apemanager.APEManagerService"
APEManagerService
provides API to manage rule chains within sidechain's
Policy
smart contract.
rpc AddChain(AddChainRequest) returns (AddChainResponse);
rpc RemoveChain(RemoveChainRequest) returns (RemoveChainResponse);
rpc ListChains(ListChainsRequest) returns (ListChainsResponse);
Method AddChain
Add a rule chain for a specific target to Policy
smart contract.
Statuses:
- OK (0, SECTION_SUCCESS):
the chain has been successfully added;
- Common failures (SECTION_FAILURE_COMMON);
- CONTAINER_NOT_FOUND (3072, SECTION_CONTAINER):
container (as target) not found;
- APE_MANAGER_ACCESS_DENIED (5120, SECTION_APE_MANAGER):
the operation is denied by the service.
Method RemoveChain
Remove a rule chain for a specific target from Policy
smart contract.
RemoveChain is an idempotent operation: removal of non-existing rule chain
also means success.
Statuses:
- OK (0, SECTION_SUCCESS):
the chain has been successfully removed;
- Common failures (SECTION_FAILURE_COMMON);
- CONTAINER_NOT_FOUND (3072, SECTION_CONTAINER):
container (as target) not found;
- APE_MANAGER_ACCESS_DENIED (5120, SECTION_APE_MANAGER):
the operation is denied by the service.
Method ListChains
List chains defined for a specific target from Policy
smart contract.
Statuses:
- OK (0, SECTION_SUCCESS):
chains have been successfully listed;
- Common failures (SECTION_FAILURE_COMMON);
- CONTAINER_NOT_FOUND (3072, SECTION_CONTAINER):
container (as target) not found;
- APE_MANAGER_ACCESS_DENIED (5120, SECTION_APE_MANAGER):
the operation is denied by the service.
Message AddChainRequest
Message AddChainRequest.Body
Message AddChainResponse
Message AddChainResponse.Body
Field |
Type |
Label |
Description |
chain_id |
bytes |
|
Chain ID assigned for the added rule chain. If chain ID is left empty in the request, then it will be generated. |
Message ListChainsRequest
Message ListChainsRequest.Body
Message ListChainsResponse
Message ListChainsResponse.Body
Field |
Type |
Label |
Description |
chains |
frost.fs.ape.Chain |
repeated |
The list of chains defined for the reqeusted target. |
Message RemoveChainRequest
Message RemoveChainRequest.Body
Field |
Type |
Label |
Description |
target |
frost.fs.ape.ChainTarget |
|
Target for which a rule chain is removed. |
chain_id |
bytes |
|
Chain ID assigned for the rule chain. |
Message RemoveChainResponse
Message RemoveChainResponse.Body
Since RemoveChain is an idempotent operation, then the only indicator that
operation could not be performed is an error returning to a client.
Scalar Value Types
.proto Type |
Notes |
C++ Type |
Java Type |
Python Type |
double |
|
double |
double |
float |
float |
|
float |
float |
float |
int32 |
Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. |
int32 |
int |
int |
int64 |
Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. |
int64 |
long |
int/long |
uint32 |
Uses variable-length encoding. |
uint32 |
int |
int/long |
uint64 |
Uses variable-length encoding. |
uint64 |
long |
int/long |
sint32 |
Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. |
int32 |
int |
int |
sint64 |
Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. |
int64 |
long |
int/long |
fixed32 |
Always four bytes. More efficient than uint32 if values are often greater than 2^28. |
uint32 |
int |
int |
fixed64 |
Always eight bytes. More efficient than uint64 if values are often greater than 2^56. |
uint64 |
long |
int/long |
sfixed32 |
Always four bytes. |
int32 |
int |
int |
sfixed64 |
Always eight bytes. |
int64 |
long |
int/long |
bool |
|
bool |
boolean |
boolean |
string |
A string must always contain UTF-8 encoded or 7-bit ASCII text. |
string |
String |
str/unicode |
bytes |
May contain any arbitrary sequence of bytes. |
string |
ByteString |
str |