From 7357551a76c4f5f8a1c0e21329ff767ebde2887a Mon Sep 17 00:00:00 2001 From: Xeronith Date: Mon, 5 Jun 2023 11:28:46 +0330 Subject: [PATCH] feat(components): :sparkles: password change --- .../operations/change_password_operation.go | 51 ++ components/api/operations/factory.go | 1 + components/api/protobuf/spis.pb.go | 647 +++++++++++------- components/api/protobuf/spis.proto | 10 + .../api/services/change_password_service.go | 27 + .../api/services/system_call_service.go | 1 - components/constants/errors.go | 4 + components/constants/resources.en-US.go | 4 + components/contracts/api.go | 1 + components/contracts/opcodes.go | 6 + components/contracts/spi.go | 4 + components/contracts/system_component.go | 2 + components/contracts/system_dispatcher.go | 3 + components/core/api_methods.go | 11 + components/core/initializer.go | 12 + components/core/spi.go | 4 + components/core/spi_manager.go | 36 + components/core/system_results.go | 4 + 18 files changed, 568 insertions(+), 260 deletions(-) create mode 100644 components/api/operations/change_password_operation.go create mode 100644 components/api/services/change_password_service.go diff --git a/components/api/operations/change_password_operation.go b/components/api/operations/change_password_operation.go new file mode 100644 index 0000000..a073c70 --- /dev/null +++ b/components/api/operations/change_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 changePasswordOperation struct { + SecureOperation + + run func(IContext, *ChangePasswordRequest) (*ChangePasswordResult, error) +} + +func ChangePasswordOperation() IOperation { + return &changePasswordOperation{ + run: ChangePasswordService, + } +} + +func (operation *changePasswordOperation) Id() (ID, ID) { + return CHANGE_PASSWORD_REQUEST, CHANGE_PASSWORD_RESULT +} + +func (operation *changePasswordOperation) InputContainer() Pointer { + return new(ChangePasswordRequest) +} + +func (operation *changePasswordOperation) OutputContainer() Pointer { + return new(ChangePasswordResult) +} + +func (operation *changePasswordOperation) Execute(context IContext, payload Pointer) (Pointer, error) { + return operation.run(context, payload.(*ChangePasswordRequest)) +} + +/* +func (operation *changePasswordOperation) 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/operations/factory.go b/components/api/operations/factory.go index 3b68a14..fbcff6f 100644 --- a/components/api/operations/factory.go +++ b/components/api/operations/factory.go @@ -14,6 +14,7 @@ func (factory *operationFactory) Operations() []IOperation { LoginOperation(), GetProfileByUserOperation(), UpdateProfileByUserOperation(), + ChangePasswordOperation(), LogoutOperation(), WebfingerOperation(), GetPackagesOperation(), diff --git a/components/api/protobuf/spis.pb.go b/components/api/protobuf/spis.pb.go index c03fef4..fc64df3 100644 --- a/components/api/protobuf/spis.pb.go +++ b/components/api/protobuf/spis.pb.go @@ -930,6 +930,101 @@ func (x *UpdateProfileByUserResult) GetGithub() string { return "" } +// API: ChangePassword +// ----------------------------------------------------------- +type ChangePasswordRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CurrentPassword string `protobuf:"bytes,1,opt,name=currentPassword,proto3" json:"currentPassword,omitempty"` + NewPassword string `protobuf:"bytes,2,opt,name=newPassword,proto3" json:"newPassword,omitempty"` +} + +func (x *ChangePasswordRequest) Reset() { + *x = ChangePasswordRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_spis_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChangePasswordRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangePasswordRequest) ProtoMessage() {} + +func (x *ChangePasswordRequest) ProtoReflect() protoreflect.Message { + mi := &file_spis_proto_msgTypes[16] + 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 ChangePasswordRequest.ProtoReflect.Descriptor instead. +func (*ChangePasswordRequest) Descriptor() ([]byte, []int) { + return file_spis_proto_rawDescGZIP(), []int{16} +} + +func (x *ChangePasswordRequest) GetCurrentPassword() string { + if x != nil { + return x.CurrentPassword + } + return "" +} + +func (x *ChangePasswordRequest) GetNewPassword() string { + if x != nil { + return x.NewPassword + } + return "" +} + +type ChangePasswordResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ChangePasswordResult) Reset() { + *x = ChangePasswordResult{} + if protoimpl.UnsafeEnabled { + mi := &file_spis_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChangePasswordResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangePasswordResult) ProtoMessage() {} + +func (x *ChangePasswordResult) ProtoReflect() protoreflect.Message { + mi := &file_spis_proto_msgTypes[17] + 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 ChangePasswordResult.ProtoReflect.Descriptor instead. +func (*ChangePasswordResult) Descriptor() ([]byte, []int) { + return file_spis_proto_rawDescGZIP(), []int{17} +} + // API: Logout // ----------------------------------------------------------- type LogoutRequest struct { @@ -941,7 +1036,7 @@ type LogoutRequest struct { func (x *LogoutRequest) Reset() { *x = LogoutRequest{} if protoimpl.UnsafeEnabled { - mi := &file_spis_proto_msgTypes[16] + mi := &file_spis_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -954,7 +1049,7 @@ func (x *LogoutRequest) String() string { func (*LogoutRequest) ProtoMessage() {} func (x *LogoutRequest) ProtoReflect() protoreflect.Message { - mi := &file_spis_proto_msgTypes[16] + mi := &file_spis_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -967,7 +1062,7 @@ func (x *LogoutRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use LogoutRequest.ProtoReflect.Descriptor instead. func (*LogoutRequest) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{16} + return file_spis_proto_rawDescGZIP(), []int{18} } type LogoutResult struct { @@ -979,7 +1074,7 @@ type LogoutResult struct { func (x *LogoutResult) Reset() { *x = LogoutResult{} if protoimpl.UnsafeEnabled { - mi := &file_spis_proto_msgTypes[17] + mi := &file_spis_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -992,7 +1087,7 @@ func (x *LogoutResult) String() string { func (*LogoutResult) ProtoMessage() {} func (x *LogoutResult) ProtoReflect() protoreflect.Message { - mi := &file_spis_proto_msgTypes[17] + mi := &file_spis_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1005,7 +1100,7 @@ func (x *LogoutResult) ProtoReflect() protoreflect.Message { // Deprecated: Use LogoutResult.ProtoReflect.Descriptor instead. func (*LogoutResult) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{17} + return file_spis_proto_rawDescGZIP(), []int{19} } // API: Webfinger @@ -1021,7 +1116,7 @@ type WebfingerRequest struct { func (x *WebfingerRequest) Reset() { *x = WebfingerRequest{} 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) } @@ -1034,7 +1129,7 @@ func (x *WebfingerRequest) String() string { func (*WebfingerRequest) ProtoMessage() {} func (x *WebfingerRequest) 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 { @@ -1047,7 +1142,7 @@ func (x *WebfingerRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use WebfingerRequest.ProtoReflect.Descriptor instead. func (*WebfingerRequest) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{18} + return file_spis_proto_rawDescGZIP(), []int{20} } func (x *WebfingerRequest) GetResource() string { @@ -1070,7 +1165,7 @@ type WebfingerResult struct { func (x *WebfingerResult) Reset() { *x = WebfingerResult{} 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) } @@ -1083,7 +1178,7 @@ func (x *WebfingerResult) String() string { func (*WebfingerResult) ProtoMessage() {} func (x *WebfingerResult) 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 { @@ -1096,7 +1191,7 @@ func (x *WebfingerResult) ProtoReflect() protoreflect.Message { // Deprecated: Use WebfingerResult.ProtoReflect.Descriptor instead. func (*WebfingerResult) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{19} + return file_spis_proto_rawDescGZIP(), []int{21} } func (x *WebfingerResult) GetAliases() []string { @@ -1131,7 +1226,7 @@ type GetPackagesRequest struct { func (x *GetPackagesRequest) Reset() { *x = GetPackagesRequest{} 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) } @@ -1144,7 +1239,7 @@ func (x *GetPackagesRequest) String() string { func (*GetPackagesRequest) ProtoMessage() {} func (x *GetPackagesRequest) 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 { @@ -1157,7 +1252,7 @@ func (x *GetPackagesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPackagesRequest.ProtoReflect.Descriptor instead. func (*GetPackagesRequest) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{20} + return file_spis_proto_rawDescGZIP(), []int{22} } type GetPackagesResult struct { @@ -1171,7 +1266,7 @@ type GetPackagesResult struct { func (x *GetPackagesResult) Reset() { *x = GetPackagesResult{} 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) } @@ -1184,7 +1279,7 @@ func (x *GetPackagesResult) String() string { func (*GetPackagesResult) ProtoMessage() {} func (x *GetPackagesResult) 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 { @@ -1197,7 +1292,7 @@ func (x *GetPackagesResult) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPackagesResult.ProtoReflect.Descriptor instead. func (*GetPackagesResult) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{21} + return file_spis_proto_rawDescGZIP(), []int{23} } func (x *GetPackagesResult) GetBody() []byte { @@ -1220,7 +1315,7 @@ type GetActorRequest struct { func (x *GetActorRequest) Reset() { *x = GetActorRequest{} 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) } @@ -1233,7 +1328,7 @@ func (x *GetActorRequest) String() string { func (*GetActorRequest) ProtoMessage() {} func (x *GetActorRequest) 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 { @@ -1246,7 +1341,7 @@ func (x *GetActorRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetActorRequest.ProtoReflect.Descriptor instead. func (*GetActorRequest) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{22} + return file_spis_proto_rawDescGZIP(), []int{24} } func (x *GetActorRequest) GetUsername() string { @@ -1281,7 +1376,7 @@ type GetActorResult struct { func (x *GetActorResult) Reset() { *x = GetActorResult{} 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) } @@ -1294,7 +1389,7 @@ func (x *GetActorResult) String() string { func (*GetActorResult) ProtoMessage() {} func (x *GetActorResult) 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 { @@ -1307,7 +1402,7 @@ func (x *GetActorResult) ProtoReflect() protoreflect.Message { // Deprecated: Use GetActorResult.ProtoReflect.Descriptor instead. func (*GetActorResult) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{23} + return file_spis_proto_rawDescGZIP(), []int{25} } func (x *GetActorResult) GetContext() []string { @@ -1429,7 +1524,7 @@ type FollowActorRequest struct { func (x *FollowActorRequest) Reset() { *x = FollowActorRequest{} 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) } @@ -1442,7 +1537,7 @@ func (x *FollowActorRequest) String() string { func (*FollowActorRequest) ProtoMessage() {} func (x *FollowActorRequest) 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 { @@ -1455,7 +1550,7 @@ func (x *FollowActorRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use FollowActorRequest.ProtoReflect.Descriptor instead. func (*FollowActorRequest) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{24} + return file_spis_proto_rawDescGZIP(), []int{26} } func (x *FollowActorRequest) GetUsername() string { @@ -1483,7 +1578,7 @@ type FollowActorResult struct { func (x *FollowActorResult) Reset() { *x = FollowActorResult{} 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) } @@ -1496,7 +1591,7 @@ func (x *FollowActorResult) String() string { func (*FollowActorResult) ProtoMessage() {} func (x *FollowActorResult) 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 { @@ -1509,7 +1604,7 @@ func (x *FollowActorResult) ProtoReflect() protoreflect.Message { // Deprecated: Use FollowActorResult.ProtoReflect.Descriptor instead. func (*FollowActorResult) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{25} + return file_spis_proto_rawDescGZIP(), []int{27} } func (x *FollowActorResult) GetUrl() string { @@ -1532,7 +1627,7 @@ type AuthorizeInteractionRequest struct { func (x *AuthorizeInteractionRequest) Reset() { *x = AuthorizeInteractionRequest{} 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) } @@ -1545,7 +1640,7 @@ func (x *AuthorizeInteractionRequest) String() string { func (*AuthorizeInteractionRequest) ProtoMessage() {} func (x *AuthorizeInteractionRequest) 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 { @@ -1558,7 +1653,7 @@ func (x *AuthorizeInteractionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AuthorizeInteractionRequest.ProtoReflect.Descriptor instead. func (*AuthorizeInteractionRequest) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{26} + return file_spis_proto_rawDescGZIP(), []int{28} } func (x *AuthorizeInteractionRequest) GetUri() string { @@ -1580,7 +1675,7 @@ type AuthorizeInteractionResult struct { func (x *AuthorizeInteractionResult) Reset() { *x = AuthorizeInteractionResult{} 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) } @@ -1593,7 +1688,7 @@ func (x *AuthorizeInteractionResult) String() string { func (*AuthorizeInteractionResult) ProtoMessage() {} func (x *AuthorizeInteractionResult) 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 { @@ -1606,7 +1701,7 @@ func (x *AuthorizeInteractionResult) ProtoReflect() protoreflect.Message { // Deprecated: Use AuthorizeInteractionResult.ProtoReflect.Descriptor instead. func (*AuthorizeInteractionResult) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{27} + return file_spis_proto_rawDescGZIP(), []int{29} } func (x *AuthorizeInteractionResult) GetUri() string { @@ -1636,7 +1731,7 @@ type GetFollowersRequest struct { func (x *GetFollowersRequest) Reset() { *x = GetFollowersRequest{} 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) } @@ -1649,7 +1744,7 @@ func (x *GetFollowersRequest) String() string { func (*GetFollowersRequest) ProtoMessage() {} func (x *GetFollowersRequest) 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 { @@ -1662,7 +1757,7 @@ func (x *GetFollowersRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetFollowersRequest.ProtoReflect.Descriptor instead. func (*GetFollowersRequest) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{28} + return file_spis_proto_rawDescGZIP(), []int{30} } func (x *GetFollowersRequest) GetUsername() string { @@ -1688,7 +1783,7 @@ type GetFollowersResult struct { func (x *GetFollowersResult) Reset() { *x = GetFollowersResult{} 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) } @@ -1701,7 +1796,7 @@ func (x *GetFollowersResult) String() string { func (*GetFollowersResult) ProtoMessage() {} func (x *GetFollowersResult) 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 { @@ -1714,7 +1809,7 @@ func (x *GetFollowersResult) ProtoReflect() protoreflect.Message { // Deprecated: Use GetFollowersResult.ProtoReflect.Descriptor instead. func (*GetFollowersResult) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{29} + return file_spis_proto_rawDescGZIP(), []int{31} } func (x *GetFollowersResult) GetContext() string { @@ -1772,7 +1867,7 @@ type GetFollowingRequest struct { func (x *GetFollowingRequest) Reset() { *x = GetFollowingRequest{} 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) } @@ -1785,7 +1880,7 @@ func (x *GetFollowingRequest) String() string { func (*GetFollowingRequest) ProtoMessage() {} func (x *GetFollowingRequest) 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 { @@ -1798,7 +1893,7 @@ func (x *GetFollowingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetFollowingRequest.ProtoReflect.Descriptor instead. func (*GetFollowingRequest) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{30} + return file_spis_proto_rawDescGZIP(), []int{32} } func (x *GetFollowingRequest) GetUsername() string { @@ -1824,7 +1919,7 @@ type GetFollowingResult struct { func (x *GetFollowingResult) Reset() { *x = GetFollowingResult{} 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) } @@ -1837,7 +1932,7 @@ func (x *GetFollowingResult) String() string { func (*GetFollowingResult) ProtoMessage() {} func (x *GetFollowingResult) 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 { @@ -1850,7 +1945,7 @@ func (x *GetFollowingResult) ProtoReflect() protoreflect.Message { // Deprecated: Use GetFollowingResult.ProtoReflect.Descriptor instead. func (*GetFollowingResult) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{31} + return file_spis_proto_rawDescGZIP(), []int{33} } func (x *GetFollowingResult) GetContext() string { @@ -1909,7 +2004,7 @@ type PostToOutboxRequest struct { func (x *PostToOutboxRequest) Reset() { *x = PostToOutboxRequest{} 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) } @@ -1922,7 +2017,7 @@ func (x *PostToOutboxRequest) String() string { func (*PostToOutboxRequest) ProtoMessage() {} func (x *PostToOutboxRequest) 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 { @@ -1935,7 +2030,7 @@ func (x *PostToOutboxRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PostToOutboxRequest.ProtoReflect.Descriptor instead. func (*PostToOutboxRequest) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{32} + return file_spis_proto_rawDescGZIP(), []int{34} } func (x *PostToOutboxRequest) GetUsername() string { @@ -1963,7 +2058,7 @@ type PostToOutboxResult struct { func (x *PostToOutboxResult) Reset() { *x = PostToOutboxResult{} 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) } @@ -1976,7 +2071,7 @@ func (x *PostToOutboxResult) String() string { func (*PostToOutboxResult) ProtoMessage() {} func (x *PostToOutboxResult) 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 { @@ -1989,7 +2084,7 @@ func (x *PostToOutboxResult) ProtoReflect() protoreflect.Message { // Deprecated: Use PostToOutboxResult.ProtoReflect.Descriptor instead. func (*PostToOutboxResult) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{33} + return file_spis_proto_rawDescGZIP(), []int{35} } func (x *PostToOutboxResult) GetBody() []byte { @@ -2012,7 +2107,7 @@ type GetOutboxRequest struct { func (x *GetOutboxRequest) Reset() { *x = GetOutboxRequest{} 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) } @@ -2025,7 +2120,7 @@ func (x *GetOutboxRequest) String() string { func (*GetOutboxRequest) ProtoMessage() {} func (x *GetOutboxRequest) 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 { @@ -2038,7 +2133,7 @@ func (x *GetOutboxRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetOutboxRequest.ProtoReflect.Descriptor instead. func (*GetOutboxRequest) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{34} + return file_spis_proto_rawDescGZIP(), []int{36} } func (x *GetOutboxRequest) GetUsername() string { @@ -2064,7 +2159,7 @@ type GetOutboxResult struct { func (x *GetOutboxResult) Reset() { *x = GetOutboxResult{} 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) } @@ -2077,7 +2172,7 @@ func (x *GetOutboxResult) String() string { func (*GetOutboxResult) ProtoMessage() {} func (x *GetOutboxResult) 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 { @@ -2090,7 +2185,7 @@ func (x *GetOutboxResult) ProtoReflect() protoreflect.Message { // Deprecated: Use GetOutboxResult.ProtoReflect.Descriptor instead. func (*GetOutboxResult) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{35} + return file_spis_proto_rawDescGZIP(), []int{37} } func (x *GetOutboxResult) GetContext() string { @@ -2149,7 +2244,7 @@ type PostToInboxRequest struct { func (x *PostToInboxRequest) Reset() { *x = PostToInboxRequest{} 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) } @@ -2162,7 +2257,7 @@ func (x *PostToInboxRequest) String() string { func (*PostToInboxRequest) ProtoMessage() {} func (x *PostToInboxRequest) 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 { @@ -2175,7 +2270,7 @@ func (x *PostToInboxRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PostToInboxRequest.ProtoReflect.Descriptor instead. func (*PostToInboxRequest) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{36} + return file_spis_proto_rawDescGZIP(), []int{38} } func (x *PostToInboxRequest) GetUsername() string { @@ -2203,7 +2298,7 @@ type PostToInboxResult struct { func (x *PostToInboxResult) Reset() { *x = PostToInboxResult{} 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) } @@ -2216,7 +2311,7 @@ func (x *PostToInboxResult) String() string { func (*PostToInboxResult) ProtoMessage() {} func (x *PostToInboxResult) 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 { @@ -2229,7 +2324,7 @@ func (x *PostToInboxResult) ProtoReflect() protoreflect.Message { // Deprecated: Use PostToInboxResult.ProtoReflect.Descriptor instead. func (*PostToInboxResult) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{37} + return file_spis_proto_rawDescGZIP(), []int{39} } func (x *PostToInboxResult) GetBody() []byte { @@ -2252,7 +2347,7 @@ type GetInboxRequest struct { func (x *GetInboxRequest) Reset() { *x = GetInboxRequest{} 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) } @@ -2265,7 +2360,7 @@ func (x *GetInboxRequest) String() string { func (*GetInboxRequest) ProtoMessage() {} func (x *GetInboxRequest) 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 { @@ -2278,7 +2373,7 @@ func (x *GetInboxRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetInboxRequest.ProtoReflect.Descriptor instead. func (*GetInboxRequest) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{38} + return file_spis_proto_rawDescGZIP(), []int{40} } func (x *GetInboxRequest) GetUsername() string { @@ -2304,7 +2399,7 @@ type GetInboxResult struct { func (x *GetInboxResult) Reset() { *x = GetInboxResult{} 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) } @@ -2317,7 +2412,7 @@ func (x *GetInboxResult) String() string { func (*GetInboxResult) ProtoMessage() {} func (x *GetInboxResult) 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 { @@ -2330,7 +2425,7 @@ func (x *GetInboxResult) ProtoReflect() protoreflect.Message { // Deprecated: Use GetInboxResult.ProtoReflect.Descriptor instead. func (*GetInboxResult) Descriptor() ([]byte, []int) { - return file_spis_proto_rawDescGZIP(), []int{39} + return file_spis_proto_rawDescGZIP(), []int{41} } func (x *GetInboxResult) GetContext() string { @@ -2459,76 +2554,98 @@ var file_spis_proto_rawDesc = []byte{ 0x62, 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 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, + 0x52, 0x06, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x22, 0x63, 0x0a, 0x15, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x73, 0x73, + 0x77, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x6e, + 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, + 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, - 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, + 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, - 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x19, 0x0a, 0x07, 0x63, 0x6f, 0x6e, + 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, @@ -2538,67 +2655,53 @@ var file_spis_proto_rawDesc = []byte{ 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, + 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, 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, 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, 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, + 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, + 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 ( @@ -2613,7 +2716,7 @@ func file_spis_proto_rawDescGZIP() []byte { return file_spis_proto_rawDescData } -var file_spis_proto_msgTypes = make([]protoimpl.MessageInfo, 40) +var file_spis_proto_msgTypes = make([]protoimpl.MessageInfo, 42) var file_spis_proto_goTypes = []interface{}{ (*SystemCallRequest)(nil), // 0: protobuf.SystemCallRequest (*SystemCallResult)(nil), // 1: protobuf.SystemCallResult @@ -2631,45 +2734,47 @@ var file_spis_proto_goTypes = []interface{}{ (*GetProfileByUserResult)(nil), // 13: protobuf.GetProfileByUserResult (*UpdateProfileByUserRequest)(nil), // 14: protobuf.UpdateProfileByUserRequest (*UpdateProfileByUserResult)(nil), // 15: protobuf.UpdateProfileByUserResult - (*LogoutRequest)(nil), // 16: protobuf.LogoutRequest - (*LogoutResult)(nil), // 17: protobuf.LogoutResult - (*WebfingerRequest)(nil), // 18: protobuf.WebfingerRequest - (*WebfingerResult)(nil), // 19: protobuf.WebfingerResult - (*GetPackagesRequest)(nil), // 20: protobuf.GetPackagesRequest - (*GetPackagesResult)(nil), // 21: protobuf.GetPackagesResult - (*GetActorRequest)(nil), // 22: protobuf.GetActorRequest - (*GetActorResult)(nil), // 23: protobuf.GetActorResult - (*FollowActorRequest)(nil), // 24: protobuf.FollowActorRequest - (*FollowActorResult)(nil), // 25: protobuf.FollowActorResult - (*AuthorizeInteractionRequest)(nil), // 26: protobuf.AuthorizeInteractionRequest - (*AuthorizeInteractionResult)(nil), // 27: protobuf.AuthorizeInteractionResult - (*GetFollowersRequest)(nil), // 28: protobuf.GetFollowersRequest - (*GetFollowersResult)(nil), // 29: protobuf.GetFollowersResult - (*GetFollowingRequest)(nil), // 30: protobuf.GetFollowingRequest - (*GetFollowingResult)(nil), // 31: protobuf.GetFollowingResult - (*PostToOutboxRequest)(nil), // 32: protobuf.PostToOutboxRequest - (*PostToOutboxResult)(nil), // 33: protobuf.PostToOutboxResult - (*GetOutboxRequest)(nil), // 34: protobuf.GetOutboxRequest - (*GetOutboxResult)(nil), // 35: protobuf.GetOutboxResult - (*PostToInboxRequest)(nil), // 36: protobuf.PostToInboxRequest - (*PostToInboxResult)(nil), // 37: protobuf.PostToInboxResult - (*GetInboxRequest)(nil), // 38: protobuf.GetInboxRequest - (*GetInboxResult)(nil), // 39: protobuf.GetInboxResult - (*Document)(nil), // 40: protobuf.Document - (*ActivityPubLink)(nil), // 41: protobuf.ActivityPubLink - (*ActivityPubMedia)(nil), // 42: protobuf.ActivityPubMedia - (*ActivityPubPublicKey)(nil), // 43: protobuf.ActivityPubPublicKey - (*ActivityPubActivity)(nil), // 44: protobuf.ActivityPubActivity + (*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 } var file_spis_proto_depIdxs = []int32{ - 40, // 0: protobuf.EchoRequest.document:type_name -> protobuf.Document - 40, // 1: protobuf.EchoResult.document:type_name -> protobuf.Document - 41, // 2: protobuf.WebfingerResult.links:type_name -> protobuf.ActivityPubLink - 42, // 3: protobuf.GetActorResult.icon:type_name -> protobuf.ActivityPubMedia - 42, // 4: protobuf.GetActorResult.image:type_name -> protobuf.ActivityPubMedia - 43, // 5: protobuf.GetActorResult.publicKey:type_name -> protobuf.ActivityPubPublicKey - 44, // 6: protobuf.GetOutboxResult.orderedItems:type_name -> protobuf.ActivityPubActivity - 44, // 7: protobuf.GetInboxResult.orderedItems:type_name -> protobuf.ActivityPubActivity + 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 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 @@ -2877,7 +2982,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LogoutRequest); i { + switch v := v.(*ChangePasswordRequest); i { case 0: return &v.state case 1: @@ -2889,7 +2994,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LogoutResult); i { + switch v := v.(*ChangePasswordResult); i { case 0: return &v.state case 1: @@ -2901,7 +3006,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WebfingerRequest); i { + switch v := v.(*LogoutRequest); i { case 0: return &v.state case 1: @@ -2913,7 +3018,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WebfingerResult); i { + switch v := v.(*LogoutResult); i { case 0: return &v.state case 1: @@ -2925,7 +3030,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPackagesRequest); i { + switch v := v.(*WebfingerRequest); i { case 0: return &v.state case 1: @@ -2937,7 +3042,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPackagesResult); i { + switch v := v.(*WebfingerResult); i { case 0: return &v.state case 1: @@ -2949,7 +3054,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetActorRequest); i { + switch v := v.(*GetPackagesRequest); i { case 0: return &v.state case 1: @@ -2961,7 +3066,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetActorResult); i { + switch v := v.(*GetPackagesResult); i { case 0: return &v.state case 1: @@ -2973,7 +3078,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FollowActorRequest); i { + switch v := v.(*GetActorRequest); i { case 0: return &v.state case 1: @@ -2985,7 +3090,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FollowActorResult); i { + switch v := v.(*GetActorResult); i { case 0: return &v.state case 1: @@ -2997,7 +3102,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AuthorizeInteractionRequest); i { + switch v := v.(*FollowActorRequest); i { case 0: return &v.state case 1: @@ -3009,7 +3114,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AuthorizeInteractionResult); i { + switch v := v.(*FollowActorResult); i { case 0: return &v.state case 1: @@ -3021,7 +3126,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetFollowersRequest); i { + switch v := v.(*AuthorizeInteractionRequest); i { case 0: return &v.state case 1: @@ -3033,7 +3138,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetFollowersResult); i { + switch v := v.(*AuthorizeInteractionResult); i { case 0: return &v.state case 1: @@ -3045,7 +3150,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetFollowingRequest); i { + switch v := v.(*GetFollowersRequest); i { case 0: return &v.state case 1: @@ -3057,7 +3162,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetFollowingResult); i { + switch v := v.(*GetFollowersResult); i { case 0: return &v.state case 1: @@ -3069,7 +3174,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PostToOutboxRequest); i { + switch v := v.(*GetFollowingRequest); i { case 0: return &v.state case 1: @@ -3081,7 +3186,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PostToOutboxResult); i { + switch v := v.(*GetFollowingResult); i { case 0: return &v.state case 1: @@ -3093,7 +3198,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetOutboxRequest); i { + switch v := v.(*PostToOutboxRequest); i { case 0: return &v.state case 1: @@ -3105,7 +3210,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetOutboxResult); i { + switch v := v.(*PostToOutboxResult); i { case 0: return &v.state case 1: @@ -3117,7 +3222,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PostToInboxRequest); i { + switch v := v.(*GetOutboxRequest); i { case 0: return &v.state case 1: @@ -3129,7 +3234,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PostToInboxResult); i { + switch v := v.(*GetOutboxResult); i { case 0: return &v.state case 1: @@ -3141,7 +3246,7 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetInboxRequest); i { + switch v := v.(*PostToInboxRequest); i { case 0: return &v.state case 1: @@ -3153,6 +3258,30 @@ func file_spis_proto_init() { } } file_spis_proto_msgTypes[39].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[40].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[41].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetInboxResult); i { case 0: return &v.state @@ -3171,7 +3300,7 @@ func file_spis_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_spis_proto_rawDesc, NumEnums: 0, - NumMessages: 40, + NumMessages: 42, NumExtensions: 0, NumServices: 0, }, diff --git a/components/api/protobuf/spis.proto b/components/api/protobuf/spis.proto index 9be8b2a..7650c4a 100644 --- a/components/api/protobuf/spis.proto +++ b/components/api/protobuf/spis.proto @@ -104,6 +104,16 @@ message UpdateProfileByUserResult { string github = 0x00000005; } +// API: ChangePassword +//----------------------------------------------------------- +message ChangePasswordRequest { + string currentPassword = 0x00000001; + string newPassword = 0x00000002; +} + +message ChangePasswordResult { +} + // API: Logout //----------------------------------------------------------- message LogoutRequest { diff --git a/components/api/services/change_password_service.go b/components/api/services/change_password_service.go new file mode 100644 index 0000000..8acc46c --- /dev/null +++ b/components/api/services/change_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 ChangePasswordService(context IContext, input *ChangePasswordRequest) (result *ChangePasswordResult, err error) { + conductor := core.Conductor + + conductor.LogRemoteCall(context, INITIALIZE, "change_password", input, result, err) + defer func() { conductor.LogRemoteCall(context, FINALIZE, "change_password", input, result, err) }() + + _result, _err := conductor.ChangePassword(input.CurrentPassword, input.NewPassword, context.Identity()) + if _err != nil { + err = _err + return nil, err + } + + _ = _result + + result = context.ResultContainer().(*ChangePasswordResult) + return result, nil +} diff --git a/components/api/services/system_call_service.go b/components/api/services/system_call_service.go index 93c24ea..09d9e76 100644 --- a/components/api/services/system_call_service.go +++ b/components/api/services/system_call_service.go @@ -14,7 +14,6 @@ import ( // noinspection GoUnusedParameter func SystemCallService(context IContext, input *SystemCallRequest) (result *SystemCallResult, err error) { conductor := core.Conductor - _ = SYSTEM_CALL_REQUEST conductor.LogRemoteCall(context, INITIALIZE, "system_call", input, result, err) defer func() { conductor.LogRemoteCall(context, FINALIZE, "system_call", input, result, err) }() diff --git a/components/constants/errors.go b/components/constants/errors.go index 77ff293..82ad407 100644 --- a/components/constants/errors.go +++ b/components/constants/errors.go @@ -54,6 +54,8 @@ const ( ERROR_MESSAGE_INVALID_EMAIL_FOR_VERIFY = "ERROR_MESSAGE_INVALID_EMAIL_FOR_VERIFY" ERROR_MESSAGE_INVALID_EMAIL_FOR_LOGIN = "ERROR_MESSAGE_INVALID_EMAIL_FOR_LOGIN" ERROR_MESSAGE_INVALID_PASSWORD_FOR_LOGIN = "ERROR_MESSAGE_INVALID_PASSWORD_FOR_LOGIN" + ERROR_MESSAGE_INVALID_CURRENT_PASSWORD_FOR_CHANGE_PASSWORD = "ERROR_MESSAGE_INVALID_CURRENT_PASSWORD_FOR_CHANGE_PASSWORD" + ERROR_MESSAGE_INVALID_NEW_PASSWORD_FOR_CHANGE_PASSWORD = "ERROR_MESSAGE_INVALID_NEW_PASSWORD_FOR_CHANGE_PASSWORD" ERROR_MESSAGE_INVALID_RESOURCE_FOR_WEBFINGER = "ERROR_MESSAGE_INVALID_RESOURCE_FOR_WEBFINGER" // CUSTOM_ERRORS ERROR_MESSAGE_DATA_INTEGRITY_VIOLATION = "ERROR_MESSAGE_DATA_INTEGRITY_VIOLATION" @@ -121,6 +123,8 @@ var ( ERROR_INVALID_EMAIL_FOR_VERIFY = errors.New(ERROR_MESSAGE_INVALID_EMAIL_FOR_VERIFY) ERROR_INVALID_EMAIL_FOR_LOGIN = errors.New(ERROR_MESSAGE_INVALID_EMAIL_FOR_LOGIN) ERROR_INVALID_PASSWORD_FOR_LOGIN = errors.New(ERROR_MESSAGE_INVALID_PASSWORD_FOR_LOGIN) + ERROR_INVALID_CURRENT_PASSWORD_FOR_CHANGE_PASSWORD = errors.New(ERROR_MESSAGE_INVALID_CURRENT_PASSWORD_FOR_CHANGE_PASSWORD) + ERROR_INVALID_NEW_PASSWORD_FOR_CHANGE_PASSWORD = errors.New(ERROR_MESSAGE_INVALID_NEW_PASSWORD_FOR_CHANGE_PASSWORD) ERROR_INVALID_RESOURCE_FOR_WEBFINGER = errors.New(ERROR_MESSAGE_INVALID_RESOURCE_FOR_WEBFINGER) // CUSTOM_ERRORS ERROR_DATA_INTEGRITY_VIOLATION = errors.New(ERROR_MESSAGE_DATA_INTEGRITY_VIOLATION) diff --git a/components/constants/resources.en-US.go b/components/constants/resources.en-US.go index 975c261..c0d0020 100644 --- a/components/constants/resources.en-US.go +++ b/components/constants/resources.en-US.go @@ -54,6 +54,8 @@ var Errors = Resource{ ERROR_MESSAGE_INVALID_EMAIL_FOR_VERIFY: "invalid_email", ERROR_MESSAGE_INVALID_EMAIL_FOR_LOGIN: "invalid_email", ERROR_MESSAGE_INVALID_PASSWORD_FOR_LOGIN: "invalid_password", + ERROR_MESSAGE_INVALID_CURRENT_PASSWORD_FOR_CHANGE_PASSWORD: "invalid_current_password", + ERROR_MESSAGE_INVALID_NEW_PASSWORD_FOR_CHANGE_PASSWORD: "invalid_new_password", ERROR_MESSAGE_INVALID_RESOURCE_FOR_WEBFINGER: "invalid_resource", // CUSTOM_ERRORS ERROR_MESSAGE_DATA_INTEGRITY_VIOLATION: "data_integrity_violation", @@ -72,4 +74,6 @@ var Errors = Resource{ func init() { // CUSTOM_ERRORS Errors[ERROR_MESSAGE_DATA_INTEGRITY_VIOLATION] = "data_integrity_violation" + Errors[ERROR_MESSAGE_INVALID_PASSWORD_FOR_SIGNUP] = "Your password should be at least 7 characters long including uppercase and lowercase letters, numbers and special characters." + Errors[ERROR_MESSAGE_INVALID_PASSWORD_FOR_LOGIN] = "Your password should be at least 7 characters long including uppercase and lowercase letters, numbers and special characters." } diff --git a/components/contracts/api.go b/components/contracts/api.go index 9b3a8d1..dc347cf 100644 --- a/components/contracts/api.go +++ b/components/contracts/api.go @@ -14,6 +14,7 @@ type IApi interface { Login(*LoginRequest) (*LoginResult, error) GetProfileByUser(*GetProfileByUserRequest) (*GetProfileByUserResult, error) UpdateProfileByUser(*UpdateProfileByUserRequest) (*UpdateProfileByUserResult, error) + ChangePassword(*ChangePasswordRequest) (*ChangePasswordResult, 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 51410f5..a83a341 100644 --- a/components/contracts/opcodes.go +++ b/components/contracts/opcodes.go @@ -36,6 +36,10 @@ const ( UPDATE_PROFILE_BY_USER_REQUEST = 0xC25AB0BA UPDATE_PROFILE_BY_USER_RESULT = 0x678A8BAF + //ChangePasswordOperation + CHANGE_PASSWORD_REQUEST = 0x926A5565 + CHANGE_PASSWORD_RESULT = 0x521E68DF + //LogoutOperation LOGOUT_REQUEST = 0x447AFA34 LOGOUT_RESULT = 0x9412D17F @@ -101,6 +105,8 @@ var OPCODES = Opcodes{ 0x8EECDE97: "GetProfileByUser", 0xC25AB0BA: "UPDATE_PROFILE_BY_USER", 0x678A8BAF: "UpdateProfileByUser", + 0x926A5565: "CHANGE_PASSWORD", + 0x521E68DF: "ChangePassword", 0x447AFA34: "LOGOUT", 0x9412D17F: "Logout", 0x01FD357C: "WEBFINGER", diff --git a/components/contracts/spi.go b/components/contracts/spi.go index dc7bbf6..2013407 100644 --- a/components/contracts/spi.go +++ b/components/contracts/spi.go @@ -62,6 +62,7 @@ type ( Login(email string, password string, editor Identity) (ILoginResult, error) 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) Logout(editor Identity) (ILogoutResult, error) Webfinger(resource string, editor Identity) (IWebfingerResult, error) GetPackages(editor Identity) (IGetPackagesResult, error) @@ -115,6 +116,9 @@ type ( Github() string } + IChangePasswordResult interface { + } + ILogoutResult interface { } diff --git a/components/contracts/system_component.go b/components/contracts/system_component.go index ead75f5..d3b2a24 100644 --- a/components/contracts/system_component.go +++ b/components/contracts/system_component.go @@ -264,6 +264,7 @@ type ( Login(email string, password string, editor Identity) (ILoginResult, error) 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) Logout(editor Identity) (ILogoutResult, error) Webfinger(resource string, editor Identity) (IWebfingerResult, error) GetPackages(editor Identity) (IGetPackagesResult, error) @@ -301,6 +302,7 @@ type ( NewLoginResult(username string, token string, ignored interface{}) ILoginResult 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 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 c5cdc1c..5da0883 100644 --- a/components/contracts/system_dispatcher.go +++ b/components/contracts/system_dispatcher.go @@ -1039,6 +1039,7 @@ type IDispatcher interface { Login(email string, password string) (ILoginResult, error) GetProfileByUser() (IGetProfileByUserResult, error) UpdateProfileByUser(displayName string, avatar string, banner string, summary string, github string) (IUpdateProfileByUserResult, error) + ChangePassword(currentPassword string, newPassword string) (IChangePasswordResult, error) Logout() (ILogoutResult, error) Webfinger(resource string) (IWebfingerResult, error) GetPackages() (IGetPackagesResult, error) @@ -1134,6 +1135,8 @@ type IDispatcher interface { NewGetProfileByUserResult(username string, displayName string, avatar string, banner string, summary string, github string) IGetProfileByUserResult // NewUpdateProfileByUserResult creates a new result container for 'Update Profile By User' system action. 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 // 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 5bd5abd..f1f2763 100644 --- a/components/core/api_methods.go +++ b/components/core/api_methods.go @@ -85,6 +85,16 @@ func (api *api) UpdateProfileByUser(request *UpdateProfileByUserRequest) (*Updat } } +func (api *api) ChangePassword(request *ChangePasswordRequest) (*ChangePasswordResult, error) { + result, err := api.call(CHANGE_PASSWORD_REQUEST, request) + + if err != nil { + return nil, err + } else { + return result.(*ChangePasswordResult), nil + } +} + func (api *api) Logout(request *LogoutRequest) (*LogoutResult, error) { result, err := api.call(LOGOUT_REQUEST, request) @@ -214,6 +224,7 @@ func init() { API_RESULT[LOGIN_RESULT] = LoginResult{} API_RESULT[GET_PROFILE_BY_USER_RESULT] = GetProfileByUserResult{} API_RESULT[UPDATE_PROFILE_BY_USER_RESULT] = UpdateProfileByUserResult{} + API_RESULT[CHANGE_PASSWORD_RESULT] = ChangePasswordResult{} 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 fb99b4c..422f32a 100644 --- a/components/core/initializer.go +++ b/components/core/initializer.go @@ -1122,6 +1122,10 @@ func (conductor *conductor) UpdateProfileByUser(displayName string, avatar strin return conductor.spiManager.UpdateProfileByUser(displayName, avatar, banner, summary, github, editor) } +func (conductor *conductor) ChangePassword(currentPassword string, newPassword string, editor Identity) (IChangePasswordResult, error) { + return conductor.spiManager.ChangePassword(currentPassword, newPassword, editor) +} + func (conductor *conductor) Logout(editor Identity) (ILogoutResult, error) { return conductor.spiManager.Logout(editor) } @@ -1266,6 +1270,10 @@ func (conductor *conductor) NewUpdateProfileByUserResult(displayName string, ava return NewUpdateProfileByUserResult(displayName, avatar, banner, summary, github, nil) } +func (conductor *conductor) NewChangePasswordResult(_ interface{}) IChangePasswordResult { + return NewChangePasswordResult(nil) +} + func (conductor *conductor) NewLogoutResult(_ interface{}) ILogoutResult { return NewLogoutResult(nil) } @@ -1315,6 +1323,10 @@ func (conductor *conductor) NewGetInboxResult(context string, id string, type_ s } func (conductor *conductor) LogRemoteCall(context IContext, eventType uint32, source string, input, result interface{}, err error) { + if !context.Configuration().IsTrafficRecordEnabled() { + return + } + errorMessage := "" if err != nil { errorMessage = strings.TrimPrefix(err.Error(), "ERROR_MESSAGE_") diff --git a/components/core/spi.go b/components/core/spi.go index c2ab038..d0f589f 100644 --- a/components/core/spi.go +++ b/components/core/spi.go @@ -268,6 +268,10 @@ func (dispatcher *dispatcher) UpdateProfileByUser(displayName string, avatar str return dispatcher.conductor.SpiManager().UpdateProfileByUser(displayName, avatar, banner, summary, github, dispatcher.identity) } +func (dispatcher *dispatcher) ChangePassword(currentPassword string, newPassword string) (IChangePasswordResult, error) { + return dispatcher.conductor.SpiManager().ChangePassword(currentPassword, newPassword, 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 0b6f9c0..c492c78 100644 --- a/components/core/spi_manager.go +++ b/components/core/spi_manager.go @@ -544,6 +544,42 @@ func (manager *spiManager) UpdateProfileByUser(displayName string, avatar string } } +//region IChangePasswordResult Implementation + +type changePasswordResult struct { +} + +func NewChangePasswordResult(_ interface{}) IChangePasswordResult { + return &changePasswordResult{} +} + +//endregion + +func (manager *spiManager) ChangePassword(currentPassword string, newPassword string, editor Identity) (result IChangePasswordResult, err error) { + if !validators.PasswordIsValid(currentPassword) { + return nil, ERROR_INVALID_CURRENT_PASSWORD_FOR_CHANGE_PASSWORD + } + + if !validators.PasswordIsValid(newPassword) { + return nil, ERROR_INVALID_NEW_PASSWORD_FOR_CHANGE_PASSWORD + } + + defer func() { + if reason := recover(); reason != nil { + err = manager.Error(reason) + } + }() + + editor.Lock(CHANGE_PASSWORD_REQUEST) + defer editor.Unlock(CHANGE_PASSWORD_REQUEST) + + if result, err = commands.ChangePassword(NewDispatcher(Conductor, editor), currentPassword, newPassword); err != nil { + return nil, err + } else { + return result, nil + } +} + //region ILogoutResult Implementation type logoutResult struct { diff --git a/components/core/system_results.go b/components/core/system_results.go index 42da25a..dacd659 100644 --- a/components/core/system_results.go +++ b/components/core/system_results.go @@ -32,6 +32,10 @@ func (dispatcher *dispatcher) NewUpdateProfileByUserResult(displayName string, a return NewUpdateProfileByUserResult(displayName, avatar, banner, summary, github, nil) } +func (dispatcher *dispatcher) NewChangePasswordResult() IChangePasswordResult { + return NewChangePasswordResult(nil) +} + func (dispatcher *dispatcher) NewLogoutResult() ILogoutResult { return NewLogoutResult(nil) }