diff --git a/example/README.md b/example/README.md index bf46549..7d68256 100644 --- a/example/README.md +++ b/example/README.md @@ -1,5 +1,5 @@ +TBD + ```shell -git submodule add https://github.com/getstackhead/pluginlib -protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative pluginlib/stackhead.proto ``` diff --git a/example/main.go b/example/main.go deleted file mode 100644 index 61b9c37..0000000 --- a/example/main.go +++ /dev/null @@ -1,47 +0,0 @@ -package main - -import ( - "log" - "net" - - "github.com/phayes/freeport" - "google.golang.org/grpc" - - pb "github.com/getstackhead/pluginlib/gen" -) - -var Plugin MyPluginWrapper - -type MyPluginWrapper struct { -} - -type plugin struct { - pb.UnimplementedStackHeadPlugin -} - -func (p MyPluginWrapper) LaunchServer(callback func(int)) { - // Set up connection with local StackHead server - conn, err := grpc.Dial("localhost:1412", grpc.WithInsecure(), grpc.WithBlock()) - if err != nil { - log.Fatalf("did not connect: %v", err) - } - defer conn.Close() - StackHeadClient := pb.NewStackHeadServiceClient(conn) - - port, err := freeport.GetFreePort() - if err != nil { - log.Fatal(err) - return - } - lis, err := net.Listen("tcp", ":"+port) - if err != nil { - log.Fatalf("failed to listen: %v", err) - } - s := grpc.NewServer() - pb.RegisterStackHeadPluginServer(s, &plugin{}) - log.Printf("server listening at %v", lis.Addr()) - if err := s.Serve(lis); err != nil { - log.Fatalf("failed to serve: %v", err) - } - callback(port) -} diff --git a/example/main_test.go b/example/main_test.go deleted file mode 100644 index 3694c25..0000000 --- a/example/main_test.go +++ /dev/null @@ -1,19 +0,0 @@ -package main_test - -import ( - "testing" - - "github.com/getstackhead/pluginlib" -) - -func TestPluginLoading(t *testing.T) { - loadedPlugin, err := pluginlib.LoadPlugin("./plugin_myplugin.so") - if err != nil { - t.Fatal("Unable to load plugin. Error occurred: " + err.Error()) - return - } - if loadedPlugin == nil { - t.Fatal("Unable to load plugin. Plugin is nil") - return - } -} diff --git a/example/plugin.so b/example/plugin.so deleted file mode 100644 index b13bf57..0000000 Binary files a/example/plugin.so and /dev/null differ diff --git a/plugin.go b/plugin.go deleted file mode 100644 index 5b42a4c..0000000 --- a/plugin.go +++ /dev/null @@ -1,5 +0,0 @@ -package pluginlib - -type Plugin interface { - LaunchServer(callback func(int)) -} diff --git a/stackhead.go b/stackhead.go new file mode 100644 index 0000000..0802317 --- /dev/null +++ b/stackhead.go @@ -0,0 +1,6 @@ +package pluginlib + +func StackHeadExecute(command string) { + // mock function + // behaviour is implemented in StackHead main repository +} diff --git a/stackhead.pb.go b/stackhead.pb.go deleted file mode 100644 index 2bb30d4..0000000 --- a/stackhead.pb.go +++ /dev/null @@ -1,1049 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v3.6.1 -// source: stackhead.proto - -package pluginlib - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - 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 NullRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *NullRequest) Reset() { - *x = NullRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_stackhead_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NullRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NullRequest) ProtoMessage() {} - -func (x *NullRequest) ProtoReflect() protoreflect.Message { - mi := &file_stackhead_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 NullRequest.ProtoReflect.Descriptor instead. -func (*NullRequest) Descriptor() ([]byte, []int) { - return file_stackhead_proto_rawDescGZIP(), []int{0} -} - -type StackHeadPluginConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AdditionalJsonData string `protobuf:"bytes,1,opt,name=AdditionalJsonData,proto3" json:"AdditionalJsonData,omitempty"` - Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` - Description string `protobuf:"bytes,3,opt,name=Description,proto3" json:"Description,omitempty"` - Version string `protobuf:"bytes,4,opt,name=Version,proto3" json:"Version,omitempty"` - Authors []string `protobuf:"bytes,5,rep,name=Authors,proto3" json:"Authors,omitempty"` - PluginType string `protobuf:"bytes,6,opt,name=PluginType,proto3" json:"PluginType,omitempty"` - Terraform *StackHeadPluginTerraformConfig `protobuf:"bytes,7,opt,name=Terraform,proto3" json:"Terraform,omitempty"` -} - -func (x *StackHeadPluginConfig) Reset() { - *x = StackHeadPluginConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_stackhead_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StackHeadPluginConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StackHeadPluginConfig) ProtoMessage() {} - -func (x *StackHeadPluginConfig) ProtoReflect() protoreflect.Message { - mi := &file_stackhead_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 StackHeadPluginConfig.ProtoReflect.Descriptor instead. -func (*StackHeadPluginConfig) Descriptor() ([]byte, []int) { - return file_stackhead_proto_rawDescGZIP(), []int{1} -} - -func (x *StackHeadPluginConfig) GetAdditionalJsonData() string { - if x != nil { - return x.AdditionalJsonData - } - return "" -} - -func (x *StackHeadPluginConfig) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *StackHeadPluginConfig) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *StackHeadPluginConfig) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *StackHeadPluginConfig) GetAuthors() []string { - if x != nil { - return x.Authors - } - return nil -} - -func (x *StackHeadPluginConfig) GetPluginType() string { - if x != nil { - return x.PluginType - } - return "" -} - -func (x *StackHeadPluginConfig) GetTerraform() *StackHeadPluginTerraformConfig { - if x != nil { - return x.Terraform - } - return nil -} - -type StackHeadPluginTerraformConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` - Vendor string `protobuf:"bytes,2,opt,name=vendor,proto3" json:"vendor,omitempty"` - Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` - ResourceName string `protobuf:"bytes,4,opt,name=resourceName,proto3" json:"resourceName,omitempty"` - Init string `protobuf:"bytes,5,opt,name=init,proto3" json:"init,omitempty"` - ProviderPerProject bool `protobuf:"varint,6,opt,name=providerPerProject,proto3" json:"providerPerProject,omitempty"` -} - -func (x *StackHeadPluginTerraformConfig) Reset() { - *x = StackHeadPluginTerraformConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_stackhead_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StackHeadPluginTerraformConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StackHeadPluginTerraformConfig) ProtoMessage() {} - -func (x *StackHeadPluginTerraformConfig) ProtoReflect() protoreflect.Message { - mi := &file_stackhead_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 StackHeadPluginTerraformConfig.ProtoReflect.Descriptor instead. -func (*StackHeadPluginTerraformConfig) Descriptor() ([]byte, []int) { - return file_stackhead_proto_rawDescGZIP(), []int{2} -} - -func (x *StackHeadPluginTerraformConfig) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *StackHeadPluginTerraformConfig) GetVendor() string { - if x != nil { - return x.Vendor - } - return "" -} - -func (x *StackHeadPluginTerraformConfig) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *StackHeadPluginTerraformConfig) GetResourceName() string { - if x != nil { - return x.ResourceName - } - return "" -} - -func (x *StackHeadPluginTerraformConfig) GetInit() string { - if x != nil { - return x.Init - } - return "" -} - -func (x *StackHeadPluginTerraformConfig) GetProviderPerProject() bool { - if x != nil { - return x.ProviderPerProject - } - return false -} - -type SetupRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *SetupRequest) Reset() { - *x = SetupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_stackhead_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetupRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetupRequest) ProtoMessage() {} - -func (x *SetupRequest) ProtoReflect() protoreflect.Message { - mi := &file_stackhead_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 SetupRequest.ProtoReflect.Descriptor instead. -func (*SetupRequest) Descriptor() ([]byte, []int) { - return file_stackhead_proto_rawDescGZIP(), []int{3} -} - -type HookRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - HookName string `protobuf:"bytes,1,opt,name=hookName,proto3" json:"hookName,omitempty"` - Project *StackHeadProject `protobuf:"bytes,2,opt,name=project,proto3" json:"project,omitempty"` -} - -func (x *HookRequest) Reset() { - *x = HookRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_stackhead_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HookRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HookRequest) ProtoMessage() {} - -func (x *HookRequest) ProtoReflect() protoreflect.Message { - mi := &file_stackhead_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 HookRequest.ProtoReflect.Descriptor instead. -func (*HookRequest) Descriptor() ([]byte, []int) { - return file_stackhead_proto_rawDescGZIP(), []int{4} -} - -func (x *HookRequest) GetHookName() string { - if x != nil { - return x.HookName - } - return "" -} - -func (x *HookRequest) GetProject() *StackHeadProject { - if x != nil { - return x.Project - } - return nil -} - -type DeployRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Project *StackHeadProject `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` -} - -func (x *DeployRequest) Reset() { - *x = DeployRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_stackhead_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeployRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeployRequest) ProtoMessage() {} - -func (x *DeployRequest) ProtoReflect() protoreflect.Message { - mi := &file_stackhead_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 DeployRequest.ProtoReflect.Descriptor instead. -func (*DeployRequest) Descriptor() ([]byte, []int) { - return file_stackhead_proto_rawDescGZIP(), []int{5} -} - -func (x *DeployRequest) GetProject() *StackHeadProject { - if x != nil { - return x.Project - } - return nil -} - -type DestroyRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Project *StackHeadProject `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` -} - -func (x *DestroyRequest) Reset() { - *x = DestroyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_stackhead_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DestroyRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DestroyRequest) ProtoMessage() {} - -func (x *DestroyRequest) ProtoReflect() protoreflect.Message { - mi := &file_stackhead_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 DestroyRequest.ProtoReflect.Descriptor instead. -func (*DestroyRequest) Descriptor() ([]byte, []int) { - return file_stackhead_proto_rawDescGZIP(), []int{6} -} - -func (x *DestroyRequest) GetProject() *StackHeadProject { - if x != nil { - return x.Project - } - return nil -} - -type StackHeadProject struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AdditionalJsonData string `protobuf:"bytes,1,opt,name=AdditionalJsonData,proto3" json:"AdditionalJsonData,omitempty"` - Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` -} - -func (x *StackHeadProject) Reset() { - *x = StackHeadProject{} - if protoimpl.UnsafeEnabled { - mi := &file_stackhead_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StackHeadProject) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StackHeadProject) ProtoMessage() {} - -func (x *StackHeadProject) ProtoReflect() protoreflect.Message { - mi := &file_stackhead_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 StackHeadProject.ProtoReflect.Descriptor instead. -func (*StackHeadProject) Descriptor() ([]byte, []int) { - return file_stackhead_proto_rawDescGZIP(), []int{7} -} - -func (x *StackHeadProject) GetAdditionalJsonData() string { - if x != nil { - return x.AdditionalJsonData - } - return "" -} - -func (x *StackHeadProject) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type StackHeadPackageInformation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ApkPackageName string `protobuf:"bytes,1,opt,name=ApkPackageName,proto3" json:"ApkPackageName,omitempty"` -} - -func (x *StackHeadPackageInformation) Reset() { - *x = StackHeadPackageInformation{} - if protoimpl.UnsafeEnabled { - mi := &file_stackhead_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StackHeadPackageInformation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StackHeadPackageInformation) ProtoMessage() {} - -func (x *StackHeadPackageInformation) ProtoReflect() protoreflect.Message { - mi := &file_stackhead_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 StackHeadPackageInformation.ProtoReflect.Descriptor instead. -func (*StackHeadPackageInformation) Descriptor() ([]byte, []int) { - return file_stackhead_proto_rawDescGZIP(), []int{8} -} - -func (x *StackHeadPackageInformation) GetApkPackageName() string { - if x != nil { - return x.ApkPackageName - } - return "" -} - -type StackHeadServiceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Command string `protobuf:"bytes,1,opt,name=Command,proto3" json:"Command,omitempty"` - Data string `protobuf:"bytes,2,opt,name=Data,proto3" json:"Data,omitempty"` -} - -func (x *StackHeadServiceRequest) Reset() { - *x = StackHeadServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_stackhead_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StackHeadServiceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StackHeadServiceRequest) ProtoMessage() {} - -func (x *StackHeadServiceRequest) ProtoReflect() protoreflect.Message { - mi := &file_stackhead_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 StackHeadServiceRequest.ProtoReflect.Descriptor instead. -func (*StackHeadServiceRequest) Descriptor() ([]byte, []int) { - return file_stackhead_proto_rawDescGZIP(), []int{9} -} - -func (x *StackHeadServiceRequest) GetCommand() string { - if x != nil { - return x.Command - } - return "" -} - -func (x *StackHeadServiceRequest) GetData() string { - if x != nil { - return x.Data - } - return "" -} - -type StackHeadServiceReply struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` - ErrorMessage string `protobuf:"bytes,2,opt,name=errorMessage,proto3" json:"errorMessage,omitempty"` -} - -func (x *StackHeadServiceReply) Reset() { - *x = StackHeadServiceReply{} - if protoimpl.UnsafeEnabled { - mi := &file_stackhead_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StackHeadServiceReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StackHeadServiceReply) ProtoMessage() {} - -func (x *StackHeadServiceReply) ProtoReflect() protoreflect.Message { - mi := &file_stackhead_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 StackHeadServiceReply.ProtoReflect.Descriptor instead. -func (*StackHeadServiceReply) Descriptor() ([]byte, []int) { - return file_stackhead_proto_rawDescGZIP(), []int{10} -} - -func (x *StackHeadServiceReply) GetSuccess() bool { - if x != nil { - return x.Success - } - return false -} - -func (x *StackHeadServiceReply) GetErrorMessage() string { - if x != nil { - return x.ErrorMessage - } - return "" -} - -type StackHeadPluginReply struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` - ErrorMessage string `protobuf:"bytes,2,opt,name=errorMessage,proto3" json:"errorMessage,omitempty"` -} - -func (x *StackHeadPluginReply) Reset() { - *x = StackHeadPluginReply{} - if protoimpl.UnsafeEnabled { - mi := &file_stackhead_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StackHeadPluginReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StackHeadPluginReply) ProtoMessage() {} - -func (x *StackHeadPluginReply) ProtoReflect() protoreflect.Message { - mi := &file_stackhead_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 StackHeadPluginReply.ProtoReflect.Descriptor instead. -func (*StackHeadPluginReply) Descriptor() ([]byte, []int) { - return file_stackhead_proto_rawDescGZIP(), []int{11} -} - -func (x *StackHeadPluginReply) GetSuccess() bool { - if x != nil { - return x.Success - } - return false -} - -func (x *StackHeadPluginReply) GetErrorMessage() string { - if x != nil { - return x.ErrorMessage - } - return "" -} - -var File_stackhead_proto protoreflect.FileDescriptor - -var file_stackhead_proto_rawDesc = []byte{ - 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x68, 0x65, 0x61, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x09, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x6c, 0x69, 0x62, 0x22, 0x0d, 0x0a, 0x0b, - 0x4e, 0x75, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x9a, 0x02, 0x0a, 0x15, - 0x53, 0x74, 0x61, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2e, 0x0a, 0x12, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x61, 0x6c, 0x4a, 0x73, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x12, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4a, 0x73, 0x6f, - 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x44, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x73, - 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x73, 0x12, - 0x1e, 0x0a, 0x0a, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x47, 0x0a, 0x09, 0x54, 0x65, 0x72, 0x72, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x6c, 0x69, 0x62, 0x2e, 0x53, - 0x74, 0x61, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x54, 0x65, - 0x72, 0x72, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x09, 0x54, - 0x65, 0x72, 0x72, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x22, 0xce, 0x01, 0x0a, 0x1e, 0x53, 0x74, 0x61, - 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x54, 0x65, 0x72, 0x72, - 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x4e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x16, 0x0a, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x6e, 0x69, 0x74, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x6e, 0x69, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x50, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x50, - 0x65, 0x72, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x0e, 0x0a, 0x0c, 0x53, 0x65, 0x74, - 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x60, 0x0a, 0x0b, 0x48, 0x6f, 0x6f, - 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x6f, 0x6f, 0x6b, - 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x6f, 0x6b, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x6c, 0x69, - 0x62, 0x2e, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x46, 0x0a, 0x0d, 0x44, - 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x07, - 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, - 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x6c, 0x69, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x48, - 0x65, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x22, 0x47, 0x0a, 0x0e, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x6c, - 0x69, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x56, 0x0a, 0x10, - 0x53, 0x74, 0x61, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, - 0x12, 0x2e, 0x0a, 0x12, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4a, 0x73, - 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x41, 0x64, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4a, 0x73, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, - 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x45, 0x0a, 0x1b, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x48, 0x65, 0x61, - 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0e, 0x41, 0x70, 0x6b, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, - 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x41, 0x70, 0x6b, - 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x47, 0x0a, 0x17, 0x53, - 0x74, 0x61, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, - 0x12, 0x12, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x44, 0x61, 0x74, 0x61, 0x22, 0x55, 0x0a, 0x15, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x48, 0x65, 0x61, - 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x18, 0x0a, - 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, - 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x54, 0x0a, 0x14, 0x53, - 0x74, 0x61, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, - 0x70, 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x22, 0x0a, - 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x32, 0xa3, 0x02, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x51, 0x0a, 0x07, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x65, 0x12, 0x22, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x6c, 0x69, 0x62, 0x2e, 0x53, 0x74, - 0x61, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x6c, 0x69, - 0x62, 0x2e, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x5c, 0x0a, 0x0e, 0x49, 0x6e, 0x73, - 0x74, 0x61, 0x6c, 0x6c, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x26, 0x2e, 0x70, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x6c, 0x69, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x48, 0x65, 0x61, - 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x1a, 0x20, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x6c, 0x69, 0x62, 0x2e, - 0x53, 0x74, 0x61, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x5e, 0x0a, 0x10, 0x55, 0x6e, 0x69, 0x6e, 0x73, - 0x74, 0x61, 0x6c, 0x6c, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x26, 0x2e, 0x70, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x6c, 0x69, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x48, 0x65, 0x61, - 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x1a, 0x20, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x6c, 0x69, 0x62, 0x2e, - 0x53, 0x74, 0x61, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x32, 0xf9, 0x02, 0x0a, 0x0f, 0x53, 0x74, 0x61, 0x63, - 0x6b, 0x48, 0x65, 0x61, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x47, 0x0a, 0x09, 0x47, - 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x16, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x6c, 0x69, 0x62, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x20, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x6c, 0x69, 0x62, 0x2e, 0x53, 0x74, 0x61, - 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x05, 0x53, 0x65, 0x74, 0x75, 0x70, 0x12, 0x17, 0x2e, - 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x6c, 0x69, 0x62, 0x2e, 0x53, 0x65, 0x74, 0x75, 0x70, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x6c, - 0x69, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x50, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x06, 0x44, 0x65, 0x70, - 0x6c, 0x6f, 0x79, 0x12, 0x18, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x6c, 0x69, 0x62, 0x2e, - 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, - 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x6c, 0x69, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x48, - 0x65, 0x61, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, - 0x12, 0x47, 0x0a, 0x07, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x12, 0x19, 0x2e, 0x70, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x6c, - 0x69, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x50, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x0b, 0x54, 0x72, 0x69, - 0x67, 0x67, 0x65, 0x72, 0x48, 0x6f, 0x6f, 0x6b, 0x12, 0x16, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x6c, 0x69, 0x62, 0x2e, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1f, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x6c, 0x69, 0x62, 0x2e, 0x53, 0x74, 0x61, - 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x70, 0x6c, - 0x79, 0x22, 0x00, 0x42, 0x48, 0x0a, 0x16, 0x69, 0x6f, 0x2e, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x68, - 0x65, 0x61, 0x64, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x6c, 0x69, 0x62, 0x42, 0x09, 0x70, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x6c, 0x69, 0x62, 0x50, 0x01, 0x5a, 0x21, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x65, 0x74, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x68, - 0x65, 0x61, 0x64, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x6c, 0x69, 0x62, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_stackhead_proto_rawDescOnce sync.Once - file_stackhead_proto_rawDescData = file_stackhead_proto_rawDesc -) - -func file_stackhead_proto_rawDescGZIP() []byte { - file_stackhead_proto_rawDescOnce.Do(func() { - file_stackhead_proto_rawDescData = protoimpl.X.CompressGZIP(file_stackhead_proto_rawDescData) - }) - return file_stackhead_proto_rawDescData -} - -var file_stackhead_proto_msgTypes = make([]protoimpl.MessageInfo, 12) -var file_stackhead_proto_goTypes = []interface{}{ - (*NullRequest)(nil), // 0: pluginlib.NullRequest - (*StackHeadPluginConfig)(nil), // 1: pluginlib.StackHeadPluginConfig - (*StackHeadPluginTerraformConfig)(nil), // 2: pluginlib.StackHeadPluginTerraformConfig - (*SetupRequest)(nil), // 3: pluginlib.SetupRequest - (*HookRequest)(nil), // 4: pluginlib.HookRequest - (*DeployRequest)(nil), // 5: pluginlib.DeployRequest - (*DestroyRequest)(nil), // 6: pluginlib.DestroyRequest - (*StackHeadProject)(nil), // 7: pluginlib.StackHeadProject - (*StackHeadPackageInformation)(nil), // 8: pluginlib.StackHeadPackageInformation - (*StackHeadServiceRequest)(nil), // 9: pluginlib.StackHeadServiceRequest - (*StackHeadServiceReply)(nil), // 10: pluginlib.StackHeadServiceReply - (*StackHeadPluginReply)(nil), // 11: pluginlib.StackHeadPluginReply -} -var file_stackhead_proto_depIdxs = []int32{ - 2, // 0: pluginlib.StackHeadPluginConfig.Terraform:type_name -> pluginlib.StackHeadPluginTerraformConfig - 7, // 1: pluginlib.HookRequest.project:type_name -> pluginlib.StackHeadProject - 7, // 2: pluginlib.DeployRequest.project:type_name -> pluginlib.StackHeadProject - 7, // 3: pluginlib.DestroyRequest.project:type_name -> pluginlib.StackHeadProject - 9, // 4: pluginlib.StackHeadService.Execute:input_type -> pluginlib.StackHeadServiceRequest - 8, // 5: pluginlib.StackHeadService.InstallPackage:input_type -> pluginlib.StackHeadPackageInformation - 8, // 6: pluginlib.StackHeadService.UninstallPackage:input_type -> pluginlib.StackHeadPackageInformation - 0, // 7: pluginlib.StackHeadPlugin.GetConfig:input_type -> pluginlib.NullRequest - 3, // 8: pluginlib.StackHeadPlugin.Setup:input_type -> pluginlib.SetupRequest - 5, // 9: pluginlib.StackHeadPlugin.Deploy:input_type -> pluginlib.DeployRequest - 6, // 10: pluginlib.StackHeadPlugin.Destroy:input_type -> pluginlib.DestroyRequest - 4, // 11: pluginlib.StackHeadPlugin.TriggerHook:input_type -> pluginlib.HookRequest - 10, // 12: pluginlib.StackHeadService.Execute:output_type -> pluginlib.StackHeadServiceReply - 10, // 13: pluginlib.StackHeadService.InstallPackage:output_type -> pluginlib.StackHeadServiceReply - 10, // 14: pluginlib.StackHeadService.UninstallPackage:output_type -> pluginlib.StackHeadServiceReply - 1, // 15: pluginlib.StackHeadPlugin.GetConfig:output_type -> pluginlib.StackHeadPluginConfig - 11, // 16: pluginlib.StackHeadPlugin.Setup:output_type -> pluginlib.StackHeadPluginReply - 11, // 17: pluginlib.StackHeadPlugin.Deploy:output_type -> pluginlib.StackHeadPluginReply - 11, // 18: pluginlib.StackHeadPlugin.Destroy:output_type -> pluginlib.StackHeadPluginReply - 11, // 19: pluginlib.StackHeadPlugin.TriggerHook:output_type -> pluginlib.StackHeadPluginReply - 12, // [12:20] is the sub-list for method output_type - 4, // [4:12] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_stackhead_proto_init() } -func file_stackhead_proto_init() { - if File_stackhead_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_stackhead_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NullRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stackhead_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StackHeadPluginConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stackhead_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StackHeadPluginTerraformConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stackhead_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stackhead_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HookRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stackhead_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeployRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stackhead_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DestroyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stackhead_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StackHeadProject); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stackhead_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StackHeadPackageInformation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stackhead_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StackHeadServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stackhead_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StackHeadServiceReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stackhead_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StackHeadPluginReply); 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_stackhead_proto_rawDesc, - NumEnums: 0, - NumMessages: 12, - NumExtensions: 0, - NumServices: 2, - }, - GoTypes: file_stackhead_proto_goTypes, - DependencyIndexes: file_stackhead_proto_depIdxs, - MessageInfos: file_stackhead_proto_msgTypes, - }.Build() - File_stackhead_proto = out.File - file_stackhead_proto_rawDesc = nil - file_stackhead_proto_goTypes = nil - file_stackhead_proto_depIdxs = nil -} diff --git a/stackhead.proto b/stackhead.proto deleted file mode 100644 index ce7d651..0000000 --- a/stackhead.proto +++ /dev/null @@ -1,83 +0,0 @@ -syntax = "proto3"; - -option go_package = "github.com/getstackhead/pluginlib"; -option java_multiple_files = true; -option java_package = "io.stackhead.pluginlib"; -option java_outer_classname = "pluginlib"; - -package pluginlib; - -// StackHeadService is implemented by StackHead and allows -// plugins to interact with Terraform or the package managers -service StackHeadService { - rpc Execute(StackHeadServiceRequest) returns (StackHeadServiceReply) {} - rpc InstallPackage(StackHeadPackageInformation) returns (StackHeadServiceReply) {} - rpc UninstallPackage(StackHeadPackageInformation) returns (StackHeadServiceReply) {} -} - -service StackHeadPlugin { - rpc GetConfig(NullRequest) returns (StackHeadPluginConfig) {} - rpc Setup(SetupRequest) returns (StackHeadPluginReply) {} - rpc Deploy(DeployRequest) returns (StackHeadPluginReply) {} - rpc Destroy(DestroyRequest) returns (StackHeadPluginReply) {} - rpc TriggerHook(HookRequest) returns (StackHeadPluginReply) {} -} - -message NullRequest{} - -message StackHeadPluginConfig { - string AdditionalJsonData = 1; - string Name = 2; - string Description = 3; - string Version = 4; - repeated string Authors = 5; - string PluginType = 6; - StackHeadPluginTerraformConfig Terraform = 7; -} - -message StackHeadPluginTerraformConfig { - string Name = 1; - string vendor = 2; - string version = 3; - string resourceName = 4; - string init = 5; - bool providerPerProject = 6; -} - -message SetupRequest { -} - -message HookRequest { - string hookName = 1; - StackHeadProject project = 2; -} -message DeployRequest { - StackHeadProject project = 1; -} -message DestroyRequest { - StackHeadProject project = 1; -} - -message StackHeadProject { - string AdditionalJsonData = 1; - string Name = 2; -} - -message StackHeadPackageInformation { - string ApkPackageName = 1; -} - -message StackHeadServiceRequest { - string Command = 1; - string Data = 2; -} - -message StackHeadServiceReply { - bool success = 1; - string errorMessage = 2; -} - -message StackHeadPluginReply { - bool success = 1; - string errorMessage = 2; -} diff --git a/stackhead_grpc.pb.go b/stackhead_grpc.pb.go deleted file mode 100644 index e5070bf..0000000 --- a/stackhead_grpc.pb.go +++ /dev/null @@ -1,403 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. - -package pluginlib - -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 - -// StackHeadServiceClient is the client API for StackHeadService 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 StackHeadServiceClient interface { - Execute(ctx context.Context, in *StackHeadServiceRequest, opts ...grpc.CallOption) (*StackHeadServiceReply, error) - InstallPackage(ctx context.Context, in *StackHeadPackageInformation, opts ...grpc.CallOption) (*StackHeadServiceReply, error) - UninstallPackage(ctx context.Context, in *StackHeadPackageInformation, opts ...grpc.CallOption) (*StackHeadServiceReply, error) -} - -type stackHeadServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewStackHeadServiceClient(cc grpc.ClientConnInterface) StackHeadServiceClient { - return &stackHeadServiceClient{cc} -} - -func (c *stackHeadServiceClient) Execute(ctx context.Context, in *StackHeadServiceRequest, opts ...grpc.CallOption) (*StackHeadServiceReply, error) { - out := new(StackHeadServiceReply) - err := c.cc.Invoke(ctx, "/pluginlib.StackHeadService/Execute", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stackHeadServiceClient) InstallPackage(ctx context.Context, in *StackHeadPackageInformation, opts ...grpc.CallOption) (*StackHeadServiceReply, error) { - out := new(StackHeadServiceReply) - err := c.cc.Invoke(ctx, "/pluginlib.StackHeadService/InstallPackage", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stackHeadServiceClient) UninstallPackage(ctx context.Context, in *StackHeadPackageInformation, opts ...grpc.CallOption) (*StackHeadServiceReply, error) { - out := new(StackHeadServiceReply) - err := c.cc.Invoke(ctx, "/pluginlib.StackHeadService/UninstallPackage", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// StackHeadServiceServer is the server API for StackHeadService service. -// All implementations must embed UnimplementedStackHeadServiceServer -// for forward compatibility -type StackHeadServiceServer interface { - Execute(context.Context, *StackHeadServiceRequest) (*StackHeadServiceReply, error) - InstallPackage(context.Context, *StackHeadPackageInformation) (*StackHeadServiceReply, error) - UninstallPackage(context.Context, *StackHeadPackageInformation) (*StackHeadServiceReply, error) - mustEmbedUnimplementedStackHeadServiceServer() -} - -// UnimplementedStackHeadServiceServer must be embedded to have forward compatible implementations. -type UnimplementedStackHeadServiceServer struct { -} - -func (UnimplementedStackHeadServiceServer) Execute(context.Context, *StackHeadServiceRequest) (*StackHeadServiceReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Execute not implemented") -} -func (UnimplementedStackHeadServiceServer) InstallPackage(context.Context, *StackHeadPackageInformation) (*StackHeadServiceReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method InstallPackage not implemented") -} -func (UnimplementedStackHeadServiceServer) UninstallPackage(context.Context, *StackHeadPackageInformation) (*StackHeadServiceReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method UninstallPackage not implemented") -} -func (UnimplementedStackHeadServiceServer) mustEmbedUnimplementedStackHeadServiceServer() {} - -// UnsafeStackHeadServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to StackHeadServiceServer will -// result in compilation errors. -type UnsafeStackHeadServiceServer interface { - mustEmbedUnimplementedStackHeadServiceServer() -} - -func RegisterStackHeadServiceServer(s grpc.ServiceRegistrar, srv StackHeadServiceServer) { - s.RegisterService(&StackHeadService_ServiceDesc, srv) -} - -func _StackHeadService_Execute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(StackHeadServiceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StackHeadServiceServer).Execute(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pluginlib.StackHeadService/Execute", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StackHeadServiceServer).Execute(ctx, req.(*StackHeadServiceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StackHeadService_InstallPackage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(StackHeadPackageInformation) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StackHeadServiceServer).InstallPackage(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pluginlib.StackHeadService/InstallPackage", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StackHeadServiceServer).InstallPackage(ctx, req.(*StackHeadPackageInformation)) - } - return interceptor(ctx, in, info, handler) -} - -func _StackHeadService_UninstallPackage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(StackHeadPackageInformation) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StackHeadServiceServer).UninstallPackage(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pluginlib.StackHeadService/UninstallPackage", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StackHeadServiceServer).UninstallPackage(ctx, req.(*StackHeadPackageInformation)) - } - return interceptor(ctx, in, info, handler) -} - -// StackHeadService_ServiceDesc is the grpc.ServiceDesc for StackHeadService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var StackHeadService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "pluginlib.StackHeadService", - HandlerType: (*StackHeadServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Execute", - Handler: _StackHeadService_Execute_Handler, - }, - { - MethodName: "InstallPackage", - Handler: _StackHeadService_InstallPackage_Handler, - }, - { - MethodName: "UninstallPackage", - Handler: _StackHeadService_UninstallPackage_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "stackhead.proto", -} - -// StackHeadPluginClient is the client API for StackHeadPlugin 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 StackHeadPluginClient interface { - GetConfig(ctx context.Context, in *NullRequest, opts ...grpc.CallOption) (*StackHeadPluginConfig, error) - Setup(ctx context.Context, in *SetupRequest, opts ...grpc.CallOption) (*StackHeadPluginReply, error) - Deploy(ctx context.Context, in *DeployRequest, opts ...grpc.CallOption) (*StackHeadPluginReply, error) - Destroy(ctx context.Context, in *DestroyRequest, opts ...grpc.CallOption) (*StackHeadPluginReply, error) - TriggerHook(ctx context.Context, in *HookRequest, opts ...grpc.CallOption) (*StackHeadPluginReply, error) -} - -type stackHeadPluginClient struct { - cc grpc.ClientConnInterface -} - -func NewStackHeadPluginClient(cc grpc.ClientConnInterface) StackHeadPluginClient { - return &stackHeadPluginClient{cc} -} - -func (c *stackHeadPluginClient) GetConfig(ctx context.Context, in *NullRequest, opts ...grpc.CallOption) (*StackHeadPluginConfig, error) { - out := new(StackHeadPluginConfig) - err := c.cc.Invoke(ctx, "/pluginlib.StackHeadPlugin/GetConfig", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stackHeadPluginClient) Setup(ctx context.Context, in *SetupRequest, opts ...grpc.CallOption) (*StackHeadPluginReply, error) { - out := new(StackHeadPluginReply) - err := c.cc.Invoke(ctx, "/pluginlib.StackHeadPlugin/Setup", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stackHeadPluginClient) Deploy(ctx context.Context, in *DeployRequest, opts ...grpc.CallOption) (*StackHeadPluginReply, error) { - out := new(StackHeadPluginReply) - err := c.cc.Invoke(ctx, "/pluginlib.StackHeadPlugin/Deploy", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stackHeadPluginClient) Destroy(ctx context.Context, in *DestroyRequest, opts ...grpc.CallOption) (*StackHeadPluginReply, error) { - out := new(StackHeadPluginReply) - err := c.cc.Invoke(ctx, "/pluginlib.StackHeadPlugin/Destroy", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stackHeadPluginClient) TriggerHook(ctx context.Context, in *HookRequest, opts ...grpc.CallOption) (*StackHeadPluginReply, error) { - out := new(StackHeadPluginReply) - err := c.cc.Invoke(ctx, "/pluginlib.StackHeadPlugin/TriggerHook", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// StackHeadPluginServer is the server API for StackHeadPlugin service. -// All implementations must embed UnimplementedStackHeadPluginServer -// for forward compatibility -type StackHeadPluginServer interface { - GetConfig(context.Context, *NullRequest) (*StackHeadPluginConfig, error) - Setup(context.Context, *SetupRequest) (*StackHeadPluginReply, error) - Deploy(context.Context, *DeployRequest) (*StackHeadPluginReply, error) - Destroy(context.Context, *DestroyRequest) (*StackHeadPluginReply, error) - TriggerHook(context.Context, *HookRequest) (*StackHeadPluginReply, error) - mustEmbedUnimplementedStackHeadPluginServer() -} - -// UnimplementedStackHeadPluginServer must be embedded to have forward compatible implementations. -type UnimplementedStackHeadPluginServer struct { -} - -func (UnimplementedStackHeadPluginServer) GetConfig(context.Context, *NullRequest) (*StackHeadPluginConfig, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetConfig not implemented") -} -func (UnimplementedStackHeadPluginServer) Setup(context.Context, *SetupRequest) (*StackHeadPluginReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Setup not implemented") -} -func (UnimplementedStackHeadPluginServer) Deploy(context.Context, *DeployRequest) (*StackHeadPluginReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Deploy not implemented") -} -func (UnimplementedStackHeadPluginServer) Destroy(context.Context, *DestroyRequest) (*StackHeadPluginReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Destroy not implemented") -} -func (UnimplementedStackHeadPluginServer) TriggerHook(context.Context, *HookRequest) (*StackHeadPluginReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method TriggerHook not implemented") -} -func (UnimplementedStackHeadPluginServer) mustEmbedUnimplementedStackHeadPluginServer() {} - -// UnsafeStackHeadPluginServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to StackHeadPluginServer will -// result in compilation errors. -type UnsafeStackHeadPluginServer interface { - mustEmbedUnimplementedStackHeadPluginServer() -} - -func RegisterStackHeadPluginServer(s grpc.ServiceRegistrar, srv StackHeadPluginServer) { - s.RegisterService(&StackHeadPlugin_ServiceDesc, srv) -} - -func _StackHeadPlugin_GetConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(NullRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StackHeadPluginServer).GetConfig(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pluginlib.StackHeadPlugin/GetConfig", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StackHeadPluginServer).GetConfig(ctx, req.(*NullRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StackHeadPlugin_Setup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetupRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StackHeadPluginServer).Setup(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pluginlib.StackHeadPlugin/Setup", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StackHeadPluginServer).Setup(ctx, req.(*SetupRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StackHeadPlugin_Deploy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeployRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StackHeadPluginServer).Deploy(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pluginlib.StackHeadPlugin/Deploy", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StackHeadPluginServer).Deploy(ctx, req.(*DeployRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StackHeadPlugin_Destroy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DestroyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StackHeadPluginServer).Destroy(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pluginlib.StackHeadPlugin/Destroy", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StackHeadPluginServer).Destroy(ctx, req.(*DestroyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StackHeadPlugin_TriggerHook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(HookRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StackHeadPluginServer).TriggerHook(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pluginlib.StackHeadPlugin/TriggerHook", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StackHeadPluginServer).TriggerHook(ctx, req.(*HookRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// StackHeadPlugin_ServiceDesc is the grpc.ServiceDesc for StackHeadPlugin service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var StackHeadPlugin_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "pluginlib.StackHeadPlugin", - HandlerType: (*StackHeadPluginServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetConfig", - Handler: _StackHeadPlugin_GetConfig_Handler, - }, - { - MethodName: "Setup", - Handler: _StackHeadPlugin_Setup_Handler, - }, - { - MethodName: "Deploy", - Handler: _StackHeadPlugin_Deploy_Handler, - }, - { - MethodName: "Destroy", - Handler: _StackHeadPlugin_Destroy_Handler, - }, - { - MethodName: "TriggerHook", - Handler: _StackHeadPlugin_TriggerHook_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "stackhead.proto", -}