auth.proto 822 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. message UserAddOptions {
  10. bool no_password = 1;
  11. };
  12. // User is a single entry in the bucket authUsers
  13. message User {
  14. bytes name = 1;
  15. bytes password = 2;
  16. repeated string roles = 3;
  17. UserAddOptions options = 4;
  18. }
  19. // Permission is a single entity
  20. message Permission {
  21. enum Type {
  22. READ = 0;
  23. WRITE = 1;
  24. READWRITE = 2;
  25. }
  26. Type permType = 1;
  27. bytes key = 2;
  28. bytes range_end = 3;
  29. }
  30. // Role is a single entry in the bucket authRoles
  31. message Role {
  32. bytes name = 1;
  33. repeated Permission keyPermission = 2;
  34. }