From 0d828396a82a2e8ad31f607d7dfb12b6a1bebb60 Mon Sep 17 00:00:00 2001 From: Joe Lei Date: Fri, 23 Feb 2024 16:13:44 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20kv=E6=94=AF=E6=8C=81=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=20sha256=20=E7=AD=BE=E5=90=8D=20--task=3D74821337=20(#2955)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: kv支持返回 sha256 签名 --task=74821337 * feat: kv支持返回 sha256 签名 --task=74821337 * feat: kv支持返回 sha256 签名 --task=74821337 * feat: kv支持返回 sha256 签名 --task=74821337 * feat: kv支持返回 sha256 签名 --task=74821337 * feat: kv支持返回 sha256 签名 --task=74821337 * feat: kv支持返回 sha256 签名 --task=74821337 * feat: kv支持返回 sha256 签名 --task=74821337 * feat: kv支持返回 sha256 签名 --task=74821337 * feat: kv支持返回 sha256 签名 --task=74821337 * feat: kv支持返回 sha256 签名 --task=74821337 * feat: kv支持返回 sha256 签名 --task=74821337 * feat: kv支持返回 sha256 签名 --task=74821337 * feat: kv支持返回 sha256 签名 --task=74821337 --- .../20240125175500_kv_add_signature.go | 215 ++++++++ .../bcs-bscp/cmd/data-service/service/kv.go | 16 + .../cmd/data-service/service/release.go | 8 +- .../cmd/data-service/service/released_kv.go | 4 +- .../cmd/feed-server/bll/eventc/scheduler.go | 1 + .../cmd/feed-server/bll/release/release.go | 1 + .../cmd/feed-server/bll/types/types.go | 10 +- .../cmd/feed-server/service/rpc_sidecar.go | 1 + bcs-services/bcs-bscp/pkg/dal/dao/kv.go | 2 +- bcs-services/bcs-bscp/pkg/dal/gen/kvs.gen.go | 10 +- .../bcs-bscp/pkg/dal/gen/released_kvs.gen.go | 10 +- bcs-services/bcs-bscp/pkg/dal/table/kv.go | 11 +- .../bcs-bscp/pkg/dal/table/released_kv.go | 7 +- .../bcs-bscp/pkg/protocol/core/kv/convert.go | 12 +- .../bcs-bscp/pkg/protocol/core/kv/kvs.pb.go | 98 ++-- .../bcs-bscp/pkg/protocol/core/kv/kvs.proto | 2 + .../pkg/protocol/core/released-kv/convert.go | 16 +- .../core/released-kv/released_kv.pb.go | 85 ++-- .../core/released-kv/released_kv.proto | 2 + .../protocol/feed-server/feed_server.pb.go | 473 +++++++++--------- .../protocol/feed-server/feed_server.proto | 2 + bcs-services/bcs-bscp/pkg/sf-share/types.go | 11 +- bcs-services/bcs-bscp/pkg/types/cache.go | 40 +- 23 files changed, 681 insertions(+), 356 deletions(-) create mode 100644 bcs-services/bcs-bscp/cmd/data-service/db-migration/migrations/20240125175500_kv_add_signature.go diff --git a/bcs-services/bcs-bscp/cmd/data-service/db-migration/migrations/20240125175500_kv_add_signature.go b/bcs-services/bcs-bscp/cmd/data-service/db-migration/migrations/20240125175500_kv_add_signature.go new file mode 100644 index 0000000000..2afc65a92b --- /dev/null +++ b/bcs-services/bcs-bscp/cmd/data-service/db-migration/migrations/20240125175500_kv_add_signature.go @@ -0,0 +1,215 @@ +/* + * Tencent is pleased to support the open source community by making Blueking Container Service available. + * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * Licensed under the MIT License (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * http://opensource.org/licenses/MIT + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific language governing permissions and + * limitations under the License. + */ + +package migrations + +import ( + "time" + + "gorm.io/gorm" + + "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/cmd/data-service/db-migration/migrator" + "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/cc" + "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/dal/table" + "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/dal/vault" + "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/kit" + "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/tools" + "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/types" +) + +func init() { + // add current migration to migrator + migrator.GetMigrator().AddMigration(&migrator.Migration{ + Version: "20240125175500", + Name: "20240125175500_kv_add_signature", + Mode: migrator.GormMode, + Up: mig20240125175500Up, + Down: mig20240125175500Down, + }) +} + +// Kvs20240125175500 kv +type Kvs20240125175500 struct { + ID uint `gorm:"type:bigint(1) unsigned not null;primaryKey;autoIncrement:false"` + + // Spec is specifics of the resource defined with user + Key string `gorm:"type:varchar(255) not null;uniqueIndex:idx_bizID_appID_key_kvState,priority:1"` + Version uint `gorm:"type:bigint(1) unsigned not null;"` + KvType string `gorm:"type:varchar(64) not null"` + KvState string `gorm:"type:varchar(64) not null;uniqueIndex:idx_bizID_appID_key_kvState,priority:2"` + + // Attachment is attachment info of the resource + BizID uint `gorm:"type:bigint(1) unsigned not null;uniqueIndex:idx_bizID_appID_key_kvState,priority:3"` + APPID uint `gorm:"type:bigint(1) unsigned not null;uniqueIndex:idx_bizID_appID_key_kvState,priority:4"` + + // Revision is revision info of the resource + Creator string `gorm:"type:varchar(64) not null"` + Reviser string `gorm:"type:varchar(64) not null"` + CreatedAt time.Time `gorm:"type:datetime(6) not null"` + UpdatedAt time.Time `gorm:"type:datetime(6) not null"` + + Signature string `gorm:"type:varchar(64) not null"` + ByteSize uint `gorm:"type:bigint(1) unsigned not null"` +} + +// TableName gorm table name +func (Kvs20240125175500) TableName() string { + t := &table.Kv{} + return t.TableName() +} + +// ReleasedKvs20240125175500 已生成版本的kv +type ReleasedKvs20240125175500 struct { + ID uint `gorm:"type:bigint(1) unsigned not null;primaryKey;autoIncrement:false"` + + // Spec is specifics of the resource defined with user + Key string `gorm:"type:varchar(255) not null;uniqueIndex:relID_key,priority:1"` + Version uint `gorm:"type:bigint(1) unsigned not null;"` + ReleaseID uint `gorm:"type:bigint(1) unsigned not null;index:idx_bizID_appID_ID,priority:3;uniqueIndex:relID_key,priority:2"` //nolint:lll + KvType string `gorm:"type:varchar(64) not null"` + + // Attachment is attachment info of the resource + BizID uint `gorm:"type:bigint(1) unsigned not null;index:idx_bizID_appID_ID,priority:1"` + AppID uint `gorm:"type:bigint(1) unsigned not null;index:idx_bizID_appID_ID,priority:2"` + + // Revision is revision info of the resource + Creator string `gorm:"type:varchar(64) not null"` + Reviser string `gorm:"type:varchar(64) not null"` + CreatedAt time.Time `gorm:"type:datetime(6) not null"` + UpdatedAt time.Time `gorm:"type:datetime(6) not null"` + + Signature string `gorm:"type:varchar(64) not null"` + ByteSize uint `gorm:"type:bigint(1) unsigned not null"` +} + +// TableName gorm table name +func (ReleasedKvs20240125175500) TableName() string { + t := &table.ReleasedKv{} + return t.TableName() +} + +func syncSignature(tx *gorm.DB) error { + // set default value + var kvs []table.Kv + + tx.Model(&table.Kv{}).Find(&kvs) + cli, err := vault.NewSet(cc.DataService().Vault) + if err != nil { + return err + } + + for _, kv := range kvs { + if kv.ContentSpec.Signature != "" { + continue + } + + opt := &types.GetLastKvOpt{BizID: kv.Attachment.BizID, AppID: kv.Attachment.AppID, Key: kv.Spec.Key} + _, value, err := cli.GetLastKv(kit.New(), opt) + if err != nil { + return err + } + + kv.ContentSpec.Signature = tools.SHA256(value) + kv.ContentSpec.ByteSize = uint64(len(value)) + tx.Save(&kv) + } + + return nil +} + +func syncReleaseSignature(tx *gorm.DB) error { + // set default value + var kvs []table.ReleasedKv + + tx.Model(&table.ReleasedKv{}).Find(&kvs) + cli, err := vault.NewSet(cc.DataService().Vault) + if err != nil { + return err + } + + for _, kv := range kvs { + if kv.ContentSpec.Signature != "" { + continue + } + + // 获取 release 版本的值 + opt := &types.GetRKvOption{ + BizID: kv.Attachment.BizID, + AppID: kv.Attachment.AppID, + Key: kv.Spec.Key, + ReleasedID: kv.ReleaseID, + Version: int(kv.Spec.Version), + } + _, value, err := cli.GetRKv(kit.New(), opt) + if err != nil { + return err + } + + kv.ContentSpec.Signature = tools.SHA256(value) + kv.ContentSpec.ByteSize = uint64(len(value)) + tx.Save(&kv) + } + + return nil +} + +// mig20240125175500Up for up migration +func mig20240125175500Up(tx *gorm.DB) error { + if err := tx.Set("gorm:table_options", "ENGINE=InnoDB CHARSET=utf8mb4"). + AutoMigrate(&Kvs20240125175500{}); err != nil { + return err + } + + if err := tx.Set("gorm:table_options", "ENGINE=InnoDB CHARSET=utf8mb4"). + AutoMigrate(&ReleasedKvs20240125175500{}); err != nil { + return err + } + + if err := syncSignature(tx); err != nil { + return err + } + + if err := syncReleaseSignature(tx); err != nil { + return err + } + + return nil +} + +// mig20240125175500Down for down migration +func mig20240125175500Down(tx *gorm.DB) error { + // delete kvs old column + if tx.Migrator().HasColumn(&Kvs20240125175500{}, "Signature") { + if err := tx.Migrator().DropColumn(&Kvs20240125175500{}, "Signature"); err != nil { + return err + } + } + if tx.Migrator().HasColumn(&Kvs20240125175500{}, "ByteSize") { + if err := tx.Migrator().DropColumn(&Kvs20240125175500{}, "ByteSize"); err != nil { + return err + } + } + + // delete release_kvs old column + if tx.Migrator().HasColumn(&ReleasedKvs20240125175500{}, "Signature") { + if err := tx.Migrator().DropColumn(&ReleasedKvs20240125175500{}, "Signature"); err != nil { + return err + } + } + if tx.Migrator().HasColumn(&ReleasedKvs20240125175500{}, "ByteSize") { + if err := tx.Migrator().DropColumn(&ReleasedKvs20240125175500{}, "ByteSize"); err != nil { + return err + } + } + + return nil +} diff --git a/bcs-services/bcs-bscp/cmd/data-service/service/kv.go b/bcs-services/bcs-bscp/cmd/data-service/service/kv.go index afeea951d3..bf0c02650a 100644 --- a/bcs-services/bcs-bscp/cmd/data-service/service/kv.go +++ b/bcs-services/bcs-bscp/cmd/data-service/service/kv.go @@ -76,6 +76,10 @@ func (s *Service) CreateKv(ctx context.Context, req *pbds.CreateKvReq) (*pbds.Cr Creator: kt.User, Reviser: kt.User, }, + ContentSpec: &table.ContentSpec{ + Signature: tools.SHA256(req.Spec.Value), + ByteSize: uint64(len(req.Spec.Value)), + }, } kv.Spec.Version = uint32(version) kv.KvState = table.KvStateAdd @@ -136,6 +140,10 @@ func (s *Service) UpdateKv(ctx context.Context, req *pbds.UpdateKvReq) (*pbbase. } kv.Spec.Version = uint32(version) + kv.ContentSpec = &table.ContentSpec{ + Signature: tools.SHA256(req.Spec.Value), + ByteSize: uint64(len(req.Spec.Value)), + } if e := s.dao.Kv().Update(kt, kv); e != nil { logs.Errorf("update kv failed, err: %v, rid: %s", e, kt.Rid) return nil, err @@ -410,6 +418,10 @@ func (s *Service) checkKvs(kt *kit.Kit, req *pbds.BatchUpsertKvsReq, editingKvMa AppID: req.AppId, }, Revision: editing.Revision, + ContentSpec: &table.ContentSpec{ + Signature: tools.SHA256(kv.KvSpec.Value), + ByteSize: uint64(len(kv.KvSpec.Value)), + }, }) } else { @@ -430,6 +442,10 @@ func (s *Service) checkKvs(kt *kit.Kit, req *pbds.BatchUpsertKvsReq, editingKvMa CreatedAt: now, UpdatedAt: now, }, + ContentSpec: &table.ContentSpec{ + Signature: tools.SHA256(kv.KvSpec.Value), + ByteSize: uint64(len(kv.KvSpec.Value)), + }, }) } diff --git a/bcs-services/bcs-bscp/cmd/data-service/service/release.go b/bcs-services/bcs-bscp/cmd/data-service/service/release.go index 79c4d05608..c5a97390f0 100644 --- a/bcs-services/bcs-bscp/cmd/data-service/service/release.go +++ b/bcs-services/bcs-bscp/cmd/data-service/service/release.go @@ -27,6 +27,7 @@ import ( "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/logs" pbbase "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/protocol/core/base" pbci "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/protocol/core/config-item" + pbcontent "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/protocol/core/content" pbkv "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/protocol/core/kv" pbrelease "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/protocol/core/release" pbrkv "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/protocol/core/released-kv" @@ -854,9 +855,10 @@ func (s *Service) genCreateKv(kt *kit.Kit, bizID, appID uint32) ([]*pbkv.Kv, err return nil, err } kvs = append(kvs, &pbkv.Kv{ - Spec: pbkv.PbKvSpec(detail.Spec, value), - Attachment: pbkv.PbKvAttachment(detail.Attachment), - Revision: pbbase.PbRevision(detail.Revision), + Spec: pbkv.PbKvSpec(detail.Spec, value), + Attachment: pbkv.PbKvAttachment(detail.Attachment), + Revision: pbbase.PbRevision(detail.Revision), + ContentSpec: pbcontent.PbContentSpec(detail.ContentSpec), }) } diff --git a/bcs-services/bcs-bscp/cmd/data-service/service/released_kv.go b/bcs-services/bcs-bscp/cmd/data-service/service/released_kv.go index 5902882905..4ab820f85d 100644 --- a/bcs-services/bcs-bscp/cmd/data-service/service/released_kv.go +++ b/bcs-services/bcs-bscp/cmd/data-service/service/released_kv.go @@ -19,6 +19,7 @@ import ( "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/kit" "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/logs" pbbase "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/protocol/core/base" + pbcontent "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/protocol/core/content" pbkv "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/protocol/core/kv" pbrkv "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/protocol/core/released-kv" released_kv "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/protocol/core/released-kv" @@ -55,7 +56,8 @@ func (s *Service) GetReleasedKv(ctx context.Context, req *pbds.GetReleasedKvReq) BizId: req.BizId, AppId: req.AppId, }, - Revision: pbbase.PbRevision(rkv.Revision), + Revision: pbbase.PbRevision(rkv.Revision), + ContentSpec: pbcontent.PbContentSpec(rkv.ContentSpec), }, nil } diff --git a/bcs-services/bcs-bscp/cmd/feed-server/bll/eventc/scheduler.go b/bcs-services/bcs-bscp/cmd/feed-server/bll/eventc/scheduler.go index 6bd07e9a5e..c61407eba5 100644 --- a/bcs-services/bcs-bscp/cmd/feed-server/bll/eventc/scheduler.go +++ b/bcs-services/bcs-bscp/cmd/feed-server/bll/eventc/scheduler.go @@ -440,6 +440,7 @@ func (sch *Scheduler) buildEventForRkv(inst *sfs.InstanceSpec, kvList []*types.R BizId: one.Attachment.BizID, AppId: one.Attachment.AppID, }, + ContentSpec: pbct.PbContentSpec(one.ContentSpec), } } diff --git a/bcs-services/bcs-bscp/cmd/feed-server/bll/release/release.go b/bcs-services/bcs-bscp/cmd/feed-server/bll/release/release.go index 6630b6cf4b..3b2f2db0d8 100644 --- a/bcs-services/bcs-bscp/cmd/feed-server/bll/release/release.go +++ b/bcs-services/bcs-bscp/cmd/feed-server/bll/release/release.go @@ -177,6 +177,7 @@ func (rs *ReleasedService) ListAppLatestReleaseKvMeta(kt *kit.Kit, opts *types.A BizId: one.Attachment.BizID, AppId: one.Attachment.AppID, }, + ContentSpec: pbcontent.PbContentSpec(one.ContentSpec), } } meta.Kvs = kvList diff --git a/bcs-services/bcs-bscp/cmd/feed-server/bll/types/types.go b/bcs-services/bcs-bscp/cmd/feed-server/bll/types/types.go index 9573d2cd78..c5212008ad 100644 --- a/bcs-services/bcs-bscp/cmd/feed-server/bll/types/types.go +++ b/bcs-services/bcs-bscp/cmd/feed-server/bll/types/types.go @@ -21,6 +21,7 @@ import ( pbbase "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/protocol/core/base" pbcommit "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/protocol/core/commit" pbci "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/protocol/core/config-item" + pbcontent "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/protocol/core/content" pbhook "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/protocol/core/hook" pbkv "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/protocol/core/kv" ) @@ -120,8 +121,9 @@ type AppLatestReleaseKvMeta struct { // ReleasedKvMeta defines a release's released kv metadata type ReleasedKvMeta struct { - Key string `json:"key,omitempty"` - KvType string `json:"kv_type,omitempty"` - Revision *pbbase.Revision `json:"revision,omitempty"` - KvAttachment *pbkv.KvAttachment `json:"kv_attachment,omitempty"` + Key string `json:"key,omitempty"` + KvType string `json:"kv_type,omitempty"` + Revision *pbbase.Revision `json:"revision,omitempty"` + KvAttachment *pbkv.KvAttachment `json:"kv_attachment,omitempty"` + ContentSpec *pbcontent.ContentSpec `json:"content_spec,omitempty"` } diff --git a/bcs-services/bcs-bscp/cmd/feed-server/service/rpc_sidecar.go b/bcs-services/bcs-bscp/cmd/feed-server/service/rpc_sidecar.go index e4b225b7e9..fbbd87e59a 100644 --- a/bcs-services/bcs-bscp/cmd/feed-server/service/rpc_sidecar.go +++ b/bcs-services/bcs-bscp/cmd/feed-server/service/rpc_sidecar.go @@ -398,6 +398,7 @@ func (s *Service) PullKvMeta(ctx context.Context, req *pbfs.PullKvMetaReq) (*pbf BizId: kv.KvAttachment.BizId, AppId: kv.KvAttachment.AppId, }, + ContentSpec: kv.ContentSpec, }) } diff --git a/bcs-services/bcs-bscp/pkg/dal/dao/kv.go b/bcs-services/bcs-bscp/pkg/dal/dao/kv.go index b2b7b10e6f..dea58ecfc9 100644 --- a/bcs-services/bcs-bscp/pkg/dal/dao/kv.go +++ b/bcs-services/bcs-bscp/pkg/dal/dao/kv.go @@ -123,7 +123,7 @@ func (dao *kvDao) Update(kit *kit.Kit, kv *table.Kv) error { updateTx := func(tx *gen.Query) error { q = tx.Kv.WithContext(kit.Ctx) if _, e := q.Where(m.BizID.Eq(kv.Attachment.BizID), m.ID.Eq(kv.ID)).Select(m.Version, m.UpdatedAt, - m.Reviser, m.KvState).Updates(kv); e != nil { + m.Reviser, m.KvState, m.Signature, m.ByteSize).Updates(kv); e != nil { return e } diff --git a/bcs-services/bcs-bscp/pkg/dal/gen/kvs.gen.go b/bcs-services/bcs-bscp/pkg/dal/gen/kvs.gen.go index 8df83d9c26..27d92b25d6 100644 --- a/bcs-services/bcs-bscp/pkg/dal/gen/kvs.gen.go +++ b/bcs-services/bcs-bscp/pkg/dal/gen/kvs.gen.go @@ -38,6 +38,8 @@ func newKv(db *gorm.DB, opts ...gen.DOOption) kv { _kv.Reviser = field.NewString(tableName, "reviser") _kv.CreatedAt = field.NewTime(tableName, "created_at") _kv.UpdatedAt = field.NewTime(tableName, "updated_at") + _kv.Signature = field.NewString(tableName, "signature") + _kv.ByteSize = field.NewUint64(tableName, "byte_size") _kv.fillFieldMap() @@ -59,6 +61,8 @@ type kv struct { Reviser field.String CreatedAt field.Time UpdatedAt field.Time + Signature field.String + ByteSize field.Uint64 fieldMap map[string]field.Expr } @@ -86,6 +90,8 @@ func (k *kv) updateTableName(table string) *kv { k.Reviser = field.NewString(table, "reviser") k.CreatedAt = field.NewTime(table, "created_at") k.UpdatedAt = field.NewTime(table, "updated_at") + k.Signature = field.NewString(table, "signature") + k.ByteSize = field.NewUint64(table, "byte_size") k.fillFieldMap() @@ -110,7 +116,7 @@ func (k *kv) GetFieldByName(fieldName string) (field.OrderExpr, bool) { } func (k *kv) fillFieldMap() { - k.fieldMap = make(map[string]field.Expr, 11) + k.fieldMap = make(map[string]field.Expr, 13) k.fieldMap["id"] = k.ID k.fieldMap["kv_state"] = k.KvState k.fieldMap["key"] = k.Key @@ -122,6 +128,8 @@ func (k *kv) fillFieldMap() { k.fieldMap["reviser"] = k.Reviser k.fieldMap["created_at"] = k.CreatedAt k.fieldMap["updated_at"] = k.UpdatedAt + k.fieldMap["signature"] = k.Signature + k.fieldMap["byte_size"] = k.ByteSize } func (k kv) clone(db *gorm.DB) kv { diff --git a/bcs-services/bcs-bscp/pkg/dal/gen/released_kvs.gen.go b/bcs-services/bcs-bscp/pkg/dal/gen/released_kvs.gen.go index f73b9bc002..578f3a5eba 100644 --- a/bcs-services/bcs-bscp/pkg/dal/gen/released_kvs.gen.go +++ b/bcs-services/bcs-bscp/pkg/dal/gen/released_kvs.gen.go @@ -38,6 +38,8 @@ func newReleasedKv(db *gorm.DB, opts ...gen.DOOption) releasedKv { _releasedKv.Reviser = field.NewString(tableName, "reviser") _releasedKv.CreatedAt = field.NewTime(tableName, "created_at") _releasedKv.UpdatedAt = field.NewTime(tableName, "updated_at") + _releasedKv.Signature = field.NewString(tableName, "signature") + _releasedKv.ByteSize = field.NewUint64(tableName, "byte_size") _releasedKv.fillFieldMap() @@ -59,6 +61,8 @@ type releasedKv struct { Reviser field.String CreatedAt field.Time UpdatedAt field.Time + Signature field.String + ByteSize field.Uint64 fieldMap map[string]field.Expr } @@ -86,6 +90,8 @@ func (r *releasedKv) updateTableName(table string) *releasedKv { r.Reviser = field.NewString(table, "reviser") r.CreatedAt = field.NewTime(table, "created_at") r.UpdatedAt = field.NewTime(table, "updated_at") + r.Signature = field.NewString(table, "signature") + r.ByteSize = field.NewUint64(table, "byte_size") r.fillFieldMap() @@ -112,7 +118,7 @@ func (r *releasedKv) GetFieldByName(fieldName string) (field.OrderExpr, bool) { } func (r *releasedKv) fillFieldMap() { - r.fieldMap = make(map[string]field.Expr, 11) + r.fieldMap = make(map[string]field.Expr, 13) r.fieldMap["id"] = r.ID r.fieldMap["release_id"] = r.ReleaseID r.fieldMap["key"] = r.Key @@ -124,6 +130,8 @@ func (r *releasedKv) fillFieldMap() { r.fieldMap["reviser"] = r.Reviser r.fieldMap["created_at"] = r.CreatedAt r.fieldMap["updated_at"] = r.UpdatedAt + r.fieldMap["signature"] = r.Signature + r.fieldMap["byte_size"] = r.ByteSize } func (r releasedKv) clone(db *gorm.DB) releasedKv { diff --git a/bcs-services/bcs-bscp/pkg/dal/table/kv.go b/bcs-services/bcs-bscp/pkg/dal/table/kv.go index 14367b6fe6..f94516ea7e 100644 --- a/bcs-services/bcs-bscp/pkg/dal/table/kv.go +++ b/bcs-services/bcs-bscp/pkg/dal/table/kv.go @@ -28,11 +28,12 @@ import ( // Kv defines a basic kv type Kv struct { // ID is an auto-increased value, which is a unique identity of a kv. - ID uint32 `json:"id" gorm:"primaryKey"` - KvState KvState `json:"kv_state" gorm:"column:kv_state"` - Spec *KvSpec `json:"spec" gorm:"embedded"` - Attachment *KvAttachment `json:"attachment" gorm:"embedded"` - Revision *Revision `json:"revision" gorm:"embedded"` + ID uint32 `json:"id" gorm:"primaryKey"` + KvState KvState `json:"kv_state" gorm:"column:kv_state"` + Spec *KvSpec `json:"spec" gorm:"embedded"` + Attachment *KvAttachment `json:"attachment" gorm:"embedded"` + Revision *Revision `json:"revision" gorm:"embedded"` + ContentSpec *ContentSpec `json:"content_spec" gorm:"embedded"` } // KvSpec is kv specific which is defined by user. diff --git a/bcs-services/bcs-bscp/pkg/dal/table/released_kv.go b/bcs-services/bcs-bscp/pkg/dal/table/released_kv.go index e429401f72..7eee74d80c 100644 --- a/bcs-services/bcs-bscp/pkg/dal/table/released_kv.go +++ b/bcs-services/bcs-bscp/pkg/dal/table/released_kv.go @@ -21,9 +21,10 @@ type ReleasedKv struct { // ReleaseID is this app's config item's release id ReleaseID uint32 `json:"release_id" gorm:"column:release_id"` - Spec *KvSpec `json:"spec" gorm:"embedded"` - Attachment *KvAttachment `json:"attachment" gorm:"embedded"` - Revision *Revision `json:"revision" gorm:"embedded"` + Spec *KvSpec `json:"spec" gorm:"embedded"` + Attachment *KvAttachment `json:"attachment" gorm:"embedded"` + Revision *Revision `json:"revision" gorm:"embedded"` + ContentSpec *ContentSpec `json:"content_spec" gorm:"embedded"` } // TableName is the ReleasedKv's database table name. diff --git a/bcs-services/bcs-bscp/pkg/protocol/core/kv/convert.go b/bcs-services/bcs-bscp/pkg/protocol/core/kv/convert.go index e8fba4687d..bfe73e1921 100644 --- a/bcs-services/bcs-bscp/pkg/protocol/core/kv/convert.go +++ b/bcs-services/bcs-bscp/pkg/protocol/core/kv/convert.go @@ -16,6 +16,7 @@ package pbkv import ( "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/dal/table" pbbase "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/protocol/core/base" + pbcontent "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/protocol/core/content" ) // Kv convert pb Kv to table Kv @@ -62,11 +63,12 @@ func PbKv(k *table.Kv, value string) *Kv { } return &Kv{ - Id: k.ID, - KvState: string(k.KvState), - Spec: PbKvSpec(k.Spec, value), - Attachment: PbKvAttachment(k.Attachment), - Revision: pbbase.PbRevision(k.Revision), + Id: k.ID, + KvState: string(k.KvState), + Spec: PbKvSpec(k.Spec, value), + Attachment: PbKvAttachment(k.Attachment), + Revision: pbbase.PbRevision(k.Revision), + ContentSpec: pbcontent.PbContentSpec(k.ContentSpec), } } diff --git a/bcs-services/bcs-bscp/pkg/protocol/core/kv/kvs.pb.go b/bcs-services/bcs-bscp/pkg/protocol/core/kv/kvs.pb.go index 5d8d489b17..06054e87c6 100644 --- a/bcs-services/bcs-bscp/pkg/protocol/core/kv/kvs.pb.go +++ b/bcs-services/bcs-bscp/pkg/protocol/core/kv/kvs.pb.go @@ -8,6 +8,7 @@ package pbkv import ( base "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/protocol/core/base" + content "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/protocol/core/content" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -27,11 +28,12 @@ type Kv struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - KvState string `protobuf:"bytes,2,opt,name=kv_state,json=kvState,proto3" json:"kv_state,omitempty"` - Spec *KvSpec `protobuf:"bytes,3,opt,name=spec,proto3" json:"spec,omitempty"` - Attachment *KvAttachment `protobuf:"bytes,4,opt,name=attachment,proto3" json:"attachment,omitempty"` - Revision *base.Revision `protobuf:"bytes,5,opt,name=revision,proto3" json:"revision,omitempty"` + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + KvState string `protobuf:"bytes,2,opt,name=kv_state,json=kvState,proto3" json:"kv_state,omitempty"` + Spec *KvSpec `protobuf:"bytes,3,opt,name=spec,proto3" json:"spec,omitempty"` + Attachment *KvAttachment `protobuf:"bytes,4,opt,name=attachment,proto3" json:"attachment,omitempty"` + Revision *base.Revision `protobuf:"bytes,5,opt,name=revision,proto3" json:"revision,omitempty"` + ContentSpec *content.ContentSpec `protobuf:"bytes,6,opt,name=content_spec,json=contentSpec,proto3" json:"content_spec,omitempty"` } func (x *Kv) Reset() { @@ -101,6 +103,13 @@ func (x *Kv) GetRevision() *base.Revision { return nil } +func (x *Kv) GetContentSpec() *content.ContentSpec { + if x != nil { + return x.ContentSpec + } + return nil +} + // KvSpec source resource reference: pkg/dal/table/kvs.go type KvSpec struct { state protoimpl.MessageState @@ -227,32 +236,39 @@ var file_kvs_proto_rawDesc = []byte{ 0x0a, 0x09, 0x6b, 0x76, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x70, 0x62, 0x6b, 0x76, 0x1a, 0x21, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb3, 0x01, 0x0a, 0x02, 0x4b, 0x76, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6b, - 0x76, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, - 0x76, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x6b, 0x76, 0x2e, 0x4b, 0x76, 0x53, 0x70, - 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x32, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x61, - 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, - 0x62, 0x6b, 0x76, 0x2e, 0x4b, 0x76, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, - 0x52, 0x0a, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x08, - 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, - 0x2e, 0x70, 0x62, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x52, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x49, 0x0a, 0x06, 0x4b, 0x76, - 0x53, 0x70, 0x65, 0x63, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x6b, 0x76, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6b, 0x76, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x3c, 0x0a, 0x0c, 0x4b, 0x76, 0x41, 0x74, 0x74, 0x61, 0x63, - 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x69, 0x7a, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x62, 0x69, 0x7a, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, - 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x61, 0x70, - 0x70, 0x49, 0x64, 0x42, 0x53, 0x5a, 0x51, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x54, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x42, 0x6c, 0x75, 0x65, 0x4b, 0x69, 0x6e, - 0x67, 0x2f, 0x62, 0x6b, 0x2d, 0x62, 0x63, 0x73, 0x2f, 0x62, 0x63, 0x73, 0x2d, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x62, 0x63, 0x73, 0x2d, 0x62, 0x73, 0x63, 0x70, 0x2f, 0x70, - 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x6b, 0x76, 0x3b, 0x70, 0x62, 0x6b, 0x76, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2f, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xee, 0x01, + 0x0a, 0x02, 0x4b, 0x76, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x76, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x76, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x20, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, + 0x70, 0x62, 0x6b, 0x76, 0x2e, 0x4b, 0x76, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, + 0x63, 0x12, 0x32, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x6b, 0x76, 0x2e, 0x4b, 0x76, 0x41, + 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x61, 0x63, + 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x73, + 0x70, 0x65, 0x63, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x62, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x53, 0x70, 0x65, + 0x63, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x53, 0x70, 0x65, 0x63, 0x22, 0x49, + 0x0a, 0x06, 0x4b, 0x76, 0x53, 0x70, 0x65, 0x63, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x6b, 0x76, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6b, 0x76, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x3c, 0x0a, 0x0c, 0x4b, 0x76, 0x41, + 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x69, 0x7a, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x62, 0x69, 0x7a, 0x49, 0x64, + 0x12, 0x15, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x42, 0x53, 0x5a, 0x51, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x42, 0x6c, 0x75, + 0x65, 0x4b, 0x69, 0x6e, 0x67, 0x2f, 0x62, 0x6b, 0x2d, 0x62, 0x63, 0x73, 0x2f, 0x62, 0x63, 0x73, + 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x62, 0x63, 0x73, 0x2d, 0x62, 0x73, + 0x63, 0x70, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, + 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x6b, 0x76, 0x3b, 0x70, 0x62, 0x6b, 0x76, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -269,20 +285,22 @@ func file_kvs_proto_rawDescGZIP() []byte { var file_kvs_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_kvs_proto_goTypes = []interface{}{ - (*Kv)(nil), // 0: pbkv.Kv - (*KvSpec)(nil), // 1: pbkv.KvSpec - (*KvAttachment)(nil), // 2: pbkv.KvAttachment - (*base.Revision)(nil), // 3: pbbase.Revision + (*Kv)(nil), // 0: pbkv.Kv + (*KvSpec)(nil), // 1: pbkv.KvSpec + (*KvAttachment)(nil), // 2: pbkv.KvAttachment + (*base.Revision)(nil), // 3: pbbase.Revision + (*content.ContentSpec)(nil), // 4: pbcontent.ContentSpec } var file_kvs_proto_depIdxs = []int32{ 1, // 0: pbkv.Kv.spec:type_name -> pbkv.KvSpec 2, // 1: pbkv.Kv.attachment:type_name -> pbkv.KvAttachment 3, // 2: pbkv.Kv.revision:type_name -> pbbase.Revision - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 4, // 3: pbkv.Kv.content_spec:type_name -> pbcontent.ContentSpec + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_kvs_proto_init() } diff --git a/bcs-services/bcs-bscp/pkg/protocol/core/kv/kvs.proto b/bcs-services/bcs-bscp/pkg/protocol/core/kv/kvs.proto index df1e5af66c..bf9ef4207a 100644 --- a/bcs-services/bcs-bscp/pkg/protocol/core/kv/kvs.proto +++ b/bcs-services/bcs-bscp/pkg/protocol/core/kv/kvs.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package pbkv; import "pkg/protocol/core/base/base.proto"; +import "pkg/protocol/core/content/content.proto"; option go_package = "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/protocol/core/kv;pbkv"; @@ -13,6 +14,7 @@ message Kv { KvSpec spec = 3; KvAttachment attachment = 4; pbbase.Revision revision = 5; + pbcontent.ContentSpec content_spec = 6; } // KvSpec source resource reference: pkg/dal/table/kvs.go diff --git a/bcs-services/bcs-bscp/pkg/protocol/core/released-kv/convert.go b/bcs-services/bcs-bscp/pkg/protocol/core/released-kv/convert.go index 5aaeb0a0e7..7992c4a687 100644 --- a/bcs-services/bcs-bscp/pkg/protocol/core/released-kv/convert.go +++ b/bcs-services/bcs-bscp/pkg/protocol/core/released-kv/convert.go @@ -19,6 +19,7 @@ import ( "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/dal/table" pbbase "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/protocol/core/base" + pbcontent "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/protocol/core/content" pbkv "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/protocol/core/kv" ) @@ -29,11 +30,12 @@ func PbRKv(k *table.ReleasedKv, value string) *ReleasedKv { } return &ReleasedKv{ - Id: k.ID, - ReleaseId: k.ReleaseID, - Spec: pbkv.PbKvSpec(k.Spec, value), - Attachment: pbkv.PbKvAttachment(k.Attachment), - Revision: pbbase.PbRevision(k.Revision), + Id: k.ID, + ReleaseId: k.ReleaseID, + Spec: pbkv.PbKvSpec(k.Spec, value), + Attachment: pbkv.PbKvAttachment(k.Attachment), + Revision: pbbase.PbRevision(k.Revision), + ContentSpec: pbcontent.PbContentSpec(k.ContentSpec), } } @@ -59,6 +61,10 @@ func RKvs(kvs []*pbkv.Kv, versionMap map[string]int, releaseID uint32) ([]*table CreatedAt: createdAt, UpdatedAt: createdAt, }, + ContentSpec: &table.ContentSpec{ + Signature: kv.ContentSpec.Signature, + ByteSize: kv.ContentSpec.ByteSize, + }, } rkv.Spec.Version = uint32(versionMap[kv.Spec.Key]) rkvs = append(rkvs, rkv) diff --git a/bcs-services/bcs-bscp/pkg/protocol/core/released-kv/released_kv.pb.go b/bcs-services/bcs-bscp/pkg/protocol/core/released-kv/released_kv.pb.go index a814fdd037..0f8ad6e274 100644 --- a/bcs-services/bcs-bscp/pkg/protocol/core/released-kv/released_kv.pb.go +++ b/bcs-services/bcs-bscp/pkg/protocol/core/released-kv/released_kv.pb.go @@ -8,6 +8,7 @@ package pbrkv import ( base "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/protocol/core/base" + content "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/protocol/core/content" kv "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/protocol/core/kv" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -28,11 +29,12 @@ type ReleasedKv struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - ReleaseId uint32 `protobuf:"varint,2,opt,name=release_id,json=releaseId,proto3" json:"release_id,omitempty"` - Spec *kv.KvSpec `protobuf:"bytes,3,opt,name=spec,proto3" json:"spec,omitempty"` - Attachment *kv.KvAttachment `protobuf:"bytes,4,opt,name=attachment,proto3" json:"attachment,omitempty"` - Revision *base.Revision `protobuf:"bytes,5,opt,name=revision,proto3" json:"revision,omitempty"` + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + ReleaseId uint32 `protobuf:"varint,2,opt,name=release_id,json=releaseId,proto3" json:"release_id,omitempty"` + Spec *kv.KvSpec `protobuf:"bytes,3,opt,name=spec,proto3" json:"spec,omitempty"` + Attachment *kv.KvAttachment `protobuf:"bytes,4,opt,name=attachment,proto3" json:"attachment,omitempty"` + Revision *base.Revision `protobuf:"bytes,5,opt,name=revision,proto3" json:"revision,omitempty"` + ContentSpec *content.ContentSpec `protobuf:"bytes,6,opt,name=content_spec,json=contentSpec,proto3" json:"content_spec,omitempty"` } func (x *ReleasedKv) Reset() { @@ -102,6 +104,13 @@ func (x *ReleasedKv) GetRevision() *base.Revision { return nil } +func (x *ReleasedKv) GetContentSpec() *content.ContentSpec { + if x != nil { + return x.ContentSpec + } + return nil +} + var File_released_kv_proto protoreflect.FileDescriptor var file_released_kv_proto_rawDesc = []byte{ @@ -110,26 +119,32 @@ var file_released_kv_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x6b, 0x76, 0x2f, 0x6b, 0x76, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbf, 0x01, - 0x0a, 0x0a, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x64, 0x4b, 0x76, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, - 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x09, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x04, 0x73, - 0x70, 0x65, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x6b, 0x76, - 0x2e, 0x4b, 0x76, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x32, 0x0a, - 0x0a, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x6b, 0x76, 0x2e, 0x4b, 0x76, 0x41, 0x74, 0x74, 0x61, 0x63, - 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, - 0x74, 0x12, 0x2c, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x76, - 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x42, - 0x5d, 0x5a, 0x5b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x65, - 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x42, 0x6c, 0x75, 0x65, 0x4b, 0x69, 0x6e, 0x67, 0x2f, 0x62, 0x6b, - 0x2d, 0x62, 0x63, 0x73, 0x2f, 0x62, 0x63, 0x73, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x73, 0x2f, 0x62, 0x63, 0x73, 0x2d, 0x62, 0x73, 0x63, 0x70, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x72, 0x65, 0x6c, - 0x65, 0x61, 0x73, 0x65, 0x64, 0x2d, 0x6b, 0x76, 0x3b, 0x70, 0x62, 0x72, 0x6b, 0x76, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2f, 0x6b, 0x76, 0x2f, 0x6b, 0x76, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x70, + 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x65, + 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfa, 0x01, 0x0a, 0x0a, 0x52, 0x65, 0x6c, 0x65, 0x61, + 0x73, 0x65, 0x64, 0x4b, 0x76, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x72, 0x65, 0x6c, 0x65, 0x61, + 0x73, 0x65, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x6b, 0x76, 0x2e, 0x4b, 0x76, 0x53, 0x70, 0x65, 0x63, + 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x32, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x6b, + 0x76, 0x2e, 0x4b, 0x76, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0a, + 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x08, 0x72, 0x65, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, + 0x62, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x08, + 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x70, 0x62, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x53, + 0x70, 0x65, 0x63, 0x42, 0x5d, 0x5a, 0x5b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x54, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x42, 0x6c, 0x75, 0x65, 0x4b, 0x69, 0x6e, + 0x67, 0x2f, 0x62, 0x6b, 0x2d, 0x62, 0x63, 0x73, 0x2f, 0x62, 0x63, 0x73, 0x2d, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x62, 0x63, 0x73, 0x2d, 0x62, 0x73, 0x63, 0x70, 0x2f, 0x70, + 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x65, + 0x2f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x64, 0x2d, 0x6b, 0x76, 0x3b, 0x70, 0x62, 0x72, + 0x6b, 0x76, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -146,20 +161,22 @@ func file_released_kv_proto_rawDescGZIP() []byte { var file_released_kv_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_released_kv_proto_goTypes = []interface{}{ - (*ReleasedKv)(nil), // 0: pbrkv.ReleasedKv - (*kv.KvSpec)(nil), // 1: pbkv.KvSpec - (*kv.KvAttachment)(nil), // 2: pbkv.KvAttachment - (*base.Revision)(nil), // 3: pbbase.Revision + (*ReleasedKv)(nil), // 0: pbrkv.ReleasedKv + (*kv.KvSpec)(nil), // 1: pbkv.KvSpec + (*kv.KvAttachment)(nil), // 2: pbkv.KvAttachment + (*base.Revision)(nil), // 3: pbbase.Revision + (*content.ContentSpec)(nil), // 4: pbcontent.ContentSpec } var file_released_kv_proto_depIdxs = []int32{ 1, // 0: pbrkv.ReleasedKv.spec:type_name -> pbkv.KvSpec 2, // 1: pbrkv.ReleasedKv.attachment:type_name -> pbkv.KvAttachment 3, // 2: pbrkv.ReleasedKv.revision:type_name -> pbbase.Revision - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 4, // 3: pbrkv.ReleasedKv.content_spec:type_name -> pbcontent.ContentSpec + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_released_kv_proto_init() } diff --git a/bcs-services/bcs-bscp/pkg/protocol/core/released-kv/released_kv.proto b/bcs-services/bcs-bscp/pkg/protocol/core/released-kv/released_kv.proto index 9d144876b2..f34a3c5b95 100644 --- a/bcs-services/bcs-bscp/pkg/protocol/core/released-kv/released_kv.proto +++ b/bcs-services/bcs-bscp/pkg/protocol/core/released-kv/released_kv.proto @@ -2,6 +2,7 @@ syntax = "proto3"; import "pkg/protocol/core/base/base.proto"; import "pkg/protocol/core/kv/kvs.proto"; +import "pkg/protocol/core/content/content.proto"; package pbrkv; @@ -14,4 +15,5 @@ message ReleasedKv { pbkv.KvSpec spec = 3; pbkv.KvAttachment attachment = 4; pbbase.Revision revision = 5; + pbcontent.ContentSpec content_spec = 6; } diff --git a/bcs-services/bcs-bscp/pkg/protocol/feed-server/feed_server.pb.go b/bcs-services/bcs-bscp/pkg/protocol/feed-server/feed_server.pb.go index db499e2677..cc5aa26af9 100644 --- a/bcs-services/bcs-bscp/pkg/protocol/feed-server/feed_server.pb.go +++ b/bcs-services/bcs-bscp/pkg/protocol/feed-server/feed_server.pb.go @@ -10,6 +10,7 @@ import ( base "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/protocol/core/base" commit "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/protocol/core/commit" config_item "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/protocol/core/config-item" + content "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/protocol/core/content" hook "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/protocol/core/hook" kv "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/protocol/core/kv" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -1275,10 +1276,11 @@ type KvMeta struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - KvType string `protobuf:"bytes,2,opt,name=kv_type,json=kvType,proto3" json:"kv_type,omitempty"` - Revision *base.Revision `protobuf:"bytes,3,opt,name=revision,proto3" json:"revision,omitempty"` - KvAttachment *kv.KvAttachment `protobuf:"bytes,4,opt,name=kv_attachment,json=kvAttachment,proto3" json:"kv_attachment,omitempty"` + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + KvType string `protobuf:"bytes,2,opt,name=kv_type,json=kvType,proto3" json:"kv_type,omitempty"` + Revision *base.Revision `protobuf:"bytes,3,opt,name=revision,proto3" json:"revision,omitempty"` + KvAttachment *kv.KvAttachment `protobuf:"bytes,4,opt,name=kv_attachment,json=kvAttachment,proto3" json:"kv_attachment,omitempty"` + ContentSpec *content.ContentSpec `protobuf:"bytes,5,opt,name=content_spec,json=contentSpec,proto3" json:"content_spec,omitempty"` } func (x *KvMeta) Reset() { @@ -1341,6 +1343,13 @@ func (x *KvMeta) GetKvAttachment() *kv.KvAttachment { return nil } +func (x *KvMeta) GetContentSpec() *content.ContentSpec { + if x != nil { + return x.ContentSpec + } + return nil +} + type GetKvValueReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1475,212 +1484,218 @@ var file_feed_server_proto_rawDesc = []byte{ 0x6f, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x68, 0x6f, 0x6f, 0x6b, 0x2f, 0x68, 0x6f, 0x6f, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x6b, 0x76, 0x2f, 0x6b, 0x76, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x52, 0x0a, 0x0b, 0x53, 0x69, 0x64, 0x65, 0x63, - 0x61, 0x72, 0x53, 0x70, 0x65, 0x63, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x69, 0x7a, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x62, 0x69, 0x7a, 0x49, 0x64, 0x12, 0x2c, 0x0a, - 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x70, 0x62, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, - 0x6e, 0x67, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x6e, 0x0a, 0x10, 0x48, - 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, - 0x33, 0x0a, 0x0b, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, 0x53, 0x69, 0x64, 0x65, 0x63, 0x61, - 0x72, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x5e, 0x0a, 0x0d, 0x48, - 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x33, 0x0a, 0x0b, - 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x84, 0x01, 0x0a, 0x0d, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x33, 0x0a, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x52, 0x0a, 0x0b, 0x53, 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, 0x53, 0x70, 0x65, 0x63, 0x12, + 0x15, 0x0a, 0x06, 0x62, 0x69, 0x7a, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x05, 0x62, 0x69, 0x7a, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x6e, 0x0a, 0x10, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, + 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x33, 0x0a, 0x0b, 0x61, 0x70, 0x69, 0x5f, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, + 0x70, 0x62, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, + 0x67, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, + 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, + 0x66, 0x73, 0x2e, 0x53, 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, + 0x73, 0x70, 0x65, 0x63, 0x22, 0x5e, 0x0a, 0x0d, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x33, 0x0a, 0x0b, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x0a, + 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x84, 0x01, 0x0a, 0x0d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x69, + 0x6e, 0x67, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x33, 0x0a, 0x0b, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x52, + 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x72, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x69, 0x64, 0x12, 0x12, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x0f, 0x0a, 0x0d, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x22, 0x5e, 0x0a, 0x0d, + 0x53, 0x69, 0x64, 0x65, 0x57, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x33, 0x0a, 0x0b, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x72, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x22, 0x0f, 0x0a, 0x0d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x52, - 0x65, 0x73, 0x70, 0x22, 0x5e, 0x0a, 0x0d, 0x53, 0x69, 0x64, 0x65, 0x57, 0x61, 0x74, 0x63, 0x68, - 0x4d, 0x65, 0x74, 0x61, 0x12, 0x33, 0x0a, 0x0b, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x61, - 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, - 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x22, 0x87, 0x01, 0x0a, 0x10, 0x46, 0x65, 0x65, 0x64, 0x57, 0x61, 0x74, 0x63, - 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x33, 0x0a, 0x0b, 0x61, 0x70, 0x69, 0x5f, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x70, 0x62, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, - 0x67, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, - 0x03, 0x72, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x69, 0x64, 0x12, - 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x9b, 0x01, - 0x0a, 0x07, 0x41, 0x70, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x70, 0x70, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x61, 0x70, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x31, 0x0a, - 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x70, 0x62, 0x66, 0x73, 0x2e, 0x41, 0x70, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x2e, 0x4c, 0x61, 0x62, - 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, - 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 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, 0x20, 0x0a, 0x0a, 0x52, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6f, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x22, 0x24, 0x0a, - 0x0e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x70, 0x65, 0x63, 0x12, - 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, - 0x61, 0x74, 0x68, 0x22, 0x83, 0x03, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x64, 0x12, 0x35, 0x0a, - 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x62, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x2e, 0x43, 0x6f, - 0x6d, 0x6d, 0x69, 0x74, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, - 0x53, 0x70, 0x65, 0x63, 0x12, 0x3e, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x69, - 0x74, 0x65, 0x6d, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x70, 0x62, 0x63, 0x69, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x74, 0x65, 0x6d, - 0x53, 0x70, 0x65, 0x63, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x74, 0x65, 0x6d, - 0x53, 0x70, 0x65, 0x63, 0x12, 0x50, 0x0a, 0x16, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x69, - 0x74, 0x65, 0x6d, 0x5f, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x62, 0x63, 0x69, 0x2e, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, - 0x52, 0x14, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x74, 0x74, 0x61, - 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3d, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x14, 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, - 0x79, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, - 0x79, 0x53, 0x70, 0x65, 0x63, 0x12, 0x42, 0x0a, 0x14, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, - 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x76, - 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x74, 0x65, - 0x6d, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xb2, 0x01, 0x0a, 0x12, 0x50, 0x75, - 0x6c, 0x6c, 0x41, 0x70, 0x70, 0x46, 0x69, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x65, 0x71, - 0x12, 0x33, 0x0a, 0x0b, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x69, 0x7a, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x62, 0x69, 0x7a, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x08, - 0x61, 0x70, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, - 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, 0x41, 0x70, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x07, 0x61, - 0x70, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0xf1, - 0x01, 0x0a, 0x13, 0x50, 0x75, 0x6c, 0x6c, 0x41, 0x70, 0x70, 0x46, 0x69, 0x6c, 0x65, 0x4d, 0x65, - 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, - 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x72, 0x65, 0x6c, 0x65, - 0x61, 0x73, 0x65, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x66, 0x73, - 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x0a, 0x72, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x2d, 0x0a, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x5f, - 0x6d, 0x65, 0x74, 0x61, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, - 0x66, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x09, 0x66, 0x69, 0x6c, - 0x65, 0x4d, 0x65, 0x74, 0x61, 0x73, 0x12, 0x2b, 0x0a, 0x08, 0x70, 0x72, 0x65, 0x5f, 0x68, 0x6f, - 0x6f, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x68, 0x6f, 0x6f, - 0x6b, 0x2e, 0x48, 0x6f, 0x6f, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x52, 0x07, 0x70, 0x72, 0x65, 0x48, - 0x6f, 0x6f, 0x6b, 0x12, 0x2d, 0x0a, 0x09, 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x68, 0x6f, 0x6f, 0x6b, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x2e, - 0x48, 0x6f, 0x6f, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x74, 0x48, 0x6f, - 0x6f, 0x6b, 0x22, 0xa2, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, - 0x61, 0x64, 0x55, 0x52, 0x4c, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x0b, 0x61, 0x70, 0x69, 0x5f, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x70, 0x62, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, - 0x67, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, - 0x06, 0x62, 0x69, 0x7a, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x62, - 0x69, 0x7a, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6d, 0x65, 0x74, - 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, 0x46, - 0x69, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4d, 0x65, 0x74, - 0x61, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x26, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x44, 0x6f, - 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x52, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, - 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, - 0x78, 0x0a, 0x03, 0x41, 0x70, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x72, - 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, - 0x70, 0x62, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, - 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x0a, 0x0b, 0x4c, 0x69, 0x73, - 0x74, 0x41, 0x70, 0x70, 0x73, 0x52, 0x65, 0x71, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x69, 0x7a, 0x5f, + 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x87, 0x01, 0x0a, + 0x10, 0x46, 0x65, 0x65, 0x64, 0x57, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x12, 0x33, 0x0a, 0x0b, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x9b, 0x01, 0x0a, 0x07, 0x41, 0x70, 0x70, 0x4d, 0x65, + 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x70, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x61, 0x70, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x31, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, 0x41, 0x70, + 0x70, 0x4d, 0x65, 0x74, 0x61, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 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, 0x20, 0x0a, 0x0a, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x22, 0x24, 0x0a, 0x0e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x53, 0x70, 0x65, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x83, 0x03, 0x0a, + 0x08, 0x46, 0x69, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x63, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x64, 0x12, 0x35, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x62, + 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x53, 0x70, 0x65, + 0x63, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x3e, 0x0a, + 0x10, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x73, 0x70, 0x65, + 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x62, 0x63, 0x69, 0x2e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x12, 0x50, 0x0a, + 0x16, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x61, 0x74, 0x74, + 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x70, 0x62, 0x63, 0x69, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x41, + 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x14, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x49, 0x74, 0x65, 0x6d, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x3d, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x73, 0x70, + 0x65, 0x63, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, + 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0e, + 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x70, 0x65, 0x63, 0x12, 0x42, + 0x0a, 0x14, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x72, 0x65, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, + 0x62, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x12, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x22, 0xb2, 0x01, 0x0a, 0x12, 0x50, 0x75, 0x6c, 0x6c, 0x41, 0x70, 0x70, 0x46, 0x69, + 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, 0x0b, 0x61, 0x70, 0x69, + 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x70, 0x62, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, + 0x6e, 0x67, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x15, + 0x0a, 0x06, 0x62, 0x69, 0x7a, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, + 0x62, 0x69, 0x7a, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x6d, 0x65, 0x74, + 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, 0x41, + 0x70, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x07, 0x61, 0x70, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x12, + 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0xf1, 0x01, 0x0a, 0x13, 0x50, 0x75, 0x6c, 0x6c, + 0x41, 0x70, 0x70, 0x46, 0x69, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x09, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x49, 0x64, 0x12, 0x30, + 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, + 0x12, 0x2d, 0x0a, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x65, + 0x4d, 0x65, 0x74, 0x61, 0x52, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x73, 0x12, + 0x2b, 0x0a, 0x08, 0x70, 0x72, 0x65, 0x5f, 0x68, 0x6f, 0x6f, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x2e, 0x48, 0x6f, 0x6f, 0x6b, 0x53, + 0x70, 0x65, 0x63, 0x52, 0x07, 0x70, 0x72, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x12, 0x2d, 0x0a, 0x09, + 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x68, 0x6f, 0x6f, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x10, 0x2e, 0x70, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x2e, 0x48, 0x6f, 0x6f, 0x6b, 0x53, 0x70, 0x65, + 0x63, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x74, 0x48, 0x6f, 0x6f, 0x6b, 0x22, 0xa2, 0x01, 0x0a, 0x11, + 0x47, 0x65, 0x74, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x52, 0x4c, 0x52, 0x65, + 0x71, 0x12, 0x33, 0x0a, 0x0b, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x69, 0x7a, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x62, 0x69, 0x7a, 0x49, 0x64, 0x12, 0x2b, 0x0a, + 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, + 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x22, 0x26, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x55, + 0x52, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x78, 0x0a, 0x03, 0x41, 0x70, 0x70, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x22, 0x3a, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x70, 0x70, 0x73, 0x52, 0x65, + 0x71, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x69, 0x7a, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x05, 0x62, 0x69, 0x7a, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0x2d, + 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x70, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, + 0x0a, 0x04, 0x61, 0x70, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x70, + 0x62, 0x66, 0x73, 0x2e, 0x41, 0x70, 0x70, 0x52, 0x04, 0x61, 0x70, 0x70, 0x73, 0x22, 0x66, 0x0a, + 0x0d, 0x50, 0x75, 0x6c, 0x6c, 0x4b, 0x76, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x65, 0x71, 0x12, 0x15, + 0x0a, 0x06, 0x62, 0x69, 0x7a, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, + 0x62, 0x69, 0x7a, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x6d, 0x65, 0x74, + 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, 0x41, + 0x70, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x07, 0x61, 0x70, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x12, + 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0x58, 0x0a, 0x0e, 0x50, 0x75, 0x6c, 0x6c, 0x4b, 0x76, 0x4d, + 0x65, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x6c, 0x65, 0x61, + 0x73, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x72, 0x65, 0x6c, + 0x65, 0x61, 0x73, 0x65, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x08, 0x6b, 0x76, 0x5f, 0x6d, 0x65, 0x74, + 0x61, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, + 0x4b, 0x76, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x07, 0x6b, 0x76, 0x4d, 0x65, 0x74, 0x61, 0x73, 0x22, + 0xd5, 0x01, 0x0a, 0x06, 0x4b, 0x76, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x17, 0x0a, 0x07, + 0x6b, 0x76, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6b, + 0x76, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x0d, 0x6b, 0x76, 0x5f, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x6b, + 0x76, 0x2e, 0x4b, 0x76, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0c, + 0x6b, 0x76, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x0c, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x62, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x53, 0x70, 0x65, 0x63, 0x22, 0x62, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4b, 0x76, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x69, 0x7a, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x62, 0x69, 0x7a, 0x49, 0x64, 0x12, - 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0x2d, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x70, 0x70, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x61, 0x70, 0x70, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, 0x41, 0x70, 0x70, 0x52, 0x04, - 0x61, 0x70, 0x70, 0x73, 0x22, 0x66, 0x0a, 0x0d, 0x50, 0x75, 0x6c, 0x6c, 0x4b, 0x76, 0x4d, 0x65, - 0x74, 0x61, 0x52, 0x65, 0x71, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x69, 0x7a, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x62, 0x69, 0x7a, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x08, - 0x61, 0x70, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, - 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, 0x41, 0x70, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x07, 0x61, - 0x70, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0x58, 0x0a, 0x0e, - 0x50, 0x75, 0x6c, 0x6c, 0x4b, 0x76, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, - 0x0a, 0x0a, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x09, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x49, 0x64, 0x12, 0x27, 0x0a, - 0x08, 0x6b, 0x76, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x0c, 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, 0x4b, 0x76, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x07, 0x6b, - 0x76, 0x4d, 0x65, 0x74, 0x61, 0x73, 0x22, 0x9a, 0x01, 0x0a, 0x06, 0x4b, 0x76, 0x4d, 0x65, 0x74, - 0x61, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x6b, 0x76, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6b, 0x76, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2c, 0x0a, 0x08, - 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, - 0x2e, 0x70, 0x62, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x52, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x0d, 0x6b, 0x76, - 0x5f, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x6b, 0x76, 0x2e, 0x4b, 0x76, 0x41, 0x74, 0x74, 0x61, 0x63, - 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0c, 0x6b, 0x76, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, - 0x65, 0x6e, 0x74, 0x22, 0x62, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4b, 0x76, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x65, 0x71, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x69, 0x7a, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x62, 0x69, 0x7a, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x08, 0x61, - 0x70, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, - 0x70, 0x62, 0x66, 0x73, 0x2e, 0x41, 0x70, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x07, 0x61, 0x70, - 0x70, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x3f, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4b, 0x76, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x17, 0x0a, 0x07, 0x6b, 0x76, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6b, 0x76, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x32, 0xf5, 0x03, 0x0a, 0x08, 0x55, 0x70, 0x73, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x3a, 0x0a, 0x09, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, - 0x6b, 0x65, 0x12, 0x16, 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, - 0x61, 0x6b, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x66, - 0x73, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, - 0x00, 0x12, 0x37, 0x0a, 0x09, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x12, 0x13, - 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x4d, - 0x65, 0x74, 0x61, 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x05, 0x57, 0x61, - 0x74, 0x63, 0x68, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, 0x53, 0x69, 0x64, 0x65, 0x57, - 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x74, 0x61, 0x1a, 0x16, 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, - 0x46, 0x65, 0x65, 0x64, 0x57, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x22, 0x00, 0x30, 0x01, 0x12, 0x48, 0x0a, 0x0f, 0x50, 0x75, 0x6c, 0x6c, 0x41, 0x70, 0x70, 0x46, - 0x69, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, 0x50, - 0x75, 0x6c, 0x6c, 0x41, 0x70, 0x70, 0x46, 0x69, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x65, - 0x71, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, 0x50, 0x75, 0x6c, 0x6c, 0x41, 0x70, 0x70, - 0x46, 0x69, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x45, - 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x52, 0x4c, - 0x12, 0x17, 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x6f, 0x77, 0x6e, 0x6c, - 0x6f, 0x61, 0x64, 0x55, 0x52, 0x4c, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x66, 0x73, - 0x2e, 0x47, 0x65, 0x74, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x52, 0x4c, 0x52, - 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x0a, 0x50, 0x75, 0x6c, 0x6c, 0x4b, 0x76, 0x4d, - 0x65, 0x74, 0x61, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, 0x50, 0x75, 0x6c, 0x6c, 0x4b, - 0x76, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, - 0x50, 0x75, 0x6c, 0x6c, 0x4b, 0x76, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, - 0x12, 0x39, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x4b, 0x76, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x13, - 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x76, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x76, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x33, 0x0a, 0x08, 0x4c, - 0x69, 0x73, 0x74, 0x41, 0x70, 0x70, 0x73, 0x12, 0x11, 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x41, 0x70, 0x70, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x70, 0x62, 0x66, - 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x70, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, - 0x42, 0x57, 0x5a, 0x55, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, - 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x42, 0x6c, 0x75, 0x65, 0x4b, 0x69, 0x6e, 0x67, 0x2f, 0x62, - 0x6b, 0x2d, 0x62, 0x63, 0x73, 0x2f, 0x62, 0x63, 0x73, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x73, 0x2f, 0x62, 0x63, 0x73, 0x2d, 0x62, 0x73, 0x63, 0x70, 0x2f, 0x70, 0x6b, 0x67, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x2d, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x3b, 0x70, 0x62, 0x66, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x28, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, 0x41, 0x70, 0x70, 0x4d, 0x65, 0x74, 0x61, + 0x52, 0x07, 0x61, 0x70, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x3f, 0x0a, 0x0e, 0x47, + 0x65, 0x74, 0x4b, 0x76, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x17, 0x0a, + 0x07, 0x6b, 0x76, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x6b, 0x76, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x32, 0xf5, 0x03, 0x0a, + 0x08, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x3a, 0x0a, 0x09, 0x48, 0x61, 0x6e, + 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x12, 0x16, 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, 0x48, 0x61, + 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x13, + 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x09, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x69, + 0x6e, 0x67, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x74, 0x61, 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x38, + 0x0a, 0x05, 0x57, 0x61, 0x74, 0x63, 0x68, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, 0x53, + 0x69, 0x64, 0x65, 0x57, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x74, 0x61, 0x1a, 0x16, 0x2e, 0x70, + 0x62, 0x66, 0x73, 0x2e, 0x46, 0x65, 0x65, 0x64, 0x57, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x48, 0x0a, 0x0f, 0x50, 0x75, 0x6c, 0x6c, + 0x41, 0x70, 0x70, 0x46, 0x69, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x18, 0x2e, 0x70, 0x62, + 0x66, 0x73, 0x2e, 0x50, 0x75, 0x6c, 0x6c, 0x41, 0x70, 0x70, 0x46, 0x69, 0x6c, 0x65, 0x4d, 0x65, + 0x74, 0x61, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, 0x50, 0x75, 0x6c, + 0x6c, 0x41, 0x70, 0x70, 0x46, 0x69, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, + 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, + 0x64, 0x55, 0x52, 0x4c, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x44, + 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x52, 0x4c, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, + 0x70, 0x62, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, + 0x55, 0x52, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x0a, 0x50, 0x75, 0x6c, + 0x6c, 0x4b, 0x76, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, 0x50, + 0x75, 0x6c, 0x6c, 0x4b, 0x76, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, + 0x62, 0x66, 0x73, 0x2e, 0x50, 0x75, 0x6c, 0x6c, 0x4b, 0x76, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x65, + 0x73, 0x70, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x4b, 0x76, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x76, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, 0x47, + 0x65, 0x74, 0x4b, 0x76, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, + 0x33, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x70, 0x70, 0x73, 0x12, 0x11, 0x2e, 0x70, 0x62, + 0x66, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x70, 0x70, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x12, + 0x2e, 0x70, 0x62, 0x66, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x70, 0x70, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x22, 0x00, 0x42, 0x57, 0x5a, 0x55, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x54, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x42, 0x6c, 0x75, 0x65, 0x4b, 0x69, + 0x6e, 0x67, 0x2f, 0x62, 0x6b, 0x2d, 0x62, 0x63, 0x73, 0x2f, 0x62, 0x63, 0x73, 0x2d, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x62, 0x63, 0x73, 0x2d, 0x62, 0x73, 0x63, 0x70, 0x2f, + 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x66, 0x65, 0x65, + 0x64, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x3b, 0x70, 0x62, 0x66, 0x73, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1728,6 +1743,7 @@ var file_feed_server_proto_goTypes = []interface{}{ (*base.Revision)(nil), // 28: pbbase.Revision (*hook.HookSpec)(nil), // 29: pbhook.HookSpec (*kv.KvAttachment)(nil), // 30: pbkv.KvAttachment + (*content.ContentSpec)(nil), // 31: pbcontent.ContentSpec } var file_feed_server_proto_depIdxs = []int32{ 24, // 0: pbfs.SidecarSpec.version:type_name -> pbbase.Versioning @@ -1757,28 +1773,29 @@ var file_feed_server_proto_depIdxs = []int32{ 20, // 24: pbfs.PullKvMetaResp.kv_metas:type_name -> pbfs.KvMeta 28, // 25: pbfs.KvMeta.revision:type_name -> pbbase.Revision 30, // 26: pbfs.KvMeta.kv_attachment:type_name -> pbkv.KvAttachment - 7, // 27: pbfs.GetKvValueReq.app_meta:type_name -> pbfs.AppMeta - 1, // 28: pbfs.Upstream.Handshake:input_type -> pbfs.HandshakeMessage - 3, // 29: pbfs.Upstream.Messaging:input_type -> pbfs.MessagingMeta - 5, // 30: pbfs.Upstream.Watch:input_type -> pbfs.SideWatchMeta - 11, // 31: pbfs.Upstream.PullAppFileMeta:input_type -> pbfs.PullAppFileMetaReq - 13, // 32: pbfs.Upstream.GetDownloadURL:input_type -> pbfs.GetDownloadURLReq - 18, // 33: pbfs.Upstream.PullKvMeta:input_type -> pbfs.PullKvMetaReq - 21, // 34: pbfs.Upstream.GetKvValue:input_type -> pbfs.GetKvValueReq - 16, // 35: pbfs.Upstream.ListApps:input_type -> pbfs.ListAppsReq - 2, // 36: pbfs.Upstream.Handshake:output_type -> pbfs.HandshakeResp - 4, // 37: pbfs.Upstream.Messaging:output_type -> pbfs.MessagingResp - 6, // 38: pbfs.Upstream.Watch:output_type -> pbfs.FeedWatchMessage - 12, // 39: pbfs.Upstream.PullAppFileMeta:output_type -> pbfs.PullAppFileMetaResp - 14, // 40: pbfs.Upstream.GetDownloadURL:output_type -> pbfs.GetDownloadURLResp - 19, // 41: pbfs.Upstream.PullKvMeta:output_type -> pbfs.PullKvMetaResp - 22, // 42: pbfs.Upstream.GetKvValue:output_type -> pbfs.GetKvValueResp - 17, // 43: pbfs.Upstream.ListApps:output_type -> pbfs.ListAppsResp - 36, // [36:44] is the sub-list for method output_type - 28, // [28:36] is the sub-list for method input_type - 28, // [28:28] is the sub-list for extension type_name - 28, // [28:28] is the sub-list for extension extendee - 0, // [0:28] is the sub-list for field type_name + 31, // 27: pbfs.KvMeta.content_spec:type_name -> pbcontent.ContentSpec + 7, // 28: pbfs.GetKvValueReq.app_meta:type_name -> pbfs.AppMeta + 1, // 29: pbfs.Upstream.Handshake:input_type -> pbfs.HandshakeMessage + 3, // 30: pbfs.Upstream.Messaging:input_type -> pbfs.MessagingMeta + 5, // 31: pbfs.Upstream.Watch:input_type -> pbfs.SideWatchMeta + 11, // 32: pbfs.Upstream.PullAppFileMeta:input_type -> pbfs.PullAppFileMetaReq + 13, // 33: pbfs.Upstream.GetDownloadURL:input_type -> pbfs.GetDownloadURLReq + 18, // 34: pbfs.Upstream.PullKvMeta:input_type -> pbfs.PullKvMetaReq + 21, // 35: pbfs.Upstream.GetKvValue:input_type -> pbfs.GetKvValueReq + 16, // 36: pbfs.Upstream.ListApps:input_type -> pbfs.ListAppsReq + 2, // 37: pbfs.Upstream.Handshake:output_type -> pbfs.HandshakeResp + 4, // 38: pbfs.Upstream.Messaging:output_type -> pbfs.MessagingResp + 6, // 39: pbfs.Upstream.Watch:output_type -> pbfs.FeedWatchMessage + 12, // 40: pbfs.Upstream.PullAppFileMeta:output_type -> pbfs.PullAppFileMetaResp + 14, // 41: pbfs.Upstream.GetDownloadURL:output_type -> pbfs.GetDownloadURLResp + 19, // 42: pbfs.Upstream.PullKvMeta:output_type -> pbfs.PullKvMetaResp + 22, // 43: pbfs.Upstream.GetKvValue:output_type -> pbfs.GetKvValueResp + 17, // 44: pbfs.Upstream.ListApps:output_type -> pbfs.ListAppsResp + 37, // [37:45] is the sub-list for method output_type + 29, // [29:37] is the sub-list for method input_type + 29, // [29:29] is the sub-list for extension type_name + 29, // [29:29] is the sub-list for extension extendee + 0, // [0:29] is the sub-list for field type_name } func init() { file_feed_server_proto_init() } diff --git a/bcs-services/bcs-bscp/pkg/protocol/feed-server/feed_server.proto b/bcs-services/bcs-bscp/pkg/protocol/feed-server/feed_server.proto index 8ae30abd30..aa75c2c4d9 100644 --- a/bcs-services/bcs-bscp/pkg/protocol/feed-server/feed_server.proto +++ b/bcs-services/bcs-bscp/pkg/protocol/feed-server/feed_server.proto @@ -7,6 +7,7 @@ import "pkg/protocol/core/commit/commit.proto"; import "pkg/protocol/core/config-item/config_item.proto"; import "pkg/protocol/core/hook/hook.proto"; import "pkg/protocol/core/kv/kvs.proto"; +import "pkg/protocol/core/content/content.proto"; option go_package = "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/protocol/feed-server;pbfs"; @@ -167,6 +168,7 @@ message KvMeta { string kv_type = 2; pbbase.Revision revision = 3; pbkv.KvAttachment kv_attachment = 4; + pbcontent.ContentSpec content_spec = 5; } message GetKvValueReq { diff --git a/bcs-services/bcs-bscp/pkg/sf-share/types.go b/bcs-services/bcs-bscp/pkg/sf-share/types.go index 7d4f1136d1..4da4b45201 100644 --- a/bcs-services/bcs-bscp/pkg/sf-share/types.go +++ b/bcs-services/bcs-bscp/pkg/sf-share/types.go @@ -478,9 +478,10 @@ func (h *HeartbeatPayload) Encode() ([]byte, error) { // KvMetaV1 defines the released kv metadata. type KvMetaV1 struct { // ID is released configuration item identity id. - ID uint32 `json:"id"` - Key string `json:"key"` - KvType string `json:"kv_type"` - Revision *pbbase.Revision `json:"revision"` - KvAttachment *pbkv.KvAttachment `json:"kv_attachment"` + ID uint32 `json:"id"` + Key string `json:"key"` + KvType string `json:"kv_type"` + Revision *pbbase.Revision `json:"revision"` + KvAttachment *pbkv.KvAttachment `json:"kv_attachment"` + ContentSpec *pbcontent.ContentSpec `json:"content_spec"` } diff --git a/bcs-services/bcs-bscp/pkg/types/cache.go b/bcs-services/bcs-bscp/pkg/types/cache.go index 280047499a..4c5fe22bcf 100644 --- a/bcs-services/bcs-bscp/pkg/types/cache.go +++ b/bcs-services/bcs-bscp/pkg/types/cache.go @@ -18,6 +18,8 @@ import ( "strings" "time" + "github.com/samber/lo" + "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/dal/table" "github.com/TencentBlueKing/bk-bcs/bcs-services/bcs-bscp/pkg/runtime/selector" ) @@ -69,12 +71,13 @@ type ReleaseCICache struct { // ReleaseKvCache is the release kv info which will be stored in cache. type ReleaseKvCache struct { - ID uint32 `json:"id"` - ReleaseID uint32 `json:"reid"` - Key string `json:"key"` - KvType string `json:"kv_type"` - Revision *table.Revision `json:"revision"` - Attachment *table.KvAttachment `json:"am"` + ID uint32 `json:"id"` + ReleaseID uint32 `json:"reid"` + Key string `json:"key"` + KvType string `json:"kv_type"` + Revision *table.Revision `json:"revision"` + Attachment *table.KvAttachment `json:"am"` + ContentSpec *table.ContentSpec `json:"content_spec"` } // ReleasedHooksCache is the released hooks info which will be stored in cache. @@ -221,21 +224,18 @@ func ReleaseCICaches(rs []*table.ReleasedConfigItem) []*ReleaseCICache { // ReleaseKvCaches convert ReleasedConfigItem to ReleaseKvCache. func ReleaseKvCaches(rs []*table.ReleasedKv) []*ReleaseKvCache { - list := make([]*ReleaseKvCache, len(rs)) - - for index, one := range rs { - list[index] = &ReleaseKvCache{ - ID: one.ID, - ReleaseID: one.ReleaseID, - Key: one.Spec.Key, - KvType: string(one.Spec.KvType), - Revision: one.Revision, - Attachment: &table.KvAttachment{ - BizID: one.Attachment.BizID, - AppID: one.Attachment.AppID, - }, + // 泛型转换处理 + list := lo.Map(rs, func(one *table.ReleasedKv, idnex int) *ReleaseKvCache { + return &ReleaseKvCache{ + ID: one.ID, + ReleaseID: one.ReleaseID, + Key: one.Spec.Key, + KvType: string(one.Spec.KvType), + Revision: one.Revision, + Attachment: one.Attachment, + ContentSpec: one.ContentSpec, } - } + }) return list }