syntax = "proto3"; option go_package = "pkg/rpc/users"; package users; service UsersService { rpc Get(IdMessage) returns (UserResponse); rpc GetList(IdList) returns (UserList); rpc Update(UserRequest) returns (NullResponse); rpc Create(UserRequest) returns (IdMessage); rpc Delete(IdMessage) returns (NullResponse); rpc List(ListRequest) returns (UserList); } message IdList { repeated int64 ID = 1; } message IdMessage { int64 ID = 1; } message UserResponse { int64 ID = 1; string Username = 2; int32 StateID = 3; } message UserRequest { int64 ID = 1; optional string Username = 2; optional int32 StateID = 3; } message UserFilter { optional int64 ID = 1; optional string Username = 2; optional int32 StateID = 3; } message UserList { repeated UserResponse Users = 1; } message ListRequest { UserFilter Filter = 1; Pagination Page = 2; } message Pagination { int32 Size = 1; int32 Number = 2; } message NullResponse { }