diff --git a/app/commands/reset_password.go b/app/commands/reset_password.go new file mode 100644 index 0000000..89f0a57 --- /dev/null +++ b/app/commands/reset_password.go @@ -0,0 +1,29 @@ +package commands + +import ( + . "github.com/reiver/greatape/app/validators" + . "github.com/reiver/greatape/components/constants" + . "github.com/reiver/greatape/components/contracts" +) + +func ResetPassword(x IDispatcher, usernameOrEmail string) (IResetPasswordResult, error) { + isEmail := x.MatchString(EMAIL, usernameOrEmail) + if !isEmail && !UsernameIsValid(usernameOrEmail) { + return nil, ERROR_INVALID_PARAMETERS + } + + identities := x.FilterIdentities(func(identity IIdentity) bool { + if isEmail { + return identity.Email() == usernameOrEmail + } else { + return identity.Username() == usernameOrEmail + } + }) + + if identities.HasExactlyOneItem() { + identity := identities.First() + _ = identity + } + + return x.NewResetPasswordResult(), nil +} diff --git a/components/api/api_test.go b/components/api/api_test.go index 4c1b6c6..a42521b 100644 --- a/components/api/api_test.go +++ b/components/api/api_test.go @@ -137,6 +137,18 @@ func TestChangePasswordApi(test *testing.T) { } } +func TestResetPasswordApi(test *testing.T) { + input := &ResetPasswordRequest{ + UsernameOrEmail: "username_or_email", + } + + if output, err := api.ResetPassword(input); err != nil { + test.Fatal(err) + } else if output == nil { + test.Fail() + } +} + func TestLogoutApi(test *testing.T) { input := &LogoutRequest{} diff --git a/components/api/operations/factory.go b/components/api/operations/factory.go index fbcff6f..2f1c4c1 100644 --- a/components/api/operations/factory.go +++ b/components/api/operations/factory.go @@ -15,6 +15,7 @@ func (factory *operationFactory) Operations() []IOperation { GetProfileByUserOperation(), UpdateProfileByUserOperation(), ChangePasswordOperation(), + ResetPasswordOperation(), LogoutOperation(), WebfingerOperation(), GetPackagesOperation(), diff --git a/components/api/operations/reset_password_operation.go b/components/api/operations/reset_password_operation.go new file mode 100644 index 0000000..276744c --- /dev/null +++ b/components/api/operations/reset_password_operation.go @@ -0,0 +1,51 @@ +package operations + +import ( + . "github.com/reiver/greatape/components/api/protobuf" + . "github.com/reiver/greatape/components/api/services" + . "github.com/reiver/greatape/components/contracts" + . "github.com/xeronith/diamante/contracts/operation" + . "github.com/xeronith/diamante/contracts/service" + . "github.com/xeronith/diamante/contracts/system" + . "github.com/xeronith/diamante/operation" +) + +type resetPasswordOperation struct { + Operation + + run func(IContext, *ResetPasswordRequest) (*ResetPasswordResult, error) +} + +func ResetPasswordOperation() IOperation { + return &resetPasswordOperation{ + run: ResetPasswordService, + } +} + +func (operation *resetPasswordOperation) Id() (ID, ID) { + return RESET_PASSWORD_REQUEST, RESET_PASSWORD_RESULT +} + +func (operation *resetPasswordOperation) InputContainer() Pointer { + return new(ResetPasswordRequest) +} + +func (operation *resetPasswordOperation) OutputContainer() Pointer { + return new(ResetPasswordResult) +} + +func (operation *resetPasswordOperation) Execute(context IContext, payload Pointer) (Pointer, error) { + return operation.run(context, payload.(*ResetPasswordRequest)) +} + +/* +func (operation *resetPasswordOperation) ExecutionTimeLimits() (Duration, Duration, Duration) { + var ( + TIME_LIMIT_WARNING Duration = 20_000_000 + TIME_LIMIT_ALERT Duration = 35_000_000 + TIME_LIMIT_CRITICAL Duration = 50_000_000 + ) + + return TIME_LIMIT_WARNING, TIME_LIMIT_ALERT, TIME_LIMIT_CRITICAL +} +*/ diff --git a/components/api/protobuf/spis.pb.go b/components/api/protobuf/spis.pb.go index fc64df3..079f6b6 100644 --- a/components/api/protobuf/spis.pb.go +++ b/components/api/protobuf/spis.pb.go @@ -1025,6 +1025,93 @@ func (*ChangePasswordResult) Descriptor() ([]byte, []int) { return file_spis_proto_rawDescGZIP(), []int{17} } +// API: ResetPassword +// ----------------------------------------------------------- +type ResetPasswordRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UsernameOrEmail string `protobuf:"bytes,1,opt,name=usernameOrEmail,proto3" json:"usernameOrEmail,omitempty"` +} + +func (x *ResetPasswordRequest) Reset() { + *x = ResetPasswordRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_spis_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResetPasswordRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResetPasswordRequest) ProtoMessage() {} + +func (x *ResetPasswordRequest) ProtoReflect() protoreflect.Message { + mi := &file_spis_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResetPasswordRequest.ProtoReflect.Descriptor instead. +func (*ResetPasswordRequest) Descriptor() ([]byte, []int) { + return file_spis_proto_rawDescGZIP(), []int{18} +} + +func (x *ResetPasswordRequest) GetUsernameOrEmail() string { + if x != nil { + return x.UsernameOrEmail + } + return "" +} + +type ResetPasswordResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ResetPasswordResult) Reset() { + *x = ResetPasswordResult{} + if protoimpl.UnsafeEnabled { + mi := &file_spis_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResetPasswordResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResetPasswordResult) ProtoMessage() {} + +func (x *ResetPasswordResult) ProtoReflect() protoreflect.Message { + mi := &file_spis_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResetPasswordResult.ProtoReflect.Descriptor instead. +func (*ResetPasswordResult) Descriptor() ([]byte, []int) { + return file_spis_proto_rawDescGZIP(), []int{19} +} + // API: Logout // ----------------------------------------------------------- type LogoutRequest struct { @@ -1036,7 +1123,7 @@ type LogoutRequest struct { func (x *LogoutRequest) Reset() { *x = LogoutRequest{} if protoimpl.UnsafeEnabled { - mi := &file_spis_proto_msgTypes[18] + mi := &file_spis_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1049,7 +1136,7 @@ func (x *LogoutRequest) String() string { func (*LogoutRequest) ProtoMessage() {} func (x *LogoutRequest) ProtoReflect() protoreflect.Message { - mi := &file_spis_proto_msgTypes[18] + mi := &file_spis_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1062,7 +1149,7 @@ func (x *LogoutRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use LogoutRequest.ProtoReflect.Descriptor instead. func (*LogoutRequest) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{18} + return file_spis_proto_rawDescGZIP(), []int{20} } type LogoutResult struct { @@ -1074,7 +1161,7 @@ type LogoutResult struct { func (x *LogoutResult) Reset() { *x = LogoutResult{} if protoimpl.UnsafeEnabled { - mi := &file_spis_proto_msgTypes[19] + mi := &file_spis_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1087,7 +1174,7 @@ func (x *LogoutResult) String() string { func (*LogoutResult) ProtoMessage() {} func (x *LogoutResult) ProtoReflect() protoreflect.Message { - mi := &file_spis_proto_msgTypes[19] + mi := &file_spis_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1100,7 +1187,7 @@ func (x *LogoutResult) ProtoReflect() protoreflect.Message { // Deprecated: Use LogoutResult.ProtoReflect.Descriptor instead. func (*LogoutResult) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{19} + return file_spis_proto_rawDescGZIP(), []int{21} } // API: Webfinger @@ -1116,7 +1203,7 @@ type WebfingerRequest struct { func (x *WebfingerRequest) Reset() { *x = WebfingerRequest{} if protoimpl.UnsafeEnabled { - mi := &file_spis_proto_msgTypes[20] + mi := &file_spis_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1129,7 +1216,7 @@ func (x *WebfingerRequest) String() string { func (*WebfingerRequest) ProtoMessage() {} func (x *WebfingerRequest) ProtoReflect() protoreflect.Message { - mi := &file_spis_proto_msgTypes[20] + mi := &file_spis_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1142,7 +1229,7 @@ func (x *WebfingerRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use WebfingerRequest.ProtoReflect.Descriptor instead. func (*WebfingerRequest) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{20} + return file_spis_proto_rawDescGZIP(), []int{22} } func (x *WebfingerRequest) GetResource() string { @@ -1165,7 +1252,7 @@ type WebfingerResult struct { func (x *WebfingerResult) Reset() { *x = WebfingerResult{} if protoimpl.UnsafeEnabled { - mi := &file_spis_proto_msgTypes[21] + mi := &file_spis_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1178,7 +1265,7 @@ func (x *WebfingerResult) String() string { func (*WebfingerResult) ProtoMessage() {} func (x *WebfingerResult) ProtoReflect() protoreflect.Message { - mi := &file_spis_proto_msgTypes[21] + mi := &file_spis_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1191,7 +1278,7 @@ func (x *WebfingerResult) ProtoReflect() protoreflect.Message { // Deprecated: Use WebfingerResult.ProtoReflect.Descriptor instead. func (*WebfingerResult) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{21} + return file_spis_proto_rawDescGZIP(), []int{23} } func (x *WebfingerResult) GetAliases() []string { @@ -1226,7 +1313,7 @@ type GetPackagesRequest struct { func (x *GetPackagesRequest) Reset() { *x = GetPackagesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_spis_proto_msgTypes[22] + mi := &file_spis_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1239,7 +1326,7 @@ func (x *GetPackagesRequest) String() string { func (*GetPackagesRequest) ProtoMessage() {} func (x *GetPackagesRequest) ProtoReflect() protoreflect.Message { - mi := &file_spis_proto_msgTypes[22] + mi := &file_spis_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1252,7 +1339,7 @@ func (x *GetPackagesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPackagesRequest.ProtoReflect.Descriptor instead. func (*GetPackagesRequest) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{22} + return file_spis_proto_rawDescGZIP(), []int{24} } type GetPackagesResult struct { @@ -1266,7 +1353,7 @@ type GetPackagesResult struct { func (x *GetPackagesResult) Reset() { *x = GetPackagesResult{} if protoimpl.UnsafeEnabled { - mi := &file_spis_proto_msgTypes[23] + mi := &file_spis_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1279,7 +1366,7 @@ func (x *GetPackagesResult) String() string { func (*GetPackagesResult) ProtoMessage() {} func (x *GetPackagesResult) ProtoReflect() protoreflect.Message { - mi := &file_spis_proto_msgTypes[23] + mi := &file_spis_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1292,7 +1379,7 @@ func (x *GetPackagesResult) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPackagesResult.ProtoReflect.Descriptor instead. func (*GetPackagesResult) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{23} + return file_spis_proto_rawDescGZIP(), []int{25} } func (x *GetPackagesResult) GetBody() []byte { @@ -1315,7 +1402,7 @@ type GetActorRequest struct { func (x *GetActorRequest) Reset() { *x = GetActorRequest{} if protoimpl.UnsafeEnabled { - mi := &file_spis_proto_msgTypes[24] + mi := &file_spis_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1328,7 +1415,7 @@ func (x *GetActorRequest) String() string { func (*GetActorRequest) ProtoMessage() {} func (x *GetActorRequest) ProtoReflect() protoreflect.Message { - mi := &file_spis_proto_msgTypes[24] + mi := &file_spis_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1341,7 +1428,7 @@ func (x *GetActorRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetActorRequest.ProtoReflect.Descriptor instead. func (*GetActorRequest) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{24} + return file_spis_proto_rawDescGZIP(), []int{26} } func (x *GetActorRequest) GetUsername() string { @@ -1376,7 +1463,7 @@ type GetActorResult struct { func (x *GetActorResult) Reset() { *x = GetActorResult{} if protoimpl.UnsafeEnabled { - mi := &file_spis_proto_msgTypes[25] + mi := &file_spis_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1389,7 +1476,7 @@ func (x *GetActorResult) String() string { func (*GetActorResult) ProtoMessage() {} func (x *GetActorResult) ProtoReflect() protoreflect.Message { - mi := &file_spis_proto_msgTypes[25] + mi := &file_spis_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1402,7 +1489,7 @@ func (x *GetActorResult) ProtoReflect() protoreflect.Message { // Deprecated: Use GetActorResult.ProtoReflect.Descriptor instead. func (*GetActorResult) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{25} + return file_spis_proto_rawDescGZIP(), []int{27} } func (x *GetActorResult) GetContext() []string { @@ -1524,7 +1611,7 @@ type FollowActorRequest struct { func (x *FollowActorRequest) Reset() { *x = FollowActorRequest{} if protoimpl.UnsafeEnabled { - mi := &file_spis_proto_msgTypes[26] + mi := &file_spis_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1537,7 +1624,7 @@ func (x *FollowActorRequest) String() string { func (*FollowActorRequest) ProtoMessage() {} func (x *FollowActorRequest) ProtoReflect() protoreflect.Message { - mi := &file_spis_proto_msgTypes[26] + mi := &file_spis_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1550,7 +1637,7 @@ func (x *FollowActorRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use FollowActorRequest.ProtoReflect.Descriptor instead. func (*FollowActorRequest) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{26} + return file_spis_proto_rawDescGZIP(), []int{28} } func (x *FollowActorRequest) GetUsername() string { @@ -1578,7 +1665,7 @@ type FollowActorResult struct { func (x *FollowActorResult) Reset() { *x = FollowActorResult{} if protoimpl.UnsafeEnabled { - mi := &file_spis_proto_msgTypes[27] + mi := &file_spis_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1591,7 +1678,7 @@ func (x *FollowActorResult) String() string { func (*FollowActorResult) ProtoMessage() {} func (x *FollowActorResult) ProtoReflect() protoreflect.Message { - mi := &file_spis_proto_msgTypes[27] + mi := &file_spis_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1604,7 +1691,7 @@ func (x *FollowActorResult) ProtoReflect() protoreflect.Message { // Deprecated: Use FollowActorResult.ProtoReflect.Descriptor instead. func (*FollowActorResult) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{27} + return file_spis_proto_rawDescGZIP(), []int{29} } func (x *FollowActorResult) GetUrl() string { @@ -1627,7 +1714,7 @@ type AuthorizeInteractionRequest struct { func (x *AuthorizeInteractionRequest) Reset() { *x = AuthorizeInteractionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_spis_proto_msgTypes[28] + mi := &file_spis_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1640,7 +1727,7 @@ func (x *AuthorizeInteractionRequest) String() string { func (*AuthorizeInteractionRequest) ProtoMessage() {} func (x *AuthorizeInteractionRequest) ProtoReflect() protoreflect.Message { - mi := &file_spis_proto_msgTypes[28] + mi := &file_spis_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1653,7 +1740,7 @@ func (x *AuthorizeInteractionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AuthorizeInteractionRequest.ProtoReflect.Descriptor instead. func (*AuthorizeInteractionRequest) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{28} + return file_spis_proto_rawDescGZIP(), []int{30} } func (x *AuthorizeInteractionRequest) GetUri() string { @@ -1675,7 +1762,7 @@ type AuthorizeInteractionResult struct { func (x *AuthorizeInteractionResult) Reset() { *x = AuthorizeInteractionResult{} if protoimpl.UnsafeEnabled { - mi := &file_spis_proto_msgTypes[29] + mi := &file_spis_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1688,7 +1775,7 @@ func (x *AuthorizeInteractionResult) String() string { func (*AuthorizeInteractionResult) ProtoMessage() {} func (x *AuthorizeInteractionResult) ProtoReflect() protoreflect.Message { - mi := &file_spis_proto_msgTypes[29] + mi := &file_spis_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1701,7 +1788,7 @@ func (x *AuthorizeInteractionResult) ProtoReflect() protoreflect.Message { // Deprecated: Use AuthorizeInteractionResult.ProtoReflect.Descriptor instead. func (*AuthorizeInteractionResult) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{29} + return file_spis_proto_rawDescGZIP(), []int{31} } func (x *AuthorizeInteractionResult) GetUri() string { @@ -1731,7 +1818,7 @@ type GetFollowersRequest struct { func (x *GetFollowersRequest) Reset() { *x = GetFollowersRequest{} if protoimpl.UnsafeEnabled { - mi := &file_spis_proto_msgTypes[30] + mi := &file_spis_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1744,7 +1831,7 @@ func (x *GetFollowersRequest) String() string { func (*GetFollowersRequest) ProtoMessage() {} func (x *GetFollowersRequest) ProtoReflect() protoreflect.Message { - mi := &file_spis_proto_msgTypes[30] + mi := &file_spis_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1757,7 +1844,7 @@ func (x *GetFollowersRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetFollowersRequest.ProtoReflect.Descriptor instead. func (*GetFollowersRequest) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{30} + return file_spis_proto_rawDescGZIP(), []int{32} } func (x *GetFollowersRequest) GetUsername() string { @@ -1783,7 +1870,7 @@ type GetFollowersResult struct { func (x *GetFollowersResult) Reset() { *x = GetFollowersResult{} if protoimpl.UnsafeEnabled { - mi := &file_spis_proto_msgTypes[31] + mi := &file_spis_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1796,7 +1883,7 @@ func (x *GetFollowersResult) String() string { func (*GetFollowersResult) ProtoMessage() {} func (x *GetFollowersResult) ProtoReflect() protoreflect.Message { - mi := &file_spis_proto_msgTypes[31] + mi := &file_spis_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1809,7 +1896,7 @@ func (x *GetFollowersResult) ProtoReflect() protoreflect.Message { // Deprecated: Use GetFollowersResult.ProtoReflect.Descriptor instead. func (*GetFollowersResult) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{31} + return file_spis_proto_rawDescGZIP(), []int{33} } func (x *GetFollowersResult) GetContext() string { @@ -1867,7 +1954,7 @@ type GetFollowingRequest struct { func (x *GetFollowingRequest) Reset() { *x = GetFollowingRequest{} if protoimpl.UnsafeEnabled { - mi := &file_spis_proto_msgTypes[32] + mi := &file_spis_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1880,7 +1967,7 @@ func (x *GetFollowingRequest) String() string { func (*GetFollowingRequest) ProtoMessage() {} func (x *GetFollowingRequest) ProtoReflect() protoreflect.Message { - mi := &file_spis_proto_msgTypes[32] + mi := &file_spis_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1893,7 +1980,7 @@ func (x *GetFollowingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetFollowingRequest.ProtoReflect.Descriptor instead. func (*GetFollowingRequest) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{32} + return file_spis_proto_rawDescGZIP(), []int{34} } func (x *GetFollowingRequest) GetUsername() string { @@ -1919,7 +2006,7 @@ type GetFollowingResult struct { func (x *GetFollowingResult) Reset() { *x = GetFollowingResult{} if protoimpl.UnsafeEnabled { - mi := &file_spis_proto_msgTypes[33] + mi := &file_spis_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1932,7 +2019,7 @@ func (x *GetFollowingResult) String() string { func (*GetFollowingResult) ProtoMessage() {} func (x *GetFollowingResult) ProtoReflect() protoreflect.Message { - mi := &file_spis_proto_msgTypes[33] + mi := &file_spis_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1945,7 +2032,7 @@ func (x *GetFollowingResult) ProtoReflect() protoreflect.Message { // Deprecated: Use GetFollowingResult.ProtoReflect.Descriptor instead. func (*GetFollowingResult) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{33} + return file_spis_proto_rawDescGZIP(), []int{35} } func (x *GetFollowingResult) GetContext() string { @@ -2004,7 +2091,7 @@ type PostToOutboxRequest struct { func (x *PostToOutboxRequest) Reset() { *x = PostToOutboxRequest{} if protoimpl.UnsafeEnabled { - mi := &file_spis_proto_msgTypes[34] + mi := &file_spis_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2017,7 +2104,7 @@ func (x *PostToOutboxRequest) String() string { func (*PostToOutboxRequest) ProtoMessage() {} func (x *PostToOutboxRequest) ProtoReflect() protoreflect.Message { - mi := &file_spis_proto_msgTypes[34] + mi := &file_spis_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2030,7 +2117,7 @@ func (x *PostToOutboxRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PostToOutboxRequest.ProtoReflect.Descriptor instead. func (*PostToOutboxRequest) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{34} + return file_spis_proto_rawDescGZIP(), []int{36} } func (x *PostToOutboxRequest) GetUsername() string { @@ -2058,7 +2145,7 @@ type PostToOutboxResult struct { func (x *PostToOutboxResult) Reset() { *x = PostToOutboxResult{} if protoimpl.UnsafeEnabled { - mi := &file_spis_proto_msgTypes[35] + mi := &file_spis_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2071,7 +2158,7 @@ func (x *PostToOutboxResult) String() string { func (*PostToOutboxResult) ProtoMessage() {} func (x *PostToOutboxResult) ProtoReflect() protoreflect.Message { - mi := &file_spis_proto_msgTypes[35] + mi := &file_spis_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2084,7 +2171,7 @@ func (x *PostToOutboxResult) ProtoReflect() protoreflect.Message { // Deprecated: Use PostToOutboxResult.ProtoReflect.Descriptor instead. func (*PostToOutboxResult) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{35} + return file_spis_proto_rawDescGZIP(), []int{37} } func (x *PostToOutboxResult) GetBody() []byte { @@ -2107,7 +2194,7 @@ type GetOutboxRequest struct { func (x *GetOutboxRequest) Reset() { *x = GetOutboxRequest{} if protoimpl.UnsafeEnabled { - mi := &file_spis_proto_msgTypes[36] + mi := &file_spis_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2120,7 +2207,7 @@ func (x *GetOutboxRequest) String() string { func (*GetOutboxRequest) ProtoMessage() {} func (x *GetOutboxRequest) ProtoReflect() protoreflect.Message { - mi := &file_spis_proto_msgTypes[36] + mi := &file_spis_proto_msgTypes[38] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2133,7 +2220,7 @@ func (x *GetOutboxRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetOutboxRequest.ProtoReflect.Descriptor instead. func (*GetOutboxRequest) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{36} + return file_spis_proto_rawDescGZIP(), []int{38} } func (x *GetOutboxRequest) GetUsername() string { @@ -2159,7 +2246,7 @@ type GetOutboxResult struct { func (x *GetOutboxResult) Reset() { *x = GetOutboxResult{} if protoimpl.UnsafeEnabled { - mi := &file_spis_proto_msgTypes[37] + mi := &file_spis_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2172,7 +2259,7 @@ func (x *GetOutboxResult) String() string { func (*GetOutboxResult) ProtoMessage() {} func (x *GetOutboxResult) ProtoReflect() protoreflect.Message { - mi := &file_spis_proto_msgTypes[37] + mi := &file_spis_proto_msgTypes[39] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2185,7 +2272,7 @@ func (x *GetOutboxResult) ProtoReflect() protoreflect.Message { // Deprecated: Use GetOutboxResult.ProtoReflect.Descriptor instead. func (*GetOutboxResult) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{37} + return file_spis_proto_rawDescGZIP(), []int{39} } func (x *GetOutboxResult) GetContext() string { @@ -2244,7 +2331,7 @@ type PostToInboxRequest struct { func (x *PostToInboxRequest) Reset() { *x = PostToInboxRequest{} if protoimpl.UnsafeEnabled { - mi := &file_spis_proto_msgTypes[38] + mi := &file_spis_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2257,7 +2344,7 @@ func (x *PostToInboxRequest) String() string { func (*PostToInboxRequest) ProtoMessage() {} func (x *PostToInboxRequest) ProtoReflect() protoreflect.Message { - mi := &file_spis_proto_msgTypes[38] + mi := &file_spis_proto_msgTypes[40] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2270,7 +2357,7 @@ func (x *PostToInboxRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PostToInboxRequest.ProtoReflect.Descriptor instead. func (*PostToInboxRequest) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{38} + return file_spis_proto_rawDescGZIP(), []int{40} } func (x *PostToInboxRequest) GetUsername() string { @@ -2298,7 +2385,7 @@ type PostToInboxResult struct { func (x *PostToInboxResult) Reset() { *x = PostToInboxResult{} if protoimpl.UnsafeEnabled { - mi := &file_spis_proto_msgTypes[39] + mi := &file_spis_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2311,7 +2398,7 @@ func (x *PostToInboxResult) String() string { func (*PostToInboxResult) ProtoMessage() {} func (x *PostToInboxResult) ProtoReflect() protoreflect.Message { - mi := &file_spis_proto_msgTypes[39] + mi := &file_spis_proto_msgTypes[41] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2324,7 +2411,7 @@ func (x *PostToInboxResult) ProtoReflect() protoreflect.Message { // Deprecated: Use PostToInboxResult.ProtoReflect.Descriptor instead. func (*PostToInboxResult) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{39} + return file_spis_proto_rawDescGZIP(), []int{41} } func (x *PostToInboxResult) GetBody() []byte { @@ -2347,7 +2434,7 @@ type GetInboxRequest struct { func (x *GetInboxRequest) Reset() { *x = GetInboxRequest{} if protoimpl.UnsafeEnabled { - mi := &file_spis_proto_msgTypes[40] + mi := &file_spis_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2360,7 +2447,7 @@ func (x *GetInboxRequest) String() string { func (*GetInboxRequest) ProtoMessage() {} func (x *GetInboxRequest) ProtoReflect() protoreflect.Message { - mi := &file_spis_proto_msgTypes[40] + mi := &file_spis_proto_msgTypes[42] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2373,7 +2460,7 @@ func (x *GetInboxRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetInboxRequest.ProtoReflect.Descriptor instead. func (*GetInboxRequest) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{40} + return file_spis_proto_rawDescGZIP(), []int{42} } func (x *GetInboxRequest) GetUsername() string { @@ -2399,7 +2486,7 @@ type GetInboxResult struct { func (x *GetInboxResult) Reset() { *x = GetInboxResult{} if protoimpl.UnsafeEnabled { - mi := &file_spis_proto_msgTypes[41] + mi := &file_spis_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2412,7 +2499,7 @@ func (x *GetInboxResult) String() string { func (*GetInboxResult) ProtoMessage() {} func (x *GetInboxResult) ProtoReflect() protoreflect.Message { - mi := &file_spis_proto_msgTypes[41] + mi := &file_spis_proto_msgTypes[43] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2425,7 +2512,7 @@ func (x *GetInboxResult) ProtoReflect() protoreflect.Message { // Deprecated: Use GetInboxResult.ProtoReflect.Descriptor instead. func (*GetInboxResult) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{41} + return file_spis_proto_rawDescGZIP(), []int{43} } func (x *GetInboxResult) GetContext() string { @@ -2562,133 +2649,116 @@ var file_spis_proto_rawDesc = []byte{ 0x65, 0x77, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x65, 0x77, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x16, 0x0a, 0x14, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x0f, 0x0a, 0x0d, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x0e, 0x0a, 0x0c, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x2e, 0x0a, 0x10, 0x57, 0x65, 0x62, 0x66, 0x69, 0x6e, - 0x67, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x76, 0x0a, 0x0f, 0x57, 0x65, 0x62, 0x66, 0x69, 0x6e, - 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x6c, 0x69, - 0x61, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x61, 0x6c, 0x69, 0x61, - 0x73, 0x65, 0x73, 0x12, 0x2f, 0x0a, 0x05, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x63, - 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x50, 0x75, 0x62, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x05, 0x6c, - 0x69, 0x6e, 0x6b, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x14, - 0x0a, 0x12, 0x47, 0x65, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x22, 0x27, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, - 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x2d, 0x0a, - 0x0f, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xe5, 0x03, 0x0a, - 0x0e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, - 0x19, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x08, 0x40, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x6f, - 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, - 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x6f, 0x6c, 0x6c, - 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x6f, 0x6c, - 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x12, 0x16, 0x0a, 0x06, - 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, - 0x74, 0x62, 0x6f, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x70, 0x72, 0x65, 0x66, - 0x65, 0x72, 0x72, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x11, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x55, 0x73, - 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, - 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x2e, 0x0a, 0x04, - 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x50, 0x75, - 0x62, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x05, - 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x40, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, + 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, + 0x0f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x4f, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, + 0x4f, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x15, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x65, 0x74, + 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x0f, + 0x0a, 0x0d, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, + 0x0e, 0x0a, 0x0c, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, + 0x2e, 0x0a, 0x10, 0x57, 0x65, 0x62, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, + 0x76, 0x0a, 0x0f, 0x57, 0x65, 0x62, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x2f, 0x0a, 0x05, + 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x50, - 0x75, 0x62, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x3c, - 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x63, 0x74, - 0x69, 0x76, 0x69, 0x74, 0x79, 0x50, 0x75, 0x62, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, - 0x79, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, - 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, - 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, - 0x68, 0x65, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, - 0x73, 0x68, 0x65, 0x64, 0x22, 0x44, 0x0a, 0x12, 0x46, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x63, - 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, - 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, - 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x63, 0x63, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x63, 0x63, 0x74, 0x22, 0x25, 0x0a, 0x11, 0x46, 0x6f, - 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, - 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, - 0x6c, 0x22, 0x2f, 0x0a, 0x1b, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x49, 0x6e, - 0x74, 0x65, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, - 0x72, 0x69, 0x22, 0x48, 0x0a, 0x1a, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x49, - 0x6e, 0x74, 0x65, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, - 0x72, 0x69, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0x31, 0x0a, 0x13, - 0x47, 0x65, 0x74, 0x46, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x22, - 0xad, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x46, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x73, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x19, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x40, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x49, 0x74, - 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, - 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x64, - 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x72, 0x64, - 0x65, 0x72, 0x65, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x72, - 0x73, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x72, 0x73, 0x74, 0x22, - 0x31, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x46, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, - 0x6d, 0x65, 0x22, 0xad, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x46, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, - 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x19, 0x0a, 0x07, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x40, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, - 0x74, 0x61, 0x6c, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x6f, 0x72, 0x64, 0x65, - 0x72, 0x65, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, - 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x14, 0x0a, 0x05, - 0x66, 0x69, 0x72, 0x73, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x72, - 0x73, 0x74, 0x22, 0x45, 0x0a, 0x13, 0x50, 0x6f, 0x73, 0x74, 0x54, 0x6f, 0x4f, 0x75, 0x74, 0x62, - 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, + 0x75, 0x62, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x05, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x12, 0x18, 0x0a, + 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x14, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x50, 0x61, + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x27, 0x0a, + 0x11, 0x47, 0x65, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x2d, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, + 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, - 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x28, 0x0a, 0x12, 0x50, 0x6f, 0x73, - 0x74, 0x54, 0x6f, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, - 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x62, - 0x6f, 0x64, 0x79, 0x22, 0x2e, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x78, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, - 0x61, 0x6d, 0x65, 0x22, 0xc9, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4f, 0x75, 0x74, 0x62, 0x6f, - 0x78, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x19, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x40, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x49, - 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x41, 0x0a, 0x0c, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, - 0x64, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, - 0x50, 0x75, 0x62, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x0c, 0x6f, 0x72, 0x64, - 0x65, 0x72, 0x65, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x72, - 0x73, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x72, 0x73, 0x74, 0x22, - 0x44, 0x0a, 0x12, 0x50, 0x6f, 0x73, 0x74, 0x54, 0x6f, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x27, 0x0a, 0x11, 0x50, 0x6f, 0x73, 0x74, 0x54, 0x6f, 0x49, - 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, - 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x2d, - 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xc8, 0x01, - 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xe5, 0x03, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, + 0x6f, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x19, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x40, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x72, + 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x12, + 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x78, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x78, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x55, 0x73, + 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x70, 0x72, + 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x2e, 0x0a, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, + 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x50, 0x75, 0x62, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x52, + 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x0c, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x50, 0x75, 0x62, 0x4d, 0x65, 0x64, 0x69, 0x61, + 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x3c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x4b, 0x65, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x50, 0x75, + 0x62, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, + 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, + 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x0f, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x22, 0x44, 0x0a, + 0x12, 0x46, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x61, 0x63, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, + 0x63, 0x63, 0x74, 0x22, 0x25, 0x0a, 0x11, 0x46, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x63, 0x74, + 0x6f, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x2f, 0x0a, 0x1b, 0x41, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x22, 0x48, 0x0a, 0x1a, 0x41, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x18, 0x0a, 0x07, 0x73, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0x31, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x46, 0x6f, 0x6c, 0x6c, + 0x6f, 0x77, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, + 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xad, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, + 0x46, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, + 0x19, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x40, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1e, + 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x22, + 0x0a, 0x0c, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x64, 0x49, 0x74, 0x65, + 0x6d, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x72, 0x73, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x66, 0x69, 0x72, 0x73, 0x74, 0x22, 0x31, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x46, + 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xad, 0x01, 0x0a, 0x12, + 0x47, 0x65, 0x74, 0x46, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x12, 0x19, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x40, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x49, 0x74, 0x65, 0x6d, + 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x64, 0x49, 0x74, 0x65, 0x6d, + 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x64, + 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x72, 0x73, 0x74, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x72, 0x73, 0x74, 0x22, 0x45, 0x0a, 0x13, 0x50, + 0x6f, 0x73, 0x74, 0x54, 0x6f, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x62, 0x6f, + 0x64, 0x79, 0x22, 0x28, 0x0a, 0x12, 0x50, 0x6f, 0x73, 0x74, 0x54, 0x6f, 0x4f, 0x75, 0x74, 0x62, + 0x6f, 0x78, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x2e, 0x0a, 0x10, + 0x47, 0x65, 0x74, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xc9, 0x01, 0x0a, + 0x0f, 0x47, 0x65, 0x74, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x19, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x40, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, @@ -2700,8 +2770,30 @@ var file_spis_proto_rawDesc = []byte{ 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x50, 0x75, 0x62, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x0c, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x72, 0x73, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x66, 0x69, 0x72, 0x73, 0x74, 0x42, 0x04, 0x5a, 0x02, 0x2e, 0x2f, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x09, 0x52, 0x05, 0x66, 0x69, 0x72, 0x73, 0x74, 0x22, 0x44, 0x0a, 0x12, 0x50, 0x6f, 0x73, 0x74, + 0x54, 0x6f, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, + 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, + 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x27, + 0x0a, 0x11, 0x50, 0x6f, 0x73, 0x74, 0x54, 0x6f, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x2d, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x49, 0x6e, + 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, + 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, + 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xc8, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x49, 0x6e, + 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x19, 0x0a, 0x07, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x40, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x41, 0x0a, 0x0c, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x65, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, + 0x74, 0x79, 0x50, 0x75, 0x62, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x0c, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x65, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x66, + 0x69, 0x72, 0x73, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x72, 0x73, + 0x74, 0x42, 0x04, 0x5a, 0x02, 0x2e, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2716,7 +2808,7 @@ func file_spis_proto_rawDescGZIP() []byte { return file_spis_proto_rawDescData } -var file_spis_proto_msgTypes = make([]protoimpl.MessageInfo, 42) +var file_spis_proto_msgTypes = make([]protoimpl.MessageInfo, 44) var file_spis_proto_goTypes = []interface{}{ (*SystemCallRequest)(nil), // 0: protobuf.SystemCallRequest (*SystemCallResult)(nil), // 1: protobuf.SystemCallResult @@ -2736,45 +2828,47 @@ var file_spis_proto_goTypes = []interface{}{ (*UpdateProfileByUserResult)(nil), // 15: protobuf.UpdateProfileByUserResult (*ChangePasswordRequest)(nil), // 16: protobuf.ChangePasswordRequest (*ChangePasswordResult)(nil), // 17: protobuf.ChangePasswordResult - (*LogoutRequest)(nil), // 18: protobuf.LogoutRequest - (*LogoutResult)(nil), // 19: protobuf.LogoutResult - (*WebfingerRequest)(nil), // 20: protobuf.WebfingerRequest - (*WebfingerResult)(nil), // 21: protobuf.WebfingerResult - (*GetPackagesRequest)(nil), // 22: protobuf.GetPackagesRequest - (*GetPackagesResult)(nil), // 23: protobuf.GetPackagesResult - (*GetActorRequest)(nil), // 24: protobuf.GetActorRequest - (*GetActorResult)(nil), // 25: protobuf.GetActorResult - (*FollowActorRequest)(nil), // 26: protobuf.FollowActorRequest - (*FollowActorResult)(nil), // 27: protobuf.FollowActorResult - (*AuthorizeInteractionRequest)(nil), // 28: protobuf.AuthorizeInteractionRequest - (*AuthorizeInteractionResult)(nil), // 29: protobuf.AuthorizeInteractionResult - (*GetFollowersRequest)(nil), // 30: protobuf.GetFollowersRequest - (*GetFollowersResult)(nil), // 31: protobuf.GetFollowersResult - (*GetFollowingRequest)(nil), // 32: protobuf.GetFollowingRequest - (*GetFollowingResult)(nil), // 33: protobuf.GetFollowingResult - (*PostToOutboxRequest)(nil), // 34: protobuf.PostToOutboxRequest - (*PostToOutboxResult)(nil), // 35: protobuf.PostToOutboxResult - (*GetOutboxRequest)(nil), // 36: protobuf.GetOutboxRequest - (*GetOutboxResult)(nil), // 37: protobuf.GetOutboxResult - (*PostToInboxRequest)(nil), // 38: protobuf.PostToInboxRequest - (*PostToInboxResult)(nil), // 39: protobuf.PostToInboxResult - (*GetInboxRequest)(nil), // 40: protobuf.GetInboxRequest - (*GetInboxResult)(nil), // 41: protobuf.GetInboxResult - (*Document)(nil), // 42: protobuf.Document - (*ActivityPubLink)(nil), // 43: protobuf.ActivityPubLink - (*ActivityPubMedia)(nil), // 44: protobuf.ActivityPubMedia - (*ActivityPubPublicKey)(nil), // 45: protobuf.ActivityPubPublicKey - (*ActivityPubActivity)(nil), // 46: protobuf.ActivityPubActivity + (*ResetPasswordRequest)(nil), // 18: protobuf.ResetPasswordRequest + (*ResetPasswordResult)(nil), // 19: protobuf.ResetPasswordResult + (*LogoutRequest)(nil), // 20: protobuf.LogoutRequest + (*LogoutResult)(nil), // 21: protobuf.LogoutResult + (*WebfingerRequest)(nil), // 22: protobuf.WebfingerRequest + (*WebfingerResult)(nil), // 23: protobuf.WebfingerResult + (*GetPackagesRequest)(nil), // 24: protobuf.GetPackagesRequest + (*GetPackagesResult)(nil), // 25: protobuf.GetPackagesResult + (*GetActorRequest)(nil), // 26: protobuf.GetActorRequest + (*GetActorResult)(nil), // 27: protobuf.GetActorResult + (*FollowActorRequest)(nil), // 28: protobuf.FollowActorRequest + (*FollowActorResult)(nil), // 29: protobuf.FollowActorResult + (*AuthorizeInteractionRequest)(nil), // 30: protobuf.AuthorizeInteractionRequest + (*AuthorizeInteractionResult)(nil), // 31: protobuf.AuthorizeInteractionResult + (*GetFollowersRequest)(nil), // 32: protobuf.GetFollowersRequest + (*GetFollowersResult)(nil), // 33: protobuf.GetFollowersResult + (*GetFollowingRequest)(nil), // 34: protobuf.GetFollowingRequest + (*GetFollowingResult)(nil), // 35: protobuf.GetFollowingResult + (*PostToOutboxRequest)(nil), // 36: protobuf.PostToOutboxRequest + (*PostToOutboxResult)(nil), // 37: protobuf.PostToOutboxResult + (*GetOutboxRequest)(nil), // 38: protobuf.GetOutboxRequest + (*GetOutboxResult)(nil), // 39: protobuf.GetOutboxResult + (*PostToInboxRequest)(nil), // 40: protobuf.PostToInboxRequest + (*PostToInboxResult)(nil), // 41: protobuf.PostToInboxResult + (*GetInboxRequest)(nil), // 42: protobuf.GetInboxRequest + (*GetInboxResult)(nil), // 43: protobuf.GetInboxResult + (*Document)(nil), // 44: protobuf.Document + (*ActivityPubLink)(nil), // 45: protobuf.ActivityPubLink + (*ActivityPubMedia)(nil), // 46: protobuf.ActivityPubMedia + (*ActivityPubPublicKey)(nil), // 47: protobuf.ActivityPubPublicKey + (*ActivityPubActivity)(nil), // 48: protobuf.ActivityPubActivity } var file_spis_proto_depIdxs = []int32{ - 42, // 0: protobuf.EchoRequest.document:type_name -> protobuf.Document - 42, // 1: protobuf.EchoResult.document:type_name -> protobuf.Document - 43, // 2: protobuf.WebfingerResult.links:type_name -> protobuf.ActivityPubLink - 44, // 3: protobuf.GetActorResult.icon:type_name -> protobuf.ActivityPubMedia - 44, // 4: protobuf.GetActorResult.image:type_name -> protobuf.ActivityPubMedia - 45, // 5: protobuf.GetActorResult.publicKey:type_name -> protobuf.ActivityPubPublicKey - 46, // 6: protobuf.GetOutboxResult.orderedItems:type_name -> protobuf.ActivityPubActivity - 46, // 7: protobuf.GetInboxResult.orderedItems:type_name -> protobuf.ActivityPubActivity + 44, // 0: protobuf.EchoRequest.document:type_name -> protobuf.Document + 44, // 1: protobuf.EchoResult.document:type_name -> protobuf.Document + 45, // 2: protobuf.WebfingerResult.links:type_name -> protobuf.ActivityPubLink + 46, // 3: protobuf.GetActorResult.icon:type_name -> protobuf.ActivityPubMedia + 46, // 4: protobuf.GetActorResult.image:type_name -> protobuf.ActivityPubMedia + 47, // 5: protobuf.GetActorResult.publicKey:type_name -> protobuf.ActivityPubPublicKey + 48, // 6: protobuf.GetOutboxResult.orderedItems:type_name -> protobuf.ActivityPubActivity + 48, // 7: protobuf.GetInboxResult.orderedItems:type_name -> protobuf.ActivityPubActivity 8, // [8:8] is the sub-list for method output_type 8, // [8:8] is the sub-list for method input_type 8, // [8:8] is the sub-list for extension type_name @@ -3006,7 +3100,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LogoutRequest); i { + switch v := v.(*ResetPasswordRequest); i { case 0: return &v.state case 1: @@ -3018,7 +3112,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LogoutResult); i { + switch v := v.(*ResetPasswordResult); i { case 0: return &v.state case 1: @@ -3030,7 +3124,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WebfingerRequest); i { + switch v := v.(*LogoutRequest); i { case 0: return &v.state case 1: @@ -3042,7 +3136,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WebfingerResult); i { + switch v := v.(*LogoutResult); i { case 0: return &v.state case 1: @@ -3054,7 +3148,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPackagesRequest); i { + switch v := v.(*WebfingerRequest); i { case 0: return &v.state case 1: @@ -3066,7 +3160,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPackagesResult); i { + switch v := v.(*WebfingerResult); i { case 0: return &v.state case 1: @@ -3078,7 +3172,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetActorRequest); i { + switch v := v.(*GetPackagesRequest); i { case 0: return &v.state case 1: @@ -3090,7 +3184,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetActorResult); i { + switch v := v.(*GetPackagesResult); i { case 0: return &v.state case 1: @@ -3102,7 +3196,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FollowActorRequest); i { + switch v := v.(*GetActorRequest); i { case 0: return &v.state case 1: @@ -3114,7 +3208,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FollowActorResult); i { + switch v := v.(*GetActorResult); i { case 0: return &v.state case 1: @@ -3126,7 +3220,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AuthorizeInteractionRequest); i { + switch v := v.(*FollowActorRequest); i { case 0: return &v.state case 1: @@ -3138,7 +3232,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AuthorizeInteractionResult); i { + switch v := v.(*FollowActorResult); i { case 0: return &v.state case 1: @@ -3150,7 +3244,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetFollowersRequest); i { + switch v := v.(*AuthorizeInteractionRequest); i { case 0: return &v.state case 1: @@ -3162,7 +3256,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetFollowersResult); i { + switch v := v.(*AuthorizeInteractionResult); i { case 0: return &v.state case 1: @@ -3174,7 +3268,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetFollowingRequest); i { + switch v := v.(*GetFollowersRequest); i { case 0: return &v.state case 1: @@ -3186,7 +3280,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetFollowingResult); i { + switch v := v.(*GetFollowersResult); i { case 0: return &v.state case 1: @@ -3198,7 +3292,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PostToOutboxRequest); i { + switch v := v.(*GetFollowingRequest); i { case 0: return &v.state case 1: @@ -3210,7 +3304,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PostToOutboxResult); i { + switch v := v.(*GetFollowingResult); i { case 0: return &v.state case 1: @@ -3222,7 +3316,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetOutboxRequest); i { + switch v := v.(*PostToOutboxRequest); i { case 0: return &v.state case 1: @@ -3234,7 +3328,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetOutboxResult); i { + switch v := v.(*PostToOutboxResult); i { case 0: return &v.state case 1: @@ -3246,7 +3340,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PostToInboxRequest); i { + switch v := v.(*GetOutboxRequest); i { case 0: return &v.state case 1: @@ -3258,7 +3352,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PostToInboxResult); i { + switch v := v.(*GetOutboxResult); i { case 0: return &v.state case 1: @@ -3270,7 +3364,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetInboxRequest); i { + switch v := v.(*PostToInboxRequest); i { case 0: return &v.state case 1: @@ -3282,6 +3376,30 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PostToInboxResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_spis_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetInboxRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_spis_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetInboxResult); i { case 0: return &v.state @@ -3300,7 +3418,7 @@ func file_spis_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_spis_proto_rawDesc, NumEnums: 0, - NumMessages: 42, + NumMessages: 44, NumExtensions: 0, NumServices: 0, }, diff --git a/components/api/protobuf/spis.proto b/components/api/protobuf/spis.proto index 7650c4a..a9757cd 100644 --- a/components/api/protobuf/spis.proto +++ b/components/api/protobuf/spis.proto @@ -114,6 +114,15 @@ message ChangePasswordRequest { message ChangePasswordResult { } +// API: ResetPassword +//----------------------------------------------------------- +message ResetPasswordRequest { + string usernameOrEmail = 0x00000001; +} + +message ResetPasswordResult { +} + // API: Logout //----------------------------------------------------------- message LogoutRequest { diff --git a/components/api/services/reset_password_service.go b/components/api/services/reset_password_service.go new file mode 100644 index 0000000..bb928ee --- /dev/null +++ b/components/api/services/reset_password_service.go @@ -0,0 +1,27 @@ +package services + +import ( + . "github.com/reiver/greatape/components/api/protobuf" + . "github.com/reiver/greatape/components/contracts" + "github.com/reiver/greatape/components/core" + . "github.com/xeronith/diamante/contracts/service" +) + +// noinspection GoUnusedParameter +func ResetPasswordService(context IContext, input *ResetPasswordRequest) (result *ResetPasswordResult, err error) { + conductor := core.Conductor + + conductor.LogRemoteCall(context, INITIALIZE, "reset_password", input, result, err) + defer func() { conductor.LogRemoteCall(context, FINALIZE, "reset_password", input, result, err) }() + + _result, _err := conductor.ResetPassword(input.UsernameOrEmail, context.Identity()) + if _err != nil { + err = _err + return nil, err + } + + _ = _result + + result = context.ResultContainer().(*ResetPasswordResult) + return result, nil +} diff --git a/components/contracts/api.go b/components/contracts/api.go index dc347cf..9880cfc 100644 --- a/components/contracts/api.go +++ b/components/contracts/api.go @@ -15,6 +15,7 @@ type IApi interface { GetProfileByUser(*GetProfileByUserRequest) (*GetProfileByUserResult, error) UpdateProfileByUser(*UpdateProfileByUserRequest) (*UpdateProfileByUserResult, error) ChangePassword(*ChangePasswordRequest) (*ChangePasswordResult, error) + ResetPassword(*ResetPasswordRequest) (*ResetPasswordResult, error) Logout(*LogoutRequest) (*LogoutResult, error) Webfinger(*WebfingerRequest) (*WebfingerResult, error) GetPackages(*GetPackagesRequest) (*GetPackagesResult, error) diff --git a/components/contracts/opcodes.go b/components/contracts/opcodes.go index a83a341..c5288d0 100644 --- a/components/contracts/opcodes.go +++ b/components/contracts/opcodes.go @@ -40,6 +40,10 @@ const ( CHANGE_PASSWORD_REQUEST = 0x926A5565 CHANGE_PASSWORD_RESULT = 0x521E68DF + //ResetPasswordOperation + RESET_PASSWORD_REQUEST = 0xF4030036 + RESET_PASSWORD_RESULT = 0x3D70F105 + //LogoutOperation LOGOUT_REQUEST = 0x447AFA34 LOGOUT_RESULT = 0x9412D17F @@ -107,6 +111,8 @@ var OPCODES = Opcodes{ 0x678A8BAF: "UpdateProfileByUser", 0x926A5565: "CHANGE_PASSWORD", 0x521E68DF: "ChangePassword", + 0xF4030036: "RESET_PASSWORD", + 0x3D70F105: "ResetPassword", 0x447AFA34: "LOGOUT", 0x9412D17F: "Logout", 0x01FD357C: "WEBFINGER", diff --git a/components/contracts/spi.go b/components/contracts/spi.go index 2013407..8f0646a 100644 --- a/components/contracts/spi.go +++ b/components/contracts/spi.go @@ -63,6 +63,7 @@ type ( GetProfileByUser(editor Identity) (IGetProfileByUserResult, error) UpdateProfileByUser(displayName string, avatar string, banner string, summary string, github string, editor Identity) (IUpdateProfileByUserResult, error) ChangePassword(currentPassword string, newPassword string, editor Identity) (IChangePasswordResult, error) + ResetPassword(usernameOrEmail string, editor Identity) (IResetPasswordResult, error) Logout(editor Identity) (ILogoutResult, error) Webfinger(resource string, editor Identity) (IWebfingerResult, error) GetPackages(editor Identity) (IGetPackagesResult, error) @@ -119,6 +120,9 @@ type ( IChangePasswordResult interface { } + IResetPasswordResult interface { + } + ILogoutResult interface { } diff --git a/components/contracts/system_component.go b/components/contracts/system_component.go index d3b2a24..eb1dc9c 100644 --- a/components/contracts/system_component.go +++ b/components/contracts/system_component.go @@ -265,6 +265,7 @@ type ( GetProfileByUser(editor Identity) (IGetProfileByUserResult, error) UpdateProfileByUser(displayName string, avatar string, banner string, summary string, github string, editor Identity) (IUpdateProfileByUserResult, error) ChangePassword(currentPassword string, newPassword string, editor Identity) (IChangePasswordResult, error) + ResetPassword(usernameOrEmail string, editor Identity) (IResetPasswordResult, error) Logout(editor Identity) (ILogoutResult, error) Webfinger(resource string, editor Identity) (IWebfingerResult, error) GetPackages(editor Identity) (IGetPackagesResult, error) @@ -303,6 +304,7 @@ type ( NewGetProfileByUserResult(username string, displayName string, avatar string, banner string, summary string, github string, ignored interface{}) IGetProfileByUserResult NewUpdateProfileByUserResult(displayName string, avatar string, banner string, summary string, github string, ignored interface{}) IUpdateProfileByUserResult NewChangePasswordResult(ignored interface{}) IChangePasswordResult + NewResetPasswordResult(ignored interface{}) IResetPasswordResult NewLogoutResult(ignored interface{}) ILogoutResult NewWebfingerResult(aliases []string, links []IActivityPubLink, subject string, ignored interface{}) IWebfingerResult NewGetPackagesResult(body []byte, ignored interface{}) IGetPackagesResult diff --git a/components/contracts/system_dispatcher.go b/components/contracts/system_dispatcher.go index 5da0883..412e8cd 100644 --- a/components/contracts/system_dispatcher.go +++ b/components/contracts/system_dispatcher.go @@ -1040,6 +1040,7 @@ type IDispatcher interface { GetProfileByUser() (IGetProfileByUserResult, error) UpdateProfileByUser(displayName string, avatar string, banner string, summary string, github string) (IUpdateProfileByUserResult, error) ChangePassword(currentPassword string, newPassword string) (IChangePasswordResult, error) + ResetPassword(usernameOrEmail string) (IResetPasswordResult, error) Logout() (ILogoutResult, error) Webfinger(resource string) (IWebfingerResult, error) GetPackages() (IGetPackagesResult, error) @@ -1137,6 +1138,8 @@ type IDispatcher interface { NewUpdateProfileByUserResult(displayName string, avatar string, banner string, summary string, github string) IUpdateProfileByUserResult // NewChangePasswordResult creates a new result container for 'Change Password' system action. NewChangePasswordResult() IChangePasswordResult + // NewResetPasswordResult creates a new result container for 'Reset Password' system action. + NewResetPasswordResult() IResetPasswordResult // NewLogoutResult creates a new result container for 'Logout' system action. NewLogoutResult() ILogoutResult // NewWebfingerResult creates a new result container for 'Webfinger' system action. diff --git a/components/core/api_methods.go b/components/core/api_methods.go index f1f2763..e94ffab 100644 --- a/components/core/api_methods.go +++ b/components/core/api_methods.go @@ -95,6 +95,16 @@ func (api *api) ChangePassword(request *ChangePasswordRequest) (*ChangePasswordR } } +func (api *api) ResetPassword(request *ResetPasswordRequest) (*ResetPasswordResult, error) { + result, err := api.call(RESET_PASSWORD_REQUEST, request) + + if err != nil { + return nil, err + } else { + return result.(*ResetPasswordResult), nil + } +} + func (api *api) Logout(request *LogoutRequest) (*LogoutResult, error) { result, err := api.call(LOGOUT_REQUEST, request) @@ -225,6 +235,7 @@ func init() { API_RESULT[GET_PROFILE_BY_USER_RESULT] = GetProfileByUserResult{} API_RESULT[UPDATE_PROFILE_BY_USER_RESULT] = UpdateProfileByUserResult{} API_RESULT[CHANGE_PASSWORD_RESULT] = ChangePasswordResult{} + API_RESULT[RESET_PASSWORD_RESULT] = ResetPasswordResult{} API_RESULT[LOGOUT_RESULT] = LogoutResult{} API_RESULT[WEBFINGER_RESULT] = WebfingerResult{} API_RESULT[GET_PACKAGES_RESULT] = GetPackagesResult{} diff --git a/components/core/initializer.go b/components/core/initializer.go index 422f32a..06067de 100644 --- a/components/core/initializer.go +++ b/components/core/initializer.go @@ -1126,6 +1126,10 @@ func (conductor *conductor) ChangePassword(currentPassword string, newPassword s return conductor.spiManager.ChangePassword(currentPassword, newPassword, editor) } +func (conductor *conductor) ResetPassword(usernameOrEmail string, editor Identity) (IResetPasswordResult, error) { + return conductor.spiManager.ResetPassword(usernameOrEmail, editor) +} + func (conductor *conductor) Logout(editor Identity) (ILogoutResult, error) { return conductor.spiManager.Logout(editor) } @@ -1274,6 +1278,10 @@ func (conductor *conductor) NewChangePasswordResult(_ interface{}) IChangePasswo return NewChangePasswordResult(nil) } +func (conductor *conductor) NewResetPasswordResult(_ interface{}) IResetPasswordResult { + return NewResetPasswordResult(nil) +} + func (conductor *conductor) NewLogoutResult(_ interface{}) ILogoutResult { return NewLogoutResult(nil) } diff --git a/components/core/spi.go b/components/core/spi.go index d0f589f..2d7e2fb 100644 --- a/components/core/spi.go +++ b/components/core/spi.go @@ -272,6 +272,10 @@ func (dispatcher *dispatcher) ChangePassword(currentPassword string, newPassword return dispatcher.conductor.SpiManager().ChangePassword(currentPassword, newPassword, dispatcher.identity) } +func (dispatcher *dispatcher) ResetPassword(usernameOrEmail string) (IResetPasswordResult, error) { + return dispatcher.conductor.SpiManager().ResetPassword(usernameOrEmail, dispatcher.identity) +} + func (dispatcher *dispatcher) Logout() (ILogoutResult, error) { return dispatcher.conductor.SpiManager().Logout(dispatcher.identity) } diff --git a/components/core/spi_manager.go b/components/core/spi_manager.go index c492c78..567c2e0 100644 --- a/components/core/spi_manager.go +++ b/components/core/spi_manager.go @@ -580,6 +580,34 @@ func (manager *spiManager) ChangePassword(currentPassword string, newPassword st } } +//region IResetPasswordResult Implementation + +type resetPasswordResult struct { +} + +func NewResetPasswordResult(_ interface{}) IResetPasswordResult { + return &resetPasswordResult{} +} + +//endregion + +func (manager *spiManager) ResetPassword(usernameOrEmail string, editor Identity) (result IResetPasswordResult, err error) { + defer func() { + if reason := recover(); reason != nil { + err = manager.Error(reason) + } + }() + + editor.Lock(RESET_PASSWORD_REQUEST) + defer editor.Unlock(RESET_PASSWORD_REQUEST) + + if result, err = commands.ResetPassword(NewDispatcher(Conductor, editor), usernameOrEmail); err != nil { + return nil, err + } else { + return result, nil + } +} + //region ILogoutResult Implementation type logoutResult struct { diff --git a/components/core/spi_manager_test.go b/components/core/spi_manager_test.go index 072819d..defe63f 100644 --- a/components/core/spi_manager_test.go +++ b/components/core/spi_manager_test.go @@ -237,6 +237,17 @@ func TestSpiManager_ChangePassword(test *testing.T) { _ = result } +func TestSpiManager_ResetPassword(test *testing.T) { + manager := Conductor.SpiManager() + + result, err := manager.ResetPassword("username_or_email", nil) + if err != nil { + test.Fatal(err) + } + + _ = result +} + func TestSpiManager_Logout(test *testing.T) { manager := Conductor.SpiManager() diff --git a/components/core/system_results.go b/components/core/system_results.go index dacd659..0f9b188 100644 --- a/components/core/system_results.go +++ b/components/core/system_results.go @@ -36,6 +36,10 @@ func (dispatcher *dispatcher) NewChangePasswordResult() IChangePasswordResult { return NewChangePasswordResult(nil) } +func (dispatcher *dispatcher) NewResetPasswordResult() IResetPasswordResult { + return NewResetPasswordResult(nil) +} + func (dispatcher *dispatcher) NewLogoutResult() ILogoutResult { return NewLogoutResult(nil) }