59 lines
1.3 KiB
Protocol Buffer
59 lines
1.3 KiB
Protocol Buffer
// Copyright (C) 2023 The Licensing Authors
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
//
|
|
// This file attempts to follow common styles and design patterns described by
|
|
// Google Cloud based on their extensive use of protocol buffers.
|
|
//
|
|
// - See here for more: https://cloud.google.com/apis/design/design_patterns
|
|
//
|
|
|
|
syntax = "proto3";
|
|
|
|
package users.v1;
|
|
|
|
import "google/api/annotations.proto";
|
|
|
|
message SignupRequest {
|
|
string email = 1;
|
|
string password = 2;
|
|
}
|
|
|
|
message SignupResponse {}
|
|
|
|
message CurrentRequest {}
|
|
|
|
message CurrentResponse {
|
|
string subject = 1;
|
|
string name = 2;
|
|
string given_name = 3;
|
|
string family_name = 4;
|
|
string middle_name = 5;
|
|
string nickname = 6;
|
|
string preferred_username = 7;
|
|
string profile = 8;
|
|
string picture = 9;
|
|
string website = 10;
|
|
string email = 11;
|
|
bool email_verified = 12;
|
|
string gender = 13;
|
|
string birthdate = 14;
|
|
string zoneinfo = 15;
|
|
string locale = 16;
|
|
string phone_number = 17;
|
|
bool phone_number_verified = 18;
|
|
int32 updated_at = 19;
|
|
}
|
|
|
|
service UserService {
|
|
rpc Signup(SignupRequest) returns (SignupResponse) {
|
|
option (google.api.http) = {
|
|
post: "/v1/users"
|
|
body: "*"
|
|
};
|
|
}
|
|
|
|
rpc Current(CurrentRequest) returns (CurrentResponse) {
|
|
option (google.api.http) = {get: "/v1/users/current"};
|
|
}
|
|
} |