mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
209 lines
No EOL
5 KiB
Protocol Buffer
209 lines
No EOL
5 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package litrpc;
|
|
|
|
option go_package = "github.com/lightninglabs/lightning-terminal/litrpc";
|
|
|
|
service Firewall {
|
|
rpc ListActions (ListActionsRequest) returns (ListActionsResponse);
|
|
rpc PrivacyMapConversion (PrivacyMapConversionRequest)
|
|
returns (PrivacyMapConversionResponse);
|
|
}
|
|
|
|
message PrivacyMapConversionRequest {
|
|
/*
|
|
If set to true, then the input string will be taken as the real value and
|
|
the response will the the pseudo value it if exists. Otherwise, the input
|
|
string will be assumed to be the pseudo value.
|
|
*/
|
|
bool real_to_pseudo = 1;
|
|
|
|
/*
|
|
The session ID under which to search for the real-pseudo pair.
|
|
*/
|
|
bytes session_id = 2;
|
|
|
|
/*
|
|
The input to be converted into the real or pseudo value.
|
|
*/
|
|
string input = 3;
|
|
}
|
|
|
|
message PrivacyMapConversionResponse {
|
|
/*
|
|
The resulting real or pseudo output.
|
|
*/
|
|
string output = 1;
|
|
}
|
|
|
|
message ListActionsRequest {
|
|
/*
|
|
The feature name which the filter the actions by. If left empty, all feature
|
|
actions will be returned.
|
|
*/
|
|
string feature_name = 1;
|
|
|
|
/*
|
|
The actor name to filter on. If left empty, all actor actions will be
|
|
returned.
|
|
*/
|
|
string actor_name = 2;
|
|
|
|
/*
|
|
The method name to filter on. If left empty, actions for any method will be
|
|
returned.
|
|
*/
|
|
string method_name = 3;
|
|
|
|
/*
|
|
The action state to filter on. If set to zero, actions for any state will
|
|
be returned.
|
|
*/
|
|
ActionState state = 4;
|
|
|
|
/*
|
|
The index of an action that will be used as the start of a query to
|
|
determine which actions should be returned in the response.
|
|
*/
|
|
uint64 index_offset = 5;
|
|
|
|
/*
|
|
The max number of actions to return in the response to this query.
|
|
*/
|
|
uint64 max_num_actions = 6;
|
|
|
|
/*
|
|
If set, the actions returned will result from seeking backwards from the
|
|
specified index offset. This can be used to paginate backwards.
|
|
*/
|
|
bool reversed = 7;
|
|
|
|
/*
|
|
Set to true if the total number of all actions that match the given filters
|
|
should be counted and returned in the request. Note that setting this will
|
|
significantly decrease the performance of the query if there are many
|
|
actions in the db.
|
|
*/
|
|
bool count_total = 8;
|
|
|
|
/*
|
|
The session ID to filter on. If left empty, actions for any session will
|
|
be returned.
|
|
*/
|
|
bytes session_id = 9;
|
|
|
|
/*
|
|
If specified, then only actions created after the given timestamp will be
|
|
considered.
|
|
*/
|
|
uint64 start_timestamp = 10 [jstype = JS_STRING];
|
|
|
|
/*
|
|
If specified, then only actions created before the given timestamp will be
|
|
considered.
|
|
*/
|
|
uint64 end_timestamp = 11 [jstype = JS_STRING];
|
|
}
|
|
|
|
message ListActionsResponse {
|
|
/*
|
|
A list of actions performed by the autopilot server.
|
|
*/
|
|
repeated Action actions = 1;
|
|
|
|
/*
|
|
The index of the last item in the set of returned actions. This can be used
|
|
to seek further, pagination style.
|
|
*/
|
|
uint64 last_index_offset = 2;
|
|
|
|
/*
|
|
The total number of actions that matched the filter in the request. It is
|
|
only set if count_total was set in the request.
|
|
*/
|
|
uint64 total_count = 3;
|
|
}
|
|
|
|
message Action {
|
|
/*
|
|
The name of the actor that initiated the action.
|
|
*/
|
|
string actor_name = 1;
|
|
|
|
/*
|
|
The name of the feature that triggered the action.
|
|
*/
|
|
string feature_name = 2;
|
|
|
|
/*
|
|
A human readable reason that the action was performed.
|
|
*/
|
|
string trigger = 3;
|
|
|
|
/*
|
|
A human readable string describing the intended outcome successfully
|
|
performing the action.
|
|
*/
|
|
string intent = 4;
|
|
|
|
/*
|
|
Structured info added by the action performer.
|
|
*/
|
|
string structured_json_data = 5;
|
|
|
|
/*
|
|
The URI of the method called.
|
|
*/
|
|
string rpc_method = 6;
|
|
|
|
/*
|
|
The parameters of the method call in compact json form.
|
|
*/
|
|
string rpc_params_json = 7;
|
|
|
|
/*
|
|
The unix timestamp in seconds at which the action was attempted.
|
|
*/
|
|
uint64 timestamp = 8 [jstype = JS_STRING];
|
|
|
|
/*
|
|
The action state. See ActionState for the meaning of each state.
|
|
*/
|
|
ActionState state = 9;
|
|
|
|
/*
|
|
If the state is Error, then this string will show the human readable reason
|
|
for why the action errored out.
|
|
*/
|
|
string error_reason = 10;
|
|
|
|
/*
|
|
The ID of the session under which the action was performed.
|
|
*/
|
|
bytes session_id = 11;
|
|
}
|
|
|
|
enum ActionState {
|
|
/*
|
|
No state was assigned to the action. This should never be the case.
|
|
*/
|
|
STATE_UNKNOWN = 0;
|
|
|
|
/*
|
|
Pending means that the request resulting in the action being created
|
|
came through but that no response came back from the appropriate backend.
|
|
This means that the Action is either still being processed or that it
|
|
did not successfully complete.
|
|
*/
|
|
STATE_PENDING = 1;
|
|
|
|
/*
|
|
Done means that the action successfully completed.
|
|
*/
|
|
STATE_DONE = 2;
|
|
|
|
/*
|
|
Error means that the Action did not successfully complete.
|
|
*/
|
|
STATE_ERROR = 3;
|
|
} |