Files
services/users/proto/users.proto
Janos Dobronszki 40b71a9cf9 Autogenerate services.m3o.com (#37)
* Autogenerate services.m3o.com

* Openapi for all

* Gen

* Fix

* Whaat

* Fix dep

* Fix

* Hmm

* Install make

* Debug

* Debug 1

* Location -> locations

* Fix

* Intall protoc gen micro

* F

* F

* F

* Push

* Rename secret

* Fix npm install

* Fix script

* Fix v2

* Ignore errors

* Ignore v2

* F

* F

* F

* Docs index

* Add hugo theme

* Hugo tania fixes

* Change gen

* Change gen 2

* Install hugo

* Change gen

* Gen fix

* Change hugo install

* Change hugo install

* CNAME

* Change articles wording

* Tiny fix

* Fix gen

* Redoc it all

* Fix gen

* Fixing up protos

* Fix proto

* Fix gen

* Fix

* Trigger build

* Fix copy

* Openapi docs

* Flatten

* Changes

* No date vol2

* Changes

* Add make to chat

* Fixes

* Change

* api spec

* replace RSS

* fix link

* Dont continue on error

* increase the width

* use micro at master

* change box colours

* move some things

* Pushing new readmes to see how they look like

* Add skip file

* Readmes

* Nicer api link

* Remove stutter

* FIx mistake

* set service font weight

* Messages readme fix

* add other font bold

* Notes

* Remove post from url

* Revert "Remove post from url"

This reverts commit 5fea2c23d0bafa910f5dc4d4cc63f71f578530e3.

* move exampleSite to site

* replace exampleSite with site

* update readme

* use filename for post

* update index

* Add source urls

* set source as params

* set source as params

* Fix entries

* Generator in go

* Fixes to generator

* F

* Change doc gen

* FIx cname

* Fixing protos

* Change to makefiles

* Fix gen script

Co-authored-by: Asim Aslam <asim@aslam.me>
2021-01-19 16:59:25 +00:00

114 lines
2.1 KiB
Protocol Buffer

syntax = "proto3";
package users;
option go_package = "proto;users";
service Users {
rpc Create(CreateRequest) returns (CreateResponse) {}
rpc Read(ReadRequest) returns (ReadResponse) {}
rpc Update(UpdateRequest) returns (UpdateResponse) {}
rpc Delete(DeleteRequest) returns (DeleteResponse) {}
rpc Search(SearchRequest) returns (SearchResponse) {}
rpc UpdatePassword(UpdatePasswordRequest) returns (UpdatePasswordResponse) {}
rpc Login(LoginRequest) returns (LoginResponse) {}
rpc Logout(LogoutRequest) returns (LogoutResponse) {}
rpc ReadSession(ReadSessionRequest) returns(ReadSessionResponse) {}
}
message User {
string id = 1; // uuid
string username = 2; // alphanumeric user or org
string email = 3;
int64 created = 4; // unix
int64 updated = 5; // unix
}
message Session {
string id = 1;
string username = 2;
string email = 3;
int64 created = 4; // unix
int64 expires = 5; // unix
}
message CreateRequest {
string id = 1; // uuid
string username = 2; // alphanumeric user or org
string email = 3;
string password = 4;
}
message CreateResponse {
}
message DeleteRequest {
string id = 1;
}
message DeleteResponse {
}
message ReadRequest {
string id = 1;
}
message ReadResponse {
User user = 1;
}
message UpdateRequest {
string id = 1; // uuid
string username = 2; // alphanumeric user or org
string email = 3;
}
message UpdateResponse {
}
message UpdatePasswordRequest {
string userId = 1;
string oldPassword = 2;
string newPassword = 3;
string confirm_password = 4;
}
message UpdatePasswordResponse {
}
message SearchRequest {
string username = 1;
string email = 2;
int64 limit = 3;
int64 offset = 4;
}
message SearchResponse {
repeated User users = 1;
}
message ReadSessionRequest {
string sessionId = 1;
}
message ReadSessionResponse {
Session session = 1;
}
message LoginRequest {
string username = 1;
string email = 2;
string password = 3;
}
message LoginResponse {
Session session = 1;
}
message LogoutRequest {
string sessionId = 1;
}
message LogoutResponse {
}