diff --git a/perxis-proto b/perxis-proto index 606cf8070bc9a930cadd5117bf49cc119ff3a16e..78539871cf2d9f6b187865c4855450143dec4e79 160000 --- a/perxis-proto +++ b/perxis-proto @@ -1 +1 @@ -Subproject commit 606cf8070bc9a930cadd5117bf49cc119ff3a16e +Subproject commit 78539871cf2d9f6b187865c4855450143dec4e79 diff --git a/pkg/extension/storage.go b/pkg/extension/storage.go index 73b20d261146ec22a455c2538010e9b6282e0720..0d8479c1b39ddc508c79280222b4e22df0d79ee7 100644 --- a/pkg/extension/storage.go +++ b/pkg/extension/storage.go @@ -45,6 +45,7 @@ func infoFromItem(extension string, item *items.Item) *Info { d := item.Data + id, _ := d["id"].(string) // чтобы РїСЂРё получении СЃРїРёСЃРєР° расширений было РІРѕР·РјРѕР¶РЅРѕ понять, что коллекция `space_extensions` еще РЅРµ была мигрирована (v0.0.19) title, _ := d["title"].(string) state, _ := d["extension_state"].(int64) ver, _ := d["version"].(string) @@ -52,7 +53,7 @@ func infoFromItem(extension string, item *items.Item) *Info { errmsg, _ := d["status_error"].(string) return &Info{ - Extension: extension, + Extension: id, Title: title, State: State(state), Msg: msg, diff --git a/proto/extensions/manager_service.pb.go b/proto/extensions/manager_service.pb.go index 8f352f1870fab3a81edfed16a1b1282e4d9eee08..92434b607cb4263c4173979b390c034ce562238e 100644 --- a/proto/extensions/manager_service.pb.go +++ b/proto/extensions/manager_service.pb.go @@ -108,10 +108,17 @@ type ListExtensionsRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Extensions []string `protobuf:"bytes,1,rep,name=extensions,proto3" json:"extensions,omitempty"` // РРјСЏ расширения (опционально), regexp + // РРјСЏ расширения (опционально), regexp. Фильтр РїРѕ расширениям является приоритетным + // относительно остальных фильтров - если РІ `ListExtensionsRequest.extensions` передано + // [ a, b, c ], то РІ `ListExtensionsResponse.extensions` вернется три элемента СЃ информацией Рѕ + // каждом РёР· расширений + Extensions []string `protobuf:"bytes,1,rep,name=extensions,proto3" json:"extensions,omitempty"` SpaceId string `protobuf:"bytes,2,opt,name=space_id,json=spaceId,proto3" json:"space_id,omitempty"` // Пространство имен расширения EnvId string `protobuf:"bytes,3,opt,name=env_id,json=envId,proto3" json:"env_id,omitempty"` // Рдентификатор окружения - State []State `protobuf:"varint,4,rep,packed,name=state,proto3,enum=extensions.State" json:"state,omitempty"` + // Вернуть СЃРїРёСЃРѕРє расширений, которые находятся РІ РѕРґРЅРѕРј РёР· переданных состояний + // Если СЃРїРёСЃРѕРє состояний пустой, РїРѕ умолчанию возвращаются расширения РІ любом состоянии, + // РєСЂРѕРјРµ NOT_INSTALLED + State []State `protobuf:"varint,4,rep,packed,name=state,proto3,enum=extensions.State" json:"state,omitempty"` } func (x *ListExtensionsRequest) Reset() { @@ -174,7 +181,11 @@ func (x *ListExtensionsRequest) GetState() []State { return nil } -// ListExtensionsResponse - описание расширения +// ListExtensionsResponse - описание расширений. Результирующий СЃРїРёСЃРѕРє возвращается всегда +// РІ отсортированном РІРёРґРµ: +// - Если `ListExtensionsRequest.extensions` пустой, то отсортированный РїРѕ идентификатору расширения +// - Если `ListExtensionsRequest.extensions` заполнен, то возвращаются расширения РІ соответствующем +// запросу РїРѕСЂСЏРґРєРµ type ListExtensionsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/proto/extensions/manager_service_grpc.pb.go b/proto/extensions/manager_service_grpc.pb.go index 21dc84b29f2ce7190db0609d0e333940cb6c229f..c75c7cc3ddcc26817ec7baae4bf59cb5ec37f455 100644 --- a/proto/extensions/manager_service_grpc.pb.go +++ b/proto/extensions/manager_service_grpc.pb.go @@ -72,7 +72,7 @@ type ExtensionManagerServiceClient interface { UnregisterExtensions(ctx context.Context, in *UnregisterExtensionsRequest, opts ...grpc.CallOption) (*UnregisterExtensionsResponse, error) // Получить СЃРїРёСЃРѕРє зарегистрированных сервисов ListRegisteredExtensions(ctx context.Context, in *ListRegisteredExtensionsRequest, opts ...grpc.CallOption) (*ListRegisteredExtensionsResponse, error) - // ListExtensions - получить статус расширения + // ListExtensions - получить информацию Рѕ расширениях ListExtensions(ctx context.Context, in *ListExtensionsRequest, opts ...grpc.CallOption) (*ListExtensionsResponse, error) } @@ -140,7 +140,7 @@ type ExtensionManagerServiceServer interface { UnregisterExtensions(context.Context, *UnregisterExtensionsRequest) (*UnregisterExtensionsResponse, error) // Получить СЃРїРёСЃРѕРє зарегистрированных сервисов ListRegisteredExtensions(context.Context, *ListRegisteredExtensionsRequest) (*ListRegisteredExtensionsResponse, error) - // ListExtensions - получить статус расширения + // ListExtensions - получить информацию Рѕ расширениях ListExtensions(context.Context, *ListExtensionsRequest) (*ListExtensionsResponse, error) mustEmbedUnimplementedExtensionManagerServiceServer() }