Skip to content

Commit

Permalink
introduce separate request/response header messages
Browse files Browse the repository at this point in the history
  • Loading branch information
havan committed Apr 15, 2024
1 parent 2f237a4 commit ad4cf7a
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions proto/cmp/types/v1alpha/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,35 @@ message Version {
// versioning)
int32 patch = 3;
}

message RequestHeader {
Header base_header = 1;
}

message ResponseHeader {
Header base_header = 1;

// Status of the response, success or failure
StatusType status = 2;

// Alert for more detailed information about the response
repeated Alert alerts = 3;
}

message Alert {
string message = 1;
AlertType type = 2;
}

enum AlertType {
ALERT_TYPE_UNSPECIFIED = 0;
ALERT_TYPE_INFO = 1;
ALERT_TYPE_WARNING = 2;
ALERT_TYPE_ERROR = 3;
}

enum StatusType {
STATUS_TYPE_UNSPECIFIED = 0;
STATUS_TYPE_SUCCESS = 1;
STATUS_TYPE_FAILURE = 2;
}

0 comments on commit ad4cf7a

Please sign in to comment.