syntax = "proto3";

package code.justin.tv.eventbus.controlplane;
option go_package = "rpc";

import "github.com/golang/protobuf/ptypes/timestamp/timestamp.proto";

service AuditLogs {
  rpc GetAuditLogsForService(GetAuditLogsForServiceReq) returns (GetAuditLogsForServiceResp);
}

message GetAuditLogsForServiceReq {
  string service_id = 1;
}

message AuditLog {
  string service_id = 1;
  string user_name = 2;
  string resource_type = 3;
  string resource_name = 4;
  string result = 5;
  string action = 6;
  google.protobuf.Timestamp timestamp = 7;
  string before = 8;
  string after = 9;
}

message GetAuditLogsForServiceResp {
  repeated AuditLog audit_logs = 1;
}
