diff --git a/perxis-proto b/perxis-proto index b6932f502c43944f278af9097607fd17af4b8b8d..dc83f92e5b9bb690c52486ee326a798365afd85f 160000 --- a/perxis-proto +++ b/perxis-proto @@ -1 +1 @@ -Subproject commit b6932f502c43944f278af9097607fd17af4b8b8d +Subproject commit dc83f92e5b9bb690c52486ee326a798365afd85f diff --git a/pkg/data/strings.go b/pkg/data/strings.go index 36c3e6943526b17ed821476bc387382a4f72cb51..f393e989536fafe05cdc5be8ec3fec4596856cfe 100644 --- a/pkg/data/strings.go +++ b/pkg/data/strings.go @@ -89,3 +89,20 @@ func GlobToRegexp(s string) string { return replacer.Replace(s) } + +func GetRegexMatches(s string, matches ...string) []string { + var res []string + for _, match := range matches { + if match == "" { + continue + } + if s == match || match == ".*" { + res = append(res, match) + continue + } + if ok, _ := regexp.MatchString(match, s); ok { + res = append(res, match) + } + } + return res +} diff --git a/pkg/extension/extension.go b/pkg/extension/extension.go index 771a945312dd8a6bdfb87b3ca6fa9970e8d28f0d..0e13061bd5a0256c073576c45ab8f41f40c8cd55 100644 --- a/pkg/extension/extension.go +++ b/pkg/extension/extension.go @@ -12,10 +12,11 @@ import ( ) const ( - StatePending = pb.State_PENDING - StateInstalled = pb.State_INSTALLED - StateInProgress = pb.State_IN_PROGRESS - StateFail = pb.State_FAIL + StateNotInstalled = pb.State_NOT_INSTALLED + StatePending = pb.State_PENDING + StateInstalled = pb.State_INSTALLED + StateInProgress = pb.State_IN_PROGRESS + StateFail = pb.State_FAIL MetadataKey = "extension" ) @@ -67,11 +68,11 @@ type Extension interface { } func CheckInstalled(ctx context.Context, content *content.Content, spaceID, envID, extension string) (bool, error) { - status, err := NewStorage(content).GetStatus(ctx, spaceID, envID, extension) + status, err := NewStorage(content).GetExtension(ctx, spaceID, envID, extension) if err != nil { return false, err } - return status.Installed, nil + return status.State == StateInstalled, nil } func isMetadataEqual(s1, s2 *schema.Schema) bool { diff --git a/pkg/extension/manager.go b/pkg/extension/manager.go index d196bdad4a10c1069dee035cf9da3c9bd56ee534..9de5dc4e71c1160a7277181a64085ebf6ab86032 100644 --- a/pkg/extension/manager.go +++ b/pkg/extension/manager.go @@ -5,7 +5,6 @@ import ( "git.perx.ru/perxis/perxis-go/pkg/auth" "git.perx.ru/perxis/perxis-go/pkg/errors" - pb "git.perx.ru/perxis/perxis-go/proto/extensions" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" ) @@ -14,13 +13,21 @@ type Manager interface { Extension RegisterExtensions(ctx context.Context, ext ...*ExtensionConnector) error UnregisterExtensions(ctx context.Context, ext ...*ExtensionConnector) error - ListExtensions(ctx context.Context, filter *ListExtensionsFilter) ([]*ExtensionConnector, error) - GetInstalledExtensions(ctx context.Context, space, env string, extensions ...string) ([]*Status, error) + ListRegisteredExtensions(ctx context.Context, extensions ...string) ([]*ExtensionConnector, error) + ListExtensions(ctx context.Context, space, env string, filter *ListExtensionsFilter) ([]*Info, error) } -type ( - ListExtensionsFilter = pb.ListExtensionsFilter -) +type ListExtensionsFilter struct { + Extensions []string + States []State +} + +func NewListExtensionsFilter(extensions []string, states ...State) *ListExtensionsFilter { + return &ListExtensionsFilter{ + Extensions: extensions, + States: states, + } +} type ExtensionConnector struct { Extension diff --git a/pkg/extension/manager_client.go b/pkg/extension/manager_client.go index 126cbe863ad5e4c1e9a1de407b16cc20dd4250e3..d15d0dd0dd9eb53c5183f1faacc655c01dd494a1 100644 --- a/pkg/extension/manager_client.go +++ b/pkg/extension/manager_client.go @@ -57,8 +57,8 @@ func (c *ManagerClient) UnregisterExtensions(ctx context.Context, exts ...*Exten return err } -func (c *ManagerClient) ListExtensions(ctx context.Context, filter *ListExtensionsFilter) ([]*ExtensionConnector, error) { - resp, err := c.manager.ListExtensions(ctx, &pb.ListExtensionsRequest{Filter: filter}, grpc.WaitForReady(true)) +func (c *ManagerClient) ListRegisteredExtensions(ctx context.Context, extensions ...string) ([]*ExtensionConnector, error) { + resp, err := c.manager.ListRegisteredExtensions(ctx, &pb.ListRegisteredExtensionsRequest{Extension: extensions}, grpc.WaitForReady(true)) if err != nil { return nil, err } @@ -71,14 +71,18 @@ func (c *ManagerClient) ListExtensions(ctx context.Context, filter *ListExtensio return exts, nil } -func (c *ManagerClient) GetInstalledExtensions(ctx context.Context, space, env string, extensions ...string) ([]*Status, error) { - resp, err := c.manager.GetInstalledExtensions(ctx, &pb.GetInstalledExtensionsRequest{ - Extensions: extensions, +func (c *ManagerClient) ListExtensions(ctx context.Context, space, env string, filter *ListExtensionsFilter) ([]*Info, error) { + if filter == nil { + filter = new(ListExtensionsFilter) + } + resp, err := c.manager.ListExtensions(ctx, &pb.ListExtensionsRequest{ + Extensions: filter.Extensions, SpaceId: space, EnvId: env, - }) + State: filter.States, + }, grpc.WaitForReady(true)) if err != nil { return nil, err } - return resp.Status, err + return resp.Extensions, err } diff --git a/pkg/extension/middleware/error_logging_middleware.go b/pkg/extension/middleware/error_logging_middleware.go index 2b3ec2f688d680d5401ba145bd4a340cde5e9203..e7dec72ba015ffe7e75a7bf0736f3a20cd7f4204 100644 --- a/pkg/extension/middleware/error_logging_middleware.go +++ b/pkg/extension/middleware/error_logging_middleware.go @@ -53,34 +53,34 @@ func (m *errorLoggingMiddleware) GetDescriptor() (ep1 *extension.ExtensionDescri return m.next.GetDescriptor() } -func (m *errorLoggingMiddleware) GetInstalledExtensions(ctx context.Context, space string, env string, extensions ...string) (spa1 []*extension.Status, err error) { +func (m *errorLoggingMiddleware) Install(ctx context.Context, in *extension.InstallRequest) (err error) { logger := m.logger defer func() { if err != nil { logger.Warn("response error", zap.Error(err)) } }() - return m.next.GetInstalledExtensions(ctx, space, env, extensions...) + return m.next.Install(ctx, in) } -func (m *errorLoggingMiddleware) Install(ctx context.Context, in *extension.InstallRequest) (err error) { +func (m *errorLoggingMiddleware) ListExtensions(ctx context.Context, space string, env string, filter *extension.ListExtensionsFilter) (ipa1 []*extension.Info, err error) { logger := m.logger defer func() { if err != nil { logger.Warn("response error", zap.Error(err)) } }() - return m.next.Install(ctx, in) + return m.next.ListExtensions(ctx, space, env, filter) } -func (m *errorLoggingMiddleware) ListExtensions(ctx context.Context, filter *extension.ListExtensionsFilter) (epa1 []*extension.ExtensionConnector, err error) { +func (m *errorLoggingMiddleware) ListRegisteredExtensions(ctx context.Context, extensions ...string) (epa1 []*extension.ExtensionConnector, err error) { logger := m.logger defer func() { if err != nil { logger.Warn("response error", zap.Error(err)) } }() - return m.next.ListExtensions(ctx, filter) + return m.next.ListRegisteredExtensions(ctx, extensions...) } func (m *errorLoggingMiddleware) RegisterExtensions(ctx context.Context, ext ...*extension.ExtensionConnector) (err error) { diff --git a/pkg/extension/middleware/logging_middleware.go b/pkg/extension/middleware/logging_middleware.go index 49eda62214b80cd0a614731333b194e1186fffbd..8ae37929d26a9dbccf40ab1030d73b708d3d96ba 100644 --- a/pkg/extension/middleware/logging_middleware.go +++ b/pkg/extension/middleware/logging_middleware.go @@ -133,14 +133,12 @@ func (m *loggingMiddleware) GetDescriptor() (ep1 *extension.ExtensionDescriptor) return ep1 } -func (m *loggingMiddleware) GetInstalledExtensions(ctx context.Context, space string, env string, extensions ...string) (spa1 []*extension.Status, err error) { +func (m *loggingMiddleware) Install(ctx context.Context, in *extension.InstallRequest) (err error) { begin := time.Now() var fields []zapcore.Field for k, v := range map[string]interface{}{ - "ctx": ctx, - "space": space, - "env": env, - "extensions": extensions} { + "ctx": ctx, + "in": in} { if k == "ctx" { fields = append(fields, zap.String("principal", fmt.Sprint(auth.GetPrincipal(ctx)))) continue @@ -148,17 +146,16 @@ func (m *loggingMiddleware) GetInstalledExtensions(ctx context.Context, space st fields = append(fields, zap.Reflect(k, v)) } - m.logger.Debug("GetInstalledExtensions.Request", fields...) + m.logger.Debug("Install.Request", fields...) - spa1, err = m.next.GetInstalledExtensions(ctx, space, env, extensions...) + err = m.next.Install(ctx, in) fields = []zapcore.Field{ zap.Duration("time", time.Since(begin)), } for k, v := range map[string]interface{}{ - "spa1": spa1, - "err": err} { + "err": err} { if k == "err" { err, _ := v.(error) fields = append(fields, zap.Error(err)) @@ -167,17 +164,19 @@ func (m *loggingMiddleware) GetInstalledExtensions(ctx context.Context, space st fields = append(fields, zap.Reflect(k, v)) } - m.logger.Debug("GetInstalledExtensions.Response", fields...) + m.logger.Debug("Install.Response", fields...) - return spa1, err + return err } -func (m *loggingMiddleware) Install(ctx context.Context, in *extension.InstallRequest) (err error) { +func (m *loggingMiddleware) ListExtensions(ctx context.Context, space string, env string, filter *extension.ListExtensionsFilter) (ipa1 []*extension.Info, err error) { begin := time.Now() var fields []zapcore.Field for k, v := range map[string]interface{}{ - "ctx": ctx, - "in": in} { + "ctx": ctx, + "space": space, + "env": env, + "filter": filter} { if k == "ctx" { fields = append(fields, zap.String("principal", fmt.Sprint(auth.GetPrincipal(ctx)))) continue @@ -185,16 +184,17 @@ func (m *loggingMiddleware) Install(ctx context.Context, in *extension.InstallRe fields = append(fields, zap.Reflect(k, v)) } - m.logger.Debug("Install.Request", fields...) + m.logger.Debug("ListExtensions.Request", fields...) - err = m.next.Install(ctx, in) + ipa1, err = m.next.ListExtensions(ctx, space, env, filter) fields = []zapcore.Field{ zap.Duration("time", time.Since(begin)), } for k, v := range map[string]interface{}{ - "err": err} { + "ipa1": ipa1, + "err": err} { if k == "err" { err, _ := v.(error) fields = append(fields, zap.Error(err)) @@ -203,17 +203,17 @@ func (m *loggingMiddleware) Install(ctx context.Context, in *extension.InstallRe fields = append(fields, zap.Reflect(k, v)) } - m.logger.Debug("Install.Response", fields...) + m.logger.Debug("ListExtensions.Response", fields...) - return err + return ipa1, err } -func (m *loggingMiddleware) ListExtensions(ctx context.Context, filter *extension.ListExtensionsFilter) (epa1 []*extension.ExtensionConnector, err error) { +func (m *loggingMiddleware) ListRegisteredExtensions(ctx context.Context, extensions ...string) (epa1 []*extension.ExtensionConnector, err error) { begin := time.Now() var fields []zapcore.Field for k, v := range map[string]interface{}{ - "ctx": ctx, - "filter": filter} { + "ctx": ctx, + "extensions": extensions} { if k == "ctx" { fields = append(fields, zap.String("principal", fmt.Sprint(auth.GetPrincipal(ctx)))) continue @@ -221,9 +221,9 @@ func (m *loggingMiddleware) ListExtensions(ctx context.Context, filter *extensio fields = append(fields, zap.Reflect(k, v)) } - m.logger.Debug("ListExtensions.Request", fields...) + m.logger.Debug("ListRegisteredExtensions.Request", fields...) - epa1, err = m.next.ListExtensions(ctx, filter) + epa1, err = m.next.ListRegisteredExtensions(ctx, extensions...) fields = []zapcore.Field{ zap.Duration("time", time.Since(begin)), @@ -240,7 +240,7 @@ func (m *loggingMiddleware) ListExtensions(ctx context.Context, filter *extensio fields = append(fields, zap.Reflect(k, v)) } - m.logger.Debug("ListExtensions.Response", fields...) + m.logger.Debug("ListRegisteredExtensions.Response", fields...) return epa1, err } diff --git a/pkg/extension/middleware/recovering_middleware.go b/pkg/extension/middleware/recovering_middleware.go index 5d9a3b5681809fd3b46d8fe72dc66043c9246235..d75af3364a31dd2e0961166a3a7dca573079f4e1 100644 --- a/pkg/extension/middleware/recovering_middleware.go +++ b/pkg/extension/middleware/recovering_middleware.go @@ -65,7 +65,7 @@ func (m *recoveringMiddleware) GetDescriptor() (ep1 *extension.ExtensionDescript return m.next.GetDescriptor() } -func (m *recoveringMiddleware) GetInstalledExtensions(ctx context.Context, space string, env string, extensions ...string) (spa1 []*extension.Status, err error) { +func (m *recoveringMiddleware) Install(ctx context.Context, in *extension.InstallRequest) (err error) { logger := m.logger defer func() { if r := recover(); r != nil { @@ -74,10 +74,10 @@ func (m *recoveringMiddleware) GetInstalledExtensions(ctx context.Context, space } }() - return m.next.GetInstalledExtensions(ctx, space, env, extensions...) + return m.next.Install(ctx, in) } -func (m *recoveringMiddleware) Install(ctx context.Context, in *extension.InstallRequest) (err error) { +func (m *recoveringMiddleware) ListExtensions(ctx context.Context, space string, env string, filter *extension.ListExtensionsFilter) (ipa1 []*extension.Info, err error) { logger := m.logger defer func() { if r := recover(); r != nil { @@ -86,10 +86,10 @@ func (m *recoveringMiddleware) Install(ctx context.Context, in *extension.Instal } }() - return m.next.Install(ctx, in) + return m.next.ListExtensions(ctx, space, env, filter) } -func (m *recoveringMiddleware) ListExtensions(ctx context.Context, filter *extension.ListExtensionsFilter) (epa1 []*extension.ExtensionConnector, err error) { +func (m *recoveringMiddleware) ListRegisteredExtensions(ctx context.Context, extensions ...string) (epa1 []*extension.ExtensionConnector, err error) { logger := m.logger defer func() { if r := recover(); r != nil { @@ -98,7 +98,7 @@ func (m *recoveringMiddleware) ListExtensions(ctx context.Context, filter *exten } }() - return m.next.ListExtensions(ctx, filter) + return m.next.ListRegisteredExtensions(ctx, extensions...) } func (m *recoveringMiddleware) RegisterExtensions(ctx context.Context, ext ...*extension.ExtensionConnector) (err error) { diff --git a/pkg/extension/mocks/Manager.go b/pkg/extension/mocks/Manager.go index 7d4266a30bc9012307f350bcfa9277d1b22e85f3..907e79be06246a240d05ed8f264d3354ab76cbbe 100644 --- a/pkg/extension/mocks/Manager.go +++ b/pkg/extension/mocks/Manager.go @@ -72,32 +72,39 @@ func (_m *Manager) GetDescriptor() *extensions.ExtensionDescriptor { return r0 } -// GetInstalledExtensions provides a mock function with given fields: ctx, space, env, _a3 -func (_m *Manager) GetInstalledExtensions(ctx context.Context, space string, env string, _a3 ...string) ([]*extensions.GetInstalledExtensionsResponse_Status, error) { - _va := make([]interface{}, len(_a3)) - for _i := range _a3 { - _va[_i] = _a3[_i] +// Install provides a mock function with given fields: ctx, in +func (_m *Manager) Install(ctx context.Context, in *extensions.InstallRequest) error { + ret := _m.Called(ctx, in) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, *extensions.InstallRequest) error); ok { + r0 = rf(ctx, in) + } else { + r0 = ret.Error(0) } - var _ca []interface{} - _ca = append(_ca, ctx, space, env) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - var r0 []*extensions.GetInstalledExtensionsResponse_Status + return r0 +} + +// ListExtensions provides a mock function with given fields: ctx, space, env, filter +func (_m *Manager) ListExtensions(ctx context.Context, space string, env string, filter *extension.ListExtensionsFilter) ([]*extensions.ListExtensionsResponse_ExtensionInfo, error) { + ret := _m.Called(ctx, space, env, filter) + + var r0 []*extensions.ListExtensionsResponse_ExtensionInfo var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, ...string) ([]*extensions.GetInstalledExtensionsResponse_Status, error)); ok { - return rf(ctx, space, env, _a3...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, *extension.ListExtensionsFilter) ([]*extensions.ListExtensionsResponse_ExtensionInfo, error)); ok { + return rf(ctx, space, env, filter) } - if rf, ok := ret.Get(0).(func(context.Context, string, string, ...string) []*extensions.GetInstalledExtensionsResponse_Status); ok { - r0 = rf(ctx, space, env, _a3...) + if rf, ok := ret.Get(0).(func(context.Context, string, string, *extension.ListExtensionsFilter) []*extensions.ListExtensionsResponse_ExtensionInfo); ok { + r0 = rf(ctx, space, env, filter) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).([]*extensions.GetInstalledExtensionsResponse_Status) + r0 = ret.Get(0).([]*extensions.ListExtensionsResponse_ExtensionInfo) } } - if rf, ok := ret.Get(1).(func(context.Context, string, string, ...string) error); ok { - r1 = rf(ctx, space, env, _a3...) + if rf, ok := ret.Get(1).(func(context.Context, string, string, *extension.ListExtensionsFilter) error); ok { + r1 = rf(ctx, space, env, filter) } else { r1 = ret.Error(1) } @@ -105,39 +112,32 @@ func (_m *Manager) GetInstalledExtensions(ctx context.Context, space string, env return r0, r1 } -// Install provides a mock function with given fields: ctx, in -func (_m *Manager) Install(ctx context.Context, in *extensions.InstallRequest) error { - ret := _m.Called(ctx, in) - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, *extensions.InstallRequest) error); ok { - r0 = rf(ctx, in) - } else { - r0 = ret.Error(0) +// ListRegisteredExtensions provides a mock function with given fields: ctx, _a1 +func (_m *Manager) ListRegisteredExtensions(ctx context.Context, _a1 ...string) ([]*extension.ExtensionConnector, error) { + _va := make([]interface{}, len(_a1)) + for _i := range _a1 { + _va[_i] = _a1[_i] } - - return r0 -} - -// ListExtensions provides a mock function with given fields: ctx, filter -func (_m *Manager) ListExtensions(ctx context.Context, filter *extensions.ListExtensionsFilter) ([]*extension.ExtensionConnector, error) { - ret := _m.Called(ctx, filter) + var _ca []interface{} + _ca = append(_ca, ctx) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) var r0 []*extension.ExtensionConnector var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *extensions.ListExtensionsFilter) ([]*extension.ExtensionConnector, error)); ok { - return rf(ctx, filter) + if rf, ok := ret.Get(0).(func(context.Context, ...string) ([]*extension.ExtensionConnector, error)); ok { + return rf(ctx, _a1...) } - if rf, ok := ret.Get(0).(func(context.Context, *extensions.ListExtensionsFilter) []*extension.ExtensionConnector); ok { - r0 = rf(ctx, filter) + if rf, ok := ret.Get(0).(func(context.Context, ...string) []*extension.ExtensionConnector); ok { + r0 = rf(ctx, _a1...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*extension.ExtensionConnector) } } - if rf, ok := ret.Get(1).(func(context.Context, *extensions.ListExtensionsFilter) error); ok { - r1 = rf(ctx, filter) + if rf, ok := ret.Get(1).(func(context.Context, ...string) error); ok { + r1 = rf(ctx, _a1...) } else { r1 = ret.Error(1) } diff --git a/pkg/extension/mocks/Storage.go b/pkg/extension/mocks/Storage.go index 702f178fe0404c6957b652a4196066a69c1ee57e..a37e32d0982754f8585492a4f5584a2bb0a77869 100644 --- a/pkg/extension/mocks/Storage.go +++ b/pkg/extension/mocks/Storage.go @@ -15,8 +15,8 @@ type Storage struct { mock.Mock } -// DeleteStatus provides a mock function with given fields: ctx, spaceID, envID, _a3 -func (_m *Storage) DeleteStatus(ctx context.Context, spaceID string, envID string, _a3 string) error { +// DeleteExtension provides a mock function with given fields: ctx, spaceID, envID, _a3 +func (_m *Storage) DeleteExtension(ctx context.Context, spaceID string, envID string, _a3 string) error { ret := _m.Called(ctx, spaceID, envID, _a3) var r0 error @@ -29,8 +29,8 @@ func (_m *Storage) DeleteStatus(ctx context.Context, spaceID string, envID strin return r0 } -// FindStatuses provides a mock function with given fields: ctx, spaceID, envID, _a3 -func (_m *Storage) FindStatuses(ctx context.Context, spaceID string, envID string, _a3 ...string) ([]*extensions.GetInstalledExtensionsResponse_Status, error) { +// FindExtensions provides a mock function with given fields: ctx, spaceID, envID, _a3 +func (_m *Storage) FindExtensions(ctx context.Context, spaceID string, envID string, _a3 ...string) ([]*extensions.ListExtensionsResponse_ExtensionInfo, error) { _va := make([]interface{}, len(_a3)) for _i := range _a3 { _va[_i] = _a3[_i] @@ -40,16 +40,16 @@ func (_m *Storage) FindStatuses(ctx context.Context, spaceID string, envID strin _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 []*extensions.GetInstalledExtensionsResponse_Status + var r0 []*extensions.ListExtensionsResponse_ExtensionInfo var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, ...string) ([]*extensions.GetInstalledExtensionsResponse_Status, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, string, string, ...string) ([]*extensions.ListExtensionsResponse_ExtensionInfo, error)); ok { return rf(ctx, spaceID, envID, _a3...) } - if rf, ok := ret.Get(0).(func(context.Context, string, string, ...string) []*extensions.GetInstalledExtensionsResponse_Status); ok { + if rf, ok := ret.Get(0).(func(context.Context, string, string, ...string) []*extensions.ListExtensionsResponse_ExtensionInfo); ok { r0 = rf(ctx, spaceID, envID, _a3...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).([]*extensions.GetInstalledExtensionsResponse_Status) + r0 = ret.Get(0).([]*extensions.ListExtensionsResponse_ExtensionInfo) } } @@ -62,20 +62,20 @@ func (_m *Storage) FindStatuses(ctx context.Context, spaceID string, envID strin return r0, r1 } -// GetStatus provides a mock function with given fields: ctx, spaceID, envID, _a3 -func (_m *Storage) GetStatus(ctx context.Context, spaceID string, envID string, _a3 string) (*extensions.GetInstalledExtensionsResponse_Status, error) { +// GetExtension provides a mock function with given fields: ctx, spaceID, envID, _a3 +func (_m *Storage) GetExtension(ctx context.Context, spaceID string, envID string, _a3 string) (*extensions.ListExtensionsResponse_ExtensionInfo, error) { ret := _m.Called(ctx, spaceID, envID, _a3) - var r0 *extensions.GetInstalledExtensionsResponse_Status + var r0 *extensions.ListExtensionsResponse_ExtensionInfo var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (*extensions.GetInstalledExtensionsResponse_Status, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (*extensions.ListExtensionsResponse_ExtensionInfo, error)); ok { return rf(ctx, spaceID, envID, _a3) } - if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *extensions.GetInstalledExtensionsResponse_Status); ok { + if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *extensions.ListExtensionsResponse_ExtensionInfo); ok { r0 = rf(ctx, spaceID, envID, _a3) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*extensions.GetInstalledExtensionsResponse_Status) + r0 = ret.Get(0).(*extensions.ListExtensionsResponse_ExtensionInfo) } } @@ -88,12 +88,12 @@ func (_m *Storage) GetStatus(ctx context.Context, spaceID string, envID string, return r0, r1 } -// SetStatus provides a mock function with given fields: ctx, spaceID, envID, _a3, status -func (_m *Storage) SetStatus(ctx context.Context, spaceID string, envID string, _a3 string, status *extensions.GetInstalledExtensionsResponse_Status) error { +// SetExtension provides a mock function with given fields: ctx, spaceID, envID, _a3, status +func (_m *Storage) SetExtension(ctx context.Context, spaceID string, envID string, _a3 string, status *extensions.ListExtensionsResponse_ExtensionInfo) error { ret := _m.Called(ctx, spaceID, envID, _a3, status) var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, *extensions.GetInstalledExtensionsResponse_Status) error); ok { + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, *extensions.ListExtensionsResponse_ExtensionInfo) error); ok { r0 = rf(ctx, spaceID, envID, _a3, status) } else { r0 = ret.Error(0) diff --git a/pkg/extension/schema.go b/pkg/extension/schema.go index 1e44488e0918776fbe770f52b333bba8828317e8..1c34b71eb34a9ddeea9f519add93b03e15959914 100644 --- a/pkg/extension/schema.go +++ b/pkg/extension/schema.go @@ -12,8 +12,8 @@ import ( ) const ( - StatusCollectionID = "space_extensions" - StatusCollectionName = "ÐаÑтройки/РаÑширениÑ" + ExtensionsCollectionID = "space_extensions" + ExtensionsCollectionName = "ÐаÑтройки/РаÑширениÑ" ActionsCollectionID = "space_actions" ActionsCollectionName = "ÐаÑтройки/ДейÑтвиÑ" @@ -141,10 +141,10 @@ func NewStatusCollection(spaceID, envID string) *collections.Collection { sch.Field.UI.Options["collection_icon"] = "SettingOutlined/ApiOutlined" return &collections.Collection{ - ID: StatusCollectionID, + ID: ExtensionsCollectionID, SpaceID: spaceID, EnvID: envID, - Name: StatusCollectionName, + Name: ExtensionsCollectionName, Schema: sch, Hidden: true, } diff --git a/pkg/extension/storage.go b/pkg/extension/storage.go index 35a8f559bd9ba3042ec5c6569b1f821656a53afd..b3d2f5003d0bbbe5c5a2ecc4d50f50decf45b088 100644 --- a/pkg/extension/storage.go +++ b/pkg/extension/storage.go @@ -2,6 +2,7 @@ package extension import ( "context" + "fmt" "strings" "git.perx.ru/perxis/perxis-go/pkg/collections" @@ -14,14 +15,16 @@ import ( "git.perx.ru/perxis/perxis-go/pkg/items" ) -type Status = pb.GetInstalledExtensionsResponse_Status +type ( + Info = pb.ListExtensionsResponse_ExtensionInfo +) // Storage опиÑывает Ð¸Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ Ñ…Ñ€Ð°Ð½Ð¸Ð»Ð¸Ñ‰Ð° ÑоÑтоÑний раÑширений type Storage interface { - GetStatus(ctx context.Context, spaceID, envID string, extension string) (*Status, error) - FindStatuses(ctx context.Context, spaceID, envID string, extensions ...string) ([]*Status, error) - SetStatus(ctx context.Context, spaceID, envID string, extension string, status *Status) error - DeleteStatus(ctx context.Context, spaceID, envID string, extension string) error + GetExtension(ctx context.Context, spaceID, envID string, extension string) (*Info, error) + FindExtensions(ctx context.Context, spaceID, envID string, extensions ...string) ([]*Info, error) + SetExtension(ctx context.Context, spaceID, envID string, extension string, status *Info) error + DeleteExtension(ctx context.Context, spaceID, envID string, extension string) error } type storage struct { @@ -32,11 +35,11 @@ func NewStorage(content *content.Content) Storage { return &storage{content: content} } -func statusFromItem(extension string, item *items.Item) *Status { +func infoFromItem(extension string, item *items.Item) *Info { if item == nil { - return &Status{ + return &Info{ Extension: extension, - Installed: false, + State: StateNotInstalled, } } @@ -48,57 +51,49 @@ func statusFromItem(extension string, item *items.Item) *Status { msg, _ := d["status_msg"].(string) errmsg, _ := d["status_error"].(string) - return &Status{ + return &Info{ Extension: extension, Title: title, State: State(state), Msg: msg, Error: errmsg, - Installed: State(state) == StateInstalled, InstalledVersion: ver, } } -// GetStatus возвращает ÑоÑтоÑние раÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ Ð² проÑтранÑтве -func (s *storage) GetStatus(ctx context.Context, spaceID, envID string, extension string) (*Status, error) { - res, err := s.content.Items.Get(ctx, spaceID, envID, StatusCollectionID, extension) +// GetExtension возвращает ÑоÑтоÑние раÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ Ð² проÑтранÑтве +func (s *storage) GetExtension(ctx context.Context, spaceID, envID string, extension string) (*Info, error) { + res, err := s.content.Items.Get(ctx, spaceID, envID, ExtensionsCollectionID, extension) if err != nil && !strings.Contains(err.Error(), "not found") { return nil, err } - return statusFromItem(extension, res), nil + return infoFromItem(extension, res), nil } -// FindStatuses возвращает ÑоÑтоÑÐ½Ð¸Ñ Ñ€Ð°Ñширений в проÑтранÑтве. ЕÑли раÑширение не уÑтановлено, -// возвращаетÑÑ ÑÑ‚Ð°Ñ‚ÑƒÑ Ñ Ñ„Ð»Ð°Ð³Ð¾Ð¼ `Installed: false`. СтатуÑÑ‹ возвращаютÑÑ Ð² том же порÑдке, что и -// переданные раÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ -func (s *storage) FindStatuses(ctx context.Context, spaceID, envID string, extensions ...string) ([]*Status, error) { - itms, _, err := s.content.Items.Find(ctx, spaceID, envID, StatusCollectionID, &items.Filter{ID: extensions}) - if err != nil && !strings.Contains(err.Error(), collections.ErrNotFound.Error()) { - return nil, err - } - - res := make([]*Status, 0, len(itms)) - - if len(extensions) == 0 { - for _, item := range itms { - res = append(res, statusFromItem(item.ID, item)) +// FindExtensions возвращает ÑоÑтоÑÐ½Ð¸Ñ Ñ€Ð°Ñширений в проÑтранÑтве +func (s *storage) FindExtensions(ctx context.Context, spaceID, envID string, extensions ...string) ([]*Info, error) { + var itemsFilter *items.Filter + if len(extensions) != 0 { + q := make([]interface{}, 0, len(extensions)+1) + for _, e := range extensions { + q = append(q, fmt.Sprintf("id contains '%s'", e)) } - return res, nil } - extensionToItem := make(map[string]*items.Item, len(itms)) - for _, item := range itms { - extensionToItem[item.ID] = item - } - for _, extension := range extensions { - res = append(res, statusFromItem(extension, extensionToItem[extension])) + itms, _, err := s.content.Items.Find(ctx, spaceID, envID, ExtensionsCollectionID, itemsFilter) + if err != nil && !strings.Contains(err.Error(), collections.ErrNotFound.Error()) { + return nil, err } + res := make([]*Info, len(itms)) + for i, item := range itms { + res[i] = infoFromItem(item.ID, item) + } return res, nil } -// SetStatus уÑтанавливает ÑоÑтоÑние раÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ Ð² проÑтранÑтве -func (s *storage) SetStatus(ctx context.Context, spaceID, envID string, extension string, status *Status) error { +// SetExtension уÑтанавливает ÑоÑтоÑние раÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ Ð² проÑтранÑтве +func (s *storage) SetExtension(ctx context.Context, spaceID, envID string, extension string, status *Info) error { if err := s.init(ctx, spaceID, envID); err != nil { return errors.Wrap(err, "prepare collections") } @@ -107,7 +102,7 @@ func (s *storage) SetStatus(ctx context.Context, spaceID, envID string, extensio ID: extension, SpaceID: spaceID, EnvID: envID, - CollectionID: StatusCollectionID, + CollectionID: ExtensionsCollectionID, Data: make(map[string]interface{}), } @@ -118,7 +113,7 @@ func (s *storage) SetStatus(ctx context.Context, spaceID, envID string, extensio _ = item.Set("status_msg", status.Msg) _ = item.Set("status_error", status.Error) - i, _ := s.content.Items.Get(ctx, spaceID, envID, StatusCollectionID, extension) + i, _ := s.content.Items.Get(ctx, spaceID, envID, ExtensionsCollectionID, extension) if i == nil { _, err := s.content.Items.Create(ctx, item) return err @@ -127,13 +122,13 @@ func (s *storage) SetStatus(ctx context.Context, spaceID, envID string, extensio return s.content.Items.Update(ctx, item) } -// DeleteStatus удалÑет ÑоÑтоÑние раÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ Ð² проÑтранÑтве (при удалении раÑширениÑ) -func (s *storage) DeleteStatus(ctx context.Context, spaceID, envID string, extension string) error { +// DeleteExtension удалÑет ÑоÑтоÑние раÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ Ð² проÑтранÑтве (при удалении раÑширениÑ) +func (s *storage) DeleteExtension(ctx context.Context, spaceID, envID string, extension string) error { item := &items.Item{ ID: extension, SpaceID: spaceID, EnvID: envID, - CollectionID: StatusCollectionID, + CollectionID: ExtensionsCollectionID, } return s.content.Items.Delete(ctx, item) } diff --git a/proto/extensions/extension.pb.go b/proto/extensions/extension.pb.go index 3e4f9d3dab8507a87146e783e074782217fefe71..0c1501b6d088570de34d5bb617346f620ed643ef 100644 --- a/proto/extensions/extension.pb.go +++ b/proto/extensions/extension.pb.go @@ -101,7 +101,7 @@ func (Target) EnumDescriptor() ([]byte, []int) { type Action_Kind int32 const ( - Action_DEFAULT Action_Kind = 0 // ДейÑтвие не отображаетÑÑ Ð² интерфейÑе и могут иÑпользуетÑÑ Ð´Ð»Ñ Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ð´Ð¾Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ñ‹Ñ… запроÑов (Ñм. `ActionResponse.next`) или напрÑмую из Ñторонних приложений. + Action_DEFAULT Action_Kind = 0 // ДейÑтвие не отображаетÑÑ Ð² интерфейÑе и может иÑпользоватьÑÑ Ð´Ð»Ñ Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ð´Ð¾Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ñ‹Ñ… запроÑов (Ñм. `ActionResponse.next`) или напрÑмую из Ñторонних приложений. Action_SPACE Action_Kind = 1 // ДейÑтвие ÑвÑзано Ñ Ð¿Ñ€Ð¾ÑтранÑтвом (требуетÑÑ Ð¿ÐµÑ€ÐµÐ´Ð°Ñ‡Ð° space_id). ОтображаетÑÑ Ð² меню "ДейÑтвиÑ". Action_ENVIRONMENT Action_Kind = 2 // ДейÑтвие ÑвÑзано Ñ Ð¾ÐºÑ€ÑƒÐ¶ÐµÐ½Ð¸ÐµÐ¼ (требуетÑÑ Ð¿ÐµÑ€ÐµÐ´Ð°Ñ‡Ð° space_id, env_id). ОтображаетÑÑ Ð² меню "ДейÑтвиÑ". Action_COLLECTION Action_Kind = 3 // ДейÑтвие ÑвÑзано Ñ ÐºÐ¾Ð»Ð»ÐµÐºÑ†Ð¸ÐµÐ¹ (требуетÑÑ Ð¿ÐµÑ€ÐµÐ´Ð°Ñ‡Ð° space_id, env_id, collection_id). ОтображаетÑÑ Ð½Ð° Ñкране ÑпиÑка запиÑей. @@ -215,7 +215,7 @@ func (Action_View) EnumDescriptor() ([]byte, []int) { } // * -// Action опиÑывает как коллекцию в ÑиÑтеме Ñ Ð¿Ñ€ÐµÐ´ÑƒÑтавновленными дейÑтвиÑми, так и возможные дальнейшие дейÑÑ‚Ð²Ð¸Ñ Ð¿Ð¾Ñле +// Action опиÑывает как коллекцию в ÑиÑтеме Ñ Ð¿Ñ€ÐµÐ´ÑƒÑтановленными дейÑтвиÑми, так и возможные дальнейшие дейÑÑ‚Ð²Ð¸Ñ Ð¿Ð¾Ñле // Ð¿Ð¾Ð»ÑƒÑ‡ÐµÐ½Ð¸Ñ Ð¾Ñ‚Ð²ÐµÑ‚Ð° (Ñм. `ActionResponse.next`) // // ЕÑли поле `request` приÑутÑтвует, но не вÑе требуемые Ð¿Ð¾Ð»Ñ Ð·Ð°Ð¿Ð¾Ð»Ð½ÐµÐ½Ñ‹, то Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð´Ð»Ñ Ð½Ð¸Ñ… берутÑÑ Ð¸Ð· текущих значений. @@ -238,11 +238,11 @@ type Action struct { // Идентификатор дейÑÑ‚Ð²Ð¸Ñ (в формате URI) // Варианты иÑпользованиÑ: // - пуÑтой - никаких дейÑтвий не выполнÑетÑÑ - // - `action_id` - проÑтое дейÑтвие (еÑли уÑтановлено раÑширение, то оно иÑпользуетÑÑ) + // - `action_id` - проÑтое дейÑтвие (еÑли уÑтановлено значение `extension`, то оно иÑпользуетÑÑ) // - `grpc:///extension_id/action_id` - полное дейÑтвие Ñ ÑƒÐºÐ°Ð·Ð°Ð½Ð¸ÐµÐ¼ раÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ // - `https://host/path` - дейÑтвие по HTTP(S) // - `ui:///path` - дейÑтвие в интерфейÑе - // - `/path` - дейÑтвие в интерфейÑе + // - `/path` - дейÑтвие в интерфейÑе - DEPRECATED: ИÑпользуйте `ui:///path` // // Пример: `https://example.com/api/v1/action` - будет выполнен Ð·Ð°Ð¿Ñ€Ð¾Ñ HTTP по указанному URL. // Сервер может вернуть ответ в формате JSON или HTML/MD. Дальнейшие дейÑÑ‚Ð²Ð¸Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÑетÑÑ Ð¾Ð¿ заголовку ответа diff --git a/proto/extensions/manager_service.pb.go b/proto/extensions/manager_service.pb.go index 47252630d183c6075e2d5d15644818b650ccf6e4..8f352f1870fab3a81edfed16a1b1282e4d9eee08 100644 --- a/proto/extensions/manager_service.pb.go +++ b/proto/extensions/manager_service.pb.go @@ -50,28 +50,28 @@ const ( type State int32 const ( - State_UNKNOWN State = 0 - State_INSTALLED State = 1 - State_IN_PROGRESS State = 2 - State_FAIL State = 3 - State_PENDING State = 4 + State_NOT_INSTALLED State = 0 + State_INSTALLED State = 1 + State_IN_PROGRESS State = 2 + State_FAIL State = 3 + State_PENDING State = 4 ) // Enum value maps for State. var ( State_name = map[int32]string{ - 0: "UNKNOWN", + 0: "NOT_INSTALLED", 1: "INSTALLED", 2: "IN_PROGRESS", 3: "FAIL", 4: "PENDING", } State_value = map[string]int32{ - "UNKNOWN": 0, - "INSTALLED": 1, - "IN_PROGRESS": 2, - "FAIL": 3, - "PENDING": 4, + "NOT_INSTALLED": 0, + "INSTALLED": 1, + "IN_PROGRESS": 2, + "FAIL": 3, + "PENDING": 4, } ) @@ -102,20 +102,20 @@ func (State) EnumDescriptor() ([]byte, []int) { return file_extensions_manager_service_proto_rawDescGZIP(), []int{0} } -// GetInstalledExtensionsRequest - Ð·Ð°Ð¿Ñ€Ð¾Ñ Ð½Ð° получение ÑтатуÑа раÑширений в проÑтранÑтве и окружении. -// ЕÑли ÑпиÑок раÑширений в запроÑе не передан, возвращаютÑÑ Ð²Ñе уÑтановленные раÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ -type GetInstalledExtensionsRequest struct { +// ListExtensionsRequest - Ð·Ð°Ð¿Ñ€Ð¾Ñ Ð½Ð° получение ÑтатуÑа раÑширений в проÑтранÑтве и окружении +type ListExtensionsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Extensions []string `protobuf:"bytes,1,rep,name=extensions,proto3" json:"extensions,omitempty"` // Ð˜Ð¼Ñ Ñ€Ð°ÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ + Extensions []string `protobuf:"bytes,1,rep,name=extensions,proto3" json:"extensions,omitempty"` // Ð˜Ð¼Ñ Ñ€Ð°ÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ (опционально), regexp 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"` } -func (x *GetInstalledExtensionsRequest) Reset() { - *x = GetInstalledExtensionsRequest{} +func (x *ListExtensionsRequest) Reset() { + *x = ListExtensionsRequest{} if protoimpl.UnsafeEnabled { mi := &file_extensions_manager_service_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -123,13 +123,13 @@ func (x *GetInstalledExtensionsRequest) Reset() { } } -func (x *GetInstalledExtensionsRequest) String() string { +func (x *ListExtensionsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetInstalledExtensionsRequest) ProtoMessage() {} +func (*ListExtensionsRequest) ProtoMessage() {} -func (x *GetInstalledExtensionsRequest) ProtoReflect() protoreflect.Message { +func (x *ListExtensionsRequest) ProtoReflect() protoreflect.Message { mi := &file_extensions_manager_service_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -141,43 +141,50 @@ func (x *GetInstalledExtensionsRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetInstalledExtensionsRequest.ProtoReflect.Descriptor instead. -func (*GetInstalledExtensionsRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use ListExtensionsRequest.ProtoReflect.Descriptor instead. +func (*ListExtensionsRequest) Descriptor() ([]byte, []int) { return file_extensions_manager_service_proto_rawDescGZIP(), []int{0} } -func (x *GetInstalledExtensionsRequest) GetExtensions() []string { +func (x *ListExtensionsRequest) GetExtensions() []string { if x != nil { return x.Extensions } return nil } -func (x *GetInstalledExtensionsRequest) GetSpaceId() string { +func (x *ListExtensionsRequest) GetSpaceId() string { if x != nil { return x.SpaceId } return "" } -func (x *GetInstalledExtensionsRequest) GetEnvId() string { +func (x *ListExtensionsRequest) GetEnvId() string { if x != nil { return x.EnvId } return "" } -// GetExtensionResponse - опиÑание раÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ -type GetInstalledExtensionsResponse struct { +func (x *ListExtensionsRequest) GetState() []State { + if x != nil { + return x.State + } + return nil +} + +// ListExtensionsResponse - опиÑание раÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ +type ListExtensionsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Status []*GetInstalledExtensionsResponse_Status `protobuf:"bytes,1,rep,name=status,proto3" json:"status,omitempty"` + Extensions []*ListExtensionsResponse_ExtensionInfo `protobuf:"bytes,1,rep,name=extensions,proto3" json:"extensions,omitempty"` } -func (x *GetInstalledExtensionsResponse) Reset() { - *x = GetInstalledExtensionsResponse{} +func (x *ListExtensionsResponse) Reset() { + *x = ListExtensionsResponse{} if protoimpl.UnsafeEnabled { mi := &file_extensions_manager_service_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -185,13 +192,13 @@ func (x *GetInstalledExtensionsResponse) Reset() { } } -func (x *GetInstalledExtensionsResponse) String() string { +func (x *ListExtensionsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetInstalledExtensionsResponse) ProtoMessage() {} +func (*ListExtensionsResponse) ProtoMessage() {} -func (x *GetInstalledExtensionsResponse) ProtoReflect() protoreflect.Message { +func (x *ListExtensionsResponse) ProtoReflect() protoreflect.Message { mi := &file_extensions_manager_service_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -203,14 +210,14 @@ func (x *GetInstalledExtensionsResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetInstalledExtensionsResponse.ProtoReflect.Descriptor instead. -func (*GetInstalledExtensionsResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use ListExtensionsResponse.ProtoReflect.Descriptor instead. +func (*ListExtensionsResponse) Descriptor() ([]byte, []int) { return file_extensions_manager_service_proto_rawDescGZIP(), []int{1} } -func (x *GetInstalledExtensionsResponse) GetStatus() []*GetInstalledExtensionsResponse_Status { +func (x *ListExtensionsResponse) GetExtensions() []*ListExtensionsResponse_ExtensionInfo { if x != nil { - return x.Status + return x.Extensions } return nil } @@ -489,7 +496,7 @@ func (*UnregisterExtensionsResponse) Descriptor() ([]byte, []int) { return file_extensions_manager_service_proto_rawDescGZIP(), []int{6} } -type ListExtensionsFilter struct { +type ListRegisteredExtensionsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -497,8 +504,8 @@ type ListExtensionsFilter struct { Extension []string `protobuf:"bytes,1,rep,name=extension,proto3" json:"extension,omitempty"` // СпиÑок имен ÑервиÑов Ð´Ð»Ñ Ð¿Ð¾Ð»ÑƒÑ‡ÐµÐ½Ð¸Ñ Ñ€ÐµÐ·ÑƒÐ»ÑŒÑ‚Ð°Ñ‚Ð¾Ð². СпиÑок может Ñодержать регулÑрные выражениÑ. } -func (x *ListExtensionsFilter) Reset() { - *x = ListExtensionsFilter{} +func (x *ListRegisteredExtensionsRequest) Reset() { + *x = ListRegisteredExtensionsRequest{} if protoimpl.UnsafeEnabled { mi := &file_extensions_manager_service_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -506,13 +513,13 @@ func (x *ListExtensionsFilter) Reset() { } } -func (x *ListExtensionsFilter) String() string { +func (x *ListRegisteredExtensionsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListExtensionsFilter) ProtoMessage() {} +func (*ListRegisteredExtensionsRequest) ProtoMessage() {} -func (x *ListExtensionsFilter) ProtoReflect() protoreflect.Message { +func (x *ListRegisteredExtensionsRequest) ProtoReflect() protoreflect.Message { mi := &file_extensions_manager_service_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -524,28 +531,28 @@ func (x *ListExtensionsFilter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListExtensionsFilter.ProtoReflect.Descriptor instead. -func (*ListExtensionsFilter) Descriptor() ([]byte, []int) { +// Deprecated: Use ListRegisteredExtensionsRequest.ProtoReflect.Descriptor instead. +func (*ListRegisteredExtensionsRequest) Descriptor() ([]byte, []int) { return file_extensions_manager_service_proto_rawDescGZIP(), []int{7} } -func (x *ListExtensionsFilter) GetExtension() []string { +func (x *ListRegisteredExtensionsRequest) GetExtension() []string { if x != nil { return x.Extension } return nil } -type ListExtensionsRequest struct { +type ListRegisteredExtensionsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Filter *ListExtensionsFilter `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` + Extensions []*ExtensionDescriptor `protobuf:"bytes,1,rep,name=extensions,proto3" json:"extensions,omitempty"` } -func (x *ListExtensionsRequest) Reset() { - *x = ListExtensionsRequest{} +func (x *ListRegisteredExtensionsResponse) Reset() { + *x = ListRegisteredExtensionsResponse{} if protoimpl.UnsafeEnabled { mi := &file_extensions_manager_service_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -553,13 +560,13 @@ func (x *ListExtensionsRequest) Reset() { } } -func (x *ListExtensionsRequest) String() string { +func (x *ListRegisteredExtensionsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListExtensionsRequest) ProtoMessage() {} +func (*ListRegisteredExtensionsResponse) ProtoMessage() {} -func (x *ListExtensionsRequest) ProtoReflect() protoreflect.Message { +func (x *ListRegisteredExtensionsResponse) ProtoReflect() protoreflect.Message { mi := &file_extensions_manager_service_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -571,59 +578,12 @@ func (x *ListExtensionsRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListExtensionsRequest.ProtoReflect.Descriptor instead. -func (*ListExtensionsRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use ListRegisteredExtensionsResponse.ProtoReflect.Descriptor instead. +func (*ListRegisteredExtensionsResponse) Descriptor() ([]byte, []int) { return file_extensions_manager_service_proto_rawDescGZIP(), []int{8} } -func (x *ListExtensionsRequest) GetFilter() *ListExtensionsFilter { - if x != nil { - return x.Filter - } - return nil -} - -type ListExtensionsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Extensions []*ExtensionDescriptor `protobuf:"bytes,1,rep,name=extensions,proto3" json:"extensions,omitempty"` -} - -func (x *ListExtensionsResponse) Reset() { - *x = ListExtensionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_extensions_manager_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListExtensionsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListExtensionsResponse) ProtoMessage() {} - -func (x *ListExtensionsResponse) ProtoReflect() protoreflect.Message { - mi := &file_extensions_manager_service_proto_msgTypes[9] - 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 ListExtensionsResponse.ProtoReflect.Descriptor instead. -func (*ListExtensionsResponse) Descriptor() ([]byte, []int) { - return file_extensions_manager_service_proto_rawDescGZIP(), []int{9} -} - -func (x *ListExtensionsResponse) GetExtensions() []*ExtensionDescriptor { +func (x *ListRegisteredExtensionsResponse) GetExtensions() []*ExtensionDescriptor { if x != nil { return x.Extensions } @@ -647,7 +607,7 @@ type SpaceExtensions struct { func (x *SpaceExtensions) Reset() { *x = SpaceExtensions{} if protoimpl.UnsafeEnabled { - mi := &file_extensions_manager_service_proto_msgTypes[10] + mi := &file_extensions_manager_service_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -660,7 +620,7 @@ func (x *SpaceExtensions) String() string { func (*SpaceExtensions) ProtoMessage() {} func (x *SpaceExtensions) ProtoReflect() protoreflect.Message { - mi := &file_extensions_manager_service_proto_msgTypes[10] + mi := &file_extensions_manager_service_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -673,7 +633,7 @@ func (x *SpaceExtensions) ProtoReflect() protoreflect.Message { // Deprecated: Use SpaceExtensions.ProtoReflect.Descriptor instead. func (*SpaceExtensions) Descriptor() ([]byte, []int) { - return file_extensions_manager_service_proto_rawDescGZIP(), []int{10} + return file_extensions_manager_service_proto_rawDescGZIP(), []int{9} } func (x *SpaceExtensions) GetExtension() string { @@ -708,7 +668,7 @@ func (x *SpaceExtensions) GetState() State { if x != nil { return x.State } - return State_UNKNOWN + return State_NOT_INSTALLED } func (x *SpaceExtensions) GetStatusError() string { @@ -725,7 +685,7 @@ func (x *SpaceExtensions) GetStatusMsg() string { return "" } -type GetInstalledExtensionsResponse_Status struct { +type ListExtensionsResponse_ExtensionInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -736,29 +696,28 @@ type GetInstalledExtensionsResponse_Status struct { Msg string `protobuf:"bytes,10200,opt,name=msg,proto3" json:"msg,omitempty"` // Сообщение Error string `protobuf:"bytes,10300,opt,name=error,proto3" json:"error,omitempty"` // Ошибка (state == ERROR) NotFound bool `protobuf:"varint,10350,opt,name=not_found,json=notFound,proto3" json:"not_found,omitempty"` // РаÑширение не найдено - Installed bool `protobuf:"varint,10400,opt,name=installed,proto3" json:"installed,omitempty"` // РаÑширение уÑтановлено UpdateAvailable bool `protobuf:"varint,10500,opt,name=update_available,json=updateAvailable,proto3" json:"update_available,omitempty"` // ДоÑтупно обновление InstalledVersion string `protobuf:"bytes,10510,opt,name=installed_version,json=installedVersion,proto3" json:"installed_version,omitempty"` // УÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ð°Ñ Ð²ÐµÑ€ÑÐ¸Ñ Ñ€Ð°ÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ AvailableVersion string `protobuf:"bytes,10520,opt,name=available_version,json=availableVersion,proto3" json:"available_version,omitempty"` // ДоÑÑ‚ÑƒÐ¿Ð½Ð°Ñ Ð²ÐµÑ€ÑÐ¸Ñ Ñ€Ð°ÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ } -func (x *GetInstalledExtensionsResponse_Status) Reset() { - *x = GetInstalledExtensionsResponse_Status{} +func (x *ListExtensionsResponse_ExtensionInfo) Reset() { + *x = ListExtensionsResponse_ExtensionInfo{} if protoimpl.UnsafeEnabled { - mi := &file_extensions_manager_service_proto_msgTypes[11] + mi := &file_extensions_manager_service_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetInstalledExtensionsResponse_Status) String() string { +func (x *ListExtensionsResponse_ExtensionInfo) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetInstalledExtensionsResponse_Status) ProtoMessage() {} +func (*ListExtensionsResponse_ExtensionInfo) ProtoMessage() {} -func (x *GetInstalledExtensionsResponse_Status) ProtoReflect() protoreflect.Message { - mi := &file_extensions_manager_service_proto_msgTypes[11] +func (x *ListExtensionsResponse_ExtensionInfo) ProtoReflect() protoreflect.Message { + mi := &file_extensions_manager_service_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -769,75 +728,68 @@ func (x *GetInstalledExtensionsResponse_Status) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use GetInstalledExtensionsResponse_Status.ProtoReflect.Descriptor instead. -func (*GetInstalledExtensionsResponse_Status) Descriptor() ([]byte, []int) { +// Deprecated: Use ListExtensionsResponse_ExtensionInfo.ProtoReflect.Descriptor instead. +func (*ListExtensionsResponse_ExtensionInfo) Descriptor() ([]byte, []int) { return file_extensions_manager_service_proto_rawDescGZIP(), []int{1, 0} } -func (x *GetInstalledExtensionsResponse_Status) GetExtension() string { +func (x *ListExtensionsResponse_ExtensionInfo) GetExtension() string { if x != nil { return x.Extension } return "" } -func (x *GetInstalledExtensionsResponse_Status) GetTitle() string { +func (x *ListExtensionsResponse_ExtensionInfo) GetTitle() string { if x != nil { return x.Title } return "" } -func (x *GetInstalledExtensionsResponse_Status) GetState() State { +func (x *ListExtensionsResponse_ExtensionInfo) GetState() State { if x != nil { return x.State } - return State_UNKNOWN + return State_NOT_INSTALLED } -func (x *GetInstalledExtensionsResponse_Status) GetMsg() string { +func (x *ListExtensionsResponse_ExtensionInfo) GetMsg() string { if x != nil { return x.Msg } return "" } -func (x *GetInstalledExtensionsResponse_Status) GetError() string { +func (x *ListExtensionsResponse_ExtensionInfo) GetError() string { if x != nil { return x.Error } return "" } -func (x *GetInstalledExtensionsResponse_Status) GetNotFound() bool { +func (x *ListExtensionsResponse_ExtensionInfo) GetNotFound() bool { if x != nil { return x.NotFound } return false } -func (x *GetInstalledExtensionsResponse_Status) GetInstalled() bool { - if x != nil { - return x.Installed - } - return false -} - -func (x *GetInstalledExtensionsResponse_Status) GetUpdateAvailable() bool { +func (x *ListExtensionsResponse_ExtensionInfo) GetUpdateAvailable() bool { if x != nil { return x.UpdateAvailable } return false } -func (x *GetInstalledExtensionsResponse_Status) GetInstalledVersion() string { +func (x *ListExtensionsResponse_ExtensionInfo) GetInstalledVersion() string { if x != nil { return x.InstalledVersion } return "" } -func (x *GetInstalledExtensionsResponse_Status) GetAvailableVersion() string { +func (x *ListExtensionsResponse_ExtensionInfo) GetAvailableVersion() string { if x != nil { return x.AvailableVersion } @@ -849,147 +801,145 @@ var File_extensions_manager_service_proto protoreflect.FileDescriptor var file_extensions_manager_service_proto_rawDesc = []byte{ 0x0a, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x71, - 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x19, 0x0a, 0x08, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x65, 0x6e, - 0x76, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6e, 0x76, 0x49, - 0x64, 0x22, 0xc5, 0x03, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, - 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x1a, - 0xd7, 0x02, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x09, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0xf4, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x05, 0x74, 0x69, 0x74, - 0x6c, 0x65, 0x18, 0xfe, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, - 0x12, 0x28, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x88, 0x4f, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x11, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x11, 0x0a, 0x03, 0x6d, 0x73, - 0x67, 0x18, 0xd8, 0x4f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x15, 0x0a, - 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0xbc, 0x50, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x6f, 0x74, 0x5f, 0x66, 0x6f, 0x75, 0x6e, - 0x64, 0x18, 0xee, 0x50, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6e, 0x6f, 0x74, 0x46, 0x6f, 0x75, - 0x6e, 0x64, 0x12, 0x1d, 0x0a, 0x09, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x18, - 0xa0, 0x51, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, - 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x76, 0x61, 0x69, - 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x84, 0x52, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2c, 0x0a, - 0x11, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x8e, 0x52, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x69, 0x6e, 0x73, 0x74, 0x61, - 0x6c, 0x6c, 0x65, 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x11, 0x61, - 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x98, 0x52, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, - 0x6c, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xea, 0x02, 0x0a, 0x13, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x12, 0x1d, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x90, - 0x4e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x15, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x9a, 0x4e, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xa4, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0xf4, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x13, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xfe, 0x4e, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x12, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x0a, 0x04, 0x64, 0x65, 0x70, 0x73, 0x18, - 0xd8, 0x4f, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65, 0x70, 0x73, 0x12, 0x10, 0x0a, 0x03, - 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x49, - 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x2d, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x5c, 0x0a, 0x19, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x65, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x1c, 0x0a, 0x1a, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, - 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x5e, 0x0a, 0x1b, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, - 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x3f, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x22, 0x1e, 0x0a, 0x1c, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, - 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x34, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x51, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, - 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x38, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x59, 0x0a, 0x16, 0x4c, - 0x69, 0x73, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xe5, 0x01, 0x0a, 0x0f, 0x53, 0x70, 0x61, 0x63, 0x65, - 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1d, 0x0a, 0x09, 0x65, 0x78, + 0x74, 0x6f, 0x12, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x92, + 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x65, 0x6e, 0x76, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6e, 0x76, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x22, 0xac, 0x03, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, + 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x1a, 0xbf, 0x02, 0x0a, 0x0d, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, + 0x66, 0x6f, 0x12, 0x1d, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0xf4, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x15, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0xfe, 0x4e, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x18, 0x88, 0x4f, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x11, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0xd8, 0x4f, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x15, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0xbc, + 0x50, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, + 0x6e, 0x6f, 0x74, 0x5f, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0xee, 0x50, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x08, 0x6e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x84, + 0x52, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x76, 0x61, + 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, + 0x6c, 0x65, 0x64, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x8e, 0x52, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x10, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x11, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, + 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x98, 0x52, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x10, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x22, 0xea, 0x02, 0x0a, 0x13, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x90, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x9a, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, - 0x12, 0x19, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0xf4, 0x4e, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x0a, 0x04, 0x64, - 0x65, 0x70, 0x73, 0x18, 0xd8, 0x4f, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65, 0x70, 0x73, - 0x12, 0x28, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0xbc, 0x50, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x11, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0xa0, 0x51, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1e, - 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x84, 0x52, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4d, 0x73, 0x67, 0x2a, 0x4b, - 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, - 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4c, 0x4c, 0x45, - 0x44, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x49, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x47, 0x52, 0x45, - 0x53, 0x53, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x41, 0x49, 0x4c, 0x10, 0x03, 0x12, 0x0b, - 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x32, 0xbb, 0x03, 0x0a, 0x17, - 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x65, 0x0a, 0x12, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6b, - 0x0a, 0x14, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x27, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x28, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x55, 0x6e, 0x72, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x59, 0x0a, 0x0e, 0x4c, - 0x69, 0x73, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x21, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, + 0x12, 0x21, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0xa4, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0xf4, + 0x4e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x30, + 0x0a, 0x13, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xfe, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x13, 0x0a, 0x04, 0x64, 0x65, 0x70, 0x73, 0x18, 0xd8, 0x4f, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x04, 0x64, 0x65, 0x70, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x49, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, + 0x5c, 0x0a, 0x19, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x0a, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, + 0x72, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x1c, 0x0a, + 0x1a, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5e, 0x0a, 0x1b, 0x55, + 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x0a, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, + 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x1e, 0x0a, 0x1c, 0x55, + 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3f, 0x0a, 0x1f, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, + 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x63, 0x0a, 0x20, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x3f, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x22, 0xe5, 0x01, 0x0a, 0x0f, 0x53, 0x70, 0x61, 0x63, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1d, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x90, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x9a, 0x4e, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x19, 0x0a, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0xf4, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x0a, 0x04, 0x64, 0x65, 0x70, 0x73, 0x18, 0xd8, + 0x4f, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65, 0x70, 0x73, 0x12, 0x28, 0x0a, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x18, 0xbc, 0x50, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0xa0, 0x51, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x84, 0x52, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4d, 0x73, 0x67, 0x2a, 0x51, 0x0a, 0x05, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x4e, 0x4f, 0x54, 0x5f, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4c, + 0x4c, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4c, 0x4c, + 0x45, 0x44, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x49, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x47, 0x52, + 0x45, 0x53, 0x53, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x41, 0x49, 0x4c, 0x10, 0x03, 0x12, + 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x32, 0xc1, 0x03, 0x0a, + 0x17, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x65, 0x0a, 0x12, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x6b, 0x0a, 0x14, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x27, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x22, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x71, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, - 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x29, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x47, 0x65, - 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x3a, 0x5a, 0x38, 0x67, 0x69, 0x74, - 0x2e, 0x70, 0x65, 0x72, 0x78, 0x2e, 0x72, 0x75, 0x2f, 0x70, 0x65, 0x72, 0x78, 0x69, 0x73, 0x2f, - 0x70, 0x65, 0x72, 0x78, 0x69, 0x73, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x1a, 0x28, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x55, 0x6e, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x77, 0x0a, 0x18, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2b, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, + 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x59, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x21, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x42, 0x3a, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x2e, 0x70, 0x65, 0x72, 0x78, 0x2e, 0x72, 0x75, 0x2f, + 0x70, 0x65, 0x72, 0x78, 0x69, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x78, 0x69, 0x73, 0x2d, 0x67, 0x6f, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x3b, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1005,40 +955,39 @@ func file_extensions_manager_service_proto_rawDescGZIP() []byte { } var file_extensions_manager_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_extensions_manager_service_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_extensions_manager_service_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_extensions_manager_service_proto_goTypes = []interface{}{ - (State)(0), // 0: extensions.State - (*GetInstalledExtensionsRequest)(nil), // 1: extensions.GetInstalledExtensionsRequest - (*GetInstalledExtensionsResponse)(nil), // 2: extensions.GetInstalledExtensionsResponse - (*ExtensionDescriptor)(nil), // 3: extensions.ExtensionDescriptor - (*RegisterExtensionsRequest)(nil), // 4: extensions.RegisterExtensionsRequest - (*RegisterExtensionsResponse)(nil), // 5: extensions.RegisterExtensionsResponse - (*UnregisterExtensionsRequest)(nil), // 6: extensions.UnregisterExtensionsRequest - (*UnregisterExtensionsResponse)(nil), // 7: extensions.UnregisterExtensionsResponse - (*ListExtensionsFilter)(nil), // 8: extensions.ListExtensionsFilter - (*ListExtensionsRequest)(nil), // 9: extensions.ListExtensionsRequest - (*ListExtensionsResponse)(nil), // 10: extensions.ListExtensionsResponse - (*SpaceExtensions)(nil), // 11: extensions.SpaceExtensions - (*GetInstalledExtensionsResponse_Status)(nil), // 12: extensions.GetInstalledExtensionsResponse.Status - nil, // 13: extensions.ExtensionDescriptor.MetadataEntry + (State)(0), // 0: extensions.State + (*ListExtensionsRequest)(nil), // 1: extensions.ListExtensionsRequest + (*ListExtensionsResponse)(nil), // 2: extensions.ListExtensionsResponse + (*ExtensionDescriptor)(nil), // 3: extensions.ExtensionDescriptor + (*RegisterExtensionsRequest)(nil), // 4: extensions.RegisterExtensionsRequest + (*RegisterExtensionsResponse)(nil), // 5: extensions.RegisterExtensionsResponse + (*UnregisterExtensionsRequest)(nil), // 6: extensions.UnregisterExtensionsRequest + (*UnregisterExtensionsResponse)(nil), // 7: extensions.UnregisterExtensionsResponse + (*ListRegisteredExtensionsRequest)(nil), // 8: extensions.ListRegisteredExtensionsRequest + (*ListRegisteredExtensionsResponse)(nil), // 9: extensions.ListRegisteredExtensionsResponse + (*SpaceExtensions)(nil), // 10: extensions.SpaceExtensions + (*ListExtensionsResponse_ExtensionInfo)(nil), // 11: extensions.ListExtensionsResponse.ExtensionInfo + nil, // 12: extensions.ExtensionDescriptor.MetadataEntry } var file_extensions_manager_service_proto_depIdxs = []int32{ - 12, // 0: extensions.GetInstalledExtensionsResponse.status:type_name -> extensions.GetInstalledExtensionsResponse.Status - 13, // 1: extensions.ExtensionDescriptor.metadata:type_name -> extensions.ExtensionDescriptor.MetadataEntry - 3, // 2: extensions.RegisterExtensionsRequest.extensions:type_name -> extensions.ExtensionDescriptor - 3, // 3: extensions.UnregisterExtensionsRequest.extensions:type_name -> extensions.ExtensionDescriptor - 8, // 4: extensions.ListExtensionsRequest.filter:type_name -> extensions.ListExtensionsFilter - 3, // 5: extensions.ListExtensionsResponse.extensions:type_name -> extensions.ExtensionDescriptor + 0, // 0: extensions.ListExtensionsRequest.state:type_name -> extensions.State + 11, // 1: extensions.ListExtensionsResponse.extensions:type_name -> extensions.ListExtensionsResponse.ExtensionInfo + 12, // 2: extensions.ExtensionDescriptor.metadata:type_name -> extensions.ExtensionDescriptor.MetadataEntry + 3, // 3: extensions.RegisterExtensionsRequest.extensions:type_name -> extensions.ExtensionDescriptor + 3, // 4: extensions.UnregisterExtensionsRequest.extensions:type_name -> extensions.ExtensionDescriptor + 3, // 5: extensions.ListRegisteredExtensionsResponse.extensions:type_name -> extensions.ExtensionDescriptor 0, // 6: extensions.SpaceExtensions.state:type_name -> extensions.State - 0, // 7: extensions.GetInstalledExtensionsResponse.Status.state:type_name -> extensions.State + 0, // 7: extensions.ListExtensionsResponse.ExtensionInfo.state:type_name -> extensions.State 4, // 8: extensions.ExtensionManagerService.RegisterExtensions:input_type -> extensions.RegisterExtensionsRequest 6, // 9: extensions.ExtensionManagerService.UnregisterExtensions:input_type -> extensions.UnregisterExtensionsRequest - 9, // 10: extensions.ExtensionManagerService.ListExtensions:input_type -> extensions.ListExtensionsRequest - 1, // 11: extensions.ExtensionManagerService.GetInstalledExtensions:input_type -> extensions.GetInstalledExtensionsRequest + 8, // 10: extensions.ExtensionManagerService.ListRegisteredExtensions:input_type -> extensions.ListRegisteredExtensionsRequest + 1, // 11: extensions.ExtensionManagerService.ListExtensions:input_type -> extensions.ListExtensionsRequest 5, // 12: extensions.ExtensionManagerService.RegisterExtensions:output_type -> extensions.RegisterExtensionsResponse 7, // 13: extensions.ExtensionManagerService.UnregisterExtensions:output_type -> extensions.UnregisterExtensionsResponse - 10, // 14: extensions.ExtensionManagerService.ListExtensions:output_type -> extensions.ListExtensionsResponse - 2, // 15: extensions.ExtensionManagerService.GetInstalledExtensions:output_type -> extensions.GetInstalledExtensionsResponse + 9, // 14: extensions.ExtensionManagerService.ListRegisteredExtensions:output_type -> extensions.ListRegisteredExtensionsResponse + 2, // 15: extensions.ExtensionManagerService.ListExtensions:output_type -> extensions.ListExtensionsResponse 12, // [12:16] is the sub-list for method output_type 8, // [8:12] is the sub-list for method input_type 8, // [8:8] is the sub-list for extension type_name @@ -1053,7 +1002,7 @@ func file_extensions_manager_service_proto_init() { } if !protoimpl.UnsafeEnabled { file_extensions_manager_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetInstalledExtensionsRequest); i { + switch v := v.(*ListExtensionsRequest); i { case 0: return &v.state case 1: @@ -1065,7 +1014,7 @@ func file_extensions_manager_service_proto_init() { } } file_extensions_manager_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetInstalledExtensionsResponse); i { + switch v := v.(*ListExtensionsResponse); i { case 0: return &v.state case 1: @@ -1137,7 +1086,7 @@ func file_extensions_manager_service_proto_init() { } } file_extensions_manager_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListExtensionsFilter); i { + switch v := v.(*ListRegisteredExtensionsRequest); i { case 0: return &v.state case 1: @@ -1149,7 +1098,7 @@ func file_extensions_manager_service_proto_init() { } } file_extensions_manager_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListExtensionsRequest); i { + switch v := v.(*ListRegisteredExtensionsResponse); i { case 0: return &v.state case 1: @@ -1161,18 +1110,6 @@ func file_extensions_manager_service_proto_init() { } } file_extensions_manager_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListExtensionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_extensions_manager_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SpaceExtensions); i { case 0: return &v.state @@ -1184,8 +1121,8 @@ func file_extensions_manager_service_proto_init() { return nil } } - file_extensions_manager_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetInstalledExtensionsResponse_Status); i { + file_extensions_manager_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListExtensionsResponse_ExtensionInfo); i { case 0: return &v.state case 1: @@ -1203,7 +1140,7 @@ func file_extensions_manager_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_extensions_manager_service_proto_rawDesc, NumEnums: 1, - NumMessages: 13, + NumMessages: 12, NumExtensions: 0, NumServices: 1, }, diff --git a/proto/extensions/manager_service_grpc.pb.go b/proto/extensions/manager_service_grpc.pb.go index 182bb41d2c7fb287077d947b1b27e07eab2b4f2d..21dc84b29f2ce7190db0609d0e333940cb6c229f 100644 --- a/proto/extensions/manager_service_grpc.pb.go +++ b/proto/extensions/manager_service_grpc.pb.go @@ -46,10 +46,10 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - ExtensionManagerService_RegisterExtensions_FullMethodName = "/extensions.ExtensionManagerService/RegisterExtensions" - ExtensionManagerService_UnregisterExtensions_FullMethodName = "/extensions.ExtensionManagerService/UnregisterExtensions" - ExtensionManagerService_ListExtensions_FullMethodName = "/extensions.ExtensionManagerService/ListExtensions" - ExtensionManagerService_GetInstalledExtensions_FullMethodName = "/extensions.ExtensionManagerService/GetInstalledExtensions" + ExtensionManagerService_RegisterExtensions_FullMethodName = "/extensions.ExtensionManagerService/RegisterExtensions" + ExtensionManagerService_UnregisterExtensions_FullMethodName = "/extensions.ExtensionManagerService/UnregisterExtensions" + ExtensionManagerService_ListRegisteredExtensions_FullMethodName = "/extensions.ExtensionManagerService/ListRegisteredExtensions" + ExtensionManagerService_ListExtensions_FullMethodName = "/extensions.ExtensionManagerService/ListExtensions" ) // ExtensionManagerServiceClient is the client API for ExtensionManagerService service. @@ -71,9 +71,9 @@ type ExtensionManagerServiceClient interface { RegisterExtensions(ctx context.Context, in *RegisterExtensionsRequest, opts ...grpc.CallOption) (*RegisterExtensionsResponse, error) UnregisterExtensions(ctx context.Context, in *UnregisterExtensionsRequest, opts ...grpc.CallOption) (*UnregisterExtensionsResponse, error) // Получить ÑпиÑок зарегиÑтрированных ÑервиÑов + ListRegisteredExtensions(ctx context.Context, in *ListRegisteredExtensionsRequest, opts ...grpc.CallOption) (*ListRegisteredExtensionsResponse, error) + // ListExtensions - получить ÑÑ‚Ð°Ñ‚ÑƒÑ Ñ€Ð°ÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ ListExtensions(ctx context.Context, in *ListExtensionsRequest, opts ...grpc.CallOption) (*ListExtensionsResponse, error) - // GetInstalledExtensions - получить ÑÑ‚Ð°Ñ‚ÑƒÑ Ñ€Ð°ÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ - GetInstalledExtensions(ctx context.Context, in *GetInstalledExtensionsRequest, opts ...grpc.CallOption) (*GetInstalledExtensionsResponse, error) } type extensionManagerServiceClient struct { @@ -102,18 +102,18 @@ func (c *extensionManagerServiceClient) UnregisterExtensions(ctx context.Context return out, nil } -func (c *extensionManagerServiceClient) ListExtensions(ctx context.Context, in *ListExtensionsRequest, opts ...grpc.CallOption) (*ListExtensionsResponse, error) { - out := new(ListExtensionsResponse) - err := c.cc.Invoke(ctx, ExtensionManagerService_ListExtensions_FullMethodName, in, out, opts...) +func (c *extensionManagerServiceClient) ListRegisteredExtensions(ctx context.Context, in *ListRegisteredExtensionsRequest, opts ...grpc.CallOption) (*ListRegisteredExtensionsResponse, error) { + out := new(ListRegisteredExtensionsResponse) + err := c.cc.Invoke(ctx, ExtensionManagerService_ListRegisteredExtensions_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *extensionManagerServiceClient) GetInstalledExtensions(ctx context.Context, in *GetInstalledExtensionsRequest, opts ...grpc.CallOption) (*GetInstalledExtensionsResponse, error) { - out := new(GetInstalledExtensionsResponse) - err := c.cc.Invoke(ctx, ExtensionManagerService_GetInstalledExtensions_FullMethodName, in, out, opts...) +func (c *extensionManagerServiceClient) ListExtensions(ctx context.Context, in *ListExtensionsRequest, opts ...grpc.CallOption) (*ListExtensionsResponse, error) { + out := new(ListExtensionsResponse) + err := c.cc.Invoke(ctx, ExtensionManagerService_ListExtensions_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -139,9 +139,9 @@ type ExtensionManagerServiceServer interface { RegisterExtensions(context.Context, *RegisterExtensionsRequest) (*RegisterExtensionsResponse, error) UnregisterExtensions(context.Context, *UnregisterExtensionsRequest) (*UnregisterExtensionsResponse, error) // Получить ÑпиÑок зарегиÑтрированных ÑервиÑов + ListRegisteredExtensions(context.Context, *ListRegisteredExtensionsRequest) (*ListRegisteredExtensionsResponse, error) + // ListExtensions - получить ÑÑ‚Ð°Ñ‚ÑƒÑ Ñ€Ð°ÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ ListExtensions(context.Context, *ListExtensionsRequest) (*ListExtensionsResponse, error) - // GetInstalledExtensions - получить ÑÑ‚Ð°Ñ‚ÑƒÑ Ñ€Ð°ÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ - GetInstalledExtensions(context.Context, *GetInstalledExtensionsRequest) (*GetInstalledExtensionsResponse, error) mustEmbedUnimplementedExtensionManagerServiceServer() } @@ -155,12 +155,12 @@ func (UnimplementedExtensionManagerServiceServer) RegisterExtensions(context.Con func (UnimplementedExtensionManagerServiceServer) UnregisterExtensions(context.Context, *UnregisterExtensionsRequest) (*UnregisterExtensionsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UnregisterExtensions not implemented") } +func (UnimplementedExtensionManagerServiceServer) ListRegisteredExtensions(context.Context, *ListRegisteredExtensionsRequest) (*ListRegisteredExtensionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListRegisteredExtensions not implemented") +} func (UnimplementedExtensionManagerServiceServer) ListExtensions(context.Context, *ListExtensionsRequest) (*ListExtensionsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListExtensions not implemented") } -func (UnimplementedExtensionManagerServiceServer) GetInstalledExtensions(context.Context, *GetInstalledExtensionsRequest) (*GetInstalledExtensionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetInstalledExtensions not implemented") -} func (UnimplementedExtensionManagerServiceServer) mustEmbedUnimplementedExtensionManagerServiceServer() { } @@ -211,38 +211,38 @@ func _ExtensionManagerService_UnregisterExtensions_Handler(srv interface{}, ctx return interceptor(ctx, in, info, handler) } -func _ExtensionManagerService_ListExtensions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListExtensionsRequest) +func _ExtensionManagerService_ListRegisteredExtensions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListRegisteredExtensionsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(ExtensionManagerServiceServer).ListExtensions(ctx, in) + return srv.(ExtensionManagerServiceServer).ListRegisteredExtensions(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: ExtensionManagerService_ListExtensions_FullMethodName, + FullMethod: ExtensionManagerService_ListRegisteredExtensions_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ExtensionManagerServiceServer).ListExtensions(ctx, req.(*ListExtensionsRequest)) + return srv.(ExtensionManagerServiceServer).ListRegisteredExtensions(ctx, req.(*ListRegisteredExtensionsRequest)) } return interceptor(ctx, in, info, handler) } -func _ExtensionManagerService_GetInstalledExtensions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetInstalledExtensionsRequest) +func _ExtensionManagerService_ListExtensions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListExtensionsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(ExtensionManagerServiceServer).GetInstalledExtensions(ctx, in) + return srv.(ExtensionManagerServiceServer).ListExtensions(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: ExtensionManagerService_GetInstalledExtensions_FullMethodName, + FullMethod: ExtensionManagerService_ListExtensions_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ExtensionManagerServiceServer).GetInstalledExtensions(ctx, req.(*GetInstalledExtensionsRequest)) + return srv.(ExtensionManagerServiceServer).ListExtensions(ctx, req.(*ListExtensionsRequest)) } return interceptor(ctx, in, info, handler) } @@ -263,12 +263,12 @@ var ExtensionManagerService_ServiceDesc = grpc.ServiceDesc{ Handler: _ExtensionManagerService_UnregisterExtensions_Handler, }, { - MethodName: "ListExtensions", - Handler: _ExtensionManagerService_ListExtensions_Handler, + MethodName: "ListRegisteredExtensions", + Handler: _ExtensionManagerService_ListRegisteredExtensions_Handler, }, { - MethodName: "GetInstalledExtensions", - Handler: _ExtensionManagerService_GetInstalledExtensions_Handler, + MethodName: "ListExtensions", + Handler: _ExtensionManagerService_ListExtensions_Handler, }, }, Streams: []grpc.StreamDesc{},