auth.proto 716 B

123456789101112131415161718192021222324252627282930313233343536
  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. bytes key = 1;
  18. enum Type {
  19. READ = 0;
  20. WRITE = 1;
  21. READWRITE = 2;
  22. }
  23. Type permType = 2;
  24. }
  25. // Role is a single entry in the bucket authRoles
  26. message Role {
  27. bytes name = 1;
  28. repeated Permission keyPermission = 2;
  29. }