errors can be looked up also migrations changed

This commit is contained in:
Priec
2026-09-02 19:10:50 +02:00
parent ac29d9577b
commit e5996e619d
5 changed files with 330 additions and 5 deletions

View File

@@ -34,6 +34,10 @@ service AuthService {
rpc ListRolePermissions(ListRolePermissionsRequest) returns (RolePermissions);
rpc ListGrantableObjects(ListGrantableObjectsRequest) returns (ListGrantableObjectsResponse);
// Support diagnostics. Requires read on diagnostics:internal-errors.
rpc ListInternalErrors(ListInternalErrorsRequest) returns (ListInternalErrorsResponse);
rpc GetInternalError(GetInternalErrorRequest) returns (InternalError);
// User administration.
rpc AssignUserRole(AssignUserRoleRequest) returns (UserSummary);
// Resets a lower-ranked user's password.
@@ -184,7 +188,7 @@ message GrantableObject {
string profile = 2;
// Set only for a table-family root.
string table = 3;
// One of global_data, global_journal, profile, journal, or table.
// One of global_data, global_journal, profile, journal, table, or diagnostics.
string kind = 4;
// Actions the caller may grant to target_role for this object.
repeated string allowed_actions = 5;
@@ -194,6 +198,50 @@ message ListGrantableObjectsResponse {
repeated GrantableObject objects = 1;
}
message InternalError {
string reference_id = 1;
string user_id = 2;
string username = 3;
string grpc_method = 4;
string detail = 5;
int64 occurred_at_unix_milliseconds = 6;
}
message ListInternalErrorsRequest {
// Every non-empty text/UUID field is an optional filter. Username and method
// use case-insensitive substring matching.
string reference_id = 1;
string user_id = 2;
string username = 3;
string grpc_method = 4;
int64 occurred_from_unix_seconds = 5;
int64 occurred_to_unix_seconds = 6;
InternalErrorSort sort = 7;
// Unspecified sort always means newest first. For an explicit sort, false is
// ascending and true is descending.
bool descending = 8;
// Defaults to 100 and is capped at 500.
uint32 limit = 9;
uint64 offset = 10;
}
enum InternalErrorSort {
INTERNAL_ERROR_SORT_UNSPECIFIED = 0;
INTERNAL_ERROR_SORT_OCCURRED_AT = 1;
INTERNAL_ERROR_SORT_REFERENCE_ID = 2;
INTERNAL_ERROR_SORT_USERNAME = 3;
INTERNAL_ERROR_SORT_GRPC_METHOD = 4;
}
message ListInternalErrorsResponse {
repeated InternalError errors = 1;
uint64 total_count = 2;
}
message GetInternalErrorRequest {
string reference_id = 1;
}
message AssignUserRoleRequest {
string username = 1;
string role = 2;