84 lines
1.4 KiB
Protocol Buffer
84 lines
1.4 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package alert.v1;
|
|
|
|
import "auth/v1/msg.proto";
|
|
import "base/v1/msg.proto";
|
|
|
|
message AlertFilter {
|
|
base.v1.BaseQueryParam base_filter = 1;
|
|
Importance importance = 2;
|
|
LogSource source = 3;
|
|
}
|
|
|
|
// Importance of given event
|
|
enum Importance {
|
|
LOW = 0; // Low Severity ( unimportant and can be ignored )
|
|
MEDIUM = 1; // MEDIUM Severity
|
|
HIGH = 2; // High Severity
|
|
CRITICAL = 3; // CRITICAL Severity ( can cause panics and data lost )
|
|
}
|
|
|
|
enum LogType {
|
|
TYPE_UNKNOWN = 0;
|
|
TYPE_SMS = 1;
|
|
TYPE_EMAIL = 2;
|
|
TYPE_PUSH = 3;
|
|
}
|
|
|
|
enum LogLevel {
|
|
LVL_UNKNOWN = 0;
|
|
LVL_INFO = 1;
|
|
LVL_SUCCESS = 2;
|
|
LVL_WARN = 3;
|
|
LVL_ERROR = 4;
|
|
}
|
|
|
|
enum LogSource {
|
|
SRC_UNKNOWN = 0;
|
|
SRC_USER = 1;
|
|
SRC_SYSTEM = 2;
|
|
SRC_WALLET = 3;
|
|
}
|
|
|
|
|
|
message Meta {
|
|
uint32 created_at_ts = 1;
|
|
uint32 updated_at_ts = 2;
|
|
uint32 blamer_id = 3; // User ID of person who made the change
|
|
}
|
|
|
|
message LogEvent {
|
|
auth.v1.InternalIAM iam = 1;
|
|
optional uint64 id = 2; // Record Id of Log stored in db
|
|
LogSource source = 3;
|
|
Importance importance = 4;
|
|
LogLevel level = 5;
|
|
string content = 6;
|
|
Meta meta = 7;
|
|
}
|
|
|
|
message LogEventList {
|
|
repeated LogEvent events = 1;
|
|
}
|
|
/*
|
|
Internal Msg
|
|
*/
|
|
|
|
message SMSChangeLog {
|
|
uint32 when_ts = 1;
|
|
string what = 2;
|
|
}
|
|
|
|
message SMS {
|
|
string recipient = 1; // recipient
|
|
string text = 2;
|
|
optional string sender = 3;
|
|
Meta meta = 4;
|
|
repeated SMSChangeLog change_log = 5;
|
|
}
|
|
|
|
message SMSList {
|
|
repeated SMS sms = 1;
|
|
}
|