auth.proto 739 B

12345678910111213141516171819202122232425262728293031323334353637
  1. syntax = "proto3";
  2. package authpb;
  3. import "gogoproto/gogo.proto";
  4. option (gogoproto.marshaler_all) = true;
  5. option (gogoproto.sizer_all) = true;
  6. option (gogoproto.unmarshaler_all) = true;
  7. option (gogoproto.goproto_getters_all) = false;
  8. option (gogoproto.goproto_enum_prefix_all) = false;
  9. // User is a single entry in the bucket authUsers
  10. message User {
  11. bytes name = 1;
  12. bytes password = 2;
  13. repeated string roles = 3;
  14. }
  15. // Permission is a single entity
  16. message Permission {
  17. enum Type {
  18. READ = 0;
  19. WRITE = 1;
  20. READWRITE = 2;
  21. }
  22. Type permType = 1;
  23. bytes key = 2;
  24. bytes range_end = 3;
  25. }
  26. // Role is a single entry in the bucket authRoles
  27. message Role {
  28. bytes name = 1;
  29. repeated Permission keyPermission = 2;
  30. }