feat(host/plugin): Implement worker filter
This commit is contained in:
1 parent
22b54c8b97
commit
7449fd6f2a
16 files changed
+436
-104
No files matched your search
+1
@@ -143,6 +143,7 @@ begin;
|
||||
comment on view oidc_auth_method_with_value_obj is
|
||||
'oidc auth method with its associated value objects (algs, auds, certs, scopes) as columns with | delimited values';
|
||||
|
||||
-- Replaced by 92/01_host_plugin_catalog_worker_filter.up.sql
|
||||
create view host_plugin_catalog_with_secret as
|
||||
select
|
||||
hc.public_id,
|
||||
|
||||
@@ -80,6 +80,7 @@ begin;
|
||||
where ish.history_id = rs.target_project_hst_id;
|
||||
|
||||
-- replaces 71/12_session_recording_views.up.sql
|
||||
-- replaced by 92/01_host_plugin_catalog_worker_filter.up.sql
|
||||
drop view session_recording_aggregate; -- this is necessary, throws weird syntax error without
|
||||
create view session_recording_aggregate as
|
||||
select
|
||||
|
||||
+143
@@ -0,0 +1,143 @@
|
||||
-- Copyright (c) HashiCorp, Inc.
|
||||
-- SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
-- This migration adds support for an optional, mutable worker_filter field in
|
||||
-- plugin-type host catalogs.
|
||||
|
||||
begin;
|
||||
alter table host_plugin_catalog
|
||||
add column worker_filter wt_bexprfilter;
|
||||
|
||||
alter table host_plugin_catalog_hst
|
||||
add column worker_filter wt_bexprfilter null;
|
||||
|
||||
-- replaces 56/02_add_data_key_foreign_key_references.up.sql
|
||||
drop view host_plugin_catalog_with_secret;
|
||||
create view host_plugin_catalog_with_secret as
|
||||
select
|
||||
hc.public_id,
|
||||
hc.project_id,
|
||||
hc.plugin_id,
|
||||
hc.name,
|
||||
hc.description,
|
||||
hc.create_time,
|
||||
hc.update_time,
|
||||
hc.version,
|
||||
hc.secrets_hmac,
|
||||
hc.attributes,
|
||||
hc.worker_filter,
|
||||
hcs.secret,
|
||||
hcs.key_id,
|
||||
hcs.create_time as persisted_create_time,
|
||||
hcs.update_time as persisted_update_time
|
||||
from
|
||||
host_plugin_catalog hc
|
||||
left outer join host_plugin_catalog_secret hcs on hc.public_id = hcs.catalog_id;
|
||||
comment on view host_plugin_catalog_with_secret is
|
||||
'host plugin catalog with its associated persisted data';
|
||||
|
||||
-- replaces 82/02_recording_session.up.sql
|
||||
drop view session_recording_aggregate;
|
||||
create view session_recording_aggregate as
|
||||
select
|
||||
rs.public_id,
|
||||
rs.storage_bucket_id,
|
||||
rs.session_id,
|
||||
rs.create_time,
|
||||
rs.update_time,
|
||||
rs.start_time,
|
||||
rs.end_time,
|
||||
rs.state,
|
||||
rs.error_details,
|
||||
rs.endpoint,
|
||||
rs.retain_until,
|
||||
rs.delete_after,
|
||||
rs.target_org_id,
|
||||
sb.scope_id as storage_bucket_scope_id,
|
||||
-- fields that cover the user fields at creation time
|
||||
uh.public_id as user_history_public_id,
|
||||
uh.name as user_history_name,
|
||||
uh.description as user_history_description,
|
||||
uh.scope_id as user_history_scope_id,
|
||||
-- fields that cover the user's scope information at creation time
|
||||
ush.public_id as user_scope_history_public_id,
|
||||
ush.name as user_scope_history_name,
|
||||
ush.description as user_scope_history_description,
|
||||
ush.type as user_scope_history_type,
|
||||
ush.parent_id as user_scope_history_parent_id,
|
||||
ush.primary_auth_method_id as user_scope_history_primary_auth_method_id,
|
||||
-- fields that cover the target fields at creation time
|
||||
th.public_id as target_history_public_id,
|
||||
th.name as target_history_name,
|
||||
th.description as target_history_description,
|
||||
th.default_port as target_history_default_port,
|
||||
th.session_max_seconds as target_history_session_max_seconds,
|
||||
th.session_connection_limit as target_history_session_connection_limit,
|
||||
th.worker_filter as target_history_worker_filter,
|
||||
th.ingress_worker_filter as target_history_ingress_worker_filter,
|
||||
th.egress_worker_filter as target_history_egress_worker_filter,
|
||||
th.default_client_port as target_history_default_client_port,
|
||||
th.enable_session_recording as target_history_enable_session_recording,
|
||||
th.storage_bucket_id as target_history_storage_bucket_id,
|
||||
-- fields that cover the target's scope information at creation time
|
||||
tsh.public_id as target_scope_history_public_id,
|
||||
tsh.name as target_scope_history_name,
|
||||
tsh.description as target_scope_history_description,
|
||||
tsh.type as target_scope_history_type,
|
||||
tsh.parent_id as target_scope_history_parent_id,
|
||||
tsh.primary_auth_method_id as target_scope_history_primary_auth_method_id,
|
||||
-- static
|
||||
-- host catalogs
|
||||
shch.public_id as static_catalog_history_public_id,
|
||||
shch.project_id as static_catalog_history_project_id,
|
||||
shch.name as static_catalog_history_name,
|
||||
shch.description as static_catalog_history_description,
|
||||
-- hosts
|
||||
shh.public_id as static_host_history_public_id,
|
||||
shh.name as static_host_history_name,
|
||||
shh.description as static_host_history_description,
|
||||
-- catalog_id is unnecessary as its inferred from the host catalog row
|
||||
shh.address as static_host_history_address,
|
||||
|
||||
-- plugin
|
||||
-- host catalogs
|
||||
hpch.public_id as plugin_catalog_history_public_id,
|
||||
hpch.project_id as plugin_catalog_history_project_id,
|
||||
hpch.name as plugin_catalog_history_name,
|
||||
hpch.description as plugin_catalog_history_description,
|
||||
hpch.attributes as plugin_catalog_history_attributes,
|
||||
hpch.plugin_id as plugin_catalog_history_plugin_id,
|
||||
hpch.worker_filter as plugin_catalog_history_worker_filter,
|
||||
-- hosts
|
||||
hph.public_id as plugin_host_history_public_id,
|
||||
hph.name as plugin_host_history_name,
|
||||
hph.description as plugin_host_history_description,
|
||||
-- catalog_id is unnecessary as its inferred from the host catalog row
|
||||
hph.external_id as plugin_host_history_external_id,
|
||||
hph.external_name as plugin_host_history_external_name
|
||||
|
||||
from recording_session rs
|
||||
join storage_plugin_storage_bucket sb on
|
||||
rs.storage_bucket_id = sb.public_id
|
||||
join iam_user_hst uh on
|
||||
rs.user_hst_id = uh.history_id
|
||||
join iam_scope_hst as ush on
|
||||
rs.user_scope_hst_id = ush.history_id
|
||||
join target_ssh_hst th on
|
||||
rs.target_hst_id = th.history_id
|
||||
join iam_scope_hst as tsh on
|
||||
rs.target_project_hst_id = tsh.history_id
|
||||
left join static_host_catalog_hst as shch on
|
||||
rs.host_catalog_hst_id = shch.history_id
|
||||
left join host_plugin_catalog_hst as hpch on
|
||||
rs.host_catalog_hst_id = hpch.history_id
|
||||
left join static_host_hst as shh on
|
||||
rs.host_hst_id = shh.history_id
|
||||
left join host_plugin_host_hst as hph on
|
||||
rs.host_hst_id = hph.history_id
|
||||
where (rs.delete_after is null or rs.delete_after > now())
|
||||
and (rs.delete_time is null or rs.delete_time > now());
|
||||
comment on view session_recording_aggregate is
|
||||
'session_recording_aggregate contains the session recording resource with its storage bucket scope info and historical user info.';
|
||||
|
||||
commit;
|
||||
@@ -289,10 +289,10 @@ begin;
|
||||
('plg___wb-hplg');
|
||||
|
||||
insert into host_plugin_catalog
|
||||
(project_id, public_id, plugin_id, name, attributes)
|
||||
(project_id, public_id, plugin_id, name, attributes, worker_filter)
|
||||
values
|
||||
('p____bwidget', 'c___wb-plghcl', 'plg___wb-hplg', 'Big Widget Plugin Catalog', ''),
|
||||
('p____swidget', 'c___ws-plghcl', 'plg___wb-hplg', 'Small Widget Plugin Catalog', '');
|
||||
('p____bwidget', 'c___wb-plghcl', 'plg___wb-hplg', 'Big Widget Plugin Catalog', '', '"test" in "/tags/type"'),
|
||||
('p____swidget', 'c___ws-plghcl', 'plg___wb-hplg', 'Small Widget Plugin Catalog', '', null);
|
||||
|
||||
insert into host_plugin_host
|
||||
(catalog_id, public_id, external_id)
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
-- Copyright (c) HashiCorp, Inc.
|
||||
-- SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
begin;
|
||||
select plan(18);
|
||||
select wtt_load('widgets', 'iam', 'hosts');
|
||||
|
||||
-- Check plugin host catalog that doesn't have worker_filter set.
|
||||
select is(worker_filter, null::wt_bexprfilter) from host_plugin_catalog
|
||||
where public_id = 'c___ws-plghcl';
|
||||
select is(worker_filter, null::wt_bexprfilter) from host_plugin_catalog_with_secret
|
||||
where public_id = 'c___ws-plghcl';
|
||||
select is(count(*), 1::bigint) from host_plugin_catalog_hst
|
||||
where public_id = 'c___ws-plghcl';
|
||||
select is(worker_filter, null::wt_bexprfilter) from host_plugin_catalog_hst
|
||||
where public_id = 'c___ws-plghcl';
|
||||
|
||||
-- Test we can add a worker_filter to a plugin host catalog that doesn't have
|
||||
-- one.
|
||||
prepare add_worker_filter as
|
||||
update host_plugin_catalog
|
||||
set worker_filter = '"add_worker_filter" in "/tags/type"'
|
||||
where public_id = 'c___ws-plghcl';
|
||||
select lives_ok('add_worker_filter');
|
||||
|
||||
select is(worker_filter, '"add_worker_filter" in "/tags/type"') from host_plugin_catalog
|
||||
where public_id = 'c___ws-plghcl';
|
||||
select is(worker_filter, '"add_worker_filter" in "/tags/type"') from host_plugin_catalog_with_secret
|
||||
where public_id = 'c___ws-plghcl';
|
||||
select is(count(*), 2::bigint) from host_plugin_catalog_hst
|
||||
where public_id = 'c___ws-plghcl';
|
||||
select results_eq('select worker_filter from host_plugin_catalog_hst where public_id = ''c___ws-plghcl''',
|
||||
ARRAY[null::wt_bexprfilter, '"add_worker_filter" in "/tags/type"'::wt_bexprfilter]);
|
||||
|
||||
-- Check plugin host catalog that already has a worker_filter set.
|
||||
select is(worker_filter, '"test" in "/tags/type"') from host_plugin_catalog
|
||||
where public_id = 'c___wb-plghcl';
|
||||
select is(worker_filter, '"test" in "/tags/type"') from host_plugin_catalog_with_secret
|
||||
where public_id = 'c___wb-plghcl';
|
||||
select is(count(*), 1::bigint) from host_plugin_catalog_hst
|
||||
where public_id = 'c___wb-plghcl';
|
||||
select is(worker_filter, '"test" in "/tags/type"') from host_plugin_catalog_hst
|
||||
where public_id = 'c___wb-plghcl';
|
||||
|
||||
-- Test we can mutate worker_filter on a plugin host catalog.
|
||||
prepare update_worker_filter as
|
||||
update host_plugin_catalog
|
||||
set worker_filter = '"update_worker_filter" in "/tags/type"'
|
||||
where public_id = 'c___wb-plghcl';
|
||||
select lives_ok('update_worker_filter');
|
||||
|
||||
select is(worker_filter, '"update_worker_filter" in "/tags/type"') from host_plugin_catalog
|
||||
where public_id = 'c___wb-plghcl';
|
||||
select is(worker_filter, '"update_worker_filter" in "/tags/type"') from host_plugin_catalog_with_secret
|
||||
where public_id = 'c___wb-plghcl';
|
||||
select is(count(*), 2::bigint) from host_plugin_catalog_hst
|
||||
where public_id = 'c___wb-plghcl';
|
||||
select results_eq('select worker_filter from host_plugin_catalog_hst where public_id = ''c___wb-plghcl''',
|
||||
ARRAY['"test" in "/tags/type"'::wt_bexprfilter, '"update_worker_filter" in "/tags/type"'::wt_bexprfilter]);
|
||||
|
||||
select * from finish();
|
||||
rollback;
|
||||
@@ -38,6 +38,8 @@ type CatalogListQueryResult struct {
|
||||
Attributes []byte
|
||||
// The subtype of the host catalog.
|
||||
Subtype string
|
||||
// Optional worker filter of a plugin-subtype host catalog.
|
||||
WorkerFilter string
|
||||
}
|
||||
|
||||
func (s *CatalogListQueryResult) toCatalog(ctx context.Context) (Catalog, error) {
|
||||
|
||||
@@ -31,7 +31,8 @@ type HostCatalog struct {
|
||||
}
|
||||
|
||||
// NewHostCatalog creates a new in memory HostCatalog assigned to a projectId
|
||||
// and pluginId. Name and description are the only valid options. All other
|
||||
// and pluginId. WithName, WithDescription, WithSecretsHmac, WithAttributes,
|
||||
// WithSecrets and WithWorkerFilter are the only valid options. All other
|
||||
// options are ignored.
|
||||
func NewHostCatalog(ctx context.Context, projectId, pluginId string, opt ...Option) (*HostCatalog, error) {
|
||||
const op = "plugin.NewHostCatalog"
|
||||
@@ -44,12 +45,13 @@ func NewHostCatalog(ctx context.Context, projectId, pluginId string, opt ...Opti
|
||||
|
||||
hc := &HostCatalog{
|
||||
HostCatalog: &store.HostCatalog{
|
||||
ProjectId: projectId,
|
||||
PluginId: pluginId,
|
||||
Name: opts.withName,
|
||||
Description: opts.withDescription,
|
||||
Attributes: attrs,
|
||||
SecretsHmac: opts.withSecretsHmac,
|
||||
ProjectId: projectId,
|
||||
PluginId: pluginId,
|
||||
Name: opts.withName,
|
||||
Description: opts.withDescription,
|
||||
Attributes: attrs,
|
||||
SecretsHmac: opts.withSecretsHmac,
|
||||
WorkerFilter: opts.withWorkerFilter,
|
||||
},
|
||||
Secrets: opts.withSecrets,
|
||||
}
|
||||
@@ -151,6 +153,7 @@ type catalogAgg struct {
|
||||
Version uint32
|
||||
SecretsHmac []byte
|
||||
Attributes []byte
|
||||
WorkerFilter string
|
||||
Secret []byte
|
||||
KeyId string
|
||||
PersistedCreateTime *timestamp.Timestamp
|
||||
@@ -172,6 +175,7 @@ func (agg *catalogAgg) toCatalogAndPersisted() (*HostCatalog, *HostCatalogSecret
|
||||
c.Version = agg.Version
|
||||
c.SecretsHmac = agg.SecretsHmac
|
||||
c.Attributes = agg.Attributes
|
||||
c.WorkerFilter = agg.WorkerFilter
|
||||
|
||||
var s *HostCatalogSecret
|
||||
if len(agg.Secret) > 0 {
|
||||
|
||||
@@ -144,6 +144,24 @@ func TestHostCatalog_Create(t *testing.T) {
|
||||
return hc
|
||||
}(),
|
||||
},
|
||||
{
|
||||
name: "valid-with-worker-filter",
|
||||
args: args{
|
||||
pluginId: plg.GetPublicId(),
|
||||
projectId: prj.GetPublicId(),
|
||||
opts: []Option{
|
||||
WithWorkerFilter(`"test" in "/tags/type"`),
|
||||
},
|
||||
},
|
||||
want: &HostCatalog{
|
||||
HostCatalog: &store.HostCatalog{
|
||||
PluginId: plg.GetPublicId(),
|
||||
ProjectId: prj.GetPublicId(),
|
||||
Attributes: []byte{},
|
||||
WorkerFilter: `"test" in "/tags/type"`,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
|
||||
@@ -37,6 +37,7 @@ type options struct {
|
||||
withSetIds []string
|
||||
withSecretsHmac []byte
|
||||
withStartPageAfterItem pagination.Item
|
||||
withWorkerFilter string
|
||||
}
|
||||
|
||||
func getDefaultOptions() options {
|
||||
@@ -153,3 +154,11 @@ func WithStartPageAfterItem(item pagination.Item) Option {
|
||||
o.withStartPageAfterItem = item
|
||||
}
|
||||
}
|
||||
|
||||
// WithWorkerFilter provides an option to set a plugin host catalog worker
|
||||
// filter.
|
||||
func WithWorkerFilter(wf string) Option {
|
||||
return func(o *options) {
|
||||
o.withWorkerFilter = wf
|
||||
}
|
||||
}
|
||||
@@ -107,4 +107,10 @@ func Test_GetOpts(t *testing.T) {
|
||||
assert.Equal(opts.withStartPageAfterItem.GetPublicId(), "s_1")
|
||||
assert.Equal(opts.withStartPageAfterItem.GetUpdateTime(), timestamp.New(updateTime))
|
||||
})
|
||||
t.Run("WithWorkerFilter", func(t *testing.T) {
|
||||
opts := getOpts(WithWorkerFilter(`"test" in "/tags/type"`))
|
||||
testOpts := getDefaultOptions()
|
||||
testOpts.withWorkerFilter = `"test" in "/tags/type"`
|
||||
assert.Equal(t, opts, testOpts)
|
||||
})
|
||||
}
|
||||
@@ -29,6 +29,7 @@ func (hostHooks) NewCatalog(ctx context.Context, result *host.CatalogListQueryRe
|
||||
s.PluginId = result.PluginId
|
||||
s.SecretsHmac = result.SecretsHmac
|
||||
s.Attributes = result.Attributes
|
||||
s.WorkerFilter = result.WorkerFilter
|
||||
|
||||
return s, nil
|
||||
}
|
||||
@@ -322,6 +322,12 @@ func (r *Repository) UpdateCatalog(ctx context.Context, c *HostCatalog, version
|
||||
}
|
||||
dbMask = append(dbMask, "SecretsHmac")
|
||||
}
|
||||
case strings.EqualFold("WorkerFilter", f) && c.WorkerFilter == "":
|
||||
nullFields = append(nullFields, "WorkerFilter")
|
||||
newCatalog.WorkerFilter = c.WorkerFilter
|
||||
case strings.EqualFold("WorkerFilter", f) && c.WorkerFilter != "":
|
||||
dbMask = append(dbMask, "WorkerFilter")
|
||||
newCatalog.WorkerFilter = c.WorkerFilter
|
||||
default:
|
||||
return nil, nil, db.NoRowsAffected, errors.New(ctx, errors.InvalidFieldMask, op, fmt.Sprintf("invalid field mask: %s", f))
|
||||
}
|
||||
|
||||
@@ -258,6 +258,26 @@ func TestRepository_CreateCatalog(t *testing.T) {
|
||||
}(),
|
||||
wantPluginCalled: true,
|
||||
},
|
||||
{
|
||||
name: "valid-with-worker-filter",
|
||||
in: &HostCatalog{
|
||||
HostCatalog: &store.HostCatalog{
|
||||
ProjectId: prj.GetPublicId(),
|
||||
PluginId: plg.GetPublicId(),
|
||||
Attributes: []byte{},
|
||||
WorkerFilter: `"test" in "/tags/type"`,
|
||||
},
|
||||
},
|
||||
want: &HostCatalog{
|
||||
HostCatalog: &store.HostCatalog{
|
||||
ProjectId: prj.GetPublicId(),
|
||||
PluginId: plg.GetPublicId(),
|
||||
Attributes: []byte{},
|
||||
WorkerFilter: `"test" in "/tags/type"`,
|
||||
},
|
||||
},
|
||||
wantPluginCalled: true,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
@@ -608,6 +628,13 @@ func TestRepository_UpdateCatalog(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
changeWorkerFilter := func(s string) changeHostCatalogFunc {
|
||||
return func(c *HostCatalog) *HostCatalog {
|
||||
c.WorkerFilter = s
|
||||
return c
|
||||
}
|
||||
}
|
||||
|
||||
// Define some checks that will be used in the below tests. Some of
|
||||
// these are re-used, so we define them here. Most of these are
|
||||
// assertions and no particular one is non-fatal in that they will
|
||||
@@ -812,6 +839,14 @@ func TestRepository_UpdateCatalog(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
checkWorkerFilter := func(want string) checkFunc {
|
||||
return func(t *testing.T, ctx context.Context) {
|
||||
t.Helper()
|
||||
assert := assert.New(t)
|
||||
assert.Equal(want, gotCatalog.WorkerFilter)
|
||||
}
|
||||
}
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
withEmptyPluginMap bool
|
||||
@@ -1172,6 +1207,22 @@ func TestRepository_UpdateCatalog(t *testing.T) {
|
||||
checkVerifyCatalogOplog(oplog.OpType_OP_TYPE_UPDATE),
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "update worker filter",
|
||||
changeFuncs: []changeHostCatalogFunc{changeWorkerFilter(`"test" in "/tags/type"`)},
|
||||
version: 2,
|
||||
fieldMask: []string{"WorkerFilter"},
|
||||
wantCheckFuncs: []checkFunc{
|
||||
checkVersion(3),
|
||||
checkSecretsHmac(true),
|
||||
checkWorkerFilter(`"test" in "/tags/type"`),
|
||||
checkSecrets(map[string]any{
|
||||
"one": "two",
|
||||
}),
|
||||
checkNumUpdated(1),
|
||||
checkVerifyCatalogOplog(oplog.OpType_OP_TYPE_UPDATE),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
// Finally define a function for bringing the test subject catalog.
|
||||
@@ -1273,7 +1324,7 @@ func TestRepository_LookupCatalog(t *testing.T) {
|
||||
plgm := map[string]plgpb.HostPluginServiceClient{
|
||||
plg.GetPublicId(): &loopback.WrappingPluginHostClient{Server: &loopback.TestPluginServer{}},
|
||||
}
|
||||
cat := TestCatalog(t, conn, prj.PublicId, plg.GetPublicId())
|
||||
cat := TestCatalog(t, conn, prj.PublicId, plg.GetPublicId(), WithWorkerFilter(`"test" in "/tags/type"`))
|
||||
badId, err := newHostCatalogId(ctx)
|
||||
assert.NoError(t, err)
|
||||
assert.NotNil(t, badId)
|
||||
|
||||
@@ -65,6 +65,9 @@ type HostCatalog struct {
|
||||
// attributes is a jsonb formatted field.
|
||||
// @inject_tag: `gorm:"not_null"`
|
||||
Attributes []byte `protobuf:"bytes,10,opt,name=attributes,proto3" json:"attributes,omitempty" gorm:"not_null"`
|
||||
// worker_filter is optional.
|
||||
// @inject_tag: `gorm:"default:null"`
|
||||
WorkerFilter string `protobuf:"bytes,11,opt,name=worker_filter,json=workerFilter,proto3" json:"worker_filter,omitempty" gorm:"default:null"`
|
||||
}
|
||||
|
||||
func (x *HostCatalog) Reset() {
|
||||
@@ -169,6 +172,13 @@ func (x *HostCatalog) GetAttributes() []byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *HostCatalog) GetWorkerFilter() string {
|
||||
if x != nil {
|
||||
return x.WorkerFilter
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type HostSet struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@@ -667,7 +677,7 @@ var file_controller_storage_host_plugin_store_v1_host_proto_rawDesc = []byte{
|
||||
0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72,
|
||||
0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2f, 0x74, 0x69,
|
||||
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73,
|
||||
0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc5, 0x03, 0x0a, 0x0b, 0x48,
|
||||
0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xea, 0x03, 0x0a, 0x0b, 0x48,
|
||||
0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x75,
|
||||
0x62, 0x6c, 0x69, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70,
|
||||
0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x64, 0x12, 0x4b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74,
|
||||
@@ -696,53 +706,11 @@ var file_controller_storage_host_plugin_store_v1_host_proto_rawDesc = []byte{
|
||||
0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x48, 0x6d,
|
||||
0x61, 0x63, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73,
|
||||
0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
|
||||
0x65, 0x73, 0x22, 0xb6, 0x05, 0x0a, 0x07, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x12, 0x1b,
|
||||
0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x08, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x64, 0x12, 0x4b, 0x0a, 0x0b, 0x63,
|
||||
0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x73, 0x74,
|
||||
0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72,
|
||||
0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61,
|
||||
0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e,
|
||||
0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61,
|
||||
0x67, 0x65, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74,
|
||||
0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x50, 0x0a, 0x0e, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x73, 0x79,
|
||||
0x6e, 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e,
|
||||
0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61,
|
||||
0x67, 0x65, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x53,
|
||||
0x79, 0x6e, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x65, 0x65, 0x64, 0x5f,
|
||||
0x73, 0x79, 0x6e, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6e, 0x65, 0x65, 0x64,
|
||||
0x53, 0x79, 0x6e, 0x63, 0x12, 0x24, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01,
|
||||
0x28, 0x09, 0x42, 0x10, 0xc2, 0xdd, 0x29, 0x0c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x04,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x64, 0x65,
|
||||
0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42,
|
||||
0x1e, 0xc2, 0xdd, 0x29, 0x1a, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x12, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52,
|
||||
0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a,
|
||||
0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x09, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76,
|
||||
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65,
|
||||
0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75,
|
||||
0x74, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69,
|
||||
0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x5e, 0x0a, 0x13, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72,
|
||||
0x65, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x0b, 0x20, 0x03,
|
||||
0x28, 0x09, 0x42, 0x2d, 0xc2, 0xdd, 0x29, 0x29, 0x0a, 0x12, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72,
|
||||
0x72, 0x65, 0x64, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x13, 0x70, 0x72,
|
||||
0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74,
|
||||
0x73, 0x52, 0x12, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x45, 0x6e, 0x64, 0x70,
|
||||
0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x64, 0x0a, 0x15, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x69, 0x6e,
|
||||
0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x0c,
|
||||
0x20, 0x01, 0x28, 0x05, 0x42, 0x30, 0xc2, 0xdd, 0x29, 0x2c, 0x0a, 0x13, 0x53, 0x79, 0x6e, 0x63,
|
||||
0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12,
|
||||
0x15, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x5f, 0x73,
|
||||
0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x52, 0x13, 0x73, 0x79, 0x6e, 0x63, 0x49, 0x6e, 0x74, 0x65,
|
||||
0x72, 0x76, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x22, 0x98, 0x02, 0x0a, 0x11,
|
||||
0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x53, 0x65, 0x63, 0x72, 0x65,
|
||||
0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x49, 0x64,
|
||||
0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c,
|
||||
0x74, 0x65, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x65,
|
||||
0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0xb6, 0x05, 0x0a, 0x07, 0x48, 0x6f, 0x73, 0x74,
|
||||
0x53, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x69, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x64,
|
||||
0x12, 0x4b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c,
|
||||
0x65, 0x72, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x73,
|
||||
@@ -752,50 +720,94 @@ var file_controller_storage_host_plugin_store_v1_host_proto_rawDesc = []byte{
|
||||
0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e,
|
||||
0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
|
||||
0x70, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a,
|
||||
0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65,
|
||||
0x63, 0x72, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72,
|
||||
0x65, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18,
|
||||
0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x63, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12,
|
||||
0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x22, 0xb2, 0x03, 0x0a, 0x04, 0x48, 0x6f, 0x73, 0x74, 0x12,
|
||||
0x1b, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x08, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b,
|
||||
0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x23, 0x0a,
|
||||
0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0b,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x4e, 0x61,
|
||||
0x6d, 0x65, 0x12, 0x4b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d,
|
||||
0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x50, 0x0a, 0x0e, 0x6c, 0x61,
|
||||
0x73, 0x74, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e,
|
||||
0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
|
||||
0x70, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0c,
|
||||
0x6c, 0x61, 0x73, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09,
|
||||
0x6e, 0x65, 0x65, 0x64, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||
0x08, 0x6e, 0x65, 0x65, 0x64, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x24, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
|
||||
0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x10, 0xc2, 0xdd, 0x29, 0x0c, 0x0a, 0x04, 0x6e,
|
||||
0x61, 0x6d, 0x65, 0x12, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
|
||||
0x40, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07,
|
||||
0x20, 0x01, 0x28, 0x09, 0x42, 0x1e, 0xc2, 0xdd, 0x29, 0x1a, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63,
|
||||
0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x64, 0x18,
|
||||
0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x49, 0x64,
|
||||
0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28,
|
||||
0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x74,
|
||||
0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a,
|
||||
0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x5e, 0x0a, 0x13, 0x70, 0x72,
|
||||
0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74,
|
||||
0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x42, 0x2d, 0xc2, 0xdd, 0x29, 0x29, 0x0a, 0x12, 0x50,
|
||||
0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74,
|
||||
0x73, 0x12, 0x13, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x64,
|
||||
0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x12, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65,
|
||||
0x64, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x64, 0x0a, 0x15, 0x73, 0x79,
|
||||
0x6e, 0x63, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x5f, 0x73, 0x65, 0x63, 0x6f,
|
||||
0x6e, 0x64, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x42, 0x30, 0xc2, 0xdd, 0x29, 0x2c, 0x0a,
|
||||
0x13, 0x53, 0x79, 0x6e, 0x63, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x53, 0x65, 0x63,
|
||||
0x6f, 0x6e, 0x64, 0x73, 0x12, 0x15, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72,
|
||||
0x76, 0x61, 0x6c, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x52, 0x13, 0x73, 0x79, 0x6e,
|
||||
0x63, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73,
|
||||
0x22, 0x98, 0x02, 0x0a, 0x11, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67,
|
||||
0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f,
|
||||
0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x61, 0x74, 0x61,
|
||||
0x6c, 0x6f, 0x67, 0x49, 0x64, 0x12, 0x4b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f,
|
||||
0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x6e,
|
||||
0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
|
||||
0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d,
|
||||
0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69,
|
||||
0x6d, 0x65, 0x12, 0x4b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d,
|
||||
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
|
||||
0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x74, 0x69, 0x6d,
|
||||
0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74,
|
||||
0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12,
|
||||
0x4b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65,
|
||||
0x72, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74,
|
||||
0x61, 0x6d, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
|
||||
0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
|
||||
0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18,
|
||||
0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x64,
|
||||
0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x49,
|
||||
0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01,
|
||||
0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69,
|
||||
0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28,
|
||||
0x09, 0x52, 0x0b, 0x69, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x1b,
|
||||
0x0a, 0x09, 0x64, 0x6e, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28,
|
||||
0x09, 0x52, 0x08, 0x64, 0x6e, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x5e, 0x0a, 0x0d, 0x48,
|
||||
0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07,
|
||||
0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68,
|
||||
0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a,
|
||||
0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x09, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x42, 0x40, 0x5a, 0x3e, 0x67,
|
||||
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63,
|
||||
0x6f, 0x72, 0x70, 0x2f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x2f, 0x69, 0x6e, 0x74,
|
||||
0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69,
|
||||
0x6e, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x3b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x61, 0x6d, 0x70, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52,
|
||||
0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x74, 0x5f, 0x73, 0x65,
|
||||
0x63, 0x72, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x63, 0x74, 0x53, 0x65,
|
||||
0x63, 0x72, 0x65, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x06,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x22, 0xb2, 0x03, 0x0a, 0x04,
|
||||
0x48, 0x6f, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x69,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49,
|
||||
0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
|
||||
0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x6e,
|
||||
0x61, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72,
|
||||
0x6e, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74,
|
||||
0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63,
|
||||
0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67,
|
||||
0x65, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x54,
|
||||
0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x54, 0x69, 0x6d, 0x65, 0x12, 0x4b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74,
|
||||
0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x6e, 0x74,
|
||||
0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x74,
|
||||
0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65,
|
||||
0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d,
|
||||
0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63,
|
||||
0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x61, 0x74, 0x61, 0x6c,
|
||||
0x6f, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x61, 0x74,
|
||||
0x61, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
|
||||
0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
|
||||
0x12, 0x21, 0x0a, 0x0c, 0x69, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73,
|
||||
0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73,
|
||||
0x73, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x6e, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73,
|
||||
0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x64, 0x6e, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x73,
|
||||
0x22, 0x5e, 0x0a, 0x0d, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65,
|
||||
0x72, 0x12, 0x17, 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x73, 0x65,
|
||||
0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x65, 0x74, 0x49,
|
||||
0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x64, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x49, 0x64,
|
||||
0x42, 0x40, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68,
|
||||
0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x72,
|
||||
0x79, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2f,
|
||||
0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x3b, 0x73, 0x74, 0x6f,
|
||||
0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
+16
-4
@@ -39,7 +39,8 @@ plugin_catalogs as (
|
||||
update_time,
|
||||
version,
|
||||
attributes,
|
||||
secrets_hmac
|
||||
secrets_hmac,
|
||||
worker_filter
|
||||
from host_plugin_catalog
|
||||
where public_id in (select public_id from catalogs)
|
||||
),
|
||||
@@ -65,6 +66,7 @@ final as (
|
||||
plugin_id,
|
||||
attributes,
|
||||
secrets_hmac,
|
||||
worker_filter,
|
||||
'plugin' as subtype
|
||||
from plugin_catalogs
|
||||
union
|
||||
@@ -78,6 +80,7 @@ final as (
|
||||
null as plugin_id, -- Add to make union uniform
|
||||
null as attributes, -- Add to make union uniform
|
||||
null as secrets_hmac, -- Add to make union uniform
|
||||
null as worker_filter, -- Add to make union uniform
|
||||
'static' as subtype
|
||||
from static_catalogs
|
||||
)
|
||||
@@ -105,7 +108,8 @@ plugin_catalogs as (
|
||||
update_time,
|
||||
version,
|
||||
attributes,
|
||||
secrets_hmac
|
||||
secrets_hmac,
|
||||
worker_filter
|
||||
from host_plugin_catalog
|
||||
where public_id in (select public_id from catalogs)
|
||||
),
|
||||
@@ -131,6 +135,7 @@ final as (
|
||||
plugin_id,
|
||||
attributes,
|
||||
secrets_hmac,
|
||||
worker_filter,
|
||||
'plugin' as subtype
|
||||
from plugin_catalogs
|
||||
union
|
||||
@@ -144,6 +149,7 @@ final as (
|
||||
null as plugin_id, -- Add to make union uniform
|
||||
null as attributes, -- Add to make union uniform
|
||||
null as secrets_hmac, -- Add to make union uniform
|
||||
null as worker_filter, -- Add to make union uniform
|
||||
'static' as subtype
|
||||
from static_catalogs
|
||||
)
|
||||
@@ -171,7 +177,8 @@ plugin_catalogs as (
|
||||
update_time,
|
||||
version,
|
||||
attributes,
|
||||
secrets_hmac
|
||||
secrets_hmac,
|
||||
worker_filter
|
||||
from host_plugin_catalog
|
||||
where public_id in (select public_id from catalogs)
|
||||
),
|
||||
@@ -197,6 +204,7 @@ final as (
|
||||
plugin_id,
|
||||
attributes,
|
||||
secrets_hmac,
|
||||
worker_filter,
|
||||
'plugin' as subtype
|
||||
from plugin_catalogs
|
||||
union
|
||||
@@ -210,6 +218,7 @@ final as (
|
||||
null as plugin_id, -- Add to make union uniform
|
||||
null as attributes, -- Add to make union uniform
|
||||
null as secrets_hmac, -- Add to make union uniform
|
||||
null as worker_filter, -- Add to make union uniform
|
||||
'static' as subtype
|
||||
from static_catalogs
|
||||
)
|
||||
@@ -238,7 +247,8 @@ plugin_catalogs as (
|
||||
update_time,
|
||||
version,
|
||||
attributes,
|
||||
secrets_hmac
|
||||
secrets_hmac,
|
||||
worker_filter
|
||||
from host_plugin_catalog
|
||||
where public_id in (select public_id from catalogs)
|
||||
),
|
||||
@@ -264,6 +274,7 @@ final as (
|
||||
plugin_id,
|
||||
attributes,
|
||||
secrets_hmac,
|
||||
worker_filter,
|
||||
'plugin' as subtype
|
||||
from plugin_catalogs
|
||||
union
|
||||
@@ -277,6 +288,7 @@ final as (
|
||||
null as plugin_id, -- Add to make union uniform
|
||||
null as attributes, -- Add to make union uniform
|
||||
null as secrets_hmac, -- Add to make union uniform
|
||||
null as worker_filter, -- Add to make union uniform
|
||||
'static' as subtype
|
||||
from static_catalogs
|
||||
)
|
||||
|
||||
@@ -60,6 +60,10 @@ message HostCatalog {
|
||||
// attributes is a jsonb formatted field.
|
||||
// @inject_tag: `gorm:"not_null"`
|
||||
bytes attributes = 10;
|
||||
|
||||
// worker_filter is optional.
|
||||
// @inject_tag: `gorm:"default:null"`
|
||||
string worker_filter = 11;
|
||||
}
|
||||
|
||||
message HostSet {
|
||||
|
||||
Reference in new issue
Block a user