notifier.proto 869 B

12345678910111213141516171819202122232425262728293031323334353637
  1. syntax = "proto3";
  2. package proto;
  3. import "google/protobuf/empty.proto";
  4. option go_package = "sdk/plugin/notifier/proto";
  5. message FsEvent {
  6. int64 timestamp = 1;
  7. string action = 2;
  8. string username = 3;
  9. string fs_path = 4;
  10. string fs_target_path = 5;
  11. string ssh_cmd = 6;
  12. int64 file_size = 7;
  13. string protocol = 8;
  14. int32 status = 9;
  15. string ip = 10;
  16. string virtual_path = 11;
  17. string virtual_target_path = 12;
  18. string session_id = 13;
  19. }
  20. message ProviderEvent {
  21. int64 timestamp = 1;
  22. string action = 2;
  23. string object_type = 3;
  24. string username = 4;
  25. string ip = 5;
  26. string object_name = 6;
  27. bytes object_data = 7; // object JSON serialized
  28. }
  29. service Notifier {
  30. rpc SendFsEvent(FsEvent) returns (google.protobuf.Empty);
  31. rpc SendProviderEvent(ProviderEvent) returns (google.protobuf.Empty);
  32. }