diff --git a/internal/cmd/commands/server/server.go b/internal/cmd/commands/server/server.go index b62dac74c..a57c3b813 100644 --- a/internal/cmd/commands/server/server.go +++ b/internal/cmd/commands/server/server.go @@ -499,14 +499,12 @@ func (c *Command) Run(args []string) int { } } - // append storage-enabled plugins - c.EnabledPlugins = append(c.EnabledPlugins, base.EnabledPluginAws) + c.EnabledPlugins = append(c.EnabledPlugins, base.EnabledPluginAws, base.EnabledPluginHostAzure) if base.MinioEnabled { c.EnabledPlugins = append(c.EnabledPlugins, base.EnabledPluginMinio) } + if c.Config.Controller != nil { - // append host-only plugins - c.EnabledPlugins = append(c.EnabledPlugins, base.EnabledPluginHostAzure) if err := c.StartController(c.Context); err != nil { c.UI.Error(err.Error()) return base.CommandCliError diff --git a/internal/daemon/worker/worker.go b/internal/daemon/worker/worker.go index a403188ae..762f7fbd3 100644 --- a/internal/daemon/worker/worker.go +++ b/internal/daemon/worker/worker.go @@ -30,6 +30,7 @@ import ( "github.com/hashicorp/boundary/internal/event" pb "github.com/hashicorp/boundary/internal/gen/controller/servers" pbs "github.com/hashicorp/boundary/internal/gen/controller/servers/services" + wpbs "github.com/hashicorp/boundary/internal/gen/worker/servers/services" "github.com/hashicorp/boundary/internal/server" "github.com/hashicorp/boundary/internal/storage" boundary_plugin_assets "github.com/hashicorp/boundary/plugins/boundary" @@ -115,6 +116,12 @@ var initializeReverseGrpcClientCollectors = noopInitializePromCollectors func noopInitializePromCollectors(r prometheus.Registerer) {} +var hostServiceServerFactory func( + ctx context.Context, + plgClients map[string]plgpb.HostPluginServiceClient, + enableLoopback bool, +) (wpbs.HostServiceServer, error) + const ( authenticationStatusNeverAuthenticated uint32 = iota authenticationStatusFirstAuthentication @@ -203,6 +210,8 @@ type Worker struct { statusLock sync.Mutex downstreamConnManager *cluster.DownstreamManager + + HostServiceServer wpbs.HostServiceServer } func New(ctx context.Context, conf *Config) (*Worker, error) { @@ -252,11 +261,47 @@ func New(ctx context.Context, conf *Config) (*Worker, error) { w.localStorageState.Store(server.NotConfiguredLocalStorageState) } - if w.conf.RawConfig.Worker.RecordingStoragePath != "" && recordingStorageFactory != nil { - pluginLogger, err := event.NewHclogLogger(ctx, w.conf.Server.Eventer) - if err != nil { - return nil, fmt.Errorf("error creating storage catalog plugin logger: %w", err) + pluginLogger, err := event.NewHclogLogger(ctx, w.conf.Server.Eventer) + if err != nil { + return nil, fmt.Errorf("error creating plugin logger: %w", err) + } + + w.HostServiceServer = wpbs.UnimplementedHostServiceServer{} + if hostServiceServerFactory != nil { + enableLoopback := false + + hostPlgClients := make(map[string]plgpb.HostPluginServiceClient) + for _, enabledPlugin := range w.conf.Server.EnabledPlugins { + switch { + case enabledPlugin == base.EnabledPluginHostAzure && !w.conf.SkipPlugins, + enabledPlugin == base.EnabledPluginAws && !w.conf.SkipPlugins: + pluginType := strings.ToLower(enabledPlugin.String()) + client, cleanup, err := external_plugins.CreateHostPlugin( + ctx, + pluginType, + external_plugins.WithPluginOptions( + pluginutil.WithPluginExecutionDirectory(conf.RawConfig.Plugins.ExecutionDir), + pluginutil.WithPluginsFilesystem(boundary_plugin_assets.PluginPrefix, boundary_plugin_assets.FileSystem()), + ), + external_plugins.WithLogger(pluginLogger.Named(pluginType)), + ) + if err != nil { + return nil, fmt.Errorf("error creating %s host plugin: %w", pluginType, err) + } + conf.ShutdownFuncs = append(conf.ShutdownFuncs, cleanup) + hostPlgClients[pluginType] = client + case enabledPlugin == base.EnabledPluginLoopback: + enableLoopback = true + } } + hs, err := hostServiceServerFactory(ctx, hostPlgClients, enableLoopback) + if err != nil { + return nil, fmt.Errorf("failed to create host service server: %w", err) + } + w.HostServiceServer = hs + } + + if w.conf.RawConfig.Worker.RecordingStoragePath != "" && recordingStorageFactory != nil { plgClients := make(map[string]plgpb.StoragePluginServiceClient) var enableStorageLoopback bool diff --git a/internal/daemon/worker/worker_test.go b/internal/daemon/worker/worker_test.go index 82b20dff8..387d91aa6 100644 --- a/internal/daemon/worker/worker_test.go +++ b/internal/daemon/worker/worker_test.go @@ -19,6 +19,7 @@ import ( "github.com/hashicorp/boundary/internal/db" "github.com/hashicorp/boundary/internal/event" "github.com/hashicorp/boundary/internal/gen/controller/servers/services" + wpbs "github.com/hashicorp/boundary/internal/gen/worker/servers/services" "github.com/hashicorp/boundary/internal/server" "github.com/hashicorp/boundary/internal/util" "github.com/hashicorp/go-hclog" @@ -170,6 +171,24 @@ func TestWorkerNew(t *testing.T) { assert.Equal(t, w.localStorageState.Load().(server.LocalStorageState).String(), server.UnknownLocalStorageState.String()) }, }, + { + name: "worker host service server is the unimplemented one by default", + in: &Config{ + Server: &base.Server{ + Listeners: []*base.ServerListener{ + {Config: &listenerutil.ListenerConfig{Purpose: []string{"proxy"}}}, + }, + }, + RawConfig: &config.Config{ + Worker: &config.Worker{}, + SharedConfig: &configutil.SharedConfig{DisableMlock: true}, + }, + }, + expErr: false, + assertions: func(t *testing.T, w *Worker) { + assert.Equal(t, wpbs.UnimplementedHostServiceServer{}, w.HostServiceServer) + }, + }, } for _, tt := range tests { @@ -185,6 +204,10 @@ func TestWorkerNew(t *testing.T) { tt.in.Eventer = event.SysEventer() } + currentHostServiceFactory := hostServiceServerFactory + hostServiceServerFactory = nil + t.Cleanup(func() { hostServiceServerFactory = currentHostServiceFactory }) + w, err := New(context.Background(), tt.in) if tt.expErr { require.EqualError(t, err, tt.expErrMsg) diff --git a/internal/gen/worker/servers/services/host_service.pb.go b/internal/gen/worker/servers/services/host_service.pb.go new file mode 100644 index 000000000..d68a19c97 --- /dev/null +++ b/internal/gen/worker/servers/services/host_service.pb.go @@ -0,0 +1,1592 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc (unknown) +// source: worker/servers/services/v1/host_service.proto + +package services + +import ( + hostcatalogs "github.com/hashicorp/boundary/sdk/pbs/controller/api/resources/hostcatalogs" + hostsets "github.com/hashicorp/boundary/sdk/pbs/controller/api/resources/hostsets" + plugins "github.com/hashicorp/boundary/sdk/pbs/controller/api/resources/plugins" + plugin "github.com/hashicorp/boundary/sdk/pbs/plugin" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type NormalizeCatalogDataRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The incoming attributes in the create or update request. + Attributes *structpb.Struct `protobuf:"bytes,100,opt,name=attributes,proto3" json:"attributes,omitempty"` + // The plugin information for this request. + Plugin *plugins.PluginInfo `protobuf:"bytes,110,opt,name=plugin,proto3" json:"plugin,omitempty"` +} + +func (x *NormalizeCatalogDataRequest) Reset() { + *x = NormalizeCatalogDataRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_worker_servers_services_v1_host_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NormalizeCatalogDataRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NormalizeCatalogDataRequest) ProtoMessage() {} + +func (x *NormalizeCatalogDataRequest) ProtoReflect() protoreflect.Message { + mi := &file_worker_servers_services_v1_host_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NormalizeCatalogDataRequest.ProtoReflect.Descriptor instead. +func (*NormalizeCatalogDataRequest) Descriptor() ([]byte, []int) { + return file_worker_servers_services_v1_host_service_proto_rawDescGZIP(), []int{0} +} + +func (x *NormalizeCatalogDataRequest) GetAttributes() *structpb.Struct { + if x != nil { + return x.Attributes + } + return nil +} + +func (x *NormalizeCatalogDataRequest) GetPlugin() *plugins.PluginInfo { + if x != nil { + return x.Plugin + } + return nil +} + +type NormalizeCatalogDataResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Outgoing attributes. If nil, no changes will be recorded. If non-nil, the + // values here will be used in place of the original set of attributes. + Attributes *structpb.Struct `protobuf:"bytes,100,opt,name=attributes,proto3" json:"attributes,omitempty"` +} + +func (x *NormalizeCatalogDataResponse) Reset() { + *x = NormalizeCatalogDataResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_worker_servers_services_v1_host_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NormalizeCatalogDataResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NormalizeCatalogDataResponse) ProtoMessage() {} + +func (x *NormalizeCatalogDataResponse) ProtoReflect() protoreflect.Message { + mi := &file_worker_servers_services_v1_host_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NormalizeCatalogDataResponse.ProtoReflect.Descriptor instead. +func (*NormalizeCatalogDataResponse) Descriptor() ([]byte, []int) { + return file_worker_servers_services_v1_host_service_proto_rawDescGZIP(), []int{1} +} + +func (x *NormalizeCatalogDataResponse) GetAttributes() *structpb.Struct { + if x != nil { + return x.Attributes + } + return nil +} + +type OnCreateCatalogRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The host catalog to create. The request may contain optional + // secret data to help authenticate the request against a cloud + // API. + Catalog *hostcatalogs.HostCatalog `protobuf:"bytes,10,opt,name=catalog,proto3" json:"catalog,omitempty"` +} + +func (x *OnCreateCatalogRequest) Reset() { + *x = OnCreateCatalogRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_worker_servers_services_v1_host_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OnCreateCatalogRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OnCreateCatalogRequest) ProtoMessage() {} + +func (x *OnCreateCatalogRequest) ProtoReflect() protoreflect.Message { + mi := &file_worker_servers_services_v1_host_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OnCreateCatalogRequest.ProtoReflect.Descriptor instead. +func (*OnCreateCatalogRequest) Descriptor() ([]byte, []int) { + return file_worker_servers_services_v1_host_service_proto_rawDescGZIP(), []int{2} +} + +func (x *OnCreateCatalogRequest) GetCatalog() *hostcatalogs.HostCatalog { + if x != nil { + return x.Catalog + } + return nil +} + +type OnCreateCatalogResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Secret data to persist encrypted within Boundary. This should be used to + // store authentication data and other necessary configuration to be used in + // later hooks and calls. Returning an error from the call will cause this + // data to not be persisted. If this is nil, nothing is written. + Persisted *plugin.HostCatalogPersisted `protobuf:"bytes,10,opt,name=persisted,proto3" json:"persisted,omitempty"` +} + +func (x *OnCreateCatalogResponse) Reset() { + *x = OnCreateCatalogResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_worker_servers_services_v1_host_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OnCreateCatalogResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OnCreateCatalogResponse) ProtoMessage() {} + +func (x *OnCreateCatalogResponse) ProtoReflect() protoreflect.Message { + mi := &file_worker_servers_services_v1_host_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OnCreateCatalogResponse.ProtoReflect.Descriptor instead. +func (*OnCreateCatalogResponse) Descriptor() ([]byte, []int) { + return file_worker_servers_services_v1_host_service_proto_rawDescGZIP(), []int{3} +} + +func (x *OnCreateCatalogResponse) GetPersisted() *plugin.HostCatalogPersisted { + if x != nil { + return x.Persisted + } + return nil +} + +type OnUpdateCatalogRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The existing state of the catalog. + CurrentCatalog *hostcatalogs.HostCatalog `protobuf:"bytes,10,opt,name=current_catalog,json=currentCatalog,proto3" json:"current_catalog,omitempty"` + // The requested new state of the catalog. This field may contain optional + // secret data that may have been updated from old authentication data + // contained within the persisted state. + NewCatalog *hostcatalogs.HostCatalog `protobuf:"bytes,20,opt,name=new_catalog,json=newCatalog,proto3" json:"new_catalog,omitempty"` + // The existing persisted secret data. + Persisted *plugin.HostCatalogPersisted `protobuf:"bytes,30,opt,name=persisted,proto3" json:"persisted,omitempty"` +} + +func (x *OnUpdateCatalogRequest) Reset() { + *x = OnUpdateCatalogRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_worker_servers_services_v1_host_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OnUpdateCatalogRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OnUpdateCatalogRequest) ProtoMessage() {} + +func (x *OnUpdateCatalogRequest) ProtoReflect() protoreflect.Message { + mi := &file_worker_servers_services_v1_host_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OnUpdateCatalogRequest.ProtoReflect.Descriptor instead. +func (*OnUpdateCatalogRequest) Descriptor() ([]byte, []int) { + return file_worker_servers_services_v1_host_service_proto_rawDescGZIP(), []int{4} +} + +func (x *OnUpdateCatalogRequest) GetCurrentCatalog() *hostcatalogs.HostCatalog { + if x != nil { + return x.CurrentCatalog + } + return nil +} + +func (x *OnUpdateCatalogRequest) GetNewCatalog() *hostcatalogs.HostCatalog { + if x != nil { + return x.NewCatalog + } + return nil +} + +func (x *OnUpdateCatalogRequest) GetPersisted() *plugin.HostCatalogPersisted { + if x != nil { + return x.Persisted + } + return nil +} + +type OnUpdateCatalogResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The updated secret data to persist encrypted within Boundary. If an error + // is returned, the update of the persisted data is aborted. If this is nil, + // no changes are written. To remove all values, simply return an allocated + // but empty map. + Persisted *plugin.HostCatalogPersisted `protobuf:"bytes,10,opt,name=persisted,proto3" json:"persisted,omitempty"` +} + +func (x *OnUpdateCatalogResponse) Reset() { + *x = OnUpdateCatalogResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_worker_servers_services_v1_host_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OnUpdateCatalogResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OnUpdateCatalogResponse) ProtoMessage() {} + +func (x *OnUpdateCatalogResponse) ProtoReflect() protoreflect.Message { + mi := &file_worker_servers_services_v1_host_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OnUpdateCatalogResponse.ProtoReflect.Descriptor instead. +func (*OnUpdateCatalogResponse) Descriptor() ([]byte, []int) { + return file_worker_servers_services_v1_host_service_proto_rawDescGZIP(), []int{5} +} + +func (x *OnUpdateCatalogResponse) GetPersisted() *plugin.HostCatalogPersisted { + if x != nil { + return x.Persisted + } + return nil +} + +type OnDeleteCatalogRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The existing state of the catalog to delete. + Catalog *hostcatalogs.HostCatalog `protobuf:"bytes,10,opt,name=catalog,proto3" json:"catalog,omitempty"` + // The host sets contained in the catalog being deleted. + Sets []*hostsets.HostSet `protobuf:"bytes,20,rep,name=sets,proto3" json:"sets,omitempty"` + // The existing persisted secret data. + Persisted *plugin.HostCatalogPersisted `protobuf:"bytes,30,opt,name=persisted,proto3" json:"persisted,omitempty"` +} + +func (x *OnDeleteCatalogRequest) Reset() { + *x = OnDeleteCatalogRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_worker_servers_services_v1_host_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OnDeleteCatalogRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OnDeleteCatalogRequest) ProtoMessage() {} + +func (x *OnDeleteCatalogRequest) ProtoReflect() protoreflect.Message { + mi := &file_worker_servers_services_v1_host_service_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OnDeleteCatalogRequest.ProtoReflect.Descriptor instead. +func (*OnDeleteCatalogRequest) Descriptor() ([]byte, []int) { + return file_worker_servers_services_v1_host_service_proto_rawDescGZIP(), []int{6} +} + +func (x *OnDeleteCatalogRequest) GetCatalog() *hostcatalogs.HostCatalog { + if x != nil { + return x.Catalog + } + return nil +} + +func (x *OnDeleteCatalogRequest) GetSets() []*hostsets.HostSet { + if x != nil { + return x.Sets + } + return nil +} + +func (x *OnDeleteCatalogRequest) GetPersisted() *plugin.HostCatalogPersisted { + if x != nil { + return x.Persisted + } + return nil +} + +type OnDeleteCatalogResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *OnDeleteCatalogResponse) Reset() { + *x = OnDeleteCatalogResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_worker_servers_services_v1_host_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OnDeleteCatalogResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OnDeleteCatalogResponse) ProtoMessage() {} + +func (x *OnDeleteCatalogResponse) ProtoReflect() protoreflect.Message { + mi := &file_worker_servers_services_v1_host_service_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OnDeleteCatalogResponse.ProtoReflect.Descriptor instead. +func (*OnDeleteCatalogResponse) Descriptor() ([]byte, []int) { + return file_worker_servers_services_v1_host_service_proto_rawDescGZIP(), []int{7} +} + +type NormalizeSetDataRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The incoming attributes in the create or update request. + Attributes *structpb.Struct `protobuf:"bytes,100,opt,name=attributes,proto3" json:"attributes,omitempty"` + // The plugin information for this request. + Plugin *plugins.PluginInfo `protobuf:"bytes,110,opt,name=plugin,proto3" json:"plugin,omitempty"` +} + +func (x *NormalizeSetDataRequest) Reset() { + *x = NormalizeSetDataRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_worker_servers_services_v1_host_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NormalizeSetDataRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NormalizeSetDataRequest) ProtoMessage() {} + +func (x *NormalizeSetDataRequest) ProtoReflect() protoreflect.Message { + mi := &file_worker_servers_services_v1_host_service_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NormalizeSetDataRequest.ProtoReflect.Descriptor instead. +func (*NormalizeSetDataRequest) Descriptor() ([]byte, []int) { + return file_worker_servers_services_v1_host_service_proto_rawDescGZIP(), []int{8} +} + +func (x *NormalizeSetDataRequest) GetAttributes() *structpb.Struct { + if x != nil { + return x.Attributes + } + return nil +} + +func (x *NormalizeSetDataRequest) GetPlugin() *plugins.PluginInfo { + if x != nil { + return x.Plugin + } + return nil +} + +type NormalizeSetDataResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Outgoing attributes. If nil, no changes will be recorded. If non-nil, the + // values here will be used in place of the original set of attributes. + Attributes *structpb.Struct `protobuf:"bytes,100,opt,name=attributes,proto3" json:"attributes,omitempty"` +} + +func (x *NormalizeSetDataResponse) Reset() { + *x = NormalizeSetDataResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_worker_servers_services_v1_host_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NormalizeSetDataResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NormalizeSetDataResponse) ProtoMessage() {} + +func (x *NormalizeSetDataResponse) ProtoReflect() protoreflect.Message { + mi := &file_worker_servers_services_v1_host_service_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NormalizeSetDataResponse.ProtoReflect.Descriptor instead. +func (*NormalizeSetDataResponse) Descriptor() ([]byte, []int) { + return file_worker_servers_services_v1_host_service_proto_rawDescGZIP(), []int{9} +} + +func (x *NormalizeSetDataResponse) GetAttributes() *structpb.Struct { + if x != nil { + return x.Attributes + } + return nil +} + +type OnCreateSetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The host catalog that the set belongs to. + Catalog *hostcatalogs.HostCatalog `protobuf:"bytes,10,opt,name=catalog,proto3" json:"catalog,omitempty"` + // The host set to create. + Set *hostsets.HostSet `protobuf:"bytes,20,opt,name=set,proto3" json:"set,omitempty"` + // The persisted data for the host catalog that the set belongs to. + Persisted *plugin.HostCatalogPersisted `protobuf:"bytes,30,opt,name=persisted,proto3" json:"persisted,omitempty"` +} + +func (x *OnCreateSetRequest) Reset() { + *x = OnCreateSetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_worker_servers_services_v1_host_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OnCreateSetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OnCreateSetRequest) ProtoMessage() {} + +func (x *OnCreateSetRequest) ProtoReflect() protoreflect.Message { + mi := &file_worker_servers_services_v1_host_service_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OnCreateSetRequest.ProtoReflect.Descriptor instead. +func (*OnCreateSetRequest) Descriptor() ([]byte, []int) { + return file_worker_servers_services_v1_host_service_proto_rawDescGZIP(), []int{10} +} + +func (x *OnCreateSetRequest) GetCatalog() *hostcatalogs.HostCatalog { + if x != nil { + return x.Catalog + } + return nil +} + +func (x *OnCreateSetRequest) GetSet() *hostsets.HostSet { + if x != nil { + return x.Set + } + return nil +} + +func (x *OnCreateSetRequest) GetPersisted() *plugin.HostCatalogPersisted { + if x != nil { + return x.Persisted + } + return nil +} + +type OnCreateSetResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *OnCreateSetResponse) Reset() { + *x = OnCreateSetResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_worker_servers_services_v1_host_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OnCreateSetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OnCreateSetResponse) ProtoMessage() {} + +func (x *OnCreateSetResponse) ProtoReflect() protoreflect.Message { + mi := &file_worker_servers_services_v1_host_service_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OnCreateSetResponse.ProtoReflect.Descriptor instead. +func (*OnCreateSetResponse) Descriptor() ([]byte, []int) { + return file_worker_servers_services_v1_host_service_proto_rawDescGZIP(), []int{11} +} + +type OnUpdateSetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The host catalog that the set belongs to. + Catalog *hostcatalogs.HostCatalog `protobuf:"bytes,10,opt,name=catalog,proto3" json:"catalog,omitempty"` + // The existing state of the host set. + CurrentSet *hostsets.HostSet `protobuf:"bytes,20,opt,name=current_set,json=currentSet,proto3" json:"current_set,omitempty"` + // The requested new state of the host set. + NewSet *hostsets.HostSet `protobuf:"bytes,30,opt,name=new_set,json=newSet,proto3" json:"new_set,omitempty"` + // The persisted data for the host catalog that the set belongs to. + Persisted *plugin.HostCatalogPersisted `protobuf:"bytes,40,opt,name=persisted,proto3" json:"persisted,omitempty"` +} + +func (x *OnUpdateSetRequest) Reset() { + *x = OnUpdateSetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_worker_servers_services_v1_host_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OnUpdateSetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OnUpdateSetRequest) ProtoMessage() {} + +func (x *OnUpdateSetRequest) ProtoReflect() protoreflect.Message { + mi := &file_worker_servers_services_v1_host_service_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OnUpdateSetRequest.ProtoReflect.Descriptor instead. +func (*OnUpdateSetRequest) Descriptor() ([]byte, []int) { + return file_worker_servers_services_v1_host_service_proto_rawDescGZIP(), []int{12} +} + +func (x *OnUpdateSetRequest) GetCatalog() *hostcatalogs.HostCatalog { + if x != nil { + return x.Catalog + } + return nil +} + +func (x *OnUpdateSetRequest) GetCurrentSet() *hostsets.HostSet { + if x != nil { + return x.CurrentSet + } + return nil +} + +func (x *OnUpdateSetRequest) GetNewSet() *hostsets.HostSet { + if x != nil { + return x.NewSet + } + return nil +} + +func (x *OnUpdateSetRequest) GetPersisted() *plugin.HostCatalogPersisted { + if x != nil { + return x.Persisted + } + return nil +} + +type OnUpdateSetResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *OnUpdateSetResponse) Reset() { + *x = OnUpdateSetResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_worker_servers_services_v1_host_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OnUpdateSetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OnUpdateSetResponse) ProtoMessage() {} + +func (x *OnUpdateSetResponse) ProtoReflect() protoreflect.Message { + mi := &file_worker_servers_services_v1_host_service_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OnUpdateSetResponse.ProtoReflect.Descriptor instead. +func (*OnUpdateSetResponse) Descriptor() ([]byte, []int) { + return file_worker_servers_services_v1_host_service_proto_rawDescGZIP(), []int{13} +} + +type OnDeleteSetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The host catalog that the set belongs to. + Catalog *hostcatalogs.HostCatalog `protobuf:"bytes,10,opt,name=catalog,proto3" json:"catalog,omitempty"` + // The host set to delete. + Set *hostsets.HostSet `protobuf:"bytes,20,opt,name=set,proto3" json:"set,omitempty"` + // The persisted data for the host catalog that the set belongs to. + Persisted *plugin.HostCatalogPersisted `protobuf:"bytes,30,opt,name=persisted,proto3" json:"persisted,omitempty"` +} + +func (x *OnDeleteSetRequest) Reset() { + *x = OnDeleteSetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_worker_servers_services_v1_host_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OnDeleteSetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OnDeleteSetRequest) ProtoMessage() {} + +func (x *OnDeleteSetRequest) ProtoReflect() protoreflect.Message { + mi := &file_worker_servers_services_v1_host_service_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OnDeleteSetRequest.ProtoReflect.Descriptor instead. +func (*OnDeleteSetRequest) Descriptor() ([]byte, []int) { + return file_worker_servers_services_v1_host_service_proto_rawDescGZIP(), []int{14} +} + +func (x *OnDeleteSetRequest) GetCatalog() *hostcatalogs.HostCatalog { + if x != nil { + return x.Catalog + } + return nil +} + +func (x *OnDeleteSetRequest) GetSet() *hostsets.HostSet { + if x != nil { + return x.Set + } + return nil +} + +func (x *OnDeleteSetRequest) GetPersisted() *plugin.HostCatalogPersisted { + if x != nil { + return x.Persisted + } + return nil +} + +type OnDeleteSetResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *OnDeleteSetResponse) Reset() { + *x = OnDeleteSetResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_worker_servers_services_v1_host_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OnDeleteSetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OnDeleteSetResponse) ProtoMessage() {} + +func (x *OnDeleteSetResponse) ProtoReflect() protoreflect.Message { + mi := &file_worker_servers_services_v1_host_service_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OnDeleteSetResponse.ProtoReflect.Descriptor instead. +func (*OnDeleteSetResponse) Descriptor() ([]byte, []int) { + return file_worker_servers_services_v1_host_service_proto_rawDescGZIP(), []int{15} +} + +type ListHostsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The host catalog that the supplied host sets belong to. + Catalog *hostcatalogs.HostCatalog `protobuf:"bytes,10,opt,name=catalog,proto3" json:"catalog,omitempty"` + // The host sets to look up hosts for. + Sets []*hostsets.HostSet `protobuf:"bytes,20,rep,name=sets,proto3" json:"sets,omitempty"` + // The persisted data for the host catalog that the supplied host + // sets belong to. + Persisted *plugin.HostCatalogPersisted `protobuf:"bytes,30,opt,name=persisted,proto3" json:"persisted,omitempty"` +} + +func (x *ListHostsRequest) Reset() { + *x = ListHostsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_worker_servers_services_v1_host_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListHostsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListHostsRequest) ProtoMessage() {} + +func (x *ListHostsRequest) ProtoReflect() protoreflect.Message { + mi := &file_worker_servers_services_v1_host_service_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListHostsRequest.ProtoReflect.Descriptor instead. +func (*ListHostsRequest) Descriptor() ([]byte, []int) { + return file_worker_servers_services_v1_host_service_proto_rawDescGZIP(), []int{16} +} + +func (x *ListHostsRequest) GetCatalog() *hostcatalogs.HostCatalog { + if x != nil { + return x.Catalog + } + return nil +} + +func (x *ListHostsRequest) GetSets() []*hostsets.HostSet { + if x != nil { + return x.Sets + } + return nil +} + +func (x *ListHostsRequest) GetPersisted() *plugin.HostCatalogPersisted { + if x != nil { + return x.Persisted + } + return nil +} + +type ListHostsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The hosts to return. + Hosts []*plugin.ListHostsResponseHost `protobuf:"bytes,10,rep,name=hosts,proto3" json:"hosts,omitempty"` +} + +func (x *ListHostsResponse) Reset() { + *x = ListHostsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_worker_servers_services_v1_host_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListHostsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListHostsResponse) ProtoMessage() {} + +func (x *ListHostsResponse) ProtoReflect() protoreflect.Message { + mi := &file_worker_servers_services_v1_host_service_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListHostsResponse.ProtoReflect.Descriptor instead. +func (*ListHostsResponse) Descriptor() ([]byte, []int) { + return file_worker_servers_services_v1_host_service_proto_rawDescGZIP(), []int{17} +} + +func (x *ListHostsResponse) GetHosts() []*plugin.ListHostsResponseHost { + if x != nil { + return x.Hosts + } + return nil +} + +var File_worker_servers_services_v1_host_service_proto protoreflect.FileDescriptor + +var file_worker_servers_services_v1_host_service_proto_rawDesc = []byte{ + 0x0a, 0x2d, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, + 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x6f, 0x73, + 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x1a, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x3b, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x33, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x73, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x68, + 0x6f, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x30, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, + 0x76, 0x31, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x9f, 0x01, 0x0a, 0x1b, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, + 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x37, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, + 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x06, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x6e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x22, 0x57, 0x0a, 0x1c, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, + 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x73, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x22, 0x69, 0x0a, + 0x16, 0x4f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4f, 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x73, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, + 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x22, 0x58, 0x0a, 0x17, 0x4f, 0x6e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x09, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x50, 0x65, + 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x52, 0x09, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, + 0x65, 0x64, 0x22, 0x8f, 0x02, 0x0a, 0x16, 0x4f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, + 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x5e, 0x0a, + 0x0f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x0e, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x56, 0x0a, + 0x0b, 0x6e, 0x65, 0x77, 0x5f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x14, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x68, 0x6f, + 0x73, 0x74, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, + 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x0a, 0x6e, 0x65, 0x77, 0x43, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x3d, 0x0a, 0x09, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, + 0x65, 0x64, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x50, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x52, 0x09, 0x70, 0x65, 0x72, 0x73, 0x69, + 0x73, 0x74, 0x65, 0x64, 0x22, 0x58, 0x0a, 0x17, 0x4f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x3d, 0x0a, 0x09, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x48, + 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x50, 0x65, 0x72, 0x73, 0x69, 0x73, + 0x74, 0x65, 0x64, 0x52, 0x09, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x22, 0xeb, + 0x01, 0x0a, 0x16, 0x4f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4f, 0x0a, 0x07, 0x63, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x41, 0x0a, 0x04, 0x73, 0x65, + 0x74, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x73, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, 0x04, 0x73, 0x65, 0x74, 0x73, 0x12, 0x3d, 0x0a, + 0x09, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, + 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x50, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, + 0x64, 0x52, 0x09, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x22, 0x19, 0x0a, 0x17, + 0x4f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x17, 0x4e, 0x6f, 0x72, 0x6d, + 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x73, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, + 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x06, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x6e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x22, 0x53, 0x0a, 0x18, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, + 0x7a, 0x65, 0x53, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x37, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, + 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0a, + 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x22, 0xe5, 0x01, 0x0a, 0x12, 0x4f, + 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x4f, 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x68, 0x6f, + 0x73, 0x74, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, + 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x12, 0x3f, 0x0a, 0x03, 0x73, 0x65, 0x74, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x73, + 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, 0x03, + 0x73, 0x65, 0x74, 0x12, 0x3d, 0x0a, 0x09, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, + 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x50, 0x65, + 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x52, 0x09, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, + 0x65, 0x64, 0x22, 0x15, 0x0a, 0x13, 0x4f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xbc, 0x02, 0x0a, 0x12, 0x4f, 0x6e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x4f, 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x35, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x68, 0x6f, 0x73, + 0x74, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, + 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x12, 0x4e, 0x0a, 0x0b, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x74, + 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, + 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, 0x0a, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x65, + 0x74, 0x12, 0x46, 0x0a, 0x07, 0x6e, 0x65, 0x77, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x1e, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x68, 0x6f, + 0x73, 0x74, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, + 0x74, 0x52, 0x06, 0x6e, 0x65, 0x77, 0x53, 0x65, 0x74, 0x12, 0x3d, 0x0a, 0x09, 0x70, 0x65, 0x72, + 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x18, 0x28, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x50, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x52, 0x09, 0x70, + 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x22, 0x15, 0x0a, 0x13, 0x4f, 0x6e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0xe5, 0x01, 0x0a, 0x12, 0x4f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4f, 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x73, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x07, + 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x3f, 0x0a, 0x03, 0x73, 0x65, 0x74, 0x18, 0x14, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, + 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, + 0x68, 0x6f, 0x73, 0x74, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, + 0x53, 0x65, 0x74, 0x52, 0x03, 0x73, 0x65, 0x74, 0x12, 0x3d, 0x0a, 0x09, 0x70, 0x65, 0x72, 0x73, + 0x69, 0x73, 0x74, 0x65, 0x64, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, + 0x6c, 0x6f, 0x67, 0x50, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x52, 0x09, 0x70, 0x65, + 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x22, 0x15, 0x0a, 0x13, 0x4f, 0x6e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe5, + 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x4f, 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, + 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, + 0x68, 0x6f, 0x73, 0x74, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x07, 0x63, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x41, 0x0a, 0x04, 0x73, 0x65, 0x74, 0x73, 0x18, 0x14, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x68, 0x6f, + 0x73, 0x74, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, + 0x74, 0x52, 0x04, 0x73, 0x65, 0x74, 0x73, 0x12, 0x3d, 0x0a, 0x09, 0x70, 0x65, 0x72, 0x73, 0x69, + 0x73, 0x74, 0x65, 0x64, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x50, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x52, 0x09, 0x70, 0x65, 0x72, + 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x22, 0x4b, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x6f, + 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x68, + 0x6f, 0x73, 0x74, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x05, 0x68, 0x6f, + 0x73, 0x74, 0x73, 0x32, 0xc6, 0x08, 0x0a, 0x0b, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x89, 0x01, 0x0a, 0x14, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, + 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x44, 0x61, 0x74, 0x61, 0x12, 0x37, 0x2e, 0x77, + 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, + 0x69, 0x7a, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x43, 0x61, 0x74, 0x61, + 0x6c, 0x6f, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x7a, 0x0a, 0x0f, 0x4f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x12, 0x32, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x4f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x61, 0x74, 0x61, + 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7a, 0x0a, 0x0f, 0x4f, + 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x32, + 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x6e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x4f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7a, 0x0a, 0x0f, 0x4f, 0x6e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x32, 0x2e, 0x77, 0x6f, 0x72, + 0x6b, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, + 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x6e, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x7d, 0x0a, 0x10, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, + 0x53, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x33, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x53, 0x65, + 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x77, + 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, + 0x69, 0x7a, 0x65, 0x53, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x6e, 0x0a, 0x0b, 0x4f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, + 0x74, 0x12, 0x2e, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, + 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2f, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, + 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x6e, 0x0a, 0x0b, 0x4f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, + 0x74, 0x12, 0x2e, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, + 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2f, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, + 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x6e, 0x0a, 0x0b, 0x4f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, + 0x74, 0x12, 0x2e, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, + 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2f, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, + 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x68, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x12, + 0x2c, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, + 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x48, + 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x4d, 0x5a, 0x4b, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, + 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x2f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x65, + 0x72, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x73, 0x3b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_worker_servers_services_v1_host_service_proto_rawDescOnce sync.Once + file_worker_servers_services_v1_host_service_proto_rawDescData = file_worker_servers_services_v1_host_service_proto_rawDesc +) + +func file_worker_servers_services_v1_host_service_proto_rawDescGZIP() []byte { + file_worker_servers_services_v1_host_service_proto_rawDescOnce.Do(func() { + file_worker_servers_services_v1_host_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_worker_servers_services_v1_host_service_proto_rawDescData) + }) + return file_worker_servers_services_v1_host_service_proto_rawDescData +} + +var file_worker_servers_services_v1_host_service_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_worker_servers_services_v1_host_service_proto_goTypes = []any{ + (*NormalizeCatalogDataRequest)(nil), // 0: worker.servers.services.v1.NormalizeCatalogDataRequest + (*NormalizeCatalogDataResponse)(nil), // 1: worker.servers.services.v1.NormalizeCatalogDataResponse + (*OnCreateCatalogRequest)(nil), // 2: worker.servers.services.v1.OnCreateCatalogRequest + (*OnCreateCatalogResponse)(nil), // 3: worker.servers.services.v1.OnCreateCatalogResponse + (*OnUpdateCatalogRequest)(nil), // 4: worker.servers.services.v1.OnUpdateCatalogRequest + (*OnUpdateCatalogResponse)(nil), // 5: worker.servers.services.v1.OnUpdateCatalogResponse + (*OnDeleteCatalogRequest)(nil), // 6: worker.servers.services.v1.OnDeleteCatalogRequest + (*OnDeleteCatalogResponse)(nil), // 7: worker.servers.services.v1.OnDeleteCatalogResponse + (*NormalizeSetDataRequest)(nil), // 8: worker.servers.services.v1.NormalizeSetDataRequest + (*NormalizeSetDataResponse)(nil), // 9: worker.servers.services.v1.NormalizeSetDataResponse + (*OnCreateSetRequest)(nil), // 10: worker.servers.services.v1.OnCreateSetRequest + (*OnCreateSetResponse)(nil), // 11: worker.servers.services.v1.OnCreateSetResponse + (*OnUpdateSetRequest)(nil), // 12: worker.servers.services.v1.OnUpdateSetRequest + (*OnUpdateSetResponse)(nil), // 13: worker.servers.services.v1.OnUpdateSetResponse + (*OnDeleteSetRequest)(nil), // 14: worker.servers.services.v1.OnDeleteSetRequest + (*OnDeleteSetResponse)(nil), // 15: worker.servers.services.v1.OnDeleteSetResponse + (*ListHostsRequest)(nil), // 16: worker.servers.services.v1.ListHostsRequest + (*ListHostsResponse)(nil), // 17: worker.servers.services.v1.ListHostsResponse + (*structpb.Struct)(nil), // 18: google.protobuf.Struct + (*plugins.PluginInfo)(nil), // 19: controller.api.resources.plugins.v1.PluginInfo + (*hostcatalogs.HostCatalog)(nil), // 20: controller.api.resources.hostcatalogs.v1.HostCatalog + (*plugin.HostCatalogPersisted)(nil), // 21: plugin.v1.HostCatalogPersisted + (*hostsets.HostSet)(nil), // 22: controller.api.resources.hostsets.v1.HostSet + (*plugin.ListHostsResponseHost)(nil), // 23: plugin.v1.ListHostsResponseHost +} +var file_worker_servers_services_v1_host_service_proto_depIdxs = []int32{ + 18, // 0: worker.servers.services.v1.NormalizeCatalogDataRequest.attributes:type_name -> google.protobuf.Struct + 19, // 1: worker.servers.services.v1.NormalizeCatalogDataRequest.plugin:type_name -> controller.api.resources.plugins.v1.PluginInfo + 18, // 2: worker.servers.services.v1.NormalizeCatalogDataResponse.attributes:type_name -> google.protobuf.Struct + 20, // 3: worker.servers.services.v1.OnCreateCatalogRequest.catalog:type_name -> controller.api.resources.hostcatalogs.v1.HostCatalog + 21, // 4: worker.servers.services.v1.OnCreateCatalogResponse.persisted:type_name -> plugin.v1.HostCatalogPersisted + 20, // 5: worker.servers.services.v1.OnUpdateCatalogRequest.current_catalog:type_name -> controller.api.resources.hostcatalogs.v1.HostCatalog + 20, // 6: worker.servers.services.v1.OnUpdateCatalogRequest.new_catalog:type_name -> controller.api.resources.hostcatalogs.v1.HostCatalog + 21, // 7: worker.servers.services.v1.OnUpdateCatalogRequest.persisted:type_name -> plugin.v1.HostCatalogPersisted + 21, // 8: worker.servers.services.v1.OnUpdateCatalogResponse.persisted:type_name -> plugin.v1.HostCatalogPersisted + 20, // 9: worker.servers.services.v1.OnDeleteCatalogRequest.catalog:type_name -> controller.api.resources.hostcatalogs.v1.HostCatalog + 22, // 10: worker.servers.services.v1.OnDeleteCatalogRequest.sets:type_name -> controller.api.resources.hostsets.v1.HostSet + 21, // 11: worker.servers.services.v1.OnDeleteCatalogRequest.persisted:type_name -> plugin.v1.HostCatalogPersisted + 18, // 12: worker.servers.services.v1.NormalizeSetDataRequest.attributes:type_name -> google.protobuf.Struct + 19, // 13: worker.servers.services.v1.NormalizeSetDataRequest.plugin:type_name -> controller.api.resources.plugins.v1.PluginInfo + 18, // 14: worker.servers.services.v1.NormalizeSetDataResponse.attributes:type_name -> google.protobuf.Struct + 20, // 15: worker.servers.services.v1.OnCreateSetRequest.catalog:type_name -> controller.api.resources.hostcatalogs.v1.HostCatalog + 22, // 16: worker.servers.services.v1.OnCreateSetRequest.set:type_name -> controller.api.resources.hostsets.v1.HostSet + 21, // 17: worker.servers.services.v1.OnCreateSetRequest.persisted:type_name -> plugin.v1.HostCatalogPersisted + 20, // 18: worker.servers.services.v1.OnUpdateSetRequest.catalog:type_name -> controller.api.resources.hostcatalogs.v1.HostCatalog + 22, // 19: worker.servers.services.v1.OnUpdateSetRequest.current_set:type_name -> controller.api.resources.hostsets.v1.HostSet + 22, // 20: worker.servers.services.v1.OnUpdateSetRequest.new_set:type_name -> controller.api.resources.hostsets.v1.HostSet + 21, // 21: worker.servers.services.v1.OnUpdateSetRequest.persisted:type_name -> plugin.v1.HostCatalogPersisted + 20, // 22: worker.servers.services.v1.OnDeleteSetRequest.catalog:type_name -> controller.api.resources.hostcatalogs.v1.HostCatalog + 22, // 23: worker.servers.services.v1.OnDeleteSetRequest.set:type_name -> controller.api.resources.hostsets.v1.HostSet + 21, // 24: worker.servers.services.v1.OnDeleteSetRequest.persisted:type_name -> plugin.v1.HostCatalogPersisted + 20, // 25: worker.servers.services.v1.ListHostsRequest.catalog:type_name -> controller.api.resources.hostcatalogs.v1.HostCatalog + 22, // 26: worker.servers.services.v1.ListHostsRequest.sets:type_name -> controller.api.resources.hostsets.v1.HostSet + 21, // 27: worker.servers.services.v1.ListHostsRequest.persisted:type_name -> plugin.v1.HostCatalogPersisted + 23, // 28: worker.servers.services.v1.ListHostsResponse.hosts:type_name -> plugin.v1.ListHostsResponseHost + 0, // 29: worker.servers.services.v1.HostService.NormalizeCatalogData:input_type -> worker.servers.services.v1.NormalizeCatalogDataRequest + 2, // 30: worker.servers.services.v1.HostService.OnCreateCatalog:input_type -> worker.servers.services.v1.OnCreateCatalogRequest + 4, // 31: worker.servers.services.v1.HostService.OnUpdateCatalog:input_type -> worker.servers.services.v1.OnUpdateCatalogRequest + 6, // 32: worker.servers.services.v1.HostService.OnDeleteCatalog:input_type -> worker.servers.services.v1.OnDeleteCatalogRequest + 8, // 33: worker.servers.services.v1.HostService.NormalizeSetData:input_type -> worker.servers.services.v1.NormalizeSetDataRequest + 10, // 34: worker.servers.services.v1.HostService.OnCreateSet:input_type -> worker.servers.services.v1.OnCreateSetRequest + 12, // 35: worker.servers.services.v1.HostService.OnUpdateSet:input_type -> worker.servers.services.v1.OnUpdateSetRequest + 14, // 36: worker.servers.services.v1.HostService.OnDeleteSet:input_type -> worker.servers.services.v1.OnDeleteSetRequest + 16, // 37: worker.servers.services.v1.HostService.ListHosts:input_type -> worker.servers.services.v1.ListHostsRequest + 1, // 38: worker.servers.services.v1.HostService.NormalizeCatalogData:output_type -> worker.servers.services.v1.NormalizeCatalogDataResponse + 3, // 39: worker.servers.services.v1.HostService.OnCreateCatalog:output_type -> worker.servers.services.v1.OnCreateCatalogResponse + 5, // 40: worker.servers.services.v1.HostService.OnUpdateCatalog:output_type -> worker.servers.services.v1.OnUpdateCatalogResponse + 7, // 41: worker.servers.services.v1.HostService.OnDeleteCatalog:output_type -> worker.servers.services.v1.OnDeleteCatalogResponse + 9, // 42: worker.servers.services.v1.HostService.NormalizeSetData:output_type -> worker.servers.services.v1.NormalizeSetDataResponse + 11, // 43: worker.servers.services.v1.HostService.OnCreateSet:output_type -> worker.servers.services.v1.OnCreateSetResponse + 13, // 44: worker.servers.services.v1.HostService.OnUpdateSet:output_type -> worker.servers.services.v1.OnUpdateSetResponse + 15, // 45: worker.servers.services.v1.HostService.OnDeleteSet:output_type -> worker.servers.services.v1.OnDeleteSetResponse + 17, // 46: worker.servers.services.v1.HostService.ListHosts:output_type -> worker.servers.services.v1.ListHostsResponse + 38, // [38:47] is the sub-list for method output_type + 29, // [29:38] 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_worker_servers_services_v1_host_service_proto_init() } +func file_worker_servers_services_v1_host_service_proto_init() { + if File_worker_servers_services_v1_host_service_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_worker_servers_services_v1_host_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*NormalizeCatalogDataRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_worker_servers_services_v1_host_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*NormalizeCatalogDataResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_worker_servers_services_v1_host_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*OnCreateCatalogRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_worker_servers_services_v1_host_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*OnCreateCatalogResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_worker_servers_services_v1_host_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*OnUpdateCatalogRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_worker_servers_services_v1_host_service_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*OnUpdateCatalogResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_worker_servers_services_v1_host_service_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*OnDeleteCatalogRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_worker_servers_services_v1_host_service_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*OnDeleteCatalogResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_worker_servers_services_v1_host_service_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*NormalizeSetDataRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_worker_servers_services_v1_host_service_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*NormalizeSetDataResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_worker_servers_services_v1_host_service_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*OnCreateSetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_worker_servers_services_v1_host_service_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*OnCreateSetResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_worker_servers_services_v1_host_service_proto_msgTypes[12].Exporter = func(v any, i int) any { + switch v := v.(*OnUpdateSetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_worker_servers_services_v1_host_service_proto_msgTypes[13].Exporter = func(v any, i int) any { + switch v := v.(*OnUpdateSetResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_worker_servers_services_v1_host_service_proto_msgTypes[14].Exporter = func(v any, i int) any { + switch v := v.(*OnDeleteSetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_worker_servers_services_v1_host_service_proto_msgTypes[15].Exporter = func(v any, i int) any { + switch v := v.(*OnDeleteSetResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_worker_servers_services_v1_host_service_proto_msgTypes[16].Exporter = func(v any, i int) any { + switch v := v.(*ListHostsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_worker_servers_services_v1_host_service_proto_msgTypes[17].Exporter = func(v any, i int) any { + switch v := v.(*ListHostsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_worker_servers_services_v1_host_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 18, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_worker_servers_services_v1_host_service_proto_goTypes, + DependencyIndexes: file_worker_servers_services_v1_host_service_proto_depIdxs, + MessageInfos: file_worker_servers_services_v1_host_service_proto_msgTypes, + }.Build() + File_worker_servers_services_v1_host_service_proto = out.File + file_worker_servers_services_v1_host_service_proto_rawDesc = nil + file_worker_servers_services_v1_host_service_proto_goTypes = nil + file_worker_servers_services_v1_host_service_proto_depIdxs = nil +} diff --git a/internal/gen/worker/servers/services/host_service_grpc.pb.go b/internal/gen/worker/servers/services/host_service_grpc.pb.go new file mode 100644 index 000000000..a2bff7d2f --- /dev/null +++ b/internal/gen/worker/servers/services/host_service_grpc.pb.go @@ -0,0 +1,512 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: worker/servers/services/v1/host_service.proto + +package services + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + HostService_NormalizeCatalogData_FullMethodName = "/worker.servers.services.v1.HostService/NormalizeCatalogData" + HostService_OnCreateCatalog_FullMethodName = "/worker.servers.services.v1.HostService/OnCreateCatalog" + HostService_OnUpdateCatalog_FullMethodName = "/worker.servers.services.v1.HostService/OnUpdateCatalog" + HostService_OnDeleteCatalog_FullMethodName = "/worker.servers.services.v1.HostService/OnDeleteCatalog" + HostService_NormalizeSetData_FullMethodName = "/worker.servers.services.v1.HostService/NormalizeSetData" + HostService_OnCreateSet_FullMethodName = "/worker.servers.services.v1.HostService/OnCreateSet" + HostService_OnUpdateSet_FullMethodName = "/worker.servers.services.v1.HostService/OnUpdateSet" + HostService_OnDeleteSet_FullMethodName = "/worker.servers.services.v1.HostService/OnDeleteSet" + HostService_ListHosts_FullMethodName = "/worker.servers.services.v1.HostService/ListHosts" +) + +// HostServiceClient is the client API for HostService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type HostServiceClient interface { + // NormalizeCatalogData is a hook that passes attributes to the plugin and + // allows those values to be normalized prior to creating or updating those + // values in the host catalog data. + // + // NormalizeCatalogData is useful for converting the values of attributes from + // a certain format/type to an expected value format/type. This is useful + // during migration of values. + // + // NormalizeCatalogData is called before the values of attributes are persisted. + // All normalized values will be persisted in Boundary and returned + // to all clients. + // + // NormalizeCatalogData could affect other clients. For example, on Terraform, + // if data is passed to Boundary and then normalized into a new data + // structure, it could cause diffs in Terraform for unchanged values. + // This is because, the data structure in Terraform's state will now be + // different from the normalized data structure returned from Boundary. + // + // NormalizeCatalogData is called before: + // * OnCreateCatalog + // * OnUpdateCatalog + NormalizeCatalogData(ctx context.Context, in *NormalizeCatalogDataRequest, opts ...grpc.CallOption) (*NormalizeCatalogDataResponse, error) + // OnCreateCatalog is a hook that runs when a + // host catalog is created. + OnCreateCatalog(ctx context.Context, in *OnCreateCatalogRequest, opts ...grpc.CallOption) (*OnCreateCatalogResponse, error) + // OnUpdateCatalog is a hook that runs when a host catalog is + // updated. + OnUpdateCatalog(ctx context.Context, in *OnUpdateCatalogRequest, opts ...grpc.CallOption) (*OnUpdateCatalogResponse, error) + // OnDeleteCatalog is a hook that runs when a host catalog is + // deleted. + OnDeleteCatalog(ctx context.Context, in *OnDeleteCatalogRequest, opts ...grpc.CallOption) (*OnDeleteCatalogResponse, error) + // NormalizeSetData is a hook that passes attributes to the plugin and + // allows those values to be normalized prior to creating or updating those + // values in the host set data. + // + // NormalizeSetData is useful for converting the values of attributes from + // a certain format/type to an expected value format/type. This is useful + // during migration of values. + // + // NormalizeSetData is called before the values of attributes are persisted. + // All normalized values will be persisted in Boundary and returned + // to all clients. + // + // NormalizeSetData could affect other clients. For example, on Terraform, + // if data is passed to Boundary and then normalized into a new data + // structure, it could cause diffs in Terraform for unchanged values. + // This is because, the data structure in Terraform's state will now be + // different from the normalized data structure returned from Boundary. + // + // NormalizeSetData is called before: + // * OnCreateSet + // * OnUpdateSet + NormalizeSetData(ctx context.Context, in *NormalizeSetDataRequest, opts ...grpc.CallOption) (*NormalizeSetDataResponse, error) + // OnCreateSet is a hook that runs when a host set is created. + OnCreateSet(ctx context.Context, in *OnCreateSetRequest, opts ...grpc.CallOption) (*OnCreateSetResponse, error) + // OnUpdateSet is a hook that runs when a host set is updated. + OnUpdateSet(ctx context.Context, in *OnUpdateSetRequest, opts ...grpc.CallOption) (*OnUpdateSetResponse, error) + // OnDeleteSet is a hook that runs when a host set is deleted. + OnDeleteSet(ctx context.Context, in *OnDeleteSetRequest, opts ...grpc.CallOption) (*OnDeleteSetResponse, error) + // ListHosts looks up all the hosts in the provided host sets. + ListHosts(ctx context.Context, in *ListHostsRequest, opts ...grpc.CallOption) (*ListHostsResponse, error) +} + +type hostServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewHostServiceClient(cc grpc.ClientConnInterface) HostServiceClient { + return &hostServiceClient{cc} +} + +func (c *hostServiceClient) NormalizeCatalogData(ctx context.Context, in *NormalizeCatalogDataRequest, opts ...grpc.CallOption) (*NormalizeCatalogDataResponse, error) { + out := new(NormalizeCatalogDataResponse) + err := c.cc.Invoke(ctx, HostService_NormalizeCatalogData_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hostServiceClient) OnCreateCatalog(ctx context.Context, in *OnCreateCatalogRequest, opts ...grpc.CallOption) (*OnCreateCatalogResponse, error) { + out := new(OnCreateCatalogResponse) + err := c.cc.Invoke(ctx, HostService_OnCreateCatalog_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hostServiceClient) OnUpdateCatalog(ctx context.Context, in *OnUpdateCatalogRequest, opts ...grpc.CallOption) (*OnUpdateCatalogResponse, error) { + out := new(OnUpdateCatalogResponse) + err := c.cc.Invoke(ctx, HostService_OnUpdateCatalog_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hostServiceClient) OnDeleteCatalog(ctx context.Context, in *OnDeleteCatalogRequest, opts ...grpc.CallOption) (*OnDeleteCatalogResponse, error) { + out := new(OnDeleteCatalogResponse) + err := c.cc.Invoke(ctx, HostService_OnDeleteCatalog_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hostServiceClient) NormalizeSetData(ctx context.Context, in *NormalizeSetDataRequest, opts ...grpc.CallOption) (*NormalizeSetDataResponse, error) { + out := new(NormalizeSetDataResponse) + err := c.cc.Invoke(ctx, HostService_NormalizeSetData_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hostServiceClient) OnCreateSet(ctx context.Context, in *OnCreateSetRequest, opts ...grpc.CallOption) (*OnCreateSetResponse, error) { + out := new(OnCreateSetResponse) + err := c.cc.Invoke(ctx, HostService_OnCreateSet_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hostServiceClient) OnUpdateSet(ctx context.Context, in *OnUpdateSetRequest, opts ...grpc.CallOption) (*OnUpdateSetResponse, error) { + out := new(OnUpdateSetResponse) + err := c.cc.Invoke(ctx, HostService_OnUpdateSet_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hostServiceClient) OnDeleteSet(ctx context.Context, in *OnDeleteSetRequest, opts ...grpc.CallOption) (*OnDeleteSetResponse, error) { + out := new(OnDeleteSetResponse) + err := c.cc.Invoke(ctx, HostService_OnDeleteSet_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hostServiceClient) ListHosts(ctx context.Context, in *ListHostsRequest, opts ...grpc.CallOption) (*ListHostsResponse, error) { + out := new(ListHostsResponse) + err := c.cc.Invoke(ctx, HostService_ListHosts_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// HostServiceServer is the server API for HostService service. +// All implementations must embed UnimplementedHostServiceServer +// for forward compatibility +type HostServiceServer interface { + // NormalizeCatalogData is a hook that passes attributes to the plugin and + // allows those values to be normalized prior to creating or updating those + // values in the host catalog data. + // + // NormalizeCatalogData is useful for converting the values of attributes from + // a certain format/type to an expected value format/type. This is useful + // during migration of values. + // + // NormalizeCatalogData is called before the values of attributes are persisted. + // All normalized values will be persisted in Boundary and returned + // to all clients. + // + // NormalizeCatalogData could affect other clients. For example, on Terraform, + // if data is passed to Boundary and then normalized into a new data + // structure, it could cause diffs in Terraform for unchanged values. + // This is because, the data structure in Terraform's state will now be + // different from the normalized data structure returned from Boundary. + // + // NormalizeCatalogData is called before: + // * OnCreateCatalog + // * OnUpdateCatalog + NormalizeCatalogData(context.Context, *NormalizeCatalogDataRequest) (*NormalizeCatalogDataResponse, error) + // OnCreateCatalog is a hook that runs when a + // host catalog is created. + OnCreateCatalog(context.Context, *OnCreateCatalogRequest) (*OnCreateCatalogResponse, error) + // OnUpdateCatalog is a hook that runs when a host catalog is + // updated. + OnUpdateCatalog(context.Context, *OnUpdateCatalogRequest) (*OnUpdateCatalogResponse, error) + // OnDeleteCatalog is a hook that runs when a host catalog is + // deleted. + OnDeleteCatalog(context.Context, *OnDeleteCatalogRequest) (*OnDeleteCatalogResponse, error) + // NormalizeSetData is a hook that passes attributes to the plugin and + // allows those values to be normalized prior to creating or updating those + // values in the host set data. + // + // NormalizeSetData is useful for converting the values of attributes from + // a certain format/type to an expected value format/type. This is useful + // during migration of values. + // + // NormalizeSetData is called before the values of attributes are persisted. + // All normalized values will be persisted in Boundary and returned + // to all clients. + // + // NormalizeSetData could affect other clients. For example, on Terraform, + // if data is passed to Boundary and then normalized into a new data + // structure, it could cause diffs in Terraform for unchanged values. + // This is because, the data structure in Terraform's state will now be + // different from the normalized data structure returned from Boundary. + // + // NormalizeSetData is called before: + // * OnCreateSet + // * OnUpdateSet + NormalizeSetData(context.Context, *NormalizeSetDataRequest) (*NormalizeSetDataResponse, error) + // OnCreateSet is a hook that runs when a host set is created. + OnCreateSet(context.Context, *OnCreateSetRequest) (*OnCreateSetResponse, error) + // OnUpdateSet is a hook that runs when a host set is updated. + OnUpdateSet(context.Context, *OnUpdateSetRequest) (*OnUpdateSetResponse, error) + // OnDeleteSet is a hook that runs when a host set is deleted. + OnDeleteSet(context.Context, *OnDeleteSetRequest) (*OnDeleteSetResponse, error) + // ListHosts looks up all the hosts in the provided host sets. + ListHosts(context.Context, *ListHostsRequest) (*ListHostsResponse, error) + mustEmbedUnimplementedHostServiceServer() +} + +// UnimplementedHostServiceServer must be embedded to have forward compatible implementations. +type UnimplementedHostServiceServer struct { +} + +func (UnimplementedHostServiceServer) NormalizeCatalogData(context.Context, *NormalizeCatalogDataRequest) (*NormalizeCatalogDataResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method NormalizeCatalogData not implemented") +} +func (UnimplementedHostServiceServer) OnCreateCatalog(context.Context, *OnCreateCatalogRequest) (*OnCreateCatalogResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OnCreateCatalog not implemented") +} +func (UnimplementedHostServiceServer) OnUpdateCatalog(context.Context, *OnUpdateCatalogRequest) (*OnUpdateCatalogResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OnUpdateCatalog not implemented") +} +func (UnimplementedHostServiceServer) OnDeleteCatalog(context.Context, *OnDeleteCatalogRequest) (*OnDeleteCatalogResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OnDeleteCatalog not implemented") +} +func (UnimplementedHostServiceServer) NormalizeSetData(context.Context, *NormalizeSetDataRequest) (*NormalizeSetDataResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method NormalizeSetData not implemented") +} +func (UnimplementedHostServiceServer) OnCreateSet(context.Context, *OnCreateSetRequest) (*OnCreateSetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OnCreateSet not implemented") +} +func (UnimplementedHostServiceServer) OnUpdateSet(context.Context, *OnUpdateSetRequest) (*OnUpdateSetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OnUpdateSet not implemented") +} +func (UnimplementedHostServiceServer) OnDeleteSet(context.Context, *OnDeleteSetRequest) (*OnDeleteSetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OnDeleteSet not implemented") +} +func (UnimplementedHostServiceServer) ListHosts(context.Context, *ListHostsRequest) (*ListHostsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListHosts not implemented") +} +func (UnimplementedHostServiceServer) mustEmbedUnimplementedHostServiceServer() {} + +// UnsafeHostServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to HostServiceServer will +// result in compilation errors. +type UnsafeHostServiceServer interface { + mustEmbedUnimplementedHostServiceServer() +} + +func RegisterHostServiceServer(s grpc.ServiceRegistrar, srv HostServiceServer) { + s.RegisterService(&HostService_ServiceDesc, srv) +} + +func _HostService_NormalizeCatalogData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(NormalizeCatalogDataRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HostServiceServer).NormalizeCatalogData(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: HostService_NormalizeCatalogData_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HostServiceServer).NormalizeCatalogData(ctx, req.(*NormalizeCatalogDataRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HostService_OnCreateCatalog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OnCreateCatalogRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HostServiceServer).OnCreateCatalog(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: HostService_OnCreateCatalog_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HostServiceServer).OnCreateCatalog(ctx, req.(*OnCreateCatalogRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HostService_OnUpdateCatalog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OnUpdateCatalogRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HostServiceServer).OnUpdateCatalog(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: HostService_OnUpdateCatalog_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HostServiceServer).OnUpdateCatalog(ctx, req.(*OnUpdateCatalogRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HostService_OnDeleteCatalog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OnDeleteCatalogRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HostServiceServer).OnDeleteCatalog(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: HostService_OnDeleteCatalog_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HostServiceServer).OnDeleteCatalog(ctx, req.(*OnDeleteCatalogRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HostService_NormalizeSetData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(NormalizeSetDataRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HostServiceServer).NormalizeSetData(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: HostService_NormalizeSetData_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HostServiceServer).NormalizeSetData(ctx, req.(*NormalizeSetDataRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HostService_OnCreateSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OnCreateSetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HostServiceServer).OnCreateSet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: HostService_OnCreateSet_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HostServiceServer).OnCreateSet(ctx, req.(*OnCreateSetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HostService_OnUpdateSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OnUpdateSetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HostServiceServer).OnUpdateSet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: HostService_OnUpdateSet_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HostServiceServer).OnUpdateSet(ctx, req.(*OnUpdateSetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HostService_OnDeleteSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OnDeleteSetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HostServiceServer).OnDeleteSet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: HostService_OnDeleteSet_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HostServiceServer).OnDeleteSet(ctx, req.(*OnDeleteSetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HostService_ListHosts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListHostsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HostServiceServer).ListHosts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: HostService_ListHosts_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HostServiceServer).ListHosts(ctx, req.(*ListHostsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// HostService_ServiceDesc is the grpc.ServiceDesc for HostService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var HostService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "worker.servers.services.v1.HostService", + HandlerType: (*HostServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "NormalizeCatalogData", + Handler: _HostService_NormalizeCatalogData_Handler, + }, + { + MethodName: "OnCreateCatalog", + Handler: _HostService_OnCreateCatalog_Handler, + }, + { + MethodName: "OnUpdateCatalog", + Handler: _HostService_OnUpdateCatalog_Handler, + }, + { + MethodName: "OnDeleteCatalog", + Handler: _HostService_OnDeleteCatalog_Handler, + }, + { + MethodName: "NormalizeSetData", + Handler: _HostService_NormalizeSetData_Handler, + }, + { + MethodName: "OnCreateSet", + Handler: _HostService_OnCreateSet_Handler, + }, + { + MethodName: "OnUpdateSet", + Handler: _HostService_OnUpdateSet_Handler, + }, + { + MethodName: "OnDeleteSet", + Handler: _HostService_OnDeleteSet_Handler, + }, + { + MethodName: "ListHosts", + Handler: _HostService_ListHosts_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "worker/servers/services/v1/host_service.proto", +} diff --git a/internal/proto/worker/servers/services/v1/host_service.proto b/internal/proto/worker/servers/services/v1/host_service.proto new file mode 100644 index 000000000..829412291 --- /dev/null +++ b/internal/proto/worker/servers/services/v1/host_service.proto @@ -0,0 +1,223 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +syntax = "proto3"; + +package worker.servers.services.v1; + +import "controller/api/resources/hostcatalogs/v1/host_catalog.proto"; +import "controller/api/resources/hostsets/v1/host_set.proto"; +import "controller/api/resources/plugins/v1/plugin.proto"; +import "google/protobuf/struct.proto"; +import "plugin/v1/host_plugin_service.proto"; + +option go_package = "github.com/hashicorp/boundary/internal/gen/worker/servers/services;services"; + +// HostService describes the service for host plugins. +service HostService { + // NormalizeCatalogData is a hook that passes attributes to the plugin and + // allows those values to be normalized prior to creating or updating those + // values in the host catalog data. + // + // NormalizeCatalogData is useful for converting the values of attributes from + // a certain format/type to an expected value format/type. This is useful + // during migration of values. + // + // NormalizeCatalogData is called before the values of attributes are persisted. + // All normalized values will be persisted in Boundary and returned + // to all clients. + // + // NormalizeCatalogData could affect other clients. For example, on Terraform, + // if data is passed to Boundary and then normalized into a new data + // structure, it could cause diffs in Terraform for unchanged values. + // This is because, the data structure in Terraform's state will now be + // different from the normalized data structure returned from Boundary. + // + // NormalizeCatalogData is called before: + // * OnCreateCatalog + // * OnUpdateCatalog + rpc NormalizeCatalogData(NormalizeCatalogDataRequest) returns (NormalizeCatalogDataResponse); + + // OnCreateCatalog is a hook that runs when a + // host catalog is created. + rpc OnCreateCatalog(OnCreateCatalogRequest) returns (OnCreateCatalogResponse); + + // OnUpdateCatalog is a hook that runs when a host catalog is + // updated. + rpc OnUpdateCatalog(OnUpdateCatalogRequest) returns (OnUpdateCatalogResponse); + + // OnDeleteCatalog is a hook that runs when a host catalog is + // deleted. + rpc OnDeleteCatalog(OnDeleteCatalogRequest) returns (OnDeleteCatalogResponse); + + // NormalizeSetData is a hook that passes attributes to the plugin and + // allows those values to be normalized prior to creating or updating those + // values in the host set data. + // + // NormalizeSetData is useful for converting the values of attributes from + // a certain format/type to an expected value format/type. This is useful + // during migration of values. + // + // NormalizeSetData is called before the values of attributes are persisted. + // All normalized values will be persisted in Boundary and returned + // to all clients. + // + // NormalizeSetData could affect other clients. For example, on Terraform, + // if data is passed to Boundary and then normalized into a new data + // structure, it could cause diffs in Terraform for unchanged values. + // This is because, the data structure in Terraform's state will now be + // different from the normalized data structure returned from Boundary. + // + // NormalizeSetData is called before: + // * OnCreateSet + // * OnUpdateSet + rpc NormalizeSetData(NormalizeSetDataRequest) returns (NormalizeSetDataResponse); + + // OnCreateSet is a hook that runs when a host set is created. + rpc OnCreateSet(OnCreateSetRequest) returns (OnCreateSetResponse); + + // OnUpdateSet is a hook that runs when a host set is updated. + rpc OnUpdateSet(OnUpdateSetRequest) returns (OnUpdateSetResponse); + + // OnDeleteSet is a hook that runs when a host set is deleted. + rpc OnDeleteSet(OnDeleteSetRequest) returns (OnDeleteSetResponse); + + // ListHosts looks up all the hosts in the provided host sets. + rpc ListHosts(ListHostsRequest) returns (ListHostsResponse); +} + +message NormalizeCatalogDataRequest { + // The incoming attributes in the create or update request. + google.protobuf.Struct attributes = 100; + + // The plugin information for this request. + controller.api.resources.plugins.v1.PluginInfo plugin = 110; +} + +message NormalizeCatalogDataResponse { + // Outgoing attributes. If nil, no changes will be recorded. If non-nil, the + // values here will be used in place of the original set of attributes. + google.protobuf.Struct attributes = 100; +} + +message OnCreateCatalogRequest { + // The host catalog to create. The request may contain optional + // secret data to help authenticate the request against a cloud + // API. + controller.api.resources.hostcatalogs.v1.HostCatalog catalog = 10; +} + +message OnCreateCatalogResponse { + // Secret data to persist encrypted within Boundary. This should be used to + // store authentication data and other necessary configuration to be used in + // later hooks and calls. Returning an error from the call will cause this + // data to not be persisted. If this is nil, nothing is written. + plugin.v1.HostCatalogPersisted persisted = 10; +} + +message OnUpdateCatalogRequest { + // The existing state of the catalog. + controller.api.resources.hostcatalogs.v1.HostCatalog current_catalog = 10; + + // The requested new state of the catalog. This field may contain optional + // secret data that may have been updated from old authentication data + // contained within the persisted state. + controller.api.resources.hostcatalogs.v1.HostCatalog new_catalog = 20; + + // The existing persisted secret data. + plugin.v1.HostCatalogPersisted persisted = 30; +} + +message OnUpdateCatalogResponse { + // The updated secret data to persist encrypted within Boundary. If an error + // is returned, the update of the persisted data is aborted. If this is nil, + // no changes are written. To remove all values, simply return an allocated + // but empty map. + plugin.v1.HostCatalogPersisted persisted = 10; +} + +message OnDeleteCatalogRequest { + // The existing state of the catalog to delete. + controller.api.resources.hostcatalogs.v1.HostCatalog catalog = 10; + + // The host sets contained in the catalog being deleted. + repeated controller.api.resources.hostsets.v1.HostSet sets = 20; + + // The existing persisted secret data. + plugin.v1.HostCatalogPersisted persisted = 30; +} + +message OnDeleteCatalogResponse {} + +message NormalizeSetDataRequest { + // The incoming attributes in the create or update request. + google.protobuf.Struct attributes = 100; + + // The plugin information for this request. + controller.api.resources.plugins.v1.PluginInfo plugin = 110; +} + +message NormalizeSetDataResponse { + // Outgoing attributes. If nil, no changes will be recorded. If non-nil, the + // values here will be used in place of the original set of attributes. + google.protobuf.Struct attributes = 100; +} + +message OnCreateSetRequest { + // The host catalog that the set belongs to. + controller.api.resources.hostcatalogs.v1.HostCatalog catalog = 10; + + // The host set to create. + controller.api.resources.hostsets.v1.HostSet set = 20; + + // The persisted data for the host catalog that the set belongs to. + plugin.v1.HostCatalogPersisted persisted = 30; +} + +message OnCreateSetResponse {} + +message OnUpdateSetRequest { + // The host catalog that the set belongs to. + controller.api.resources.hostcatalogs.v1.HostCatalog catalog = 10; + + // The existing state of the host set. + controller.api.resources.hostsets.v1.HostSet current_set = 20; + + // The requested new state of the host set. + controller.api.resources.hostsets.v1.HostSet new_set = 30; + + // The persisted data for the host catalog that the set belongs to. + plugin.v1.HostCatalogPersisted persisted = 40; +} + +message OnUpdateSetResponse {} + +message OnDeleteSetRequest { + // The host catalog that the set belongs to. + controller.api.resources.hostcatalogs.v1.HostCatalog catalog = 10; + + // The host set to delete. + controller.api.resources.hostsets.v1.HostSet set = 20; + + // The persisted data for the host catalog that the set belongs to. + plugin.v1.HostCatalogPersisted persisted = 30; +} + +message OnDeleteSetResponse {} + +message ListHostsRequest { + // The host catalog that the supplied host sets belong to. + controller.api.resources.hostcatalogs.v1.HostCatalog catalog = 10; + + // The host sets to look up hosts for. + repeated controller.api.resources.hostsets.v1.HostSet sets = 20; + + // The persisted data for the host catalog that the supplied host + // sets belong to. + plugin.v1.HostCatalogPersisted persisted = 30; +} + +message ListHostsResponse { + // The hosts to return. + repeated plugin.v1.ListHostsResponseHost hosts = 10; +}