server.proto 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. syntax = "proto3";
  2. package chatto.discovery.v1;
  3. import "chatto/api/v1/server.proto";
  4. import "google/protobuf/descriptor.proto";
  5. // Request for public server metadata.
  6. message GetServerRequest {}
  7. // Public metadata clients need before they can authenticate or render the
  8. // initial server view.
  9. message GetServerResponse {
  10. // Public server profile and branding.
  11. chatto.api.v1.ServerPublicProfile profile = 1;
  12. // Login and registration options.
  13. chatto.api.v1.ServerLogin login = 2;
  14. }
  15. // Request for the public Neighbor directory.
  16. message ListNeighborsRequest {}
  17. // Publicly advertised servers. The response has no ordering contract.
  18. message ListNeighborsResponse {
  19. reserved 2;
  20. reserved "neighbors";
  21. // Canonical origins of the advertised servers.
  22. repeated string origins = 1;
  23. }
  24. // Provides unauthenticated server discovery metadata.
  25. service ServerDiscoveryService {
  26. // Returns public server metadata, branding, registration status, and login
  27. // provider information. This fully public RPC is available before login so
  28. // clients can render the first server screen and authentication choices.
  29. rpc GetServer(GetServerRequest) returns (GetServerResponse) {
  30. option idempotency_level = NO_SIDE_EFFECTS;
  31. }
  32. // Returns the public Neighbor directory without requiring a session.
  33. rpc ListNeighbors(ListNeighborsRequest) returns (ListNeighborsResponse) {
  34. option idempotency_level = NO_SIDE_EFFECTS;
  35. }
  36. }