From f82b8381bb1dcceec4ec96942def206b25fe4808 Mon Sep 17 00:00:00 2001 From: Clockwork Date: Fri, 23 Jun 2023 13:57:55 +0300 Subject: [PATCH 01/23] refactor: Analyzer/analizer -> ClientAPI --- docs/docs/plugins/02-dev-plugins.md | 24 ++-- ignite/cmd/plugin.go | 10 +- ignite/services/plugin/analyzer.go | 12 +- ignite/services/plugin/grpc/v1/analizer.pb.go | 134 +++++++++--------- ignite/services/plugin/grpc/v1/service.pb.go | 30 ++-- .../plugin/grpc/v1/service_grpc.pb.go | 62 ++++---- ignite/services/plugin/interface.go | 22 +-- ignite/services/plugin/mocks/interface.go | 32 ++--- ignite/services/plugin/protocol.go | 70 ++++----- ignite/services/plugin/template/main.go.plush | 8 +- .../services/plugin/grpc/v1/service.proto | 14 +- 11 files changed, 209 insertions(+), 209 deletions(-) diff --git a/docs/docs/plugins/02-dev-plugins.md b/docs/docs/plugins/02-dev-plugins.md index 8281cf314f..88df9c74c7 100644 --- a/docs/docs/plugins/02-dev-plugins.md +++ b/docs/docs/plugins/02-dev-plugins.md @@ -47,30 +47,30 @@ type Interface interface { // Execute will be invoked by ignite when a plugin Command is executed. // It is global for all commands declared in Manifest, if you have declared // multiple commands, use cmd.Path to distinguish them. - // The analizer argument can be used by plugins to get chain app analysis info. - Execute(context.Context, *ExecutedCommand, Analyzer) error + // The ClientAPI argument can be used by plugins to get chain app analysis info. + Execute(context.Context, *ExecutedCommand, ClientAPI) error // ExecuteHookPre is invoked by ignite when a command specified by the Hook // path is invoked. // It is global for all hooks declared in Manifest, if you have declared // multiple hooks, use hook.Name to distinguish them. - // The analizer argument can be used by plugins to get chain app analysis info. - ExecuteHookPre(context.Context, *ExecutedHook, Analyzer) error + // The ClientAPI argument can be used by plugins to get chain app analysis info. + ExecuteHookPre(context.Context, *ExecutedHook, ClientAPI) error // ExecuteHookPost is invoked by ignite when a command specified by the hook // path is invoked. // It is global for all hooks declared in Manifest, if you have declared // multiple hooks, use hook.Name to distinguish them. - // The analizer argument can be used by plugins to get chain app analysis info. - ExecuteHookPost(context.Context, *ExecutedHook, Analyzer) error + // The ClientAPI argument can be used by plugins to get chain app analysis info. + ExecuteHookPost(context.Context, *ExecutedHook, ClientAPI) error // ExecuteHookCleanUp is invoked by ignite when a command specified by the // hook path is invoked. Unlike ExecuteHookPost, it is invoked regardless of // execution status of the command and hooks. // It is global for all hooks declared in Manifest, if you have declared // multiple hooks, use hook.Name to distinguish them. - // The analizer argument can be used by plugins to get chain app analysis info. - ExecuteHookCleanUp(context.Context, *ExecutedHook, Analyzer) error + // The ClientAPI argument can be used by plugins to get chain app analysis info. + ExecuteHookCleanUp(context.Context, *ExecutedHook, ClientAPI) error } ``` @@ -160,7 +160,7 @@ To update the plugin execution, you have to change the plugin `Execute` command, for instance : ```go -func (p) Execute(_ context.Context, cmd *plugin.ExecutedCommand, _ plugin.Analyzer) error { +func (p) Execute(_ context.Context, cmd *plugin.ExecutedCommand, _ plugin.ClientAPI) error { if len(cmd.Args) == 0 { return fmt.Errorf("oracle name missing") } @@ -221,7 +221,7 @@ func (p) Manifest(context.Context) (*plugin.Manifest, error) { }, nil } -func (p) ExecuteHookPre(_ context.Context, h *plugin.ExecutedHook, _ plugin.Analyzer) error { +func (p) ExecuteHookPre(_ context.Context, h *plugin.ExecutedHook, _ plugin.ClientAPI) error { switch h.Hook.GetName() { case "my-hook": fmt.Println("I'm executed before ignite chain build") @@ -231,7 +231,7 @@ func (p) ExecuteHookPre(_ context.Context, h *plugin.ExecutedHook, _ plugin.Anal return nil } -func (p) ExecuteHookPost(_ context.Context, h *plugin.ExecutedHook, _ plugin.Analyzer) error { +func (p) ExecuteHookPost(_ context.Context, h *plugin.ExecutedHook, _ plugin.ClientAPI) error { switch h.Hook.GetName() { case "my-hook": fmt.Println("I'm executed after ignite chain build (if no error)") @@ -241,7 +241,7 @@ func (p) ExecuteHookPost(_ context.Context, h *plugin.ExecutedHook, _ plugin.Ana return nil } -func (p) ExecuteHookCleanUp(_ context.Context, h *plugin.ExecutedHook, _ plugin.Analyzer) error { +func (p) ExecuteHookCleanUp(_ context.Context, h *plugin.ExecutedHook, _ plugin.ClientAPI) error { switch h.Hook.GetName() { case "my-hook": fmt.Println("I'm executed after ignite chain build (regardless errors)") diff --git a/ignite/cmd/plugin.go b/ignite/cmd/plugin.go index abb362314f..9cbfa6f682 100644 --- a/ignite/cmd/plugin.go +++ b/ignite/cmd/plugin.go @@ -207,7 +207,7 @@ func linkPluginHook(rootCmd *cobra.Command, p *plugin.Plugin, hook *plugin.Hook) } execHook := newExecutedHook(hook, cmd, args) - err := p.Interface.ExecuteHookPre(ctx, execHook, plugin.NewAnalyzer()) + err := p.Interface.ExecuteHookPre(ctx, execHook, plugin.NewClientAPI()) if err != nil { return fmt.Errorf("plugin %q ExecuteHookPre() error: %w", p.Path, err) } @@ -223,7 +223,7 @@ func linkPluginHook(rootCmd *cobra.Command, p *plugin.Plugin, hook *plugin.Hook) if err != nil { ctx := cmd.Context() execHook := newExecutedHook(hook, cmd, args) - err := p.Interface.ExecuteHookCleanUp(ctx, execHook, plugin.NewAnalyzer()) + err := p.Interface.ExecuteHookCleanUp(ctx, execHook, plugin.NewClientAPI()) if err != nil { fmt.Printf("plugin %q ExecuteHookCleanUp() error: %v", p.Path, err) } @@ -241,7 +241,7 @@ func linkPluginHook(rootCmd *cobra.Command, p *plugin.Plugin, hook *plugin.Hook) execHook := newExecutedHook(hook, cmd, args) defer func() { - err := p.Interface.ExecuteHookCleanUp(ctx, execHook, plugin.NewAnalyzer()) + err := p.Interface.ExecuteHookCleanUp(ctx, execHook, plugin.NewClientAPI()) if err != nil { fmt.Printf("plugin %q ExecuteHookCleanUp() error: %v", p.Path, err) } @@ -255,7 +255,7 @@ func linkPluginHook(rootCmd *cobra.Command, p *plugin.Plugin, hook *plugin.Hook) } } - err := p.Interface.ExecuteHookPost(ctx, execHook, plugin.NewAnalyzer()) + err := p.Interface.ExecuteHookPost(ctx, execHook, plugin.NewClientAPI()) if err != nil { return fmt.Errorf("plugin %q ExecuteHookPost() error : %w", p.Path, err) } @@ -327,7 +327,7 @@ func linkPluginCmd(rootCmd *cobra.Command, p *plugin.Plugin, pluginCmd *plugin.C } execCmd.ImportFlags(cmd) // Call the plugin Execute - err := p.Interface.Execute(ctx, execCmd, plugin.NewAnalyzer()) + err := p.Interface.Execute(ctx, execCmd, plugin.NewClientAPI()) // NOTE(tb): This pause gives enough time for go-plugin to sync the // output from stdout/stderr of the plugin. Without that pause, this // output can be discarded and not printed in the user console. diff --git a/ignite/services/plugin/analyzer.go b/ignite/services/plugin/analyzer.go index f78d92c407..cf01a32bed 100644 --- a/ignite/services/plugin/analyzer.go +++ b/ignite/services/plugin/analyzer.go @@ -2,17 +2,17 @@ package plugin import "context" -// NewAnalyzer creates a new app analizer. -func NewAnalyzer() Analyzer { - return analizer{} +// NewClientAPI creates a new app ClientAPI. +func NewClientAPI() clientAPI { + return clientAPI{} } -type analizer struct{} +type clientAPI struct{} -// TODO: Implement dependency analizer. +// TODO: Implement dependency ClientAPI. // Deoendencies returns chain app dependencies. -func (a analizer) Dependencies(_ context.Context) ([]*Dependency, error) { +func (c clientAPI) Dependencies(_ context.Context) ([]*Dependency, error) { return []*Dependency{ {Path: "Foo"}, }, nil diff --git a/ignite/services/plugin/grpc/v1/analizer.pb.go b/ignite/services/plugin/grpc/v1/analizer.pb.go index 74798a1853..1d4cc2167a 100644 --- a/ignite/services/plugin/grpc/v1/analizer.pb.go +++ b/ignite/services/plugin/grpc/v1/analizer.pb.go @@ -2,7 +2,7 @@ // versions: // protoc-gen-go v1.30.0 // protoc (unknown) -// source: ignite/services/plugin/grpc/v1/analizer.proto +// source: ignite/services/plugin/grpc/v1/clientAPI.proto package v1 @@ -35,7 +35,7 @@ type Dependency struct { func (x *Dependency) Reset() { *x = Dependency{} if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_analizer_proto_msgTypes[0] + mi := &file_ignite_services_plugin_grpc_v1_clientAPI_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -48,7 +48,7 @@ func (x *Dependency) String() string { func (*Dependency) ProtoMessage() {} func (x *Dependency) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_analizer_proto_msgTypes[0] + mi := &file_ignite_services_plugin_grpc_v1_clientAPI_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -61,7 +61,7 @@ func (x *Dependency) ProtoReflect() protoreflect.Message { // Deprecated: Use Dependency.ProtoReflect.Descriptor instead. func (*Dependency) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_analizer_proto_rawDescGZIP(), []int{0} + return file_ignite_services_plugin_grpc_v1_clientAPI_proto_rawDescGZIP(), []int{0} } func (x *Dependency) GetPath() string { @@ -101,7 +101,7 @@ type Module struct { func (x *Module) Reset() { *x = Module{} if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_analizer_proto_msgTypes[1] + mi := &file_ignite_services_plugin_grpc_v1_clientAPI_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -114,7 +114,7 @@ func (x *Module) String() string { func (*Module) ProtoMessage() {} func (x *Module) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_analizer_proto_msgTypes[1] + mi := &file_ignite_services_plugin_grpc_v1_clientAPI_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -127,7 +127,7 @@ func (x *Module) ProtoReflect() protoreflect.Message { // Deprecated: Use Module.ProtoReflect.Descriptor instead. func (*Module) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_analizer_proto_rawDescGZIP(), []int{1} + return file_ignite_services_plugin_grpc_v1_clientAPI_proto_rawDescGZIP(), []int{1} } func (x *Module) GetName() string { @@ -195,7 +195,7 @@ type ProtoPackage struct { func (x *ProtoPackage) Reset() { *x = ProtoPackage{} if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_analizer_proto_msgTypes[2] + mi := &file_ignite_services_plugin_grpc_v1_clientAPI_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -208,7 +208,7 @@ func (x *ProtoPackage) String() string { func (*ProtoPackage) ProtoMessage() {} func (x *ProtoPackage) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_analizer_proto_msgTypes[2] + mi := &file_ignite_services_plugin_grpc_v1_clientAPI_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -221,7 +221,7 @@ func (x *ProtoPackage) ProtoReflect() protoreflect.Message { // Deprecated: Use ProtoPackage.ProtoReflect.Descriptor instead. func (*ProtoPackage) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_analizer_proto_rawDescGZIP(), []int{2} + return file_ignite_services_plugin_grpc_v1_clientAPI_proto_rawDescGZIP(), []int{2} } func (x *ProtoPackage) GetName() string { @@ -281,7 +281,7 @@ type ProtoFile struct { func (x *ProtoFile) Reset() { *x = ProtoFile{} if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_analizer_proto_msgTypes[3] + mi := &file_ignite_services_plugin_grpc_v1_clientAPI_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -294,7 +294,7 @@ func (x *ProtoFile) String() string { func (*ProtoFile) ProtoMessage() {} func (x *ProtoFile) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_analizer_proto_msgTypes[3] + mi := &file_ignite_services_plugin_grpc_v1_clientAPI_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -307,7 +307,7 @@ func (x *ProtoFile) ProtoReflect() protoreflect.Message { // Deprecated: Use ProtoFile.ProtoReflect.Descriptor instead. func (*ProtoFile) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_analizer_proto_rawDescGZIP(), []int{3} + return file_ignite_services_plugin_grpc_v1_clientAPI_proto_rawDescGZIP(), []int{3} } func (x *ProtoFile) GetPath() string { @@ -344,7 +344,7 @@ type ProtoMessage struct { func (x *ProtoMessage) Reset() { *x = ProtoMessage{} if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_analizer_proto_msgTypes[4] + mi := &file_ignite_services_plugin_grpc_v1_clientAPI_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -357,7 +357,7 @@ func (x *ProtoMessage) String() string { func (*ProtoMessage) ProtoMessage() {} func (x *ProtoMessage) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_analizer_proto_msgTypes[4] + mi := &file_ignite_services_plugin_grpc_v1_clientAPI_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -370,7 +370,7 @@ func (x *ProtoMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use ProtoMessage.ProtoReflect.Descriptor instead. func (*ProtoMessage) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_analizer_proto_rawDescGZIP(), []int{4} + return file_ignite_services_plugin_grpc_v1_clientAPI_proto_rawDescGZIP(), []int{4} } func (x *ProtoMessage) GetName() string { @@ -416,7 +416,7 @@ type ProtoService struct { func (x *ProtoService) Reset() { *x = ProtoService{} if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_analizer_proto_msgTypes[5] + mi := &file_ignite_services_plugin_grpc_v1_clientAPI_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -429,7 +429,7 @@ func (x *ProtoService) String() string { func (*ProtoService) ProtoMessage() {} func (x *ProtoService) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_analizer_proto_msgTypes[5] + mi := &file_ignite_services_plugin_grpc_v1_clientAPI_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -442,7 +442,7 @@ func (x *ProtoService) ProtoReflect() protoreflect.Message { // Deprecated: Use ProtoService.ProtoReflect.Descriptor instead. func (*ProtoService) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_analizer_proto_rawDescGZIP(), []int{5} + return file_ignite_services_plugin_grpc_v1_clientAPI_proto_rawDescGZIP(), []int{5} } func (x *ProtoService) GetName() string { @@ -480,7 +480,7 @@ type ProtoServiceFunc struct { func (x *ProtoServiceFunc) Reset() { *x = ProtoServiceFunc{} if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_analizer_proto_msgTypes[6] + mi := &file_ignite_services_plugin_grpc_v1_clientAPI_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -493,7 +493,7 @@ func (x *ProtoServiceFunc) String() string { func (*ProtoServiceFunc) ProtoMessage() {} func (x *ProtoServiceFunc) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_analizer_proto_msgTypes[6] + mi := &file_ignite_services_plugin_grpc_v1_clientAPI_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -506,7 +506,7 @@ func (x *ProtoServiceFunc) ProtoReflect() protoreflect.Message { // Deprecated: Use ProtoServiceFunc.ProtoReflect.Descriptor instead. func (*ProtoServiceFunc) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_analizer_proto_rawDescGZIP(), []int{6} + return file_ignite_services_plugin_grpc_v1_clientAPI_proto_rawDescGZIP(), []int{6} } func (x *ProtoServiceFunc) GetName() string { @@ -561,7 +561,7 @@ type Message struct { func (x *Message) Reset() { *x = Message{} if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_analizer_proto_msgTypes[7] + mi := &file_ignite_services_plugin_grpc_v1_clientAPI_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -574,7 +574,7 @@ func (x *Message) String() string { func (*Message) ProtoMessage() {} func (x *Message) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_analizer_proto_msgTypes[7] + mi := &file_ignite_services_plugin_grpc_v1_clientAPI_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -587,7 +587,7 @@ func (x *Message) ProtoReflect() protoreflect.Message { // Deprecated: Use Message.ProtoReflect.Descriptor instead. func (*Message) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_analizer_proto_rawDescGZIP(), []int{7} + return file_ignite_services_plugin_grpc_v1_clientAPI_proto_rawDescGZIP(), []int{7} } func (x *Message) GetName() string { @@ -630,7 +630,7 @@ type HTTPQuery struct { func (x *HTTPQuery) Reset() { *x = HTTPQuery{} if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_analizer_proto_msgTypes[8] + mi := &file_ignite_services_plugin_grpc_v1_clientAPI_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -643,7 +643,7 @@ func (x *HTTPQuery) String() string { func (*HTTPQuery) ProtoMessage() {} func (x *HTTPQuery) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_analizer_proto_msgTypes[8] + mi := &file_ignite_services_plugin_grpc_v1_clientAPI_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -656,7 +656,7 @@ func (x *HTTPQuery) ProtoReflect() protoreflect.Message { // Deprecated: Use HTTPQuery.ProtoReflect.Descriptor instead. func (*HTTPQuery) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_analizer_proto_rawDescGZIP(), []int{8} + return file_ignite_services_plugin_grpc_v1_clientAPI_proto_rawDescGZIP(), []int{8} } func (x *HTTPQuery) GetName() string { @@ -704,7 +704,7 @@ type HTTPRule struct { func (x *HTTPRule) Reset() { *x = HTTPRule{} if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_analizer_proto_msgTypes[9] + mi := &file_ignite_services_plugin_grpc_v1_clientAPI_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -717,7 +717,7 @@ func (x *HTTPRule) String() string { func (*HTTPRule) ProtoMessage() {} func (x *HTTPRule) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_analizer_proto_msgTypes[9] + mi := &file_ignite_services_plugin_grpc_v1_clientAPI_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -730,7 +730,7 @@ func (x *HTTPRule) ProtoReflect() protoreflect.Message { // Deprecated: Use HTTPRule.ProtoReflect.Descriptor instead. func (*HTTPRule) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_analizer_proto_rawDescGZIP(), []int{9} + return file_ignite_services_plugin_grpc_v1_clientAPI_proto_rawDescGZIP(), []int{9} } func (x *HTTPRule) GetParams() []string { @@ -769,7 +769,7 @@ type Type struct { func (x *Type) Reset() { *x = Type{} if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_analizer_proto_msgTypes[10] + mi := &file_ignite_services_plugin_grpc_v1_clientAPI_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -782,7 +782,7 @@ func (x *Type) String() string { func (*Type) ProtoMessage() {} func (x *Type) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_analizer_proto_msgTypes[10] + mi := &file_ignite_services_plugin_grpc_v1_clientAPI_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -795,7 +795,7 @@ func (x *Type) ProtoReflect() protoreflect.Message { // Deprecated: Use Type.ProtoReflect.Descriptor instead. func (*Type) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_analizer_proto_rawDescGZIP(), []int{10} + return file_ignite_services_plugin_grpc_v1_clientAPI_proto_rawDescGZIP(), []int{10} } func (x *Type) GetName() string { @@ -812,9 +812,9 @@ func (x *Type) GetFilePath() string { return "" } -var File_ignite_services_plugin_grpc_v1_analizer_proto protoreflect.FileDescriptor +var File_ignite_services_plugin_grpc_v1_clientAPI_proto protoreflect.FileDescriptor -var file_ignite_services_plugin_grpc_v1_analizer_proto_rawDesc = []byte{ +var file_ignite_services_plugin_grpc_v1_clientAPI_proto_rawDesc = []byte{ 0x0a, 0x2d, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, @@ -939,19 +939,19 @@ var file_ignite_services_plugin_grpc_v1_analizer_proto_rawDesc = []byte{ } var ( - file_ignite_services_plugin_grpc_v1_analizer_proto_rawDescOnce sync.Once - file_ignite_services_plugin_grpc_v1_analizer_proto_rawDescData = file_ignite_services_plugin_grpc_v1_analizer_proto_rawDesc + file_ignite_services_plugin_grpc_v1_clientAPI_proto_rawDescOnce sync.Once + file_ignite_services_plugin_grpc_v1_clientAPI_proto_rawDescData = file_ignite_services_plugin_grpc_v1_clientAPI_proto_rawDesc ) -func file_ignite_services_plugin_grpc_v1_analizer_proto_rawDescGZIP() []byte { - file_ignite_services_plugin_grpc_v1_analizer_proto_rawDescOnce.Do(func() { - file_ignite_services_plugin_grpc_v1_analizer_proto_rawDescData = protoimpl.X.CompressGZIP(file_ignite_services_plugin_grpc_v1_analizer_proto_rawDescData) +func file_ignite_services_plugin_grpc_v1_clientAPI_proto_rawDescGZIP() []byte { + file_ignite_services_plugin_grpc_v1_clientAPI_proto_rawDescOnce.Do(func() { + file_ignite_services_plugin_grpc_v1_clientAPI_proto_rawDescData = protoimpl.X.CompressGZIP(file_ignite_services_plugin_grpc_v1_clientAPI_proto_rawDescData) }) - return file_ignite_services_plugin_grpc_v1_analizer_proto_rawDescData + return file_ignite_services_plugin_grpc_v1_clientAPI_proto_rawDescData } -var file_ignite_services_plugin_grpc_v1_analizer_proto_msgTypes = make([]protoimpl.MessageInfo, 12) -var file_ignite_services_plugin_grpc_v1_analizer_proto_goTypes = []interface{}{ +var file_ignite_services_plugin_grpc_v1_clientAPI_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_ignite_services_plugin_grpc_v1_clientAPI_proto_goTypes = []interface{}{ (*Dependency)(nil), // 0: ignite.services.plugin.grpc.v1.Dependency (*Module)(nil), // 1: ignite.services.plugin.grpc.v1.Module (*ProtoPackage)(nil), // 2: ignite.services.plugin.grpc.v1.ProtoPackage @@ -965,7 +965,7 @@ var file_ignite_services_plugin_grpc_v1_analizer_proto_goTypes = []interface{}{ (*Type)(nil), // 10: ignite.services.plugin.grpc.v1.Type nil, // 11: ignite.services.plugin.grpc.v1.ProtoMessage.FieldsEntry } -var file_ignite_services_plugin_grpc_v1_analizer_proto_depIdxs = []int32{ +var file_ignite_services_plugin_grpc_v1_clientAPI_proto_depIdxs = []int32{ 1, // 0: ignite.services.plugin.grpc.v1.Dependency.modules:type_name -> ignite.services.plugin.grpc.v1.Module 2, // 1: ignite.services.plugin.grpc.v1.Module.package:type_name -> ignite.services.plugin.grpc.v1.ProtoPackage 7, // 2: ignite.services.plugin.grpc.v1.Module.messages:type_name -> ignite.services.plugin.grpc.v1.Message @@ -985,13 +985,13 @@ var file_ignite_services_plugin_grpc_v1_analizer_proto_depIdxs = []int32{ 0, // [0:12] is the sub-list for field type_name } -func init() { file_ignite_services_plugin_grpc_v1_analizer_proto_init() } -func file_ignite_services_plugin_grpc_v1_analizer_proto_init() { - if File_ignite_services_plugin_grpc_v1_analizer_proto != nil { +func init() { file_ignite_services_plugin_grpc_v1_clientAPI_proto_init() } +func file_ignite_services_plugin_grpc_v1_clientAPI_proto_init() { + if File_ignite_services_plugin_grpc_v1_clientAPI_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_ignite_services_plugin_grpc_v1_analizer_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_ignite_services_plugin_grpc_v1_clientAPI_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Dependency); i { case 0: return &v.state @@ -1003,7 +1003,7 @@ func file_ignite_services_plugin_grpc_v1_analizer_proto_init() { return nil } } - file_ignite_services_plugin_grpc_v1_analizer_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_ignite_services_plugin_grpc_v1_clientAPI_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Module); i { case 0: return &v.state @@ -1015,7 +1015,7 @@ func file_ignite_services_plugin_grpc_v1_analizer_proto_init() { return nil } } - file_ignite_services_plugin_grpc_v1_analizer_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_ignite_services_plugin_grpc_v1_clientAPI_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ProtoPackage); i { case 0: return &v.state @@ -1027,7 +1027,7 @@ func file_ignite_services_plugin_grpc_v1_analizer_proto_init() { return nil } } - file_ignite_services_plugin_grpc_v1_analizer_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_ignite_services_plugin_grpc_v1_clientAPI_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ProtoFile); i { case 0: return &v.state @@ -1039,7 +1039,7 @@ func file_ignite_services_plugin_grpc_v1_analizer_proto_init() { return nil } } - file_ignite_services_plugin_grpc_v1_analizer_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_ignite_services_plugin_grpc_v1_clientAPI_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ProtoMessage); i { case 0: return &v.state @@ -1051,7 +1051,7 @@ func file_ignite_services_plugin_grpc_v1_analizer_proto_init() { return nil } } - file_ignite_services_plugin_grpc_v1_analizer_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_ignite_services_plugin_grpc_v1_clientAPI_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ProtoService); i { case 0: return &v.state @@ -1063,7 +1063,7 @@ func file_ignite_services_plugin_grpc_v1_analizer_proto_init() { return nil } } - file_ignite_services_plugin_grpc_v1_analizer_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_ignite_services_plugin_grpc_v1_clientAPI_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ProtoServiceFunc); i { case 0: return &v.state @@ -1075,7 +1075,7 @@ func file_ignite_services_plugin_grpc_v1_analizer_proto_init() { return nil } } - file_ignite_services_plugin_grpc_v1_analizer_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_ignite_services_plugin_grpc_v1_clientAPI_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Message); i { case 0: return &v.state @@ -1087,7 +1087,7 @@ func file_ignite_services_plugin_grpc_v1_analizer_proto_init() { return nil } } - file_ignite_services_plugin_grpc_v1_analizer_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_ignite_services_plugin_grpc_v1_clientAPI_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HTTPQuery); i { case 0: return &v.state @@ -1099,7 +1099,7 @@ func file_ignite_services_plugin_grpc_v1_analizer_proto_init() { return nil } } - file_ignite_services_plugin_grpc_v1_analizer_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_ignite_services_plugin_grpc_v1_clientAPI_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HTTPRule); i { case 0: return &v.state @@ -1111,7 +1111,7 @@ func file_ignite_services_plugin_grpc_v1_analizer_proto_init() { return nil } } - file_ignite_services_plugin_grpc_v1_analizer_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_ignite_services_plugin_grpc_v1_clientAPI_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Type); i { case 0: return &v.state @@ -1128,18 +1128,18 @@ func file_ignite_services_plugin_grpc_v1_analizer_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_ignite_services_plugin_grpc_v1_analizer_proto_rawDesc, + RawDescriptor: file_ignite_services_plugin_grpc_v1_clientAPI_proto_rawDesc, NumEnums: 0, NumMessages: 12, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_ignite_services_plugin_grpc_v1_analizer_proto_goTypes, - DependencyIndexes: file_ignite_services_plugin_grpc_v1_analizer_proto_depIdxs, - MessageInfos: file_ignite_services_plugin_grpc_v1_analizer_proto_msgTypes, + GoTypes: file_ignite_services_plugin_grpc_v1_clientAPI_proto_goTypes, + DependencyIndexes: file_ignite_services_plugin_grpc_v1_clientAPI_proto_depIdxs, + MessageInfos: file_ignite_services_plugin_grpc_v1_clientAPI_proto_msgTypes, }.Build() - File_ignite_services_plugin_grpc_v1_analizer_proto = out.File - file_ignite_services_plugin_grpc_v1_analizer_proto_rawDesc = nil - file_ignite_services_plugin_grpc_v1_analizer_proto_goTypes = nil - file_ignite_services_plugin_grpc_v1_analizer_proto_depIdxs = nil + File_ignite_services_plugin_grpc_v1_clientAPI_proto = out.File + file_ignite_services_plugin_grpc_v1_clientAPI_proto_rawDesc = nil + file_ignite_services_plugin_grpc_v1_clientAPI_proto_goTypes = nil + file_ignite_services_plugin_grpc_v1_clientAPI_proto_depIdxs = nil } diff --git a/ignite/services/plugin/grpc/v1/service.pb.go b/ignite/services/plugin/grpc/v1/service.pb.go index c6997dfdef..70cb3aab6a 100644 --- a/ignite/services/plugin/grpc/v1/service.pb.go +++ b/ignite/services/plugin/grpc/v1/service.pb.go @@ -112,7 +112,7 @@ type ExecuteRequest struct { unknownFields protoimpl.UnknownFields Cmd *ExecutedCommand `protobuf:"bytes,1,opt,name=cmd,proto3" json:"cmd,omitempty"` - Analyzer uint32 `protobuf:"varint,2,opt,name=analizer,proto3" json:"analizer,omitempty"` + ClientAPI uint32 `protobuf:"varint,2,opt,name=clientapi,proto3" json:"clientapi,omitempty"` } func (x *ExecuteRequest) Reset() { @@ -154,9 +154,9 @@ func (x *ExecuteRequest) GetCmd() *ExecutedCommand { return nil } -func (x *ExecuteRequest) GetAnalyzer() uint32 { +func (x *ExecuteRequest) GetClientAPI() uint32 { if x != nil { - return x.Analyzer + return x.ClientAPI } return 0 } @@ -205,7 +205,7 @@ type ExecuteHookPreRequest struct { unknownFields protoimpl.UnknownFields Hook *ExecutedHook `protobuf:"bytes,1,opt,name=hook,proto3" json:"hook,omitempty"` - Analyzer uint32 `protobuf:"varint,2,opt,name=analizer,proto3" json:"analizer,omitempty"` + ClientAPI uint32 `protobuf:"varint,2,opt,name=clientapi,proto3" json:"clientapi,omitempty"` } func (x *ExecuteHookPreRequest) Reset() { @@ -247,9 +247,9 @@ func (x *ExecuteHookPreRequest) GetHook() *ExecutedHook { return nil } -func (x *ExecuteHookPreRequest) GetAnalyzer() uint32 { +func (x *ExecuteHookPreRequest) GetClientAPI() uint32 { if x != nil { - return x.Analyzer + return x.ClientAPI } return 0 } @@ -298,7 +298,7 @@ type ExecuteHookPostRequest struct { unknownFields protoimpl.UnknownFields Hook *ExecutedHook `protobuf:"bytes,1,opt,name=hook,proto3" json:"hook,omitempty"` - Analyzer uint32 `protobuf:"varint,2,opt,name=analizer,proto3" json:"analizer,omitempty"` + ClientAPI uint32 `protobuf:"varint,2,opt,name=clientapi,proto3" json:"clientapi,omitempty"` } func (x *ExecuteHookPostRequest) Reset() { @@ -340,9 +340,9 @@ func (x *ExecuteHookPostRequest) GetHook() *ExecutedHook { return nil } -func (x *ExecuteHookPostRequest) GetAnalyzer() uint32 { +func (x *ExecuteHookPostRequest) GetClientAPI() uint32 { if x != nil { - return x.Analyzer + return x.ClientAPI } return 0 } @@ -391,7 +391,7 @@ type ExecuteHookCleanUpRequest struct { unknownFields protoimpl.UnknownFields Hook *ExecutedHook `protobuf:"bytes,1,opt,name=hook,proto3" json:"hook,omitempty"` - Analyzer uint32 `protobuf:"varint,2,opt,name=analizer,proto3" json:"analizer,omitempty"` + ClientAPI uint32 `protobuf:"varint,2,opt,name=clientapi,proto3" json:"clientapi,omitempty"` } func (x *ExecuteHookCleanUpRequest) Reset() { @@ -433,9 +433,9 @@ func (x *ExecuteHookCleanUpRequest) GetHook() *ExecutedHook { return nil } -func (x *ExecuteHookCleanUpRequest) GetAnalyzer() uint32 { +func (x *ExecuteHookCleanUpRequest) GetClientAPI() uint32 { if x != nil { - return x.Analyzer + return x.ClientAPI } return 0 } @@ -728,13 +728,13 @@ var file_ignite_services_plugin_grpc_v1_service_proto_depIdxs = []int32{ 4, // 8: ignite.services.plugin.grpc.v1.InterfaceService.ExecuteHookPre:input_type -> ignite.services.plugin.grpc.v1.ExecuteHookPreRequest 6, // 9: ignite.services.plugin.grpc.v1.InterfaceService.ExecuteHookPost:input_type -> ignite.services.plugin.grpc.v1.ExecuteHookPostRequest 8, // 10: ignite.services.plugin.grpc.v1.InterfaceService.ExecuteHookCleanUp:input_type -> ignite.services.plugin.grpc.v1.ExecuteHookCleanUpRequest - 10, // 11: ignite.services.plugin.grpc.v1.AnalyzerService.Dependencies:input_type -> ignite.services.plugin.grpc.v1.DependenciesRequest + 10, // 11: ignite.services.plugin.grpc.v1.ClientAPIService.Dependencies:input_type -> ignite.services.plugin.grpc.v1.DependenciesRequest 1, // 12: ignite.services.plugin.grpc.v1.InterfaceService.Manifest:output_type -> ignite.services.plugin.grpc.v1.ManifestResponse 3, // 13: ignite.services.plugin.grpc.v1.InterfaceService.Execute:output_type -> ignite.services.plugin.grpc.v1.ExecuteResponse 5, // 14: ignite.services.plugin.grpc.v1.InterfaceService.ExecuteHookPre:output_type -> ignite.services.plugin.grpc.v1.ExecuteHookPreResponse 7, // 15: ignite.services.plugin.grpc.v1.InterfaceService.ExecuteHookPost:output_type -> ignite.services.plugin.grpc.v1.ExecuteHookPostResponse 9, // 16: ignite.services.plugin.grpc.v1.InterfaceService.ExecuteHookCleanUp:output_type -> ignite.services.plugin.grpc.v1.ExecuteHookCleanUpResponse - 11, // 17: ignite.services.plugin.grpc.v1.AnalyzerService.Dependencies:output_type -> ignite.services.plugin.grpc.v1.DependenciesResponse + 11, // 17: ignite.services.plugin.grpc.v1.ClientAPIService.Dependencies:output_type -> ignite.services.plugin.grpc.v1.DependenciesResponse 12, // [12:18] is the sub-list for method output_type 6, // [6:12] is the sub-list for method input_type 6, // [6:6] is the sub-list for extension type_name @@ -747,7 +747,7 @@ func file_ignite_services_plugin_grpc_v1_service_proto_init() { if File_ignite_services_plugin_grpc_v1_service_proto != nil { return } - file_ignite_services_plugin_grpc_v1_analizer_proto_init() + file_ignite_services_plugin_grpc_v1_clientAPI_proto_init() file_ignite_services_plugin_grpc_v1_interface_proto_init() if !protoimpl.UnsafeEnabled { file_ignite_services_plugin_grpc_v1_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { diff --git a/ignite/services/plugin/grpc/v1/service_grpc.pb.go b/ignite/services/plugin/grpc/v1/service_grpc.pb.go index 7277e38e96..876ee8ac22 100644 --- a/ignite/services/plugin/grpc/v1/service_grpc.pb.go +++ b/ignite/services/plugin/grpc/v1/service_grpc.pb.go @@ -295,90 +295,90 @@ var InterfaceService_ServiceDesc = grpc.ServiceDesc{ } const ( - AnalyzerService_Dependencies_FullMethodName = "/ignite.services.plugin.grpc.v1.AnalyzerService/Dependencies" + ClientAPIService_Dependencies_FullMethodName = "/ignite.services.plugin.grpc.v1.ClientAPIService/Dependencies" ) -// AnalyzerServiceClient is the client API for AnalyzerService service. +// ClientAPIServiceClient is the client API for ClientAPIService 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 AnalyzerServiceClient interface { +type ClientAPIServiceClient interface { // Dependencies returns the app dependencies. Dependencies(ctx context.Context, in *DependenciesRequest, opts ...grpc.CallOption) (*DependenciesResponse, error) } -type analizerServiceClient struct { +type clientAPIServiceClient struct { cc grpc.ClientConnInterface } -func NewAnalyzerServiceClient(cc grpc.ClientConnInterface) AnalyzerServiceClient { - return &analizerServiceClient{cc} +func NewClientAPIServiceClient(cc grpc.ClientConnInterface) ClientAPIServiceClient { + return &clientAPIServiceClient{cc} } -func (c *analizerServiceClient) Dependencies(ctx context.Context, in *DependenciesRequest, opts ...grpc.CallOption) (*DependenciesResponse, error) { +func (c *clientAPIServiceClient) Dependencies(ctx context.Context, in *DependenciesRequest, opts ...grpc.CallOption) (*DependenciesResponse, error) { out := new(DependenciesResponse) - err := c.cc.Invoke(ctx, AnalyzerService_Dependencies_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ClientAPIService_Dependencies_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -// AnalyzerServiceServer is the server API for AnalyzerService service. -// All implementations must embed UnimplementedAnalyzerServiceServer +// ClientAPIServiceServer is the server API for ClientAPIService service. +// All implementations must embed UnimplementedClientAPIServiceServer // for forward compatibility -type AnalyzerServiceServer interface { +type ClientAPIServiceServer interface { // Dependencies returns the app dependencies. Dependencies(context.Context, *DependenciesRequest) (*DependenciesResponse, error) - mustEmbedUnimplementedAnalyzerServiceServer() + mustEmbedUnimplementedClientAPIServiceServer() } -// UnimplementedAnalyzerServiceServer must be embedded to have forward compatible implementations. -type UnimplementedAnalyzerServiceServer struct{} +// UnimplementedClientAPIServiceServer must be embedded to have forward compatible implementations. +type UnimplementedClientAPIServiceServer struct{} -func (UnimplementedAnalyzerServiceServer) Dependencies(context.Context, *DependenciesRequest) (*DependenciesResponse, error) { +func (UnimplementedClientAPIServiceServer) Dependencies(context.Context, *DependenciesRequest) (*DependenciesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Dependencies not implemented") } -func (UnimplementedAnalyzerServiceServer) mustEmbedUnimplementedAnalyzerServiceServer() {} +func (UnimplementedClientAPIServiceServer) mustEmbedUnimplementedClientAPIServiceServer() {} -// UnsafeAnalyzerServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to AnalyzerServiceServer will +// UnsafeClientAPIServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ClientAPIServiceServer will // result in compilation errors. -type UnsafeAnalyzerServiceServer interface { - mustEmbedUnimplementedAnalyzerServiceServer() +type UnsafeClientAPIServiceServer interface { + mustEmbedUnimplementedClientAPIServiceServer() } -func RegisterAnalyzerServiceServer(s grpc.ServiceRegistrar, srv AnalyzerServiceServer) { - s.RegisterService(&AnalyzerService_ServiceDesc, srv) +func RegisterClientAPIServiceServer(s grpc.ServiceRegistrar, srv ClientAPIServiceServer) { + s.RegisterService(&ClientAPIService_ServiceDesc, srv) } -func _AnalyzerService_Dependencies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _ClientAPIService_Dependencies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DependenciesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AnalyzerServiceServer).Dependencies(ctx, in) + return srv.(ClientAPIServiceServer).Dependencies(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: AnalyzerService_Dependencies_FullMethodName, + FullMethod: ClientAPIService_Dependencies_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AnalyzerServiceServer).Dependencies(ctx, req.(*DependenciesRequest)) + return srv.(ClientAPIServiceServer).Dependencies(ctx, req.(*DependenciesRequest)) } return interceptor(ctx, in, info, handler) } -// AnalyzerService_ServiceDesc is the grpc.ServiceDesc for AnalyzerService service. +// ClientAPIService_ServiceDesc is the grpc.ServiceDesc for ClientAPIService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) -var AnalyzerService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "ignite.services.plugin.grpc.v1.AnalyzerService", - HandlerType: (*AnalyzerServiceServer)(nil), +var ClientAPIService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "ignite.services.plugin.grpc.v1.ClientAPIService", + HandlerType: (*ClientAPIServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Dependencies", - Handler: _AnalyzerService_Dependencies_Handler, + Handler: _ClientAPIService_Dependencies_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/ignite/services/plugin/interface.go b/ignite/services/plugin/interface.go index 708d381c11..25cb367ff6 100644 --- a/ignite/services/plugin/interface.go +++ b/ignite/services/plugin/interface.go @@ -39,36 +39,36 @@ type Interface interface { // Execute will be invoked by ignite when a plugin Command is executed. // It is global for all commands declared in Manifest, if you have declared // multiple commands, use cmd.Path to distinguish them. - // The analizer argument can be used by plugins to get chain app analysis info. - Execute(context.Context, *ExecutedCommand, Analyzer) error + // The clientAPI argument can be used by plugins to get chain app analysis info. + Execute(context.Context, *ExecutedCommand, ClientAPI) error // ExecuteHookPre is invoked by ignite when a command specified by the Hook // path is invoked. // It is global for all hooks declared in Manifest, if you have declared // multiple hooks, use hook.Name to distinguish them. - // The analizer argument can be used by plugins to get chain app analysis info. - ExecuteHookPre(context.Context, *ExecutedHook, Analyzer) error + // The clientAPI argument can be used by plugins to get chain app analysis info. + ExecuteHookPre(context.Context, *ExecutedHook, ClientAPI) error // ExecuteHookPost is invoked by ignite when a command specified by the hook // path is invoked. // It is global for all hooks declared in Manifest, if you have declared // multiple hooks, use hook.Name to distinguish them. - // The analizer argument can be used by plugins to get chain app analysis info. - ExecuteHookPost(context.Context, *ExecutedHook, Analyzer) error + // The clientAPI argument can be used by plugins to get chain app analysis info. + ExecuteHookPost(context.Context, *ExecutedHook, ClientAPI) error // ExecuteHookCleanUp is invoked by ignite when a command specified by the // hook path is invoked. Unlike ExecuteHookPost, it is invoked regardless of // execution status of the command and hooks. // It is global for all hooks declared in Manifest, if you have declared // multiple hooks, use hook.Name to distinguish them. - // The analizer argument can be used by plugins to get chain app analysis info. - ExecuteHookCleanUp(context.Context, *ExecutedHook, Analyzer) error + // The clientAPI argument can be used by plugins to get chain app analysis info. + ExecuteHookCleanUp(context.Context, *ExecutedHook, ClientAPI) error } -// Analyzer defines the interface for plugins to get chain app code analysis info. +// ClientAPI defines the interface for plugins to get chain app code analysis info. // -//go:generate mockery --srcpkg . --name Analyzer --structname PluginAnalyzer --filename interface.go --with-expecter -type Analyzer interface { +//go:generate mockery --srcpkg . --name ClientAPI --structname PluginClientAPI --filename interface.go --with-expecter +type ClientAPI interface { // Dependencies returns the app dependencies. Dependencies(context.Context) ([]*Dependency, error) } diff --git a/ignite/services/plugin/mocks/interface.go b/ignite/services/plugin/mocks/interface.go index 97548d9fab..5d8b875835 100644 --- a/ignite/services/plugin/mocks/interface.go +++ b/ignite/services/plugin/mocks/interface.go @@ -10,21 +10,21 @@ import ( v1 "github.com/ignite/cli/ignite/services/plugin/grpc/v1" ) -// PluginAnalyzer is an autogenerated mock type for the Analyzer type -type PluginAnalyzer struct { +// PluginClientAPI is an autogenerated mock type for the ClientAPI type +type PluginClientAPI struct { mock.Mock } -type PluginAnalyzer_Expecter struct { +type PluginClientAPI_Expecter struct { mock *mock.Mock } -func (_m *PluginAnalyzer) EXPECT() *PluginAnalyzer_Expecter { - return &PluginAnalyzer_Expecter{mock: &_m.Mock} +func (_m *PluginClientAPI) EXPECT() *PluginClientAPI_Expecter { + return &PluginClientAPI_Expecter{mock: &_m.Mock} } // Dependencies provides a mock function with given fields: _a0 -func (_m *PluginAnalyzer) Dependencies(_a0 context.Context) ([]*v1.Dependency, error) { +func (_m *PluginClientAPI) Dependencies(_a0 context.Context) ([]*v1.Dependency, error) { ret := _m.Called(_a0) var r0 []*v1.Dependency @@ -46,37 +46,37 @@ func (_m *PluginAnalyzer) Dependencies(_a0 context.Context) ([]*v1.Dependency, e return r0, r1 } -// PluginAnalyzer_Dependencies_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Dependencies' -type PluginAnalyzer_Dependencies_Call struct { +// PluginClientAPI_Dependencies_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Dependencies' +type PluginClientAPI_Dependencies_Call struct { *mock.Call } // Dependencies is a helper method to define mock.On call // - _a0 context.Context -func (_e *PluginAnalyzer_Expecter) Dependencies(_a0 interface{}) *PluginAnalyzer_Dependencies_Call { - return &PluginAnalyzer_Dependencies_Call{Call: _e.mock.On("Dependencies", _a0)} +func (_e *PluginClientAPI_Expecter) Dependencies(_a0 interface{}) *PluginClientAPI_Dependencies_Call { + return &PluginClientAPI_Dependencies_Call{Call: _e.mock.On("Dependencies", _a0)} } -func (_c *PluginAnalyzer_Dependencies_Call) Run(run func(_a0 context.Context)) *PluginAnalyzer_Dependencies_Call { +func (_c *PluginClientAPI_Dependencies_Call) Run(run func(_a0 context.Context)) *PluginClientAPI_Dependencies_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context)) }) return _c } -func (_c *PluginAnalyzer_Dependencies_Call) Return(_a0 []*v1.Dependency, _a1 error) *PluginAnalyzer_Dependencies_Call { +func (_c *PluginClientAPI_Dependencies_Call) Return(_a0 []*v1.Dependency, _a1 error) *PluginClientAPI_Dependencies_Call { _c.Call.Return(_a0, _a1) return _c } -type mockConstructorTestingTNewPluginAnalyzer interface { +type mockConstructorTestingTNewPluginClientAPI interface { mock.TestingT Cleanup(func()) } -// NewPluginAnalyzer creates a new instance of PluginAnalyzer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewPluginAnalyzer(t mockConstructorTestingTNewPluginAnalyzer) *PluginAnalyzer { - mock := &PluginAnalyzer{} +// NewPluginClientAPI creates a new instance of PluginClientAPI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewPluginClientAPI(t mockConstructorTestingTNewPluginClientAPI) *PluginClientAPI { + mock := &PluginClientAPI{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) diff --git a/ignite/services/plugin/protocol.go b/ignite/services/plugin/protocol.go index a3b6d81f8f..d22bc2a1ad 100644 --- a/ignite/services/plugin/protocol.go +++ b/ignite/services/plugin/protocol.go @@ -65,47 +65,47 @@ func (c client) Manifest(ctx context.Context) (*Manifest, error) { return r.Manifest, nil } -func (c client) Execute(ctx context.Context, cmd *ExecutedCommand, a Analyzer) error { - brokerID, stopServer := c.startAnalyzerServer(a) +func (c client) Execute(ctx context.Context, cmd *ExecutedCommand, a ClientAPI) error { + brokerID, stopServer := c.startClientAPIServer(a) _, err := c.grpc.Execute(ctx, &v1.ExecuteRequest{ - Cmd: cmd, - Analyzer: brokerID, + Cmd: cmd, + ClientAPI: brokerID, }) stopServer() return err } -func (c client) ExecuteHookPre(ctx context.Context, h *ExecutedHook, a Analyzer) error { - brokerID, stopServer := c.startAnalyzerServer(a) +func (c client) ExecuteHookPre(ctx context.Context, h *ExecutedHook, a ClientAPI) error { + brokerID, stopServer := c.startClientAPIServer(a) _, err := c.grpc.ExecuteHookPre(ctx, &v1.ExecuteHookPreRequest{ - Hook: h, - Analyzer: brokerID, + Hook: h, + ClientAPI: brokerID, }) stopServer() return err } -func (c client) ExecuteHookPost(ctx context.Context, h *ExecutedHook, a Analyzer) error { - brokerID, stopServer := c.startAnalyzerServer(a) +func (c client) ExecuteHookPost(ctx context.Context, h *ExecutedHook, a ClientAPI) error { + brokerID, stopServer := c.startClientAPIServer(a) _, err := c.grpc.ExecuteHookPost(ctx, &v1.ExecuteHookPostRequest{ - Hook: h, - Analyzer: brokerID, + Hook: h, + ClientAPI: brokerID, }) stopServer() return err } -func (c client) ExecuteHookCleanUp(ctx context.Context, h *ExecutedHook, a Analyzer) error { - brokerID, stopServer := c.startAnalyzerServer(a) +func (c client) ExecuteHookCleanUp(ctx context.Context, h *ExecutedHook, a ClientAPI) error { + brokerID, stopServer := c.startClientAPIServer(a) _, err := c.grpc.ExecuteHookCleanUp(ctx, &v1.ExecuteHookCleanUpRequest{ - Hook: h, - Analyzer: brokerID, + Hook: h, + ClientAPI: brokerID, }) stopServer() return err } -func (c client) startAnalyzerServer(a Analyzer) (uint32, func()) { +func (c client) startClientAPIServer(a ClientAPI) (uint32, func()) { var ( srv *grpc.Server brokerID = c.broker.NextId() @@ -113,7 +113,7 @@ func (c client) startAnalyzerServer(a Analyzer) (uint32, func()) { go c.broker.AcceptAndServe(brokerID, func(opts []grpc.ServerOption) *grpc.Server { srv = grpc.NewServer(opts...) - v1.RegisterAnalyzerServiceServer(srv, &analizerServer{impl: a}) + v1.RegisterClientAPIServiceServer(srv, &clientAPIServer{impl: a}) return srv }) @@ -137,14 +137,14 @@ func (s server) Manifest(ctx context.Context, r *v1.ManifestRequest) (*v1.Manife } func (s server) Execute(ctx context.Context, r *v1.ExecuteRequest) (*v1.ExecuteResponse, error) { - conn, err := s.broker.Dial(r.Analyzer) + conn, err := s.broker.Dial(r.ClientAPI) if err != nil { return nil, err } defer conn.Close() - err = s.impl.Execute(ctx, r.GetCmd(), newAnalyzerClient(conn)) + err = s.impl.Execute(ctx, r.GetCmd(), newClientAPIClient(conn)) if err != nil { return nil, err } @@ -153,14 +153,14 @@ func (s server) Execute(ctx context.Context, r *v1.ExecuteRequest) (*v1.ExecuteR } func (s server) ExecuteHookPre(ctx context.Context, r *v1.ExecuteHookPreRequest) (*v1.ExecuteHookPreResponse, error) { - conn, err := s.broker.Dial(r.Analyzer) + conn, err := s.broker.Dial(r.ClientAPI) if err != nil { return nil, err } defer conn.Close() - err = s.impl.ExecuteHookPre(ctx, r.GetHook(), newAnalyzerClient(conn)) + err = s.impl.ExecuteHookPre(ctx, r.GetHook(), newClientAPIClient(conn)) if err != nil { return nil, err } @@ -169,14 +169,14 @@ func (s server) ExecuteHookPre(ctx context.Context, r *v1.ExecuteHookPreRequest) } func (s server) ExecuteHookPost(ctx context.Context, r *v1.ExecuteHookPostRequest) (*v1.ExecuteHookPostResponse, error) { - conn, err := s.broker.Dial(r.Analyzer) + conn, err := s.broker.Dial(r.ClientAPI) if err != nil { return nil, err } defer conn.Close() - err = s.impl.ExecuteHookPost(ctx, r.GetHook(), newAnalyzerClient(conn)) + err = s.impl.ExecuteHookPost(ctx, r.GetHook(), newClientAPIClient(conn)) if err != nil { return nil, err } @@ -185,14 +185,14 @@ func (s server) ExecuteHookPost(ctx context.Context, r *v1.ExecuteHookPostReques } func (s server) ExecuteHookCleanUp(ctx context.Context, r *v1.ExecuteHookCleanUpRequest) (*v1.ExecuteHookCleanUpResponse, error) { - conn, err := s.broker.Dial(r.Analyzer) + conn, err := s.broker.Dial(r.ClientAPI) if err != nil { return nil, err } defer conn.Close() - err = s.impl.ExecuteHookCleanUp(ctx, r.GetHook(), newAnalyzerClient(conn)) + err = s.impl.ExecuteHookCleanUp(ctx, r.GetHook(), newClientAPIClient(conn)) if err != nil { return nil, err } @@ -200,15 +200,15 @@ func (s server) ExecuteHookCleanUp(ctx context.Context, r *v1.ExecuteHookCleanUp return &v1.ExecuteHookCleanUpResponse{}, nil } -func newAnalyzerClient(c *grpc.ClientConn) *analizerClient { - return &analizerClient{v1.NewAnalyzerServiceClient(c)} +func newClientAPIClient(c *grpc.ClientConn) *clientAPIClient { + return &clientAPIClient{v1.NewClientAPIServiceClient(c)} } -type analizerClient struct { - grpc v1.AnalyzerServiceClient +type clientAPIClient struct { + grpc v1.ClientAPIServiceClient } -func (c analizerClient) Dependencies(ctx context.Context) ([]*Dependency, error) { +func (c clientAPIClient) Dependencies(ctx context.Context) ([]*Dependency, error) { r, err := c.grpc.Dependencies(ctx, &v1.DependenciesRequest{}) if err != nil { return nil, err @@ -217,13 +217,13 @@ func (c analizerClient) Dependencies(ctx context.Context) ([]*Dependency, error) return r.Dependencies, nil } -type analizerServer struct { - v1.UnimplementedAnalyzerServiceServer +type clientAPIServer struct { + v1.UnimplementedClientAPIServiceServer - impl Analyzer + impl ClientAPI } -func (s analizerServer) Dependencies(ctx context.Context, _ *v1.DependenciesRequest) (*v1.DependenciesResponse, error) { +func (s clientAPIServer) Dependencies(ctx context.Context, _ *v1.DependenciesRequest) (*v1.DependenciesResponse, error) { deps, err := s.impl.Dependencies(ctx) if err != nil { return nil, err diff --git a/ignite/services/plugin/template/main.go.plush b/ignite/services/plugin/template/main.go.plush index 2caf8a88e3..ea07213633 100644 --- a/ignite/services/plugin/template/main.go.plush +++ b/ignite/services/plugin/template/main.go.plush @@ -41,7 +41,7 @@ func (p) Manifest(ctx context.Context) (*plugin.Manifest, error) { }, nil } -func (p) Execute(ctx context.Context, cmd *plugin.ExecutedCommand, az plugin.Analyzer) error { +func (p) Execute(ctx context.Context, cmd *plugin.ExecutedCommand, c plugin.ClientAPI) error { // TODO: write command execution here fmt.Printf("Hello I'm the example-plugin plugin\n") fmt.Printf("My executed command: %q\n", cmd.Path) @@ -76,17 +76,17 @@ func (p) Execute(ctx context.Context, cmd *plugin.ExecutedCommand, az plugin.Ana return nil } -func (p) ExecuteHookPre(ctx context.Context, h *plugin.ExecutedHook, az plugin.Analyzer) error { +func (p) ExecuteHookPre(ctx context.Context, h *plugin.ExecutedHook, c plugin.ClientAPI) error { fmt.Printf("Executing hook pre %q\n", h.Hook.GetName()) return nil } -func (p) ExecuteHookPost(ctx context.Context, h *plugin.ExecutedHook, az plugin.Analyzer) error { +func (p) ExecuteHookPost(ctx context.Context, h *plugin.ExecutedHook, c plugin.ClientAPI) error { fmt.Printf("Executing hook post %q\n", h.Hook.GetName()) return nil } -func (p) ExecuteHookCleanUp(ctx context.Context, h *plugin.ExecutedHook, az plugin.Analyzer) error { +func (p) ExecuteHookCleanUp(ctx context.Context, h *plugin.ExecutedHook, c plugin.ClientAPI) error { fmt.Printf("Executing hook cleanup %q\n", h.Hook.GetName()) return nil } diff --git a/proto/ignite/services/plugin/grpc/v1/service.proto b/proto/ignite/services/plugin/grpc/v1/service.proto index 9586d845f2..390de87b63 100644 --- a/proto/ignite/services/plugin/grpc/v1/service.proto +++ b/proto/ignite/services/plugin/grpc/v1/service.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ignite.services.plugin.grpc.v1; -import "ignite/services/plugin/grpc/v1/analizer.proto"; +import "ignite/services/plugin/grpc/v1/clientAPI.proto"; import "ignite/services/plugin/grpc/v1/interface.proto"; option go_package = "github.com/ignite/cli/ignite/services/plugin/grpc/v1"; @@ -45,34 +45,34 @@ message ManifestResponse { message ExecuteRequest { ExecutedCommand cmd = 1; - uint32 analizer = 2; + uint32 clientAPI = 2; } message ExecuteResponse {} message ExecuteHookPreRequest { ExecutedHook hook = 1; - uint32 analizer = 2; + uint32 clientAPI = 2; } message ExecuteHookPreResponse {} message ExecuteHookPostRequest { ExecutedHook hook = 1; - uint32 analizer = 2; + uint32 clientAPI = 2; } message ExecuteHookPostResponse {} message ExecuteHookCleanUpRequest { ExecutedHook hook = 1; - uint32 analizer = 2; + uint32 clientAPI = 2; } message ExecuteHookCleanUpResponse {} -// AnalyzerService defines the interface that allows plugins to get chain app analysis info. -service AnalyzerService { +// ClientAPIService defines the interface that allows plugins to get chain app analysis info. +service ClientAPIService { // Dependencies returns the app dependencies. rpc Dependencies(DependenciesRequest) returns (DependenciesResponse); } From 51efa6d9248903899ac4a441c203aa8c06a696cd Mon Sep 17 00:00:00 2001 From: Clockwork Date: Fri, 23 Jun 2023 14:13:32 +0300 Subject: [PATCH 02/23] refactor: rename proto files and rebuild --- .../plugin/{analyzer.go => clientAPI.go} | 0 .../v1/{analizer.pb.go => clientAPI.pb.go} | 234 +++++++-------- ignite/services/plugin/grpc/v1/service.pb.go | 272 +++++++++--------- .../plugin/grpc/v1/service_grpc.pb.go | 11 +- .../v1/{analizer.proto => clientAPI.proto} | 0 5 files changed, 256 insertions(+), 261 deletions(-) rename ignite/services/plugin/{analyzer.go => clientAPI.go} (100%) rename ignite/services/plugin/grpc/v1/{analizer.pb.go => clientAPI.pb.go} (73%) rename proto/ignite/services/plugin/grpc/v1/{analizer.proto => clientAPI.proto} (100%) diff --git a/ignite/services/plugin/analyzer.go b/ignite/services/plugin/clientAPI.go similarity index 100% rename from ignite/services/plugin/analyzer.go rename to ignite/services/plugin/clientAPI.go diff --git a/ignite/services/plugin/grpc/v1/analizer.pb.go b/ignite/services/plugin/grpc/v1/clientAPI.pb.go similarity index 73% rename from ignite/services/plugin/grpc/v1/analizer.pb.go rename to ignite/services/plugin/grpc/v1/clientAPI.pb.go index 1d4cc2167a..76c86cdc21 100644 --- a/ignite/services/plugin/grpc/v1/analizer.pb.go +++ b/ignite/services/plugin/grpc/v1/clientAPI.pb.go @@ -815,127 +815,127 @@ func (x *Type) GetFilePath() string { var File_ignite_services_plugin_grpc_v1_clientAPI_proto protoreflect.FileDescriptor var file_ignite_services_plugin_grpc_v1_clientAPI_proto_rawDesc = []byte{ - 0x0a, 0x2d, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x0a, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x31, - 0x2f, 0x61, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x1e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, - 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x22, - 0x62, 0x0a, 0x0a, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x12, 0x0a, - 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, - 0x68, 0x12, 0x40, 0x0a, 0x07, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x07, 0x6d, 0x6f, 0x64, 0x75, - 0x6c, 0x65, 0x73, 0x22, 0xd9, 0x02, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x67, 0x6f, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, - 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x67, 0x6f, 0x4d, 0x6f, - 0x64, 0x75, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x46, 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, - 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x69, 0x67, 0x6e, 0x69, - 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, - 0x12, 0x43, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x4c, 0x0a, 0x0c, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x71, 0x75, - 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x69, 0x67, - 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x54, 0x54, - 0x50, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x0b, 0x68, 0x74, 0x74, 0x70, 0x51, 0x75, 0x65, 0x72, - 0x69, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x22, - 0xb1, 0x02, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x3f, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x46, 0x69, - 0x6c, 0x65, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x67, 0x6f, 0x5f, - 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x67, 0x6f, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x48, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x2c, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, - 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, - 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x48, 0x0a, 0x08, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x69, 0x67, - 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x22, 0x43, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x46, 0x69, 0x6c, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x70, 0x61, 0x74, 0x68, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, - 0x63, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x65, - 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x22, 0xf5, 0x01, 0x0a, 0x0c, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, - 0x68, 0x12, 0x30, 0x0a, 0x14, 0x68, 0x69, 0x67, 0x68, 0x65, 0x73, 0x74, 0x5f, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x12, 0x68, 0x69, 0x67, 0x68, 0x65, 0x73, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x12, 0x50, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, + 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x1e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, + 0x22, 0x62, 0x0a, 0x0a, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x12, + 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, + 0x74, 0x68, 0x12, 0x40, 0x0a, 0x07, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, - 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x66, - 0x69, 0x65, 0x6c, 0x64, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0x72, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4e, 0x0a, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, 0x75, 0x6e, 0x63, 0x52, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xd1, 0x01, 0x0a, 0x10, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, 0x75, 0x6e, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, - 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x12, - 0x47, 0x0a, 0x0a, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, + 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x07, 0x6d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x73, 0x22, 0xd9, 0x02, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x67, 0x6f, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x67, 0x6f, 0x4d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x46, 0x0a, 0x07, 0x70, 0x61, 0x63, + 0x6b, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x69, 0x67, 0x6e, + 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, + 0x65, 0x12, 0x43, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, - 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x09, 0x68, - 0x74, 0x74, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x22, 0x4c, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c, - 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, - 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x22, 0x9a, 0x01, 0x0a, 0x09, 0x48, 0x54, 0x54, 0x50, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75, 0x6c, 0x6c, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, - 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x65, 0x64, 0x12, 0x3e, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x4c, 0x0a, 0x0c, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x71, + 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x69, + 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x54, + 0x54, 0x50, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x0b, 0x68, 0x74, 0x74, 0x70, 0x51, 0x75, 0x65, + 0x72, 0x69, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x06, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x22, 0xb1, 0x02, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x3f, 0x0a, 0x05, 0x66, 0x69, 0x6c, + 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, + 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x46, + 0x69, 0x6c, 0x65, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x67, 0x6f, + 0x5f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x67, 0x6f, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x48, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, - 0x6c, 0x65, 0x73, 0x22, 0x5a, 0x0a, 0x08, 0x48, 0x54, 0x54, 0x50, 0x52, 0x75, 0x6c, 0x65, 0x12, - 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x61, 0x73, 0x5f, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x68, 0x61, 0x73, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x68, 0x61, 0x73, 0x5f, 0x62, 0x6f, 0x64, 0x79, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x68, 0x61, 0x73, 0x42, 0x6f, 0x64, 0x79, 0x22, - 0x37, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, - 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x66, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2f, 0x63, 0x6c, - 0x69, 0x2f, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x73, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x48, 0x0a, 0x08, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x69, + 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x73, 0x22, 0x43, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x46, 0x69, 0x6c, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, + 0x6e, 0x63, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x70, + 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x22, 0xf5, 0x01, 0x0a, 0x0c, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, + 0x74, 0x68, 0x12, 0x30, 0x0a, 0x14, 0x68, 0x69, 0x67, 0x68, 0x65, 0x73, 0x74, 0x5f, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x12, 0x68, 0x69, 0x67, 0x68, 0x65, 0x73, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x12, 0x50, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x22, 0x72, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4e, 0x0a, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, + 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, 0x75, 0x6e, 0x63, 0x52, 0x09, 0x66, 0x75, 0x6e, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xd1, 0x01, 0x0a, 0x10, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, 0x75, 0x6e, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, + 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, + 0x12, 0x47, 0x0a, 0x0a, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x09, + 0x68, 0x74, 0x74, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x22, 0x4c, 0x0a, 0x07, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, + 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, + 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x22, 0x9a, 0x01, 0x0a, 0x09, 0x48, 0x54, 0x54, 0x50, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75, 0x6c, + 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, + 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, + 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x70, 0x61, 0x67, 0x69, 0x6e, + 0x61, 0x74, 0x65, 0x64, 0x12, 0x3e, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x22, 0x5a, 0x0a, 0x08, 0x48, 0x54, 0x54, 0x50, 0x52, 0x75, 0x6c, 0x65, + 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x61, 0x73, 0x5f, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x68, 0x61, 0x73, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x68, 0x61, 0x73, 0x5f, 0x62, 0x6f, 0x64, + 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x68, 0x61, 0x73, 0x42, 0x6f, 0x64, 0x79, + 0x22, 0x37, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, + 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2f, 0x63, + 0x6c, 0x69, 0x2f, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x73, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x76, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/ignite/services/plugin/grpc/v1/service.pb.go b/ignite/services/plugin/grpc/v1/service.pb.go index 70cb3aab6a..b67b1ff097 100644 --- a/ignite/services/plugin/grpc/v1/service.pb.go +++ b/ignite/services/plugin/grpc/v1/service.pb.go @@ -7,11 +7,10 @@ package v1 import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( @@ -111,8 +110,8 @@ type ExecuteRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Cmd *ExecutedCommand `protobuf:"bytes,1,opt,name=cmd,proto3" json:"cmd,omitempty"` - ClientAPI uint32 `protobuf:"varint,2,opt,name=clientapi,proto3" json:"clientapi,omitempty"` + Cmd *ExecutedCommand `protobuf:"bytes,1,opt,name=cmd,proto3" json:"cmd,omitempty"` + ClientAPI uint32 `protobuf:"varint,2,opt,name=clientAPI,proto3" json:"clientAPI,omitempty"` } func (x *ExecuteRequest) Reset() { @@ -204,8 +203,8 @@ type ExecuteHookPreRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Hook *ExecutedHook `protobuf:"bytes,1,opt,name=hook,proto3" json:"hook,omitempty"` - ClientAPI uint32 `protobuf:"varint,2,opt,name=clientapi,proto3" json:"clientapi,omitempty"` + Hook *ExecutedHook `protobuf:"bytes,1,opt,name=hook,proto3" json:"hook,omitempty"` + ClientAPI uint32 `protobuf:"varint,2,opt,name=clientAPI,proto3" json:"clientAPI,omitempty"` } func (x *ExecuteHookPreRequest) Reset() { @@ -297,8 +296,8 @@ type ExecuteHookPostRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Hook *ExecutedHook `protobuf:"bytes,1,opt,name=hook,proto3" json:"hook,omitempty"` - ClientAPI uint32 `protobuf:"varint,2,opt,name=clientapi,proto3" json:"clientapi,omitempty"` + Hook *ExecutedHook `protobuf:"bytes,1,opt,name=hook,proto3" json:"hook,omitempty"` + ClientAPI uint32 `protobuf:"varint,2,opt,name=clientAPI,proto3" json:"clientAPI,omitempty"` } func (x *ExecuteHookPostRequest) Reset() { @@ -390,8 +389,8 @@ type ExecuteHookCleanUpRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Hook *ExecutedHook `protobuf:"bytes,1,opt,name=hook,proto3" json:"hook,omitempty"` - ClientAPI uint32 `protobuf:"varint,2,opt,name=clientapi,proto3" json:"clientapi,omitempty"` + Hook *ExecutedHook `protobuf:"bytes,1,opt,name=hook,proto3" json:"hook,omitempty"` + ClientAPI uint32 `protobuf:"varint,2,opt,name=clientAPI,proto3" json:"clientAPI,omitempty"` } func (x *ExecuteHookCleanUpRequest) Reset() { @@ -570,117 +569,118 @@ var file_ignite_services_plugin_grpc_v1_service_proto_rawDesc = []byte{ 0x73, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, - 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x1a, 0x2d, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x1a, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, - 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x61, - 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x69, - 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x70, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x11, 0x0a, - 0x0f, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x22, 0x58, 0x0a, 0x10, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, - 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, - 0x52, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x22, 0x6f, 0x0a, 0x0e, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x03, - 0x63, 0x6d, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x69, 0x67, 0x6e, 0x69, - 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x03, 0x63, 0x6d, 0x64, 0x12, - 0x1a, 0x0a, 0x08, 0x61, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x08, 0x61, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x22, 0x11, 0x0a, 0x0f, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x75, - 0x0a, 0x15, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x50, 0x72, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x04, 0x68, 0x6f, 0x6f, 0x6b, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, - 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x48, - 0x6f, 0x6f, 0x6b, 0x52, 0x04, 0x68, 0x6f, 0x6f, 0x6b, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x6e, 0x61, - 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x61, 0x6e, 0x61, - 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x22, 0x18, 0x0a, 0x16, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, - 0x48, 0x6f, 0x6f, 0x6b, 0x50, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x76, 0x0a, 0x16, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x50, 0x6f, - 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x04, 0x68, 0x6f, 0x6f, - 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, + 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x11, + 0x0a, 0x0f, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x22, 0x58, 0x0a, 0x10, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, - 0x64, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x04, 0x68, 0x6f, 0x6f, 0x6b, 0x12, 0x1a, 0x0a, 0x08, 0x61, - 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x61, - 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x22, 0x19, 0x0a, 0x17, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x79, 0x0a, 0x19, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, - 0x6b, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x55, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x40, 0x0a, 0x04, 0x68, 0x6f, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, - 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, - 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x04, 0x68, 0x6f, 0x6f, - 0x6b, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x08, 0x61, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x22, 0x1c, 0x0a, - 0x1a, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x43, 0x6c, 0x65, 0x61, - 0x6e, 0x55, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x44, - 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x22, 0x66, 0x0a, 0x14, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, - 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x0c, 0x64, 0x65, - 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x2a, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x0c, 0x64, 0x65, - 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x32, 0x81, 0x05, 0x0a, 0x10, 0x49, - 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, - 0x6d, 0x0a, 0x08, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x2e, 0x69, 0x67, - 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x6e, - 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x69, - 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, - 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, - 0x0a, 0x07, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x2e, 0x2e, 0x69, 0x67, 0x6e, 0x69, - 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x69, 0x67, 0x6e, 0x69, - 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7f, 0x0a, 0x0e, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x50, 0x72, 0x65, 0x12, 0x35, 0x2e, 0x69, + 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, + 0x74, 0x52, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x22, 0x71, 0x0a, 0x0e, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, + 0x03, 0x63, 0x6d, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x69, 0x67, 0x6e, + 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x03, 0x63, 0x6d, 0x64, + 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x22, 0x11, + 0x0a, 0x0f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x77, 0x0a, 0x15, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, + 0x50, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x04, 0x68, 0x6f, + 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, + 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x65, 0x64, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x04, 0x68, 0x6f, 0x6f, 0x6b, 0x12, 0x1c, 0x0a, 0x09, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x22, 0x18, 0x0a, 0x16, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x50, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x78, 0x0a, 0x16, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, + 0x6f, 0x6f, 0x6b, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, + 0x0a, 0x04, 0x68, 0x6f, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x50, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, - 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, - 0x50, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x82, 0x01, 0x0a, 0x0f, - 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x50, 0x6f, 0x73, 0x74, 0x12, - 0x36, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, - 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x50, 0x6f, 0x73, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, - 0x48, 0x6f, 0x6f, 0x6b, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x8b, 0x01, 0x0a, 0x12, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, - 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x55, 0x70, 0x12, 0x39, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, - 0x48, 0x6f, 0x6f, 0x6b, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x55, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x04, 0x68, 0x6f, 0x6f, 0x6b, + 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x22, 0x19, + 0x0a, 0x17, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x50, 0x6f, 0x73, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7b, 0x0a, 0x19, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x55, 0x70, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x04, 0x68, 0x6f, 0x6f, 0x6b, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x48, 0x6f, + 0x6f, 0x6b, 0x52, 0x04, 0x68, 0x6f, 0x6f, 0x6b, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x41, 0x50, 0x49, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x22, 0x1c, 0x0a, 0x1a, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x55, 0x70, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, + 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x66, 0x0a, 0x14, 0x44, + 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x0c, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, + 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x69, 0x67, 0x6e, 0x69, + 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, + 0x64, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, + 0x69, 0x65, 0x73, 0x32, 0x81, 0x05, 0x0a, 0x10, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, + 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6d, 0x0a, 0x08, 0x4d, 0x61, 0x6e, 0x69, + 0x66, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, + 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x07, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x65, 0x12, 0x2e, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x43, - 0x6c, 0x65, 0x61, 0x6e, 0x55, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x8c, - 0x01, 0x0a, 0x0f, 0x41, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x79, 0x0a, 0x0c, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, - 0x65, 0x73, 0x12, 0x33, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, - 0x6e, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, - 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x67, 0x6e, 0x69, - 0x74, 0x65, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2f, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x67, 0x72, - 0x70, 0x63, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x7f, 0x0a, 0x0e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, + 0x6f, 0x6b, 0x50, 0x72, 0x65, 0x12, 0x35, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, + 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, + 0x6f, 0x6b, 0x50, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x69, + 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x50, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x82, 0x01, 0x0a, 0x0f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, + 0x48, 0x6f, 0x6f, 0x6b, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x36, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, + 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x37, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, + 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x50, 0x6f, 0x73, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8b, 0x01, 0x0a, 0x12, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x55, 0x70, + 0x12, 0x39, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, + 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x43, 0x6c, 0x65, + 0x61, 0x6e, 0x55, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x69, 0x67, + 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x55, 0x70, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x8d, 0x01, 0x0a, 0x10, 0x43, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x41, 0x50, 0x49, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x79, 0x0a, 0x0c, + 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x12, 0x33, 0x2e, 0x69, + 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, + 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x34, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, + 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2f, 0x63, 0x6c, 0x69, + 0x2f, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, + 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -695,27 +695,25 @@ func file_ignite_services_plugin_grpc_v1_service_proto_rawDescGZIP() []byte { return file_ignite_services_plugin_grpc_v1_service_proto_rawDescData } -var ( - file_ignite_services_plugin_grpc_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 12) - file_ignite_services_plugin_grpc_v1_service_proto_goTypes = []interface{}{ - (*ManifestRequest)(nil), // 0: ignite.services.plugin.grpc.v1.ManifestRequest - (*ManifestResponse)(nil), // 1: ignite.services.plugin.grpc.v1.ManifestResponse - (*ExecuteRequest)(nil), // 2: ignite.services.plugin.grpc.v1.ExecuteRequest - (*ExecuteResponse)(nil), // 3: ignite.services.plugin.grpc.v1.ExecuteResponse - (*ExecuteHookPreRequest)(nil), // 4: ignite.services.plugin.grpc.v1.ExecuteHookPreRequest - (*ExecuteHookPreResponse)(nil), // 5: ignite.services.plugin.grpc.v1.ExecuteHookPreResponse - (*ExecuteHookPostRequest)(nil), // 6: ignite.services.plugin.grpc.v1.ExecuteHookPostRequest - (*ExecuteHookPostResponse)(nil), // 7: ignite.services.plugin.grpc.v1.ExecuteHookPostResponse - (*ExecuteHookCleanUpRequest)(nil), // 8: ignite.services.plugin.grpc.v1.ExecuteHookCleanUpRequest - (*ExecuteHookCleanUpResponse)(nil), // 9: ignite.services.plugin.grpc.v1.ExecuteHookCleanUpResponse - (*DependenciesRequest)(nil), // 10: ignite.services.plugin.grpc.v1.DependenciesRequest - (*DependenciesResponse)(nil), // 11: ignite.services.plugin.grpc.v1.DependenciesResponse - (*Manifest)(nil), // 12: ignite.services.plugin.grpc.v1.Manifest - (*ExecutedCommand)(nil), // 13: ignite.services.plugin.grpc.v1.ExecutedCommand - (*ExecutedHook)(nil), // 14: ignite.services.plugin.grpc.v1.ExecutedHook - (*Dependency)(nil), // 15: ignite.services.plugin.grpc.v1.Dependency - } -) +var file_ignite_services_plugin_grpc_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_ignite_services_plugin_grpc_v1_service_proto_goTypes = []interface{}{ + (*ManifestRequest)(nil), // 0: ignite.services.plugin.grpc.v1.ManifestRequest + (*ManifestResponse)(nil), // 1: ignite.services.plugin.grpc.v1.ManifestResponse + (*ExecuteRequest)(nil), // 2: ignite.services.plugin.grpc.v1.ExecuteRequest + (*ExecuteResponse)(nil), // 3: ignite.services.plugin.grpc.v1.ExecuteResponse + (*ExecuteHookPreRequest)(nil), // 4: ignite.services.plugin.grpc.v1.ExecuteHookPreRequest + (*ExecuteHookPreResponse)(nil), // 5: ignite.services.plugin.grpc.v1.ExecuteHookPreResponse + (*ExecuteHookPostRequest)(nil), // 6: ignite.services.plugin.grpc.v1.ExecuteHookPostRequest + (*ExecuteHookPostResponse)(nil), // 7: ignite.services.plugin.grpc.v1.ExecuteHookPostResponse + (*ExecuteHookCleanUpRequest)(nil), // 8: ignite.services.plugin.grpc.v1.ExecuteHookCleanUpRequest + (*ExecuteHookCleanUpResponse)(nil), // 9: ignite.services.plugin.grpc.v1.ExecuteHookCleanUpResponse + (*DependenciesRequest)(nil), // 10: ignite.services.plugin.grpc.v1.DependenciesRequest + (*DependenciesResponse)(nil), // 11: ignite.services.plugin.grpc.v1.DependenciesResponse + (*Manifest)(nil), // 12: ignite.services.plugin.grpc.v1.Manifest + (*ExecutedCommand)(nil), // 13: ignite.services.plugin.grpc.v1.ExecutedCommand + (*ExecutedHook)(nil), // 14: ignite.services.plugin.grpc.v1.ExecutedHook + (*Dependency)(nil), // 15: ignite.services.plugin.grpc.v1.Dependency +} var file_ignite_services_plugin_grpc_v1_service_proto_depIdxs = []int32{ 12, // 0: ignite.services.plugin.grpc.v1.ManifestResponse.manifest:type_name -> ignite.services.plugin.grpc.v1.Manifest 13, // 1: ignite.services.plugin.grpc.v1.ExecuteRequest.cmd:type_name -> ignite.services.plugin.grpc.v1.ExecutedCommand diff --git a/ignite/services/plugin/grpc/v1/service_grpc.pb.go b/ignite/services/plugin/grpc/v1/service_grpc.pb.go index 876ee8ac22..93fe6963d8 100644 --- a/ignite/services/plugin/grpc/v1/service_grpc.pb.go +++ b/ignite/services/plugin/grpc/v1/service_grpc.pb.go @@ -8,7 +8,6 @@ package v1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -138,24 +137,21 @@ type InterfaceServiceServer interface { } // UnimplementedInterfaceServiceServer must be embedded to have forward compatible implementations. -type UnimplementedInterfaceServiceServer struct{} +type UnimplementedInterfaceServiceServer struct { +} func (UnimplementedInterfaceServiceServer) Manifest(context.Context, *ManifestRequest) (*ManifestResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Manifest not implemented") } - func (UnimplementedInterfaceServiceServer) Execute(context.Context, *ExecuteRequest) (*ExecuteResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Execute not implemented") } - func (UnimplementedInterfaceServiceServer) ExecuteHookPre(context.Context, *ExecuteHookPreRequest) (*ExecuteHookPreResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ExecuteHookPre not implemented") } - func (UnimplementedInterfaceServiceServer) ExecuteHookPost(context.Context, *ExecuteHookPostRequest) (*ExecuteHookPostResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ExecuteHookPost not implemented") } - func (UnimplementedInterfaceServiceServer) ExecuteHookCleanUp(context.Context, *ExecuteHookCleanUpRequest) (*ExecuteHookCleanUpResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ExecuteHookCleanUp not implemented") } @@ -333,7 +329,8 @@ type ClientAPIServiceServer interface { } // UnimplementedClientAPIServiceServer must be embedded to have forward compatible implementations. -type UnimplementedClientAPIServiceServer struct{} +type UnimplementedClientAPIServiceServer struct { +} func (UnimplementedClientAPIServiceServer) Dependencies(context.Context, *DependenciesRequest) (*DependenciesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Dependencies not implemented") diff --git a/proto/ignite/services/plugin/grpc/v1/analizer.proto b/proto/ignite/services/plugin/grpc/v1/clientAPI.proto similarity index 100% rename from proto/ignite/services/plugin/grpc/v1/analizer.proto rename to proto/ignite/services/plugin/grpc/v1/clientAPI.proto From 70bb2461deb987b0a326dd4f4a24fb8854d4dee4 Mon Sep 17 00:00:00 2001 From: Clockwork Date: Tue, 4 Jul 2023 15:59:15 +0300 Subject: [PATCH 03/23] refactor: Add json tags --- ignite/pkg/cosmosanalysis/module/module.go | 38 ++++++------- ignite/pkg/protoanalysis/package.go | 66 ++++++++++------------ 2 files changed, 48 insertions(+), 56 deletions(-) diff --git a/ignite/pkg/cosmosanalysis/module/module.go b/ignite/pkg/cosmosanalysis/module/module.go index 16d538e847..e7bbb95129 100644 --- a/ignite/pkg/cosmosanalysis/module/module.go +++ b/ignite/pkg/cosmosanalysis/module/module.go @@ -22,57 +22,55 @@ type Msgs map[string][]string // Module keeps metadata about a Cosmos SDK module. type Module struct { // Name of the module. - Name string + Name string `json:"name,omitempty"` // GoModulePath of the app where the module is defined. - GoModulePath string + GoModulePath string `json:"go_module_path,omitempty"` // Pkg holds the proto package info. - Pkg protoanalysis.Package + Pkg protoanalysis.Package `json:"package,omitempty"` // Msg is a list of sdk.Msg implementation of the module. - Msgs []Msg + Msgs []Msg `json:"messages,omitempty"` // HTTPQueries is a list of module queries. - HTTPQueries []HTTPQuery + HTTPQueries []HTTPQuery `json:"http_queries,omitempty"` // Types is a list of proto types that might be used by module. - Types []Type + Types []Type `json:"types,omitempty"` } // Msg keeps metadata about an sdk.Msg implementation. type Msg struct { // Name of the type. - Name string - + Name string `json:"name,omitempty"` // URI of the type. - URI string - - // FilePath is the path of the .proto file where message is defined at. - FilePath string + URI string `json:"uri,omitempty"` + // File path is the path of the proto file where message is defined. + FilePath string `json:"file_path,omitempty"` } // HTTPQuery is an sdk Query. type HTTPQuery struct { // Name of the RPC func. - Name string + Name string `json:"name,omitempty"` // FullName of the query with service name and rpc func name. - FullName string + FullName string `json:"full_name,omitempty"` // HTTPAnnotations keeps info about http annotations of query. - Rules []protoanalysis.HTTPRule + Rules []protoanalysis.HTTPRule `json:"rules,omitempty"` // Paginated indicates that the query is using pagination. - Paginated bool + Paginated bool `json:"paginated,omitempty"` } // Type is a proto type that might be used by module. type Type struct { - Name string - - // FilePath is the path of the .proto file where message is defined at. - FilePath string + // Name pf the type. + Name string `json:"name,omitempty"` + // File path is the path of the .proto file where message is defined at. + FilePath string `json:"file_path,omitempty"` } type moduleDiscoverer struct { diff --git a/ignite/pkg/protoanalysis/package.go b/ignite/pkg/protoanalysis/package.go index 2d53d0e5a3..b5c6c3f1dd 100644 --- a/ignite/pkg/protoanalysis/package.go +++ b/ignite/pkg/protoanalysis/package.go @@ -19,32 +19,31 @@ func (p Packages) Files() Files { // Package represents a proto pkg. type Package struct { // Name of the proto pkg. - Name string + Name string `json:"name,omitempty"` // Path of the package in the fs. - Path string + Path string `json:"path,omitempty"` // Files is a list of .proto files in the package. - Files Files + Files Files `json:"files,omitempty"` // GoImportName is the go package name of proto package. - GoImportName string + GoImportName string `json:"go_import_name,omitempty"` // Messages is a list of proto messages defined in the package. - Messages []Message + Messages []Message `json:"messages,omitempty"` // Services is a list of RPC services. - Services []Service + Services []Service `json:"services,omitempty"` } type Files []File type File struct { // Path of the file. - Path string - - // Dependencies is a list of imported .proto files in this package. - Dependencies []string + Path string `json:"path,omitempty"` + // Dependencies is a list of imported proto packages. + Dependencies []string `json:"dependencies,omitempty"` } func (f Files) Paths() []string { @@ -73,56 +72,51 @@ func (p Package) GoImportPath() string { // Message represents a proto message. type Message struct { // Name of the message. - Name string - - // Path of the file where message is defined at. - Path string - - // HighestFieldNumber is the highest field number among fields of the message - // This allows to determine new field number when writing to proto message - HighestFieldNumber int - - // Fields contains message's field names and types - Fields map[string]string + Name string `json:"name,omitempty"` + // Path of the proto file where the message is defined. + Path string `json:"path,omitempty"` + // Highest field name is the highest field number among fields of the message. + // This allows to determine new field number when writing to proto message. + HighestFieldNumber int `json:"highest_field_number,omitempty"` + // Fields contains message's field names and types. + Fields map[string]string `json:"fields,omitempty"` } // Service is an RPC service. type Service struct { // Name of the services. - Name string + Name string `json:"name,omitempty"` // RPC is a list of RPC funcs of the service. - RPCFuncs []RPCFunc + RPCFuncs []RPCFunc `json:"functions,omitempty"` } // RPCFunc is an RPC func. type RPCFunc struct { // Name of the RPC func. - Name string + Name string `json:"name,omitempty"` // RequestType is the request type of RPC func. - RequestType string + RequestType string `json:"request_type,omitempty"` // ReturnsType is the response type of RPC func. - ReturnsType string + ReturnsType string `json:"return_type,omitempty"` // HTTPRules keeps info about http rules of an RPC func. // spec: // https://github.com/googleapis/googleapis/blob/master/google/api/http.proto. - HTTPRules []HTTPRule + HTTPRules []HTTPRule `json:"http_rules,omitempty"` // Paginated indicates that the RPC function is using pagination. - Paginated bool + Paginated bool `json:"paginated,omitempty"` } // HTTPRule keeps info about a configured http rule of an RPC func. type HTTPRule struct { - // Params is a list of parameters defined in the http endpoint itself. - Params []string - - // HasQuery indicates if there is a request query. - HasQuery bool - - // HasBody indicates if there is a request payload. - HasBody bool + // Params is a list of parameters defined in the HTTP endpoint itself. + Params []string `json:"params,omitempty"` + // Has query indicates if there is a request query. + HasQuery bool `json:"has_query,omitempty"` + // Has body indicates if there is a request payload. + HasBody bool `json:"has_body,omitempty"` } From b73332073401116977f3c59cce74ea2774f9f8c9 Mon Sep 17 00:00:00 2001 From: Clockwork Date: Fri, 7 Jul 2023 11:35:36 +0300 Subject: [PATCH 04/23] wip/refactor: Module analysis --- ignite/pkg/cosmosanalysis/chain/chain.go | 265 +++++++++++++++++++++++ ignite/services/chain/chain.go | 5 + 2 files changed, 270 insertions(+) create mode 100644 ignite/pkg/cosmosanalysis/chain/chain.go diff --git a/ignite/pkg/cosmosanalysis/chain/chain.go b/ignite/pkg/cosmosanalysis/chain/chain.go new file mode 100644 index 0000000000..607a015958 --- /dev/null +++ b/ignite/pkg/cosmosanalysis/chain/chain.go @@ -0,0 +1,265 @@ +package cosmosgen + +import ( + "bytes" + "context" + "encoding/json" + "os" + "path/filepath" + "strings" + + "github.com/pkg/errors" + + "github.com/ignite/cli/ignite/pkg/cache" + "github.com/ignite/cli/ignite/pkg/cmdrunner" + "github.com/ignite/cli/ignite/pkg/cmdrunner/step" + "github.com/ignite/cli/ignite/pkg/cosmosanalysis/module" + "github.com/ignite/cli/ignite/pkg/cosmosgen" + "github.com/ignite/cli/ignite/pkg/cosmosver" + "github.com/ignite/cli/ignite/pkg/gomodule" + "github.com/ignite/cli/ignite/pkg/xfilepath" + "github.com/ignite/cli/ignite/services/chain" + gomod "golang.org/x/mod/module" +) + +const ( + moduleCacheNamespace = "analyze.setup.module" +) + +var protocGlobalInclude = xfilepath.List( + xfilepath.JoinFromHome(xfilepath.Path("local/include")), + xfilepath.JoinFromHome(xfilepath.Path(".local/include")), +) + +type ModulesInPath struct { + Path string + Modules []module.Module +} +type AllModules struct { + ModulePaths []ModulesInPath + Includes []string +} + +type Analyzer struct { + ctx context.Context + appPath string + protoDir string + sdkImport string + appModules []module.Module + cacheStorage cache.Storage + deps []gomod.Version + includeDirs []string + thirdModules map[string][]module.Module // app dependency-modules pair. +} + +func GetModuleList(ctx context.Context, c *chain.Chain) (map[string]string, error) { + conf, err := c.Config() + if err != nil { + return nil, err + } + + cacheStorage, err := cache.NewStorage(filepath.Join(c.AppPath(), "analyzer_cache.db")) + if err != nil { + return nil, err + } + + if err := cosmosgen.InstallDepTools(ctx, c.AppPath()); err != nil { + return nil, err + } + + var errb bytes.Buffer + if err := cmdrunner. + New( + cmdrunner.DefaultStderr(&errb), + cmdrunner.DefaultWorkdir(g.appPath), + ).Run(g.ctx, step.New(step.Exec("go", "mod", "download"))); err != nil { + return nil, errors.Wrap(err, errb.String()) + } + + modFile, err := gomodule.ParseAt(g.appPath) + a := &Analyzer{ + ctx: ctx, + appPath: c.AppPath(), + protoDir: conf.Build.Proto.Path, + includeDirs: conf.Build.Proto.ThirdPartyPaths, + thirdModules: make(map[string][]module.Module), + cacheStorage: cacheStorage, + } + if err != nil { + return nil, err + } + + a.sdkImport = cosmosver.CosmosModulePath + + // Check if the Cosmos SDK import path points to a different path + // and if so change the default one to the new location. + for _, r := range modFile.Replace { + if r.Old.Path == cosmosver.CosmosModulePath { + a.sdkImport = r.New.Path + break + } + } + + // Read the dependencies defined in the `go.mod` file + a.deps, err = gomodule.ResolveDependencies(modFile) + if err != nil { + return nil, err + } + + // Discover any custom modules defined by the user's app + a.appModules, err = a.discoverModules(a.appPath, a.protoDir) + if err != nil { + return nil, err + } + + // Go through the Go dependencies of the user's app within go.mod, some of them might be hosting Cosmos SDK modules + // that could be in use by user's blockchain. + // + // Cosmos SDK is a dependency of all blockchains, so it's absolute that we'll be discovering all modules of the + // SDK as well during this process. + // + // Even if a dependency contains some SDK modules, not all of these modules could be used by user's blockchain. + // this is fine, we can still generate TS clients for those non modules, it is up to user to use (import in typescript) + // not use generated modules. + // + // TODO: we can still implement some sort of smart filtering to detect non used modules by the user's blockchain + // at some point, it is a nice to have. + moduleCache := cache.New[ModulesInPath](a.cacheStorage, moduleCacheNamespace) + for _, dep := range a.deps { + // Try to get the cached list of modules for the current dependency package + cacheKey := cache.Key(dep.Path, dep.Version) + modulesInPath, err := moduleCache.Get(cacheKey) + if err != nil && !errors.Is(err, cache.ErrorNotFound) { + return nil, err + } + + // Discover the modules of the dependency package when they are not cached + if errors.Is(err, cache.ErrorNotFound) { + // Get the absolute path to the package's directory + path, err := gomodule.LocatePath(a.ctx, a.cacheStorage, a.appPath, dep) + if err != nil { + return nil, err + } + + // Discover any modules defined by the package + modules, err := a.discoverModules(path, "") + if err != nil { + return nil, err + } + + modulesInPath = ModulesInPath{ + Path: path, + Modules: modules, + } + + if err := moduleCache.Put(cacheKey, modulesInPath); err != nil { + return nil, err + } + } + + a.thirdModules[modulesInPath.Path] = append(a.thirdModules[modulesInPath.Path], modulesInPath.Modules...) + } + + // Perform include resolution AFTER includeDirs has been fully populated + includePaths, err := a.resolveInclude(c.AppPath()) + if err != nil { + return nil, err + } + var modulelist []ModulesInPath + modulelist = append(modulelist, ModulesInPath{Path: c.AppPath(), Modules: a.appModules}) + for sourcePath, modules := range a.thirdModules { + modulelist = append(modulelist, ModulesInPath{Path: sourcePath, Modules: modules}) + } + allModules := &AllModules{ + ModulePaths: modulelist, + Includes: includePaths, + } + ret := make(map[string]string) + jsonm, _ := json.Marshal(allModules) + ret["ModuleAnalysis"] = string(jsonm) + return ret, nil +} + +func (a *Analyzer) resolveDependencyInclude() ([]string, error) { + // Init paths with the global include paths for protoc + paths, err := protocGlobalInclude() + if err != nil { + return nil, err + } + + // Relative paths to proto directories + protoDirs := append([]string{a.protoDir}, a.includeDirs...) + + // Create a list of proto import paths for the dependencies. + // These paths will be available to be imported from the chain app's proto files. + for rootPath, m := range a.thirdModules { + // Skip modules without proto files + if m == nil { + continue + } + + // Check each one of the possible proto directory names for the + // current module and append them only when the directory exists. + for _, d := range protoDirs { + p := filepath.Join(rootPath, d) + f, err := os.Stat(p) + if err != nil { + if os.IsNotExist(err) { + continue + } + + return nil, err + } + + if f.IsDir() { + paths = append(paths, p) + } + } + } + + return paths, nil +} + +func (a *Analyzer) resolveIncludeApp(path string) (paths []string) { + // Append chain app's proto paths + paths = append(paths, filepath.Join(path, a.protoDir)) + for _, p := range a.includeDirs { + paths = append(paths, filepath.Join(path, p)) + } + return +} + +func (a *Analyzer) resolveInclude(path string) (paths []string, err error) { + paths = a.resolveIncludeApp(path) + + // Append paths for dependencies that have protocol buffer files + includePaths, err := a.resolveDependencyInclude() + if err != nil { + return nil, err + } + + paths = append(paths, includePaths...) + + return paths, nil +} + +func (a *Analyzer) discoverModules(path, protoDir string) ([]module.Module, error) { + var filteredModules []module.Module + + modules, err := module.Discover(a.ctx, a.appPath, path, protoDir) + if err != nil { + return nil, err + } + + protoPath := filepath.Join(path, a.protoDir) + + for _, m := range modules { + if !strings.HasPrefix(m.Pkg.Path, protoPath) { + continue + } + + filteredModules = append(filteredModules, m) + } + + return filteredModules, nil +} diff --git a/ignite/services/chain/chain.go b/ignite/services/chain/chain.go index 2bc222ab57..a9ddf73a8c 100644 --- a/ignite/services/chain/chain.go +++ b/ignite/services/chain/chain.go @@ -314,6 +314,11 @@ func (c *Chain) Home() (string, error) { return home, nil } +// AppPath returns the configured App's path +func (c *Chain) AppPath() string { + return c.app.Path +} + // DefaultHome returns the blockchain node's default home dir when not specified in the app. func (c *Chain) DefaultHome() (string, error) { // check if home is defined in config From 0a183f508f977d166a095a09d59957edfe73954d Mon Sep 17 00:00:00 2001 From: "Alex M. (clockwork)" Date: Sat, 15 Jul 2023 08:17:22 +0300 Subject: [PATCH 05/23] feat: Add chain reference to plugin ClientAPI --- ignite/cmd/plugin.go | 30 ++- ignite/pkg/cosmosanalysis/chain/chain.go | 16 +- ignite/services/plugin/clientAPI.go | 35 ++- .../services/plugin/grpc/v1/client_api.pb.go | 227 ++++++++++++------ ignite/services/plugin/grpc/v1/service.pb.go | 114 ++++----- ignite/services/plugin/interface.go | 4 +- ignite/services/plugin/protocol.go | 2 +- .../services/plugin/grpc/v1/client_api.proto | 5 + .../services/plugin/grpc/v1/service.proto | 2 +- 9 files changed, 276 insertions(+), 159 deletions(-) diff --git a/ignite/cmd/plugin.go b/ignite/cmd/plugin.go index 9cbfa6f682..e143bd0fae 100644 --- a/ignite/cmd/plugin.go +++ b/ignite/cmd/plugin.go @@ -207,7 +207,11 @@ func linkPluginHook(rootCmd *cobra.Command, p *plugin.Plugin, hook *plugin.Hook) } execHook := newExecutedHook(hook, cmd, args) - err := p.Interface.ExecuteHookPre(ctx, execHook, plugin.NewClientAPI()) + c, err := newChainWithHomeFlags(cmd) + if err != nil { + return err + } + err = p.Interface.ExecuteHookPre(ctx, execHook, plugin.NewClientAPI(c)) if err != nil { return fmt.Errorf("plugin %q ExecuteHookPre() error: %w", p.Path, err) } @@ -223,7 +227,11 @@ func linkPluginHook(rootCmd *cobra.Command, p *plugin.Plugin, hook *plugin.Hook) if err != nil { ctx := cmd.Context() execHook := newExecutedHook(hook, cmd, args) - err := p.Interface.ExecuteHookCleanUp(ctx, execHook, plugin.NewClientAPI()) + c, err := newChainWithHomeFlags(cmd) + if err != nil { + return err + } + err = p.Interface.ExecuteHookCleanUp(ctx, execHook, plugin.NewClientAPI(c)) if err != nil { fmt.Printf("plugin %q ExecuteHookCleanUp() error: %v", p.Path, err) } @@ -240,8 +248,12 @@ func linkPluginHook(rootCmd *cobra.Command, p *plugin.Plugin, hook *plugin.Hook) ctx := cmd.Context() execHook := newExecutedHook(hook, cmd, args) + c, err := newChainWithHomeFlags(cmd) + if err != nil { + return err + } defer func() { - err := p.Interface.ExecuteHookCleanUp(ctx, execHook, plugin.NewClientAPI()) + err := p.Interface.ExecuteHookCleanUp(ctx, execHook, plugin.NewClientAPI(c)) if err != nil { fmt.Printf("plugin %q ExecuteHookCleanUp() error: %v", p.Path, err) } @@ -255,7 +267,11 @@ func linkPluginHook(rootCmd *cobra.Command, p *plugin.Plugin, hook *plugin.Hook) } } - err := p.Interface.ExecuteHookPost(ctx, execHook, plugin.NewClientAPI()) + c, err = newChainWithHomeFlags(cmd) + if err != nil { + return err + } + err = p.Interface.ExecuteHookPost(ctx, execHook, plugin.NewClientAPI(c)) if err != nil { return fmt.Errorf("plugin %q ExecuteHookPost() error : %w", p.Path, err) } @@ -327,7 +343,11 @@ func linkPluginCmd(rootCmd *cobra.Command, p *plugin.Plugin, pluginCmd *plugin.C } execCmd.ImportFlags(cmd) // Call the plugin Execute - err := p.Interface.Execute(ctx, execCmd, plugin.NewClientAPI()) + c, err := newChainWithHomeFlags(cmd) + if err != nil { + return err + } + err = p.Interface.Execute(ctx, execCmd, plugin.NewClientAPI(c)) // NOTE(tb): This pause gives enough time for go-plugin to sync the // output from stdout/stderr of the plugin. Without that pause, this // output can be discarded and not printed in the user console. diff --git a/ignite/pkg/cosmosanalysis/chain/chain.go b/ignite/pkg/cosmosanalysis/chain/chain.go index 607a015958..45f95efcff 100644 --- a/ignite/pkg/cosmosanalysis/chain/chain.go +++ b/ignite/pkg/cosmosanalysis/chain/chain.go @@ -1,9 +1,8 @@ -package cosmosgen +package chain import ( "bytes" "context" - "encoding/json" "os" "path/filepath" "strings" @@ -52,7 +51,7 @@ type Analyzer struct { thirdModules map[string][]module.Module // app dependency-modules pair. } -func GetModuleList(ctx context.Context, c *chain.Chain) (map[string]string, error) { +func GetModuleList(ctx context.Context, c *chain.Chain) (*AllModules, error) { conf, err := c.Config() if err != nil { return nil, err @@ -71,12 +70,12 @@ func GetModuleList(ctx context.Context, c *chain.Chain) (map[string]string, erro if err := cmdrunner. New( cmdrunner.DefaultStderr(&errb), - cmdrunner.DefaultWorkdir(g.appPath), - ).Run(g.ctx, step.New(step.Exec("go", "mod", "download"))); err != nil { + cmdrunner.DefaultWorkdir(c.AppPath()), + ).Run(ctx, step.New(step.Exec("go", "mod", "download"))); err != nil { return nil, errors.Wrap(err, errb.String()) } - modFile, err := gomodule.ParseAt(g.appPath) + modFile, err := gomodule.ParseAt(c.AppPath()) a := &Analyzer{ ctx: ctx, appPath: c.AppPath(), @@ -174,10 +173,7 @@ func GetModuleList(ctx context.Context, c *chain.Chain) (map[string]string, erro ModulePaths: modulelist, Includes: includePaths, } - ret := make(map[string]string) - jsonm, _ := json.Marshal(allModules) - ret["ModuleAnalysis"] = string(jsonm) - return ret, nil + return allModules, nil } func (a *Analyzer) resolveDependencyInclude() ([]string, error) { diff --git a/ignite/services/plugin/clientAPI.go b/ignite/services/plugin/clientAPI.go index cf01a32bed..3f19143b29 100644 --- a/ignite/services/plugin/clientAPI.go +++ b/ignite/services/plugin/clientAPI.go @@ -1,19 +1,38 @@ package plugin -import "context" +import ( + "context" + "encoding/json" + + "github.com/ignite/cli/ignite/pkg/cosmosanalysis/chain" + chainservice "github.com/ignite/cli/ignite/services/chain" +) // NewClientAPI creates a new app ClientAPI. -func NewClientAPI() clientAPI { - return clientAPI{} +func NewClientAPI(c *chainservice.Chain) clientAPI { + return clientAPI{chain: c} } -type clientAPI struct{} +type clientAPI struct { + chain *chainservice.Chain +} // TODO: Implement dependency ClientAPI. // Deoendencies returns chain app dependencies. -func (c clientAPI) Dependencies(_ context.Context) ([]*Dependency, error) { - return []*Dependency{ - {Path: "Foo"}, - }, nil +func (c clientAPI) Dependencies(ctx context.Context) (*Dependencies, error) { + + mods, err := chain.GetModuleList(ctx, c.chain) + + if err != nil { + return nil, err + } + ret := &Dependencies{} + bytes, err := json.Marshal(mods) + + if err != nil { + return nil, err + } + json.Unmarshal(bytes, ret) + return ret, nil } diff --git a/ignite/services/plugin/grpc/v1/client_api.pb.go b/ignite/services/plugin/grpc/v1/client_api.pb.go index 993be0b90f..90eb196a45 100644 --- a/ignite/services/plugin/grpc/v1/client_api.pb.go +++ b/ignite/services/plugin/grpc/v1/client_api.pb.go @@ -20,6 +20,61 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type Dependencies struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ModulesInPath []*Dependency `protobuf:"bytes,1,rep,name=modules_in_path,json=modulesInPath,proto3" json:"modules_in_path,omitempty"` + Includes []string `protobuf:"bytes,2,rep,name=includes,proto3" json:"includes,omitempty"` +} + +func (x *Dependencies) Reset() { + *x = Dependencies{} + if protoimpl.UnsafeEnabled { + mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Dependencies) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Dependencies) ProtoMessage() {} + +func (x *Dependencies) ProtoReflect() protoreflect.Message { + mi := &file_ignite_services_plugin_grpc_v1_client_api_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 Dependencies.ProtoReflect.Descriptor instead. +func (*Dependencies) Descriptor() ([]byte, []int) { + return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP(), []int{0} +} + +func (x *Dependencies) GetModulesInPath() []*Dependency { + if x != nil { + return x.ModulesInPath + } + return nil +} + +func (x *Dependencies) GetIncludes() []string { + if x != nil { + return x.Includes + } + return nil +} + // Dependecy keeps data about Go module dependencies. type Dependency struct { state protoimpl.MessageState @@ -35,7 +90,7 @@ type Dependency struct { func (x *Dependency) Reset() { *x = Dependency{} if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[0] + mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -48,7 +103,7 @@ func (x *Dependency) String() string { func (*Dependency) ProtoMessage() {} func (x *Dependency) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[0] + mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -61,7 +116,7 @@ func (x *Dependency) ProtoReflect() protoreflect.Message { // Deprecated: Use Dependency.ProtoReflect.Descriptor instead. func (*Dependency) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP(), []int{0} + return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP(), []int{1} } func (x *Dependency) GetPath() string { @@ -101,7 +156,7 @@ type Module struct { func (x *Module) Reset() { *x = Module{} if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[1] + mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -114,7 +169,7 @@ func (x *Module) String() string { func (*Module) ProtoMessage() {} func (x *Module) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[1] + mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -127,7 +182,7 @@ func (x *Module) ProtoReflect() protoreflect.Message { // Deprecated: Use Module.ProtoReflect.Descriptor instead. func (*Module) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP(), []int{1} + return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP(), []int{2} } func (x *Module) GetName() string { @@ -195,7 +250,7 @@ type ProtoPackage struct { func (x *ProtoPackage) Reset() { *x = ProtoPackage{} if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[2] + mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -208,7 +263,7 @@ func (x *ProtoPackage) String() string { func (*ProtoPackage) ProtoMessage() {} func (x *ProtoPackage) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[2] + mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -221,7 +276,7 @@ func (x *ProtoPackage) ProtoReflect() protoreflect.Message { // Deprecated: Use ProtoPackage.ProtoReflect.Descriptor instead. func (*ProtoPackage) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP(), []int{2} + return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP(), []int{3} } func (x *ProtoPackage) GetName() string { @@ -281,7 +336,7 @@ type ProtoFile struct { func (x *ProtoFile) Reset() { *x = ProtoFile{} if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[3] + mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -294,7 +349,7 @@ func (x *ProtoFile) String() string { func (*ProtoFile) ProtoMessage() {} func (x *ProtoFile) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[3] + mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -307,7 +362,7 @@ func (x *ProtoFile) ProtoReflect() protoreflect.Message { // Deprecated: Use ProtoFile.ProtoReflect.Descriptor instead. func (*ProtoFile) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP(), []int{3} + return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP(), []int{4} } func (x *ProtoFile) GetPath() string { @@ -344,7 +399,7 @@ type ProtoMessage struct { func (x *ProtoMessage) Reset() { *x = ProtoMessage{} if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[4] + mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -357,7 +412,7 @@ func (x *ProtoMessage) String() string { func (*ProtoMessage) ProtoMessage() {} func (x *ProtoMessage) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[4] + mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -370,7 +425,7 @@ func (x *ProtoMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use ProtoMessage.ProtoReflect.Descriptor instead. func (*ProtoMessage) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP(), []int{4} + return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP(), []int{5} } func (x *ProtoMessage) GetName() string { @@ -416,7 +471,7 @@ type ProtoService struct { func (x *ProtoService) Reset() { *x = ProtoService{} if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[5] + mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -429,7 +484,7 @@ func (x *ProtoService) String() string { func (*ProtoService) ProtoMessage() {} func (x *ProtoService) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[5] + mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -442,7 +497,7 @@ func (x *ProtoService) ProtoReflect() protoreflect.Message { // Deprecated: Use ProtoService.ProtoReflect.Descriptor instead. func (*ProtoService) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP(), []int{5} + return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP(), []int{6} } func (x *ProtoService) GetName() string { @@ -480,7 +535,7 @@ type ProtoServiceFunc struct { func (x *ProtoServiceFunc) Reset() { *x = ProtoServiceFunc{} if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[6] + mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -493,7 +548,7 @@ func (x *ProtoServiceFunc) String() string { func (*ProtoServiceFunc) ProtoMessage() {} func (x *ProtoServiceFunc) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[6] + mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -506,7 +561,7 @@ func (x *ProtoServiceFunc) ProtoReflect() protoreflect.Message { // Deprecated: Use ProtoServiceFunc.ProtoReflect.Descriptor instead. func (*ProtoServiceFunc) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP(), []int{6} + return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP(), []int{7} } func (x *ProtoServiceFunc) GetName() string { @@ -561,7 +616,7 @@ type Message struct { func (x *Message) Reset() { *x = Message{} if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[7] + mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -574,7 +629,7 @@ func (x *Message) String() string { func (*Message) ProtoMessage() {} func (x *Message) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[7] + mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -587,7 +642,7 @@ func (x *Message) ProtoReflect() protoreflect.Message { // Deprecated: Use Message.ProtoReflect.Descriptor instead. func (*Message) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP(), []int{7} + return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP(), []int{8} } func (x *Message) GetName() string { @@ -630,7 +685,7 @@ type HTTPQuery struct { func (x *HTTPQuery) Reset() { *x = HTTPQuery{} if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[8] + mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -643,7 +698,7 @@ func (x *HTTPQuery) String() string { func (*HTTPQuery) ProtoMessage() {} func (x *HTTPQuery) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[8] + mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -656,7 +711,7 @@ func (x *HTTPQuery) ProtoReflect() protoreflect.Message { // Deprecated: Use HTTPQuery.ProtoReflect.Descriptor instead. func (*HTTPQuery) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP(), []int{8} + return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP(), []int{9} } func (x *HTTPQuery) GetName() string { @@ -704,7 +759,7 @@ type HTTPRule struct { func (x *HTTPRule) Reset() { *x = HTTPRule{} if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[9] + mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -717,7 +772,7 @@ func (x *HTTPRule) String() string { func (*HTTPRule) ProtoMessage() {} func (x *HTTPRule) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[9] + mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -730,7 +785,7 @@ func (x *HTTPRule) ProtoReflect() protoreflect.Message { // Deprecated: Use HTTPRule.ProtoReflect.Descriptor instead. func (*HTTPRule) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP(), []int{9} + return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP(), []int{10} } func (x *HTTPRule) GetParams() []string { @@ -769,7 +824,7 @@ type Type struct { func (x *Type) Reset() { *x = Type{} if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[10] + mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -782,7 +837,7 @@ func (x *Type) String() string { func (*Type) ProtoMessage() {} func (x *Type) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[10] + mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -795,7 +850,7 @@ func (x *Type) ProtoReflect() protoreflect.Message { // Deprecated: Use Type.ProtoReflect.Descriptor instead. func (*Type) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP(), []int{10} + return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP(), []int{11} } func (x *Type) GetName() string { @@ -820,7 +875,15 @@ var file_ignite_services_plugin_grpc_v1_client_api_proto_rawDesc = []byte{ 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, - 0x31, 0x22, 0x62, 0x0a, 0x0a, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, + 0x31, 0x22, 0x7e, 0x0a, 0x0c, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, + 0x73, 0x12, 0x52, 0x0a, 0x0f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x5f, 0x69, 0x6e, 0x5f, + 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x69, 0x67, 0x6e, + 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x65, + 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x0d, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x49, + 0x6e, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, + 0x73, 0x22, 0x62, 0x0a, 0x0a, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x40, 0x0a, 0x07, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, @@ -950,39 +1013,41 @@ func file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP() []byte { return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescData } -var file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_ignite_services_plugin_grpc_v1_client_api_proto_goTypes = []interface{}{ - (*Dependency)(nil), // 0: ignite.services.plugin.grpc.v1.Dependency - (*Module)(nil), // 1: ignite.services.plugin.grpc.v1.Module - (*ProtoPackage)(nil), // 2: ignite.services.plugin.grpc.v1.ProtoPackage - (*ProtoFile)(nil), // 3: ignite.services.plugin.grpc.v1.ProtoFile - (*ProtoMessage)(nil), // 4: ignite.services.plugin.grpc.v1.ProtoMessage - (*ProtoService)(nil), // 5: ignite.services.plugin.grpc.v1.ProtoService - (*ProtoServiceFunc)(nil), // 6: ignite.services.plugin.grpc.v1.ProtoServiceFunc - (*Message)(nil), // 7: ignite.services.plugin.grpc.v1.Message - (*HTTPQuery)(nil), // 8: ignite.services.plugin.grpc.v1.HTTPQuery - (*HTTPRule)(nil), // 9: ignite.services.plugin.grpc.v1.HTTPRule - (*Type)(nil), // 10: ignite.services.plugin.grpc.v1.Type - nil, // 11: ignite.services.plugin.grpc.v1.ProtoMessage.FieldsEntry + (*Dependencies)(nil), // 0: ignite.services.plugin.grpc.v1.Dependencies + (*Dependency)(nil), // 1: ignite.services.plugin.grpc.v1.Dependency + (*Module)(nil), // 2: ignite.services.plugin.grpc.v1.Module + (*ProtoPackage)(nil), // 3: ignite.services.plugin.grpc.v1.ProtoPackage + (*ProtoFile)(nil), // 4: ignite.services.plugin.grpc.v1.ProtoFile + (*ProtoMessage)(nil), // 5: ignite.services.plugin.grpc.v1.ProtoMessage + (*ProtoService)(nil), // 6: ignite.services.plugin.grpc.v1.ProtoService + (*ProtoServiceFunc)(nil), // 7: ignite.services.plugin.grpc.v1.ProtoServiceFunc + (*Message)(nil), // 8: ignite.services.plugin.grpc.v1.Message + (*HTTPQuery)(nil), // 9: ignite.services.plugin.grpc.v1.HTTPQuery + (*HTTPRule)(nil), // 10: ignite.services.plugin.grpc.v1.HTTPRule + (*Type)(nil), // 11: ignite.services.plugin.grpc.v1.Type + nil, // 12: ignite.services.plugin.grpc.v1.ProtoMessage.FieldsEntry } var file_ignite_services_plugin_grpc_v1_client_api_proto_depIdxs = []int32{ - 1, // 0: ignite.services.plugin.grpc.v1.Dependency.modules:type_name -> ignite.services.plugin.grpc.v1.Module - 2, // 1: ignite.services.plugin.grpc.v1.Module.package:type_name -> ignite.services.plugin.grpc.v1.ProtoPackage - 7, // 2: ignite.services.plugin.grpc.v1.Module.messages:type_name -> ignite.services.plugin.grpc.v1.Message - 8, // 3: ignite.services.plugin.grpc.v1.Module.http_queries:type_name -> ignite.services.plugin.grpc.v1.HTTPQuery - 10, // 4: ignite.services.plugin.grpc.v1.Module.types:type_name -> ignite.services.plugin.grpc.v1.Type - 3, // 5: ignite.services.plugin.grpc.v1.ProtoPackage.files:type_name -> ignite.services.plugin.grpc.v1.ProtoFile - 4, // 6: ignite.services.plugin.grpc.v1.ProtoPackage.messages:type_name -> ignite.services.plugin.grpc.v1.ProtoMessage - 5, // 7: ignite.services.plugin.grpc.v1.ProtoPackage.services:type_name -> ignite.services.plugin.grpc.v1.ProtoService - 11, // 8: ignite.services.plugin.grpc.v1.ProtoMessage.fields:type_name -> ignite.services.plugin.grpc.v1.ProtoMessage.FieldsEntry - 6, // 9: ignite.services.plugin.grpc.v1.ProtoService.functions:type_name -> ignite.services.plugin.grpc.v1.ProtoServiceFunc - 9, // 10: ignite.services.plugin.grpc.v1.ProtoServiceFunc.http_rules:type_name -> ignite.services.plugin.grpc.v1.HTTPRule - 9, // 11: ignite.services.plugin.grpc.v1.HTTPQuery.rules:type_name -> ignite.services.plugin.grpc.v1.HTTPRule - 12, // [12:12] is the sub-list for method output_type - 12, // [12:12] is the sub-list for method input_type - 12, // [12:12] is the sub-list for extension type_name - 12, // [12:12] is the sub-list for extension extendee - 0, // [0:12] is the sub-list for field type_name + 1, // 0: ignite.services.plugin.grpc.v1.Dependencies.modules_in_path:type_name -> ignite.services.plugin.grpc.v1.Dependency + 2, // 1: ignite.services.plugin.grpc.v1.Dependency.modules:type_name -> ignite.services.plugin.grpc.v1.Module + 3, // 2: ignite.services.plugin.grpc.v1.Module.package:type_name -> ignite.services.plugin.grpc.v1.ProtoPackage + 8, // 3: ignite.services.plugin.grpc.v1.Module.messages:type_name -> ignite.services.plugin.grpc.v1.Message + 9, // 4: ignite.services.plugin.grpc.v1.Module.http_queries:type_name -> ignite.services.plugin.grpc.v1.HTTPQuery + 11, // 5: ignite.services.plugin.grpc.v1.Module.types:type_name -> ignite.services.plugin.grpc.v1.Type + 4, // 6: ignite.services.plugin.grpc.v1.ProtoPackage.files:type_name -> ignite.services.plugin.grpc.v1.ProtoFile + 5, // 7: ignite.services.plugin.grpc.v1.ProtoPackage.messages:type_name -> ignite.services.plugin.grpc.v1.ProtoMessage + 6, // 8: ignite.services.plugin.grpc.v1.ProtoPackage.services:type_name -> ignite.services.plugin.grpc.v1.ProtoService + 12, // 9: ignite.services.plugin.grpc.v1.ProtoMessage.fields:type_name -> ignite.services.plugin.grpc.v1.ProtoMessage.FieldsEntry + 7, // 10: ignite.services.plugin.grpc.v1.ProtoService.functions:type_name -> ignite.services.plugin.grpc.v1.ProtoServiceFunc + 10, // 11: ignite.services.plugin.grpc.v1.ProtoServiceFunc.http_rules:type_name -> ignite.services.plugin.grpc.v1.HTTPRule + 10, // 12: ignite.services.plugin.grpc.v1.HTTPQuery.rules:type_name -> ignite.services.plugin.grpc.v1.HTTPRule + 13, // [13:13] is the sub-list for method output_type + 13, // [13:13] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name } func init() { file_ignite_services_plugin_grpc_v1_client_api_proto_init() } @@ -992,7 +1057,7 @@ func file_ignite_services_plugin_grpc_v1_client_api_proto_init() { } if !protoimpl.UnsafeEnabled { file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Dependency); i { + switch v := v.(*Dependencies); i { case 0: return &v.state case 1: @@ -1004,7 +1069,7 @@ func file_ignite_services_plugin_grpc_v1_client_api_proto_init() { } } file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Module); i { + switch v := v.(*Dependency); i { case 0: return &v.state case 1: @@ -1016,7 +1081,7 @@ func file_ignite_services_plugin_grpc_v1_client_api_proto_init() { } } file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProtoPackage); i { + switch v := v.(*Module); i { case 0: return &v.state case 1: @@ -1028,7 +1093,7 @@ func file_ignite_services_plugin_grpc_v1_client_api_proto_init() { } } file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProtoFile); i { + switch v := v.(*ProtoPackage); i { case 0: return &v.state case 1: @@ -1040,7 +1105,7 @@ func file_ignite_services_plugin_grpc_v1_client_api_proto_init() { } } file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProtoMessage); i { + switch v := v.(*ProtoFile); i { case 0: return &v.state case 1: @@ -1052,7 +1117,7 @@ func file_ignite_services_plugin_grpc_v1_client_api_proto_init() { } } file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProtoService); i { + switch v := v.(*ProtoMessage); i { case 0: return &v.state case 1: @@ -1064,7 +1129,7 @@ func file_ignite_services_plugin_grpc_v1_client_api_proto_init() { } } file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProtoServiceFunc); i { + switch v := v.(*ProtoService); i { case 0: return &v.state case 1: @@ -1076,7 +1141,7 @@ func file_ignite_services_plugin_grpc_v1_client_api_proto_init() { } } file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Message); i { + switch v := v.(*ProtoServiceFunc); i { case 0: return &v.state case 1: @@ -1088,7 +1153,7 @@ func file_ignite_services_plugin_grpc_v1_client_api_proto_init() { } } file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HTTPQuery); i { + switch v := v.(*Message); i { case 0: return &v.state case 1: @@ -1100,7 +1165,7 @@ func file_ignite_services_plugin_grpc_v1_client_api_proto_init() { } } file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HTTPRule); i { + switch v := v.(*HTTPQuery); i { case 0: return &v.state case 1: @@ -1112,6 +1177,18 @@ func file_ignite_services_plugin_grpc_v1_client_api_proto_init() { } } file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HTTPRule); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Type); i { case 0: return &v.state @@ -1130,7 +1207,7 @@ func file_ignite_services_plugin_grpc_v1_client_api_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_ignite_services_plugin_grpc_v1_client_api_proto_rawDesc, NumEnums: 0, - NumMessages: 12, + NumMessages: 13, NumExtensions: 0, NumServices: 0, }, diff --git a/ignite/services/plugin/grpc/v1/service.pb.go b/ignite/services/plugin/grpc/v1/service.pb.go index 52efc1f211..da1a8ff66f 100644 --- a/ignite/services/plugin/grpc/v1/service.pb.go +++ b/ignite/services/plugin/grpc/v1/service.pb.go @@ -520,7 +520,7 @@ type DependenciesResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Dependencies []*Dependency `protobuf:"bytes,2,rep,name=dependencies,proto3" json:"dependencies,omitempty"` + Dependencies *Dependencies `protobuf:"bytes,2,opt,name=dependencies,proto3" json:"dependencies,omitempty"` } func (x *DependenciesResponse) Reset() { @@ -555,7 +555,7 @@ func (*DependenciesResponse) Descriptor() ([]byte, []int) { return file_ignite_services_plugin_grpc_v1_service_proto_rawDescGZIP(), []int{11} } -func (x *DependenciesResponse) GetDependencies() []*Dependency { +func (x *DependenciesResponse) GetDependencies() *Dependencies { if x != nil { return x.Dependencies } @@ -621,66 +621,66 @@ var file_ignite_services_plugin_grpc_v1_service_proto_rawDesc = []byte{ 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x55, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x22, 0x66, 0x0a, 0x14, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x0c, 0x64, 0x65, 0x70, 0x65, - 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, + 0x22, 0x68, 0x0a, 0x14, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x0c, 0x64, 0x65, 0x70, 0x65, + 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x65, - 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x32, 0x81, 0x05, 0x0a, 0x10, 0x49, 0x6e, 0x74, - 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6d, 0x0a, - 0x08, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x2e, 0x69, 0x67, 0x6e, 0x69, + 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x52, 0x0c, 0x64, 0x65, + 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x32, 0x81, 0x05, 0x0a, 0x10, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x6d, 0x0a, 0x08, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x2e, 0x69, 0x67, + 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x6e, + 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x69, + 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, + 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, + 0x0a, 0x07, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x2e, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x6e, 0x69, 0x66, - 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x69, 0x67, 0x6e, - 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, - 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x6e, 0x69, - 0x66, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x07, - 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x2e, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, + 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x69, 0x67, 0x6e, 0x69, + 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7f, 0x0a, 0x0e, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x50, 0x72, 0x65, 0x12, 0x35, 0x2e, 0x69, + 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x50, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, + 0x50, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x82, 0x01, 0x0a, 0x0f, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x50, 0x6f, 0x73, 0x74, 0x12, + 0x36, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, + 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x50, 0x6f, 0x73, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, + 0x48, 0x6f, 0x6f, 0x6b, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x8b, 0x01, 0x0a, 0x12, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, + 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x55, 0x70, 0x12, 0x39, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7f, 0x0a, 0x0e, 0x45, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x50, 0x72, 0x65, 0x12, 0x35, 0x2e, 0x69, 0x67, 0x6e, - 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, - 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x50, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x36, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, - 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x50, 0x72, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x82, 0x01, 0x0a, 0x0f, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x36, 0x2e, - 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, - 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, - 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, - 0x6f, 0x6b, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8b, - 0x01, 0x0a, 0x12, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x43, 0x6c, - 0x65, 0x61, 0x6e, 0x55, 0x70, 0x12, 0x39, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, - 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, - 0x6f, 0x6b, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x55, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x3a, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x43, 0x6c, 0x65, - 0x61, 0x6e, 0x55, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x8d, 0x01, 0x0a, - 0x10, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x79, 0x0a, 0x0c, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, - 0x73, 0x12, 0x33, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, - 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, - 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, - 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, 0x34, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x67, 0x6e, 0x69, 0x74, - 0x65, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2f, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x67, 0x72, 0x70, - 0x63, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x48, 0x6f, 0x6f, 0x6b, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x55, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, + 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x43, + 0x6c, 0x65, 0x61, 0x6e, 0x55, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x8d, + 0x01, 0x0a, 0x10, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x79, 0x0a, 0x0c, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, + 0x69, 0x65, 0x73, 0x12, 0x33, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, + 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, + 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, + 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x67, 0x6e, + 0x69, 0x74, 0x65, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2f, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x67, + 0x72, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -712,7 +712,7 @@ var file_ignite_services_plugin_grpc_v1_service_proto_goTypes = []interface{}{ (*Manifest)(nil), // 12: ignite.services.plugin.grpc.v1.Manifest (*ExecutedCommand)(nil), // 13: ignite.services.plugin.grpc.v1.ExecutedCommand (*ExecutedHook)(nil), // 14: ignite.services.plugin.grpc.v1.ExecutedHook - (*Dependency)(nil), // 15: ignite.services.plugin.grpc.v1.Dependency + (*Dependencies)(nil), // 15: ignite.services.plugin.grpc.v1.Dependencies } var file_ignite_services_plugin_grpc_v1_service_proto_depIdxs = []int32{ 12, // 0: ignite.services.plugin.grpc.v1.ManifestResponse.manifest:type_name -> ignite.services.plugin.grpc.v1.Manifest @@ -720,7 +720,7 @@ var file_ignite_services_plugin_grpc_v1_service_proto_depIdxs = []int32{ 14, // 2: ignite.services.plugin.grpc.v1.ExecuteHookPreRequest.hook:type_name -> ignite.services.plugin.grpc.v1.ExecutedHook 14, // 3: ignite.services.plugin.grpc.v1.ExecuteHookPostRequest.hook:type_name -> ignite.services.plugin.grpc.v1.ExecutedHook 14, // 4: ignite.services.plugin.grpc.v1.ExecuteHookCleanUpRequest.hook:type_name -> ignite.services.plugin.grpc.v1.ExecutedHook - 15, // 5: ignite.services.plugin.grpc.v1.DependenciesResponse.dependencies:type_name -> ignite.services.plugin.grpc.v1.Dependency + 15, // 5: ignite.services.plugin.grpc.v1.DependenciesResponse.dependencies:type_name -> ignite.services.plugin.grpc.v1.Dependencies 0, // 6: ignite.services.plugin.grpc.v1.InterfaceService.Manifest:input_type -> ignite.services.plugin.grpc.v1.ManifestRequest 2, // 7: ignite.services.plugin.grpc.v1.InterfaceService.Execute:input_type -> ignite.services.plugin.grpc.v1.ExecuteRequest 4, // 8: ignite.services.plugin.grpc.v1.InterfaceService.ExecuteHookPre:input_type -> ignite.services.plugin.grpc.v1.ExecuteHookPreRequest diff --git a/ignite/services/plugin/interface.go b/ignite/services/plugin/interface.go index e03c870050..514225616d 100644 --- a/ignite/services/plugin/interface.go +++ b/ignite/services/plugin/interface.go @@ -20,7 +20,7 @@ const ( // Type aliases for the current plugin version. type ( Command = v1.Command - Dependency = v1.Dependency + Dependencies = v1.Dependencies ExecutedCommand = v1.ExecutedCommand ExecutedHook = v1.ExecutedHook Flag = v1.Flag @@ -70,5 +70,5 @@ type Interface interface { //go:generate mockery --srcpkg . --name ClientAPI --structname PluginClientAPI --filename interface.go --with-expecter type ClientAPI interface { // Dependencies returns the app dependencies. - Dependencies(context.Context) ([]*Dependency, error) + Dependencies(context.Context) (*Dependencies, error) } diff --git a/ignite/services/plugin/protocol.go b/ignite/services/plugin/protocol.go index da8871383e..f2454c6ffd 100644 --- a/ignite/services/plugin/protocol.go +++ b/ignite/services/plugin/protocol.go @@ -208,7 +208,7 @@ type clientAPIClient struct { grpc v1.ClientAPIServiceClient } -func (c clientAPIClient) Dependencies(ctx context.Context) ([]*Dependency, error) { +func (c clientAPIClient) Dependencies(ctx context.Context) (*Dependencies, error) { r, err := c.grpc.Dependencies(ctx, &v1.DependenciesRequest{}) if err != nil { return nil, err diff --git a/proto/ignite/services/plugin/grpc/v1/client_api.proto b/proto/ignite/services/plugin/grpc/v1/client_api.proto index 69e352cf1c..3175f660e7 100644 --- a/proto/ignite/services/plugin/grpc/v1/client_api.proto +++ b/proto/ignite/services/plugin/grpc/v1/client_api.proto @@ -4,6 +4,11 @@ package ignite.services.plugin.grpc.v1; option go_package = "github.com/ignite/cli/ignite/services/plugin/grpc/v1"; +message Dependencies { + repeated Dependency modules_in_path = 1; + repeated string includes = 2; +} + // Dependecy keeps data about Go module dependencies. message Dependency { // Path is the absolute path to the Go module. diff --git a/proto/ignite/services/plugin/grpc/v1/service.proto b/proto/ignite/services/plugin/grpc/v1/service.proto index c68748d100..aa2d2b492c 100644 --- a/proto/ignite/services/plugin/grpc/v1/service.proto +++ b/proto/ignite/services/plugin/grpc/v1/service.proto @@ -80,5 +80,5 @@ service ClientAPIService { message DependenciesRequest {} message DependenciesResponse { - repeated Dependency dependencies = 2; + Dependencies dependencies = 2; } From 43af937a487725e959573d0dad18407b439f7b8c Mon Sep 17 00:00:00 2001 From: "Alex M. (clockwork)" Date: Mon, 17 Jul 2023 09:59:33 +0300 Subject: [PATCH 06/23] feat: Complete Dependencies ClientAPI method --- ignite/pkg/cosmosanalysis/chain/chain.go | 8 ++++---- ignite/services/plugin/clientAPI.go | 2 ++ ignite/services/plugin/template/main.go.plush | 5 +++++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ignite/pkg/cosmosanalysis/chain/chain.go b/ignite/pkg/cosmosanalysis/chain/chain.go index 45f95efcff..3430959551 100644 --- a/ignite/pkg/cosmosanalysis/chain/chain.go +++ b/ignite/pkg/cosmosanalysis/chain/chain.go @@ -31,12 +31,12 @@ var protocGlobalInclude = xfilepath.List( ) type ModulesInPath struct { - Path string - Modules []module.Module + Path string `json:"path,omitempty"` + Modules []module.Module `json:"modules,omitempty"` } type AllModules struct { - ModulePaths []ModulesInPath - Includes []string + ModulePaths []ModulesInPath `json:"modules_in_path,omitempty"` + Includes []string `json:"includes,omitempty"` } type Analyzer struct { diff --git a/ignite/services/plugin/clientAPI.go b/ignite/services/plugin/clientAPI.go index 3f19143b29..31dad5a9ca 100644 --- a/ignite/services/plugin/clientAPI.go +++ b/ignite/services/plugin/clientAPI.go @@ -3,6 +3,7 @@ package plugin import ( "context" "encoding/json" + "fmt" "github.com/ignite/cli/ignite/pkg/cosmosanalysis/chain" chainservice "github.com/ignite/cli/ignite/services/chain" @@ -34,5 +35,6 @@ func (c clientAPI) Dependencies(ctx context.Context) (*Dependencies, error) { return nil, err } json.Unmarshal(bytes, ret) + fmt.Println(ret) return ret, nil } diff --git a/ignite/services/plugin/template/main.go.plush b/ignite/services/plugin/template/main.go.plush index ea07213633..a5e53a24de 100644 --- a/ignite/services/plugin/template/main.go.plush +++ b/ignite/services/plugin/template/main.go.plush @@ -73,6 +73,11 @@ func (p) Execute(ctx context.Context, cmd *plugin.ExecutedCommand, c plugin.Clie fmt.Println("Deleting stuff...") } */ + + // Calling the ClientAPI example + /* + fmt.Println(c.Dependencies(ctx)) + /* return nil } From 5bec995a507186e4fcaedbae9b4841921bf073d8 Mon Sep 17 00:00:00 2001 From: Clockwork Date: Tue, 8 Aug 2023 12:37:12 +0300 Subject: [PATCH 07/23] fix: Address review comments --- ignite/cmd/plugin.go | 32 +++++++------------ ignite/pkg/cosmosanalysis/chain/chain.go | 24 ++++++++++---- ignite/pkg/cosmosanalysis/module/module.go | 3 ++ ignite/pkg/cosmosgen/generate.go | 2 +- ignite/pkg/gomodule/gomodule.go | 4 +-- ignite/pkg/protoanalysis/package.go | 3 ++ ignite/services/chain/chain.go | 2 +- .../plugin/{clientAPI.go => client_api.go} | 16 ++++------ ignite/services/plugin/template/go.mod.plush | 2 +- ignite/services/plugin/template/main.go.plush | 6 ++-- 10 files changed, 50 insertions(+), 44 deletions(-) rename ignite/services/plugin/{clientAPI.go => client_api.go} (76%) diff --git a/ignite/cmd/plugin.go b/ignite/cmd/plugin.go index e143bd0fae..9629bb4ee3 100644 --- a/ignite/cmd/plugin.go +++ b/ignite/cmd/plugin.go @@ -180,6 +180,11 @@ func linkPluginHook(rootCmd *cobra.Command, p *plugin.Plugin, hook *plugin.Hook) return } + c, err := newChainWithHomeFlags(cmd) + if err != nil { + p.Error = errors.Errorf("unable to obtain chain information.") + return + } newExecutedHook := func(hook *plugin.Hook, cmd *cobra.Command, args []string) *plugin.ExecutedHook { execHook := &plugin.ExecutedHook{ Hook: hook, @@ -207,11 +212,7 @@ func linkPluginHook(rootCmd *cobra.Command, p *plugin.Plugin, hook *plugin.Hook) } execHook := newExecutedHook(hook, cmd, args) - c, err := newChainWithHomeFlags(cmd) - if err != nil { - return err - } - err = p.Interface.ExecuteHookPre(ctx, execHook, plugin.NewClientAPI(c)) + err := p.Interface.ExecuteHookPre(ctx, execHook, plugin.NewClientAPI(c)) if err != nil { return fmt.Errorf("plugin %q ExecuteHookPre() error: %w", p.Path, err) } @@ -227,10 +228,6 @@ func linkPluginHook(rootCmd *cobra.Command, p *plugin.Plugin, hook *plugin.Hook) if err != nil { ctx := cmd.Context() execHook := newExecutedHook(hook, cmd, args) - c, err := newChainWithHomeFlags(cmd) - if err != nil { - return err - } err = p.Interface.ExecuteHookCleanUp(ctx, execHook, plugin.NewClientAPI(c)) if err != nil { fmt.Printf("plugin %q ExecuteHookCleanUp() error: %v", p.Path, err) @@ -248,10 +245,6 @@ func linkPluginHook(rootCmd *cobra.Command, p *plugin.Plugin, hook *plugin.Hook) ctx := cmd.Context() execHook := newExecutedHook(hook, cmd, args) - c, err := newChainWithHomeFlags(cmd) - if err != nil { - return err - } defer func() { err := p.Interface.ExecuteHookCleanUp(ctx, execHook, plugin.NewClientAPI(c)) if err != nil { @@ -267,10 +260,6 @@ func linkPluginHook(rootCmd *cobra.Command, p *plugin.Plugin, hook *plugin.Hook) } } - c, err = newChainWithHomeFlags(cmd) - if err != nil { - return err - } err = p.Interface.ExecuteHookPost(ctx, execHook, plugin.NewClientAPI(c)) if err != nil { return fmt.Errorf("plugin %q ExecuteHookPost() error : %w", p.Path, err) @@ -305,6 +294,11 @@ func linkPluginCmd(rootCmd *cobra.Command, p *plugin.Plugin, pluginCmd *plugin.C return } + c, err := newChainWithHomeFlags(cmd) + if err != nil { + p.Error = errors.Errorf("unable to obtain chain information.") + return + } // Check for existing commands // pluginCmd.Use can be like `command [args]` so we need to remove those // extra args if any. @@ -343,10 +337,6 @@ func linkPluginCmd(rootCmd *cobra.Command, p *plugin.Plugin, pluginCmd *plugin.C } execCmd.ImportFlags(cmd) // Call the plugin Execute - c, err := newChainWithHomeFlags(cmd) - if err != nil { - return err - } err = p.Interface.Execute(ctx, execCmd, plugin.NewClientAPI(c)) // NOTE(tb): This pause gives enough time for go-plugin to sync the // output from stdout/stderr of the plugin. Without that pause, this diff --git a/ignite/pkg/cosmosanalysis/chain/chain.go b/ignite/pkg/cosmosanalysis/chain/chain.go index 3430959551..42c653f486 100644 --- a/ignite/pkg/cosmosanalysis/chain/chain.go +++ b/ignite/pkg/cosmosanalysis/chain/chain.go @@ -100,7 +100,7 @@ func GetModuleList(ctx context.Context, c *chain.Chain) (*AllModules, error) { } // Read the dependencies defined in the `go.mod` file - a.deps, err = gomodule.ResolveDependencies(modFile) + a.deps, err = gomodule.ResolveDependencies(modFile, true) if err != nil { return nil, err } @@ -139,7 +139,7 @@ func GetModuleList(ctx context.Context, c *chain.Chain) (*AllModules, error) { if err != nil { return nil, err } - + a.includeDirs = append(a.includeDirs, path) // Discover any modules defined by the package modules, err := a.discoverModules(path, "") if err != nil { @@ -155,7 +155,6 @@ func GetModuleList(ctx context.Context, c *chain.Chain) (*AllModules, error) { return nil, err } } - a.thirdModules[modulesInPath.Path] = append(a.thirdModules[modulesInPath.Path], modulesInPath.Modules...) } @@ -183,7 +182,7 @@ func (a *Analyzer) resolveDependencyInclude() ([]string, error) { return nil, err } - // Relative paths to proto directories + // Relative and absolute paths to proto directories protoDirs := append([]string{a.protoDir}, a.includeDirs...) // Create a list of proto import paths for the dependencies. @@ -193,10 +192,10 @@ func (a *Analyzer) resolveDependencyInclude() ([]string, error) { if m == nil { continue } - // Check each one of the possible proto directory names for the // current module and append them only when the directory exists. for _, d := range protoDirs { + p := filepath.Join(rootPath, d) f, err := os.Stat(p) if err != nil { @@ -220,7 +219,20 @@ func (a *Analyzer) resolveIncludeApp(path string) (paths []string) { // Append chain app's proto paths paths = append(paths, filepath.Join(path, a.protoDir)) for _, p := range a.includeDirs { - paths = append(paths, filepath.Join(path, p)) + f, err := os.Stat(p) + if err != nil { + f, err = os.Stat(filepath.Join(path, p)) + if err == nil { + + if f.IsDir() { + paths = append(paths, filepath.Join(path, p)) + } + } + continue + } + if f.IsDir() { + paths = append(paths, p) + } } return } diff --git a/ignite/pkg/cosmosanalysis/module/module.go b/ignite/pkg/cosmosanalysis/module/module.go index e7bbb95129..a6c446331d 100644 --- a/ignite/pkg/cosmosanalysis/module/module.go +++ b/ignite/pkg/cosmosanalysis/module/module.go @@ -44,8 +44,10 @@ type Module struct { type Msg struct { // Name of the type. Name string `json:"name,omitempty"` + // URI of the type. URI string `json:"uri,omitempty"` + // File path is the path of the proto file where message is defined. FilePath string `json:"file_path,omitempty"` } @@ -69,6 +71,7 @@ type HTTPQuery struct { type Type struct { // Name pf the type. Name string `json:"name,omitempty"` + // File path is the path of the .proto file where message is defined at. FilePath string `json:"file_path,omitempty"` } diff --git a/ignite/pkg/cosmosgen/generate.go b/ignite/pkg/cosmosgen/generate.go index ac09180caf..8bdeb3a802 100644 --- a/ignite/pkg/cosmosgen/generate.go +++ b/ignite/pkg/cosmosgen/generate.go @@ -66,7 +66,7 @@ func (g *generator) setup() (err error) { } // Read the dependencies defined in the `go.mod` file - g.deps, err = gomodule.ResolveDependencies(modFile) + g.deps, err = gomodule.ResolveDependencies(modFile, false) if err != nil { return err } diff --git a/ignite/pkg/gomodule/gomodule.go b/ignite/pkg/gomodule/gomodule.go index ef5c892328..1418079fcb 100644 --- a/ignite/pkg/gomodule/gomodule.go +++ b/ignite/pkg/gomodule/gomodule.go @@ -52,7 +52,7 @@ func FilterVersions(dependencies []module.Version, paths ...string) []module.Ver return filtered } -func ResolveDependencies(f *modfile.File) ([]module.Version, error) { +func ResolveDependencies(f *modfile.File, includeIndirect bool) ([]module.Version, error) { var versions []module.Version isReplacementAdded := func(rv module.Version) bool { @@ -68,7 +68,7 @@ func ResolveDependencies(f *modfile.File) ([]module.Version, error) { } for _, req := range f.Require { - if req.Indirect { + if req.Indirect && !includeIndirect { continue } if !isReplacementAdded(req.Mod) { diff --git a/ignite/pkg/protoanalysis/package.go b/ignite/pkg/protoanalysis/package.go index b5c6c3f1dd..0067dc64e5 100644 --- a/ignite/pkg/protoanalysis/package.go +++ b/ignite/pkg/protoanalysis/package.go @@ -73,11 +73,14 @@ func (p Package) GoImportPath() string { type Message struct { // Name of the message. Name string `json:"name,omitempty"` + // Path of the proto file where the message is defined. Path string `json:"path,omitempty"` + // Highest field name is the highest field number among fields of the message. // This allows to determine new field number when writing to proto message. HighestFieldNumber int `json:"highest_field_number,omitempty"` + // Fields contains message's field names and types. Fields map[string]string `json:"fields,omitempty"` } diff --git a/ignite/services/chain/chain.go b/ignite/services/chain/chain.go index a9ddf73a8c..4e8af01382 100644 --- a/ignite/services/chain/chain.go +++ b/ignite/services/chain/chain.go @@ -314,7 +314,7 @@ func (c *Chain) Home() (string, error) { return home, nil } -// AppPath returns the configured App's path +// AppPath returns the configured App's path. func (c *Chain) AppPath() string { return c.app.Path } diff --git a/ignite/services/plugin/clientAPI.go b/ignite/services/plugin/client_api.go similarity index 76% rename from ignite/services/plugin/clientAPI.go rename to ignite/services/plugin/client_api.go index 31dad5a9ca..0c2902f11d 100644 --- a/ignite/services/plugin/clientAPI.go +++ b/ignite/services/plugin/client_api.go @@ -3,14 +3,13 @@ package plugin import ( "context" "encoding/json" - "fmt" "github.com/ignite/cli/ignite/pkg/cosmosanalysis/chain" chainservice "github.com/ignite/cli/ignite/services/chain" ) // NewClientAPI creates a new app ClientAPI. -func NewClientAPI(c *chainservice.Chain) clientAPI { +func NewClientAPI(c *chainservice.Chain) ClientAPI { return clientAPI{chain: c} } @@ -24,17 +23,16 @@ type clientAPI struct { func (c clientAPI) Dependencies(ctx context.Context) (*Dependencies, error) { mods, err := chain.GetModuleList(ctx, c.chain) - if err != nil { return nil, err } - ret := &Dependencies{} - bytes, err := json.Marshal(mods) - + bz, err := json.Marshal(mods) if err != nil { return nil, err } - json.Unmarshal(bytes, ret) - fmt.Println(ret) - return ret, nil + var d Dependencies + if err := json.Unmarshal(bz, &d); err != nil { + return nil, err + } + return &d, nil } diff --git a/ignite/services/plugin/template/go.mod.plush b/ignite/services/plugin/template/go.mod.plush index 62f74f7623..bf2968b58e 100644 --- a/ignite/services/plugin/template/go.mod.plush +++ b/ignite/services/plugin/template/go.mod.plush @@ -4,5 +4,5 @@ go 1.19 require ( github.com/hashicorp/go-plugin v1.4.9 - github.com/ignite/cli v0.26.2-0.20230504112712-4324e2ff958f + github.com/ignite/cli v0.27.2-0.20230717065933-43af937a4877 ) diff --git a/ignite/services/plugin/template/main.go.plush b/ignite/services/plugin/template/main.go.plush index a5e53a24de..91a8cf93ad 100644 --- a/ignite/services/plugin/template/main.go.plush +++ b/ignite/services/plugin/template/main.go.plush @@ -75,9 +75,9 @@ func (p) Execute(ctx context.Context, cmd *plugin.ExecutedCommand, c plugin.Clie */ // Calling the ClientAPI example - /* - fmt.Println(c.Dependencies(ctx)) - /* + + fmt.Println(c.Dependencies(ctx)) + return nil } From fa13c9ce0beec9a4e73c549ded74d27fef84f85f Mon Sep 17 00:00:00 2001 From: Clockwork Date: Tue, 8 Aug 2023 13:59:44 +0300 Subject: [PATCH 08/23] feat: Remove services/chain dep from pkg/cosmosanalysis as per discussion --- ignite/pkg/cosmosanalysis/chain/chain.go | 26 +++++++++--------------- ignite/services/plugin/client_api.go | 7 +++++-- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/ignite/pkg/cosmosanalysis/chain/chain.go b/ignite/pkg/cosmosanalysis/chain/chain.go index 42c653f486..9ff8e913d0 100644 --- a/ignite/pkg/cosmosanalysis/chain/chain.go +++ b/ignite/pkg/cosmosanalysis/chain/chain.go @@ -17,7 +17,6 @@ import ( "github.com/ignite/cli/ignite/pkg/cosmosver" "github.com/ignite/cli/ignite/pkg/gomodule" "github.com/ignite/cli/ignite/pkg/xfilepath" - "github.com/ignite/cli/ignite/services/chain" gomod "golang.org/x/mod/module" ) @@ -51,18 +50,13 @@ type Analyzer struct { thirdModules map[string][]module.Module // app dependency-modules pair. } -func GetModuleList(ctx context.Context, c *chain.Chain) (*AllModules, error) { - conf, err := c.Config() +func GetModuleList(ctx context.Context, appPath, protoPath string, thirdPartyPaths []string) (*AllModules, error) { + cacheStorage, err := cache.NewStorage(filepath.Join(appPath, "analyzer_cache.db")) if err != nil { return nil, err } - cacheStorage, err := cache.NewStorage(filepath.Join(c.AppPath(), "analyzer_cache.db")) - if err != nil { - return nil, err - } - - if err := cosmosgen.InstallDepTools(ctx, c.AppPath()); err != nil { + if err := cosmosgen.InstallDepTools(ctx, appPath); err != nil { return nil, err } @@ -70,17 +64,17 @@ func GetModuleList(ctx context.Context, c *chain.Chain) (*AllModules, error) { if err := cmdrunner. New( cmdrunner.DefaultStderr(&errb), - cmdrunner.DefaultWorkdir(c.AppPath()), + cmdrunner.DefaultWorkdir(appPath), ).Run(ctx, step.New(step.Exec("go", "mod", "download"))); err != nil { return nil, errors.Wrap(err, errb.String()) } - modFile, err := gomodule.ParseAt(c.AppPath()) + modFile, err := gomodule.ParseAt(appPath) a := &Analyzer{ ctx: ctx, - appPath: c.AppPath(), - protoDir: conf.Build.Proto.Path, - includeDirs: conf.Build.Proto.ThirdPartyPaths, + appPath: appPath, + protoDir: protoPath, + includeDirs: thirdPartyPaths, thirdModules: make(map[string][]module.Module), cacheStorage: cacheStorage, } @@ -159,12 +153,12 @@ func GetModuleList(ctx context.Context, c *chain.Chain) (*AllModules, error) { } // Perform include resolution AFTER includeDirs has been fully populated - includePaths, err := a.resolveInclude(c.AppPath()) + includePaths, err := a.resolveInclude(appPath) if err != nil { return nil, err } var modulelist []ModulesInPath - modulelist = append(modulelist, ModulesInPath{Path: c.AppPath(), Modules: a.appModules}) + modulelist = append(modulelist, ModulesInPath{Path: appPath, Modules: a.appModules}) for sourcePath, modules := range a.thirdModules { modulelist = append(modulelist, ModulesInPath{Path: sourcePath, Modules: modules}) } diff --git a/ignite/services/plugin/client_api.go b/ignite/services/plugin/client_api.go index 0c2902f11d..707f040faa 100644 --- a/ignite/services/plugin/client_api.go +++ b/ignite/services/plugin/client_api.go @@ -21,8 +21,11 @@ type clientAPI struct { // Deoendencies returns chain app dependencies. func (c clientAPI) Dependencies(ctx context.Context) (*Dependencies, error) { - - mods, err := chain.GetModuleList(ctx, c.chain) + conf, err := c.chain.Config() + if err != nil { + return nil, err + } + mods, err := chain.GetModuleList(ctx, c.chain.AppPath(), conf.Build.Proto.Path, conf.Build.Proto.ThirdPartyPaths) if err != nil { return nil, err } From 13f2b90e81730fcaca9efccedad4a7dc5cc5d919 Mon Sep 17 00:00:00 2001 From: Clockwork Date: Tue, 29 Aug 2023 16:32:48 +0300 Subject: [PATCH 09/23] wip: remove deptools install --- ignite/cmd/plugin.go | 32 +++++++---- ignite/pkg/cosmosanalysis/chain/chain.go | 73 ++++++++++++++++-------- 2 files changed, 70 insertions(+), 35 deletions(-) diff --git a/ignite/cmd/plugin.go b/ignite/cmd/plugin.go index 9629bb4ee3..e143bd0fae 100644 --- a/ignite/cmd/plugin.go +++ b/ignite/cmd/plugin.go @@ -180,11 +180,6 @@ func linkPluginHook(rootCmd *cobra.Command, p *plugin.Plugin, hook *plugin.Hook) return } - c, err := newChainWithHomeFlags(cmd) - if err != nil { - p.Error = errors.Errorf("unable to obtain chain information.") - return - } newExecutedHook := func(hook *plugin.Hook, cmd *cobra.Command, args []string) *plugin.ExecutedHook { execHook := &plugin.ExecutedHook{ Hook: hook, @@ -212,7 +207,11 @@ func linkPluginHook(rootCmd *cobra.Command, p *plugin.Plugin, hook *plugin.Hook) } execHook := newExecutedHook(hook, cmd, args) - err := p.Interface.ExecuteHookPre(ctx, execHook, plugin.NewClientAPI(c)) + c, err := newChainWithHomeFlags(cmd) + if err != nil { + return err + } + err = p.Interface.ExecuteHookPre(ctx, execHook, plugin.NewClientAPI(c)) if err != nil { return fmt.Errorf("plugin %q ExecuteHookPre() error: %w", p.Path, err) } @@ -228,6 +227,10 @@ func linkPluginHook(rootCmd *cobra.Command, p *plugin.Plugin, hook *plugin.Hook) if err != nil { ctx := cmd.Context() execHook := newExecutedHook(hook, cmd, args) + c, err := newChainWithHomeFlags(cmd) + if err != nil { + return err + } err = p.Interface.ExecuteHookCleanUp(ctx, execHook, plugin.NewClientAPI(c)) if err != nil { fmt.Printf("plugin %q ExecuteHookCleanUp() error: %v", p.Path, err) @@ -245,6 +248,10 @@ func linkPluginHook(rootCmd *cobra.Command, p *plugin.Plugin, hook *plugin.Hook) ctx := cmd.Context() execHook := newExecutedHook(hook, cmd, args) + c, err := newChainWithHomeFlags(cmd) + if err != nil { + return err + } defer func() { err := p.Interface.ExecuteHookCleanUp(ctx, execHook, plugin.NewClientAPI(c)) if err != nil { @@ -260,6 +267,10 @@ func linkPluginHook(rootCmd *cobra.Command, p *plugin.Plugin, hook *plugin.Hook) } } + c, err = newChainWithHomeFlags(cmd) + if err != nil { + return err + } err = p.Interface.ExecuteHookPost(ctx, execHook, plugin.NewClientAPI(c)) if err != nil { return fmt.Errorf("plugin %q ExecuteHookPost() error : %w", p.Path, err) @@ -294,11 +305,6 @@ func linkPluginCmd(rootCmd *cobra.Command, p *plugin.Plugin, pluginCmd *plugin.C return } - c, err := newChainWithHomeFlags(cmd) - if err != nil { - p.Error = errors.Errorf("unable to obtain chain information.") - return - } // Check for existing commands // pluginCmd.Use can be like `command [args]` so we need to remove those // extra args if any. @@ -337,6 +343,10 @@ func linkPluginCmd(rootCmd *cobra.Command, p *plugin.Plugin, pluginCmd *plugin.C } execCmd.ImportFlags(cmd) // Call the plugin Execute + c, err := newChainWithHomeFlags(cmd) + if err != nil { + return err + } err = p.Interface.Execute(ctx, execCmd, plugin.NewClientAPI(c)) // NOTE(tb): This pause gives enough time for go-plugin to sync the // output from stdout/stderr of the plugin. Without that pause, this diff --git a/ignite/pkg/cosmosanalysis/chain/chain.go b/ignite/pkg/cosmosanalysis/chain/chain.go index 9ff8e913d0..1f3dbf76bd 100644 --- a/ignite/pkg/cosmosanalysis/chain/chain.go +++ b/ignite/pkg/cosmosanalysis/chain/chain.go @@ -13,7 +13,6 @@ import ( "github.com/ignite/cli/ignite/pkg/cmdrunner" "github.com/ignite/cli/ignite/pkg/cmdrunner/step" "github.com/ignite/cli/ignite/pkg/cosmosanalysis/module" - "github.com/ignite/cli/ignite/pkg/cosmosgen" "github.com/ignite/cli/ignite/pkg/cosmosver" "github.com/ignite/cli/ignite/pkg/gomodule" "github.com/ignite/cli/ignite/pkg/xfilepath" @@ -28,10 +27,12 @@ var protocGlobalInclude = xfilepath.List( xfilepath.JoinFromHome(xfilepath.Path("local/include")), xfilepath.JoinFromHome(xfilepath.Path(".local/include")), ) +var protoFound = errors.New("Proto file found") // Hacky way to terminate dir walk early type ModulesInPath struct { - Path string `json:"path,omitempty"` - Modules []module.Module `json:"modules,omitempty"` + Path string `json:"path,omitempty"` + Modules []module.Module `json:"modules,omitempty"` + HasProto bool `json:"has_proto,omitempty"` } type AllModules struct { ModulePaths []ModulesInPath `json:"modules_in_path,omitempty"` @@ -55,11 +56,6 @@ func GetModuleList(ctx context.Context, appPath, protoPath string, thirdPartyPat if err != nil { return nil, err } - - if err := cosmosgen.InstallDepTools(ctx, appPath); err != nil { - return nil, err - } - var errb bytes.Buffer if err := cmdrunner. New( @@ -133,23 +129,36 @@ func GetModuleList(ctx context.Context, appPath, protoPath string, thirdPartyPat if err != nil { return nil, err } - a.includeDirs = append(a.includeDirs, path) - // Discover any modules defined by the package - modules, err := a.discoverModules(path, "") + hasProto, err := a.checkForProto(path) if err != nil { return nil, err } + if hasProto { + // Discover any modules defined by the package + modules, err := a.discoverModules(path, "") + if err != nil { + return nil, err + } - modulesInPath = ModulesInPath{ - Path: path, - Modules: modules, + modulesInPath = ModulesInPath{ + Path: path, + Modules: modules, + HasProto: true, + } + } else { + modulesInPath = ModulesInPath{ + Path: path, + Modules: []module.Module{}, + HasProto: false, + } } - if err := moduleCache.Put(cacheKey, modulesInPath); err != nil { return nil, err } } - a.thirdModules[modulesInPath.Path] = append(a.thirdModules[modulesInPath.Path], modulesInPath.Modules...) + if modulesInPath.HasProto { + a.thirdModules[modulesInPath.Path] = append(a.thirdModules[modulesInPath.Path], modulesInPath.Modules...) + } } // Perform include resolution AFTER includeDirs has been fully populated @@ -160,7 +169,9 @@ func GetModuleList(ctx context.Context, appPath, protoPath string, thirdPartyPat var modulelist []ModulesInPath modulelist = append(modulelist, ModulesInPath{Path: appPath, Modules: a.appModules}) for sourcePath, modules := range a.thirdModules { - modulelist = append(modulelist, ModulesInPath{Path: sourcePath, Modules: modules}) + { + modulelist = append(modulelist, ModulesInPath{Path: sourcePath, Modules: modules}) + } } allModules := &AllModules{ ModulePaths: modulelist, @@ -169,6 +180,26 @@ func GetModuleList(ctx context.Context, appPath, protoPath string, thirdPartyPat return allModules, nil } +func (a *Analyzer) checkForProto(modpath string) (bool, error) { + err := filepath.Walk(modpath, + func(path string, _ os.FileInfo, err error) error { + if err != nil { + return err + } + if filepath.Ext(path) == ".proto" { + return protoFound + } + return nil + }) + if err == protoFound { + return true, nil + } + if err != nil { + return false, err + } + return false, nil +} + func (a *Analyzer) resolveDependencyInclude() ([]string, error) { // Init paths with the global include paths for protoc paths, err := protocGlobalInclude() @@ -181,11 +212,7 @@ func (a *Analyzer) resolveDependencyInclude() ([]string, error) { // Create a list of proto import paths for the dependencies. // These paths will be available to be imported from the chain app's proto files. - for rootPath, m := range a.thirdModules { - // Skip modules without proto files - if m == nil { - continue - } + for rootPath := range a.thirdModules { // Check each one of the possible proto directory names for the // current module and append them only when the directory exists. for _, d := range protoDirs { @@ -217,7 +244,6 @@ func (a *Analyzer) resolveIncludeApp(path string) (paths []string) { if err != nil { f, err = os.Stat(filepath.Join(path, p)) if err == nil { - if f.IsDir() { paths = append(paths, filepath.Join(path, p)) } @@ -262,6 +288,5 @@ func (a *Analyzer) discoverModules(path, protoDir string) ([]module.Module, erro filteredModules = append(filteredModules, m) } - return filteredModules, nil } From 6042bfd40500ccdb4162f275e1ca709f79a0e57b Mon Sep 17 00:00:00 2001 From: Clockwork Date: Mon, 4 Sep 2023 12:54:10 +0300 Subject: [PATCH 10/23] feat: package-specific includes --- ignite/pkg/cosmosanalysis/chain/chain.go | 141 ++++++++---------- .../services/plugin/grpc/v1/client_api.pb.go | 38 ++--- .../services/plugin/grpc/v1/client_api.proto | 2 +- 3 files changed, 82 insertions(+), 99 deletions(-) diff --git a/ignite/pkg/cosmosanalysis/chain/chain.go b/ignite/pkg/cosmosanalysis/chain/chain.go index 1f3dbf76bd..0070a13679 100644 --- a/ignite/pkg/cosmosanalysis/chain/chain.go +++ b/ignite/pkg/cosmosanalysis/chain/chain.go @@ -3,6 +3,7 @@ package chain import ( "bytes" "context" + "fmt" "os" "path/filepath" "strings" @@ -20,7 +21,9 @@ import ( ) const ( - moduleCacheNamespace = "analyze.setup.module" + moduleCacheNamespace = "analyze.setup.module" + includeProtoCacheNamespace = "analyze.includes.proto" + includeCacheNamespace = "analyze.includes.module" ) var protocGlobalInclude = xfilepath.List( @@ -33,10 +36,10 @@ type ModulesInPath struct { Path string `json:"path,omitempty"` Modules []module.Module `json:"modules,omitempty"` HasProto bool `json:"has_proto,omitempty"` + Includes []string `json:"includes,omitempty"` } type AllModules struct { ModulePaths []ModulesInPath `json:"modules_in_path,omitempty"` - Includes []string `json:"includes,omitempty"` } type Analyzer struct { @@ -48,7 +51,7 @@ type Analyzer struct { cacheStorage cache.Storage deps []gomod.Version includeDirs []string - thirdModules map[string][]module.Module // app dependency-modules pair. + thirdModules map[string][]ModulesInPath // app dependency-modules pair. } func GetModuleList(ctx context.Context, appPath, protoPath string, thirdPartyPaths []string) (*AllModules, error) { @@ -71,7 +74,7 @@ func GetModuleList(ctx context.Context, appPath, protoPath string, thirdPartyPat appPath: appPath, protoDir: protoPath, includeDirs: thirdPartyPaths, - thirdModules: make(map[string][]module.Module), + thirdModules: make(map[string][]ModulesInPath), cacheStorage: cacheStorage, } if err != nil { @@ -139,11 +142,15 @@ func GetModuleList(ctx context.Context, appPath, protoPath string, thirdPartyPat if err != nil { return nil, err } - + includePaths, err := a.getProtoIncludeFolders(path) + if err != nil { + return nil, err + } modulesInPath = ModulesInPath{ Path: path, Modules: modules, HasProto: true, + Includes: includePaths, } } else { modulesInPath = ModulesInPath{ @@ -157,118 +164,94 @@ func GetModuleList(ctx context.Context, appPath, protoPath string, thirdPartyPat } } if modulesInPath.HasProto { - a.thirdModules[modulesInPath.Path] = append(a.thirdModules[modulesInPath.Path], modulesInPath.Modules...) + a.thirdModules[modulesInPath.Path] = append(a.thirdModules[modulesInPath.Path], modulesInPath) } } - // Perform include resolution AFTER includeDirs has been fully populated - includePaths, err := a.resolveInclude(appPath) if err != nil { return nil, err } var modulelist []ModulesInPath modulelist = append(modulelist, ModulesInPath{Path: appPath, Modules: a.appModules}) - for sourcePath, modules := range a.thirdModules { + for _, modules := range a.thirdModules { { - modulelist = append(modulelist, ModulesInPath{Path: sourcePath, Modules: modules}) + modulelist = append(modulelist, modules...) } } allModules := &AllModules{ ModulePaths: modulelist, - Includes: includePaths, } + fmt.Println(allModules) return allModules, nil } -func (a *Analyzer) checkForProto(modpath string) (bool, error) { - err := filepath.Walk(modpath, - func(path string, _ os.FileInfo, err error) error { - if err != nil { - return err - } - if filepath.Ext(path) == ".proto" { - return protoFound - } - return nil - }) - if err == protoFound { - return true, nil - } +func (a *Analyzer) getProtoIncludeFolders(modPath string) ([]string, error) { + // Read the mod file for this module + modFile, err := gomodule.ParseAt(modPath) if err != nil { - return false, err + return nil, err } - return false, nil -} - -func (a *Analyzer) resolveDependencyInclude() ([]string, error) { - // Init paths with the global include paths for protoc - paths, err := protocGlobalInclude() + includePaths := []string{} + // Get the imports/deps from the mod file (include indirect) + deps, err := gomodule.ResolveDependencies(modFile, true) if err != nil { return nil, err } + // Initialize include cache for proto checking (lots of common includes across modules. No need to traverse repeatedly) + includeProtoCache := cache.New[bool](a.cacheStorage, includeProtoCacheNamespace) + + for _, dep := range deps { - // Relative and absolute paths to proto directories - protoDirs := append([]string{a.protoDir}, a.includeDirs...) + // Check for proto file in this dependency + cacheKey := cache.Key(dep.Path, dep.Version) + hasProto, err := includeProtoCache.Get(cacheKey) - // Create a list of proto import paths for the dependencies. - // These paths will be available to be imported from the chain app's proto files. - for rootPath := range a.thirdModules { - // Check each one of the possible proto directory names for the - // current module and append them only when the directory exists. - for _, d := range protoDirs { + // Return unexpected error + if err != nil && !errors.Is(err, cache.ErrorNotFound) { + return nil, err + } - p := filepath.Join(rootPath, d) - f, err := os.Stat(p) + // If result not already cached + if errors.Is(err, cache.ErrorNotFound) { + path, err := gomodule.LocatePath(a.ctx, a.cacheStorage, a.appPath, dep) if err != nil { - if os.IsNotExist(err) { - continue - } - return nil, err } - - if f.IsDir() { - paths = append(paths, p) + hasProto, err = a.checkForProto(path) + if err != nil { + return nil, err } } - } - return paths, nil -} - -func (a *Analyzer) resolveIncludeApp(path string) (paths []string) { - // Append chain app's proto paths - paths = append(paths, filepath.Join(path, a.protoDir)) - for _, p := range a.includeDirs { - f, err := os.Stat(p) - if err != nil { - f, err = os.Stat(filepath.Join(path, p)) - if err == nil { - if f.IsDir() { - paths = append(paths, filepath.Join(path, p)) - } + if hasProto { + path, err := gomodule.LocatePath(a.ctx, a.cacheStorage, a.appPath, dep) + if err != nil { + return nil, err } - continue - } - if f.IsDir() { - paths = append(paths, p) + includePaths = append(includePaths, path) } } - return + return includePaths, nil } -func (a *Analyzer) resolveInclude(path string) (paths []string, err error) { - paths = a.resolveIncludeApp(path) - - // Append paths for dependencies that have protocol buffer files - includePaths, err := a.resolveDependencyInclude() +func (a *Analyzer) checkForProto(modpath string) (bool, error) { + err := filepath.Walk(modpath, + func(path string, _ os.FileInfo, err error) error { + if err != nil { + return err + } + if filepath.Ext(path) == ".proto" { + return protoFound + } + return nil + }) + if err == protoFound { + return true, nil + } if err != nil { - return nil, err + return false, err } - - paths = append(paths, includePaths...) - - return paths, nil + return false, nil } func (a *Analyzer) discoverModules(path, protoDir string) ([]module.Module, error) { diff --git a/ignite/services/plugin/grpc/v1/client_api.pb.go b/ignite/services/plugin/grpc/v1/client_api.pb.go index 90eb196a45..d47f660689 100644 --- a/ignite/services/plugin/grpc/v1/client_api.pb.go +++ b/ignite/services/plugin/grpc/v1/client_api.pb.go @@ -26,7 +26,6 @@ type Dependencies struct { unknownFields protoimpl.UnknownFields ModulesInPath []*Dependency `protobuf:"bytes,1,rep,name=modules_in_path,json=modulesInPath,proto3" json:"modules_in_path,omitempty"` - Includes []string `protobuf:"bytes,2,rep,name=includes,proto3" json:"includes,omitempty"` } func (x *Dependencies) Reset() { @@ -68,13 +67,6 @@ func (x *Dependencies) GetModulesInPath() []*Dependency { return nil } -func (x *Dependencies) GetIncludes() []string { - if x != nil { - return x.Includes - } - return nil -} - // Dependecy keeps data about Go module dependencies. type Dependency struct { state protoimpl.MessageState @@ -84,7 +76,8 @@ type Dependency struct { // Path is the absolute path to the Go module. Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` // Modules contains the list of modules defined by the dependency. - Modules []*Module `protobuf:"bytes,2,rep,name=modules,proto3" json:"modules,omitempty"` + Modules []*Module `protobuf:"bytes,2,rep,name=modules,proto3" json:"modules,omitempty"` + Includes []string `protobuf:"bytes,3,rep,name=includes,proto3" json:"includes,omitempty"` } func (x *Dependency) Reset() { @@ -133,6 +126,13 @@ func (x *Dependency) GetModules() []*Module { return nil } +func (x *Dependency) GetIncludes() []string { + if x != nil { + return x.Includes + } + return nil +} + // Module keeps metadata about a Cosmos SDK module. type Module struct { state protoimpl.MessageState @@ -875,21 +875,21 @@ var file_ignite_services_plugin_grpc_v1_client_api_proto_rawDesc = []byte{ 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, - 0x31, 0x22, 0x7e, 0x0a, 0x0c, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, + 0x31, 0x22, 0x62, 0x0a, 0x0c, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x0f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x5f, 0x69, 0x6e, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x0d, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x49, - 0x6e, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, - 0x73, 0x22, 0x62, 0x0a, 0x0a, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, - 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, - 0x61, 0x74, 0x68, 0x12, 0x40, 0x0a, 0x07, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, - 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x07, 0x6d, 0x6f, - 0x64, 0x75, 0x6c, 0x65, 0x73, 0x22, 0xd9, 0x02, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x6e, 0x50, 0x61, 0x74, 0x68, 0x22, 0x7e, 0x0a, 0x0a, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, + 0x6e, 0x63, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x40, 0x0a, 0x07, 0x6d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, + 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x52, 0x07, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x63, + 0x6c, 0x75, 0x64, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x63, + 0x6c, 0x75, 0x64, 0x65, 0x73, 0x22, 0xd9, 0x02, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x67, 0x6f, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x67, 0x6f, diff --git a/proto/ignite/services/plugin/grpc/v1/client_api.proto b/proto/ignite/services/plugin/grpc/v1/client_api.proto index 3175f660e7..62a52a069e 100644 --- a/proto/ignite/services/plugin/grpc/v1/client_api.proto +++ b/proto/ignite/services/plugin/grpc/v1/client_api.proto @@ -6,7 +6,6 @@ option go_package = "github.com/ignite/cli/ignite/services/plugin/grpc/v1"; message Dependencies { repeated Dependency modules_in_path = 1; - repeated string includes = 2; } // Dependecy keeps data about Go module dependencies. @@ -16,6 +15,7 @@ message Dependency { // Modules contains the list of modules defined by the dependency. repeated Module modules = 2; + repeated string includes = 3; } // Module keeps metadata about a Cosmos SDK module. From e07b00debd25d31cd55de593f9e570f3263cf98c Mon Sep 17 00:00:00 2001 From: Clockwork Date: Mon, 4 Sep 2023 13:34:33 +0300 Subject: [PATCH 11/23] fix: Replace Module List call with Chain Info call --- .../cosmosclient/mocks/account_retriever.go | 2 +- .../cosmosclient/mocks/bank_query_client.go | 2 +- .../pkg/cosmosclient/mocks/faucet_client.go | 12 +- ignite/pkg/cosmosclient/mocks/gasometer.go | 14 +- ignite/pkg/cosmosclient/mocks/rpc_client.go | 2 +- ignite/pkg/cosmosclient/mocks/signer.go | 7 +- ignite/pkg/cosmostxcollector/mocks/saver.go | 10 +- .../cosmostxcollector/mocks/txs_collector.go | 7 +- ignite/services/plugin/client_api.go | 22 +- .../services/plugin/grpc/v1/client_api.pb.go | 1127 +---------------- ignite/services/plugin/grpc/v1/service.pb.go | 170 +-- .../plugin/grpc/v1/service_grpc.pb.go | 34 +- ignite/services/plugin/interface.go | 4 +- ignite/services/plugin/mocks/interface.go | 36 +- ignite/services/plugin/protocol.go | 12 +- .../services/plugin/grpc/v1/client_api.proto | 238 ++-- .../services/plugin/grpc/v1/service.proto | 19 +- 17 files changed, 373 insertions(+), 1345 deletions(-) diff --git a/ignite/pkg/cosmosclient/mocks/account_retriever.go b/ignite/pkg/cosmosclient/mocks/account_retriever.go index c5ed1de1f6..d01a5c6f6a 100644 --- a/ignite/pkg/cosmosclient/mocks/account_retriever.go +++ b/ignite/pkg/cosmosclient/mocks/account_retriever.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.27.1. DO NOT EDIT. package mocks diff --git a/ignite/pkg/cosmosclient/mocks/bank_query_client.go b/ignite/pkg/cosmosclient/mocks/bank_query_client.go index 76793e1c4b..32b4722b69 100644 --- a/ignite/pkg/cosmosclient/mocks/bank_query_client.go +++ b/ignite/pkg/cosmosclient/mocks/bank_query_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.27.1. DO NOT EDIT. package mocks diff --git a/ignite/pkg/cosmosclient/mocks/faucet_client.go b/ignite/pkg/cosmosclient/mocks/faucet_client.go index 6c808dce58..12ac46772e 100644 --- a/ignite/pkg/cosmosclient/mocks/faucet_client.go +++ b/ignite/pkg/cosmosclient/mocks/faucet_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.16.0. DO NOT EDIT. +// Code generated by mockery v2.27.1. DO NOT EDIT. package mocks @@ -28,13 +28,16 @@ func (_m *FaucetClient) Transfer(_a0 context.Context, _a1 cosmosfaucet.TransferR ret := _m.Called(_a0, _a1) var r0 cosmosfaucet.TransferResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, cosmosfaucet.TransferRequest) (cosmosfaucet.TransferResponse, error)); ok { + return rf(_a0, _a1) + } if rf, ok := ret.Get(0).(func(context.Context, cosmosfaucet.TransferRequest) cosmosfaucet.TransferResponse); ok { r0 = rf(_a0, _a1) } else { r0 = ret.Get(0).(cosmosfaucet.TransferResponse) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, cosmosfaucet.TransferRequest) error); ok { r1 = rf(_a0, _a1) } else { @@ -68,6 +71,11 @@ func (_c *FaucetClient_Transfer_Call) Return(_a0 cosmosfaucet.TransferResponse, return _c } +func (_c *FaucetClient_Transfer_Call) RunAndReturn(run func(context.Context, cosmosfaucet.TransferRequest) (cosmosfaucet.TransferResponse, error)) *FaucetClient_Transfer_Call { + _c.Call.Return(run) + return _c +} + type mockConstructorTestingTNewFaucetClient interface { mock.TestingT Cleanup(func()) diff --git a/ignite/pkg/cosmosclient/mocks/gasometer.go b/ignite/pkg/cosmosclient/mocks/gasometer.go index 26b8149585..2bb356b37e 100644 --- a/ignite/pkg/cosmosclient/mocks/gasometer.go +++ b/ignite/pkg/cosmosclient/mocks/gasometer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.16.0. DO NOT EDIT. +// Code generated by mockery v2.27.1. DO NOT EDIT. package mocks @@ -38,6 +38,11 @@ func (_m *Gasometer) CalculateGas(clientCtx grpc.ClientConn, txf tx.Factory, msg ret := _m.Called(_ca...) var r0 *typestx.SimulateResponse + var r1 uint64 + var r2 error + if rf, ok := ret.Get(0).(func(grpc.ClientConn, tx.Factory, ...types.Msg) (*typestx.SimulateResponse, uint64, error)); ok { + return rf(clientCtx, txf, msgs...) + } if rf, ok := ret.Get(0).(func(grpc.ClientConn, tx.Factory, ...types.Msg) *typestx.SimulateResponse); ok { r0 = rf(clientCtx, txf, msgs...) } else { @@ -46,14 +51,12 @@ func (_m *Gasometer) CalculateGas(clientCtx grpc.ClientConn, txf tx.Factory, msg } } - var r1 uint64 if rf, ok := ret.Get(1).(func(grpc.ClientConn, tx.Factory, ...types.Msg) uint64); ok { r1 = rf(clientCtx, txf, msgs...) } else { r1 = ret.Get(1).(uint64) } - var r2 error if rf, ok := ret.Get(2).(func(grpc.ClientConn, tx.Factory, ...types.Msg) error); ok { r2 = rf(clientCtx, txf, msgs...) } else { @@ -95,6 +98,11 @@ func (_c *Gasometer_CalculateGas_Call) Return(_a0 *typestx.SimulateResponse, _a1 return _c } +func (_c *Gasometer_CalculateGas_Call) RunAndReturn(run func(grpc.ClientConn, tx.Factory, ...types.Msg) (*typestx.SimulateResponse, uint64, error)) *Gasometer_CalculateGas_Call { + _c.Call.Return(run) + return _c +} + type mockConstructorTestingTNewGasometer interface { mock.TestingT Cleanup(func()) diff --git a/ignite/pkg/cosmosclient/mocks/rpc_client.go b/ignite/pkg/cosmosclient/mocks/rpc_client.go index d76eae984d..a8b39d43ee 100644 --- a/ignite/pkg/cosmosclient/mocks/rpc_client.go +++ b/ignite/pkg/cosmosclient/mocks/rpc_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.22.1. DO NOT EDIT. +// Code generated by mockery v2.27.1. DO NOT EDIT. package mocks diff --git a/ignite/pkg/cosmosclient/mocks/signer.go b/ignite/pkg/cosmosclient/mocks/signer.go index b199b10fcf..53914d8a73 100644 --- a/ignite/pkg/cosmosclient/mocks/signer.go +++ b/ignite/pkg/cosmosclient/mocks/signer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.16.0. DO NOT EDIT. +// Code generated by mockery v2.27.1. DO NOT EDIT. package mocks @@ -63,6 +63,11 @@ func (_c *Signer_Sign_Call) Return(_a0 error) *Signer_Sign_Call { return _c } +func (_c *Signer_Sign_Call) RunAndReturn(run func(tx.Factory, string, client.TxBuilder, bool) error) *Signer_Sign_Call { + _c.Call.Return(run) + return _c +} + type mockConstructorTestingTNewSigner interface { mock.TestingT Cleanup(func()) diff --git a/ignite/pkg/cosmostxcollector/mocks/saver.go b/ignite/pkg/cosmostxcollector/mocks/saver.go index 734e1f1c11..0f28067f30 100644 --- a/ignite/pkg/cosmostxcollector/mocks/saver.go +++ b/ignite/pkg/cosmostxcollector/mocks/saver.go @@ -1,13 +1,12 @@ -// Code generated by mockery v2.16.0. DO NOT EDIT. +// Code generated by mockery v2.27.1. DO NOT EDIT. package mocks import ( context "context" - mock "github.com/stretchr/testify/mock" - cosmosclient "github.com/ignite/cli/ignite/pkg/cosmosclient" + mock "github.com/stretchr/testify/mock" ) // Saver is an autogenerated mock type for the Saver type @@ -61,6 +60,11 @@ func (_c *Saver_Save_Call) Return(_a0 error) *Saver_Save_Call { return _c } +func (_c *Saver_Save_Call) RunAndReturn(run func(context.Context, []cosmosclient.TX) error) *Saver_Save_Call { + _c.Call.Return(run) + return _c +} + type mockConstructorTestingTNewSaver interface { mock.TestingT Cleanup(func()) diff --git a/ignite/pkg/cosmostxcollector/mocks/txs_collector.go b/ignite/pkg/cosmostxcollector/mocks/txs_collector.go index a80ee11808..9ee77bed6e 100644 --- a/ignite/pkg/cosmostxcollector/mocks/txs_collector.go +++ b/ignite/pkg/cosmostxcollector/mocks/txs_collector.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.16.0. DO NOT EDIT. +// Code generated by mockery v2.27.1. DO NOT EDIT. package mocks @@ -62,6 +62,11 @@ func (_c *TXsCollector_CollectTXs_Call) Return(_a0 error) *TXsCollector_CollectT return _c } +func (_c *TXsCollector_CollectTXs_Call) RunAndReturn(run func(context.Context, int64, chan<- []cosmosclient.TX) error) *TXsCollector_CollectTXs_Call { + _c.Call.Return(run) + return _c +} + type mockConstructorTestingTNewTXsCollector interface { mock.TestingT Cleanup(func()) diff --git a/ignite/services/plugin/client_api.go b/ignite/services/plugin/client_api.go index 707f040faa..e4869ed55e 100644 --- a/ignite/services/plugin/client_api.go +++ b/ignite/services/plugin/client_api.go @@ -2,9 +2,7 @@ package plugin import ( "context" - "encoding/json" - "github.com/ignite/cli/ignite/pkg/cosmosanalysis/chain" chainservice "github.com/ignite/cli/ignite/services/chain" ) @@ -20,6 +18,7 @@ type clientAPI struct { // TODO: Implement dependency ClientAPI. // Deoendencies returns chain app dependencies. +/* func (c clientAPI) Dependencies(ctx context.Context) (*Dependencies, error) { conf, err := c.chain.Config() if err != nil { @@ -39,3 +38,22 @@ func (c clientAPI) Dependencies(ctx context.Context) (*Dependencies, error) { } return &d, nil } +*/ +func (c clientAPI) GetChainInfo(ctx context.Context) (*ChainInfo, error) { + chain_id, err := c.chain.ID() + if err != nil { + return nil, err + } + app_path := c.chain.AppPath() + config_path := c.chain.ConfigPath() + rpc, err := c.chain.RPCPublicAddress() + if err != nil { + return nil, err + } + return &ChainInfo{ + ChainId: chain_id, + AppPath: app_path, + ConfigPath: config_path, + Rpc: rpc, + }, nil +} diff --git a/ignite/services/plugin/grpc/v1/client_api.pb.go b/ignite/services/plugin/grpc/v1/client_api.pb.go index d47f660689..dac69a5702 100644 --- a/ignite/services/plugin/grpc/v1/client_api.pb.go +++ b/ignite/services/plugin/grpc/v1/client_api.pb.go @@ -20,16 +20,19 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type Dependencies struct { +type ChainInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ModulesInPath []*Dependency `protobuf:"bytes,1,rep,name=modules_in_path,json=modulesInPath,proto3" json:"modules_in_path,omitempty"` + ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + AppPath string `protobuf:"bytes,2,opt,name=app_path,json=appPath,proto3" json:"app_path,omitempty"` + ConfigPath string `protobuf:"bytes,3,opt,name=config_path,json=configPath,proto3" json:"config_path,omitempty"` + Rpc string `protobuf:"bytes,4,opt,name=rpc,proto3" json:"rpc,omitempty"` } -func (x *Dependencies) Reset() { - *x = Dependencies{} +func (x *ChainInfo) Reset() { + *x = ChainInfo{} if protoimpl.UnsafeEnabled { mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -37,13 +40,13 @@ func (x *Dependencies) Reset() { } } -func (x *Dependencies) String() string { +func (x *ChainInfo) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Dependencies) ProtoMessage() {} +func (*ChainInfo) ProtoMessage() {} -func (x *Dependencies) ProtoReflect() protoreflect.Message { +func (x *ChainInfo) ProtoReflect() protoreflect.Message { mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -55,814 +58,35 @@ func (x *Dependencies) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Dependencies.ProtoReflect.Descriptor instead. -func (*Dependencies) Descriptor() ([]byte, []int) { +// Deprecated: Use ChainInfo.ProtoReflect.Descriptor instead. +func (*ChainInfo) Descriptor() ([]byte, []int) { return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP(), []int{0} } -func (x *Dependencies) GetModulesInPath() []*Dependency { +func (x *ChainInfo) GetChainId() string { if x != nil { - return x.ModulesInPath - } - return nil -} - -// Dependecy keeps data about Go module dependencies. -type Dependency struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Path is the absolute path to the Go module. - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - // Modules contains the list of modules defined by the dependency. - Modules []*Module `protobuf:"bytes,2,rep,name=modules,proto3" json:"modules,omitempty"` - Includes []string `protobuf:"bytes,3,rep,name=includes,proto3" json:"includes,omitempty"` -} - -func (x *Dependency) Reset() { - *x = Dependency{} - if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Dependency) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Dependency) ProtoMessage() {} - -func (x *Dependency) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_client_api_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 Dependency.ProtoReflect.Descriptor instead. -func (*Dependency) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP(), []int{1} -} - -func (x *Dependency) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *Dependency) GetModules() []*Module { - if x != nil { - return x.Modules - } - return nil -} - -func (x *Dependency) GetIncludes() []string { - if x != nil { - return x.Includes - } - return nil -} - -// Module keeps metadata about a Cosmos SDK module. -type Module struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name of the module. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Go module path of the app where the module is defined. - GoModulePath string `protobuf:"bytes,2,opt,name=go_module_path,json=goModulePath,proto3" json:"go_module_path,omitempty"` - // Package contains proto package info. - Package *ProtoPackage `protobuf:"bytes,3,opt,name=package,proto3" json:"package,omitempty"` - // Messages is the list of sdk.Msg that the module implements. - Messages []*Message `protobuf:"bytes,4,rep,name=messages,proto3" json:"messages,omitempty"` - // HTTP queries is a list of module queries. - HttpQueries []*HTTPQuery `protobuf:"bytes,5,rep,name=http_queries,json=httpQueries,proto3" json:"http_queries,omitempty"` - // Types is a list of proto types that could be used by the module. - Types []*Type `protobuf:"bytes,6,rep,name=types,proto3" json:"types,omitempty"` -} - -func (x *Module) Reset() { - *x = Module{} - if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Module) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Module) ProtoMessage() {} - -func (x *Module) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_client_api_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 Module.ProtoReflect.Descriptor instead. -func (*Module) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP(), []int{2} -} - -func (x *Module) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Module) GetGoModulePath() string { - if x != nil { - return x.GoModulePath - } - return "" -} - -func (x *Module) GetPackage() *ProtoPackage { - if x != nil { - return x.Package - } - return nil -} - -func (x *Module) GetMessages() []*Message { - if x != nil { - return x.Messages - } - return nil -} - -func (x *Module) GetHttpQueries() []*HTTPQuery { - if x != nil { - return x.HttpQueries - } - return nil -} - -func (x *Module) GetTypes() []*Type { - if x != nil { - return x.Types - } - return nil -} - -// ProtoPackage represents a proto package. -type ProtoPackage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name of the proto package. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Path of the proto package. - Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - // Files is list of package proto files. - Files []*ProtoFile `protobuf:"bytes,3,rep,name=files,proto3" json:"files,omitempty"` - // Go import name for the proto package. - GoImportName string `protobuf:"bytes,4,opt,name=go_import_name,json=goImportName,proto3" json:"go_import_name,omitempty"` - // Messages is list of messages defined within the proto package. - Messages []*ProtoMessage `protobuf:"bytes,5,rep,name=messages,proto3" json:"messages,omitempty"` - // Services is list of services defined within the proto package. - Services []*ProtoService `protobuf:"bytes,6,rep,name=services,proto3" json:"services,omitempty"` -} - -func (x *ProtoPackage) Reset() { - *x = ProtoPackage{} - if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ProtoPackage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ProtoPackage) ProtoMessage() {} - -func (x *ProtoPackage) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_client_api_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 ProtoPackage.ProtoReflect.Descriptor instead. -func (*ProtoPackage) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP(), []int{3} -} - -func (x *ProtoPackage) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ProtoPackage) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *ProtoPackage) GetFiles() []*ProtoFile { - if x != nil { - return x.Files - } - return nil -} - -func (x *ProtoPackage) GetGoImportName() string { - if x != nil { - return x.GoImportName - } - return "" -} - -func (x *ProtoPackage) GetMessages() []*ProtoMessage { - if x != nil { - return x.Messages - } - return nil -} - -func (x *ProtoPackage) GetServices() []*ProtoService { - if x != nil { - return x.Services - } - return nil -} - -// ProtoFile represents a proto file. -type ProtoFile struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Path to the file. - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - // Dependencies is a list of imported proto packages. - Dependencies []string `protobuf:"bytes,2,rep,name=dependencies,proto3" json:"dependencies,omitempty"` -} - -func (x *ProtoFile) Reset() { - *x = ProtoFile{} - if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ProtoFile) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ProtoFile) ProtoMessage() {} - -func (x *ProtoFile) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_client_api_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 ProtoFile.ProtoReflect.Descriptor instead. -func (*ProtoFile) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP(), []int{4} -} - -func (x *ProtoFile) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *ProtoFile) GetDependencies() []string { - if x != nil { - return x.Dependencies - } - return nil -} - -// ProtoMessage represents a proto message. -type ProtoMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name of the message. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Path of the proto file where the message is defined. - Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - // Highest field name is the highest field number among fields of the message. - // This allows to determine new field number when writing to proto message. - HighestFieldNumber int32 `protobuf:"varint,3,opt,name=highest_field_number,json=highestFieldNumber,proto3" json:"highest_field_number,omitempty"` - // Fields contains message's field names and types. - Fields map[string]string `protobuf:"bytes,4,rep,name=fields,proto3" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *ProtoMessage) Reset() { - *x = ProtoMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ProtoMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ProtoMessage) ProtoMessage() {} - -func (x *ProtoMessage) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_client_api_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 ProtoMessage.ProtoReflect.Descriptor instead. -func (*ProtoMessage) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP(), []int{5} -} - -func (x *ProtoMessage) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ProtoMessage) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *ProtoMessage) GetHighestFieldNumber() int32 { - if x != nil { - return x.HighestFieldNumber - } - return 0 -} - -func (x *ProtoMessage) GetFields() map[string]string { - if x != nil { - return x.Fields - } - return nil -} - -// ProtoService represents a proto RPC service. -type ProtoService struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name of the service. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Functions is a list of RPC functions. - Functions []*ProtoServiceFunc `protobuf:"bytes,2,rep,name=functions,proto3" json:"functions,omitempty"` -} - -func (x *ProtoService) Reset() { - *x = ProtoService{} - if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ProtoService) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ProtoService) ProtoMessage() {} - -func (x *ProtoService) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_client_api_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 ProtoService.ProtoReflect.Descriptor instead. -func (*ProtoService) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP(), []int{6} -} - -func (x *ProtoService) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ProtoService) GetFunctions() []*ProtoServiceFunc { - if x != nil { - return x.Functions - } - return nil -} - -// Proto service func represents a proto RPC function. -type ProtoServiceFunc struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name of the RPC function. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Request type is the request type of the RPC function. - RequestType string `protobuf:"bytes,2,opt,name=request_type,json=requestType,proto3" json:"request_type,omitempty"` - // Return type is the return type of the RPC function. - ReturnType string `protobuf:"bytes,3,opt,name=return_type,json=returnType,proto3" json:"return_type,omitempty"` - // Paginated indicates that the function is using pagination. - Paginated bool `protobuf:"varint,4,opt,name=paginated,proto3" json:"paginated,omitempty"` - // HTTP rules keeps info about HTTP annotations of query. - HttpRules []*HTTPRule `protobuf:"bytes,5,rep,name=http_rules,json=httpRules,proto3" json:"http_rules,omitempty"` -} - -func (x *ProtoServiceFunc) Reset() { - *x = ProtoServiceFunc{} - if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ProtoServiceFunc) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ProtoServiceFunc) ProtoMessage() {} - -func (x *ProtoServiceFunc) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_client_api_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 ProtoServiceFunc.ProtoReflect.Descriptor instead. -func (*ProtoServiceFunc) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP(), []int{7} -} - -func (x *ProtoServiceFunc) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ProtoServiceFunc) GetRequestType() string { - if x != nil { - return x.RequestType - } - return "" -} - -func (x *ProtoServiceFunc) GetReturnType() string { - if x != nil { - return x.ReturnType - } - return "" -} - -func (x *ProtoServiceFunc) GetPaginated() bool { - if x != nil { - return x.Paginated - } - return false -} - -func (x *ProtoServiceFunc) GetHttpRules() []*HTTPRule { - if x != nil { - return x.HttpRules - } - return nil -} - -// Message keeps metadata about an sdk.Msg implementation. -type Message struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name of the type. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // URI of the type. - Uri string `protobuf:"bytes,2,opt,name=uri,proto3" json:"uri,omitempty"` - // File path is the path of the proto file where message is defined. - FilePath string `protobuf:"bytes,3,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"` -} - -func (x *Message) Reset() { - *x = Message{} - if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Message) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Message) ProtoMessage() {} - -func (x *Message) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_client_api_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 Message.ProtoReflect.Descriptor instead. -func (*Message) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP(), []int{8} -} - -func (x *Message) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Message) GetUri() string { - if x != nil { - return x.Uri - } - return "" -} - -func (x *Message) GetFilePath() string { - if x != nil { - return x.FilePath - } - return "" -} - -// HTTPQuery is an SDK query. -type HTTPQuery struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name of the RPC function. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Full name of the query with service name and RPC function name. - FullName string `protobuf:"bytes,2,opt,name=full_name,json=fullName,proto3" json:"full_name,omitempty"` - // Paginated indicates that the query is using pagination. - Paginated bool `protobuf:"varint,3,opt,name=paginated,proto3" json:"paginated,omitempty"` - // HTTP rules keeps info about HTTP annotations of query. - Rules []*HTTPRule `protobuf:"bytes,4,rep,name=rules,proto3" json:"rules,omitempty"` -} - -func (x *HTTPQuery) Reset() { - *x = HTTPQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HTTPQuery) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HTTPQuery) ProtoMessage() {} - -func (x *HTTPQuery) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_client_api_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 HTTPQuery.ProtoReflect.Descriptor instead. -func (*HTTPQuery) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP(), []int{9} -} - -func (x *HTTPQuery) GetName() string { - if x != nil { - return x.Name + return x.ChainId } return "" } -func (x *HTTPQuery) GetFullName() string { +func (x *ChainInfo) GetAppPath() string { if x != nil { - return x.FullName + return x.AppPath } return "" } -func (x *HTTPQuery) GetPaginated() bool { - if x != nil { - return x.Paginated - } - return false -} - -func (x *HTTPQuery) GetRules() []*HTTPRule { - if x != nil { - return x.Rules - } - return nil -} - -// HTTP rule keeps info about a configured HTTP rule of an RPC function. -type HTTPRule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Params is a list of parameters defined in the HTTP endpoint itself. - Params []string `protobuf:"bytes,1,rep,name=params,proto3" json:"params,omitempty"` - // Has query indicates if there is a request query. - HasQuery bool `protobuf:"varint,2,opt,name=has_query,json=hasQuery,proto3" json:"has_query,omitempty"` - // Has body indicates if there is a request payload. - HasBody bool `protobuf:"varint,3,opt,name=has_body,json=hasBody,proto3" json:"has_body,omitempty"` -} - -func (x *HTTPRule) Reset() { - *x = HTTPRule{} - if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HTTPRule) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HTTPRule) ProtoMessage() {} - -func (x *HTTPRule) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_client_api_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 HTTPRule.ProtoReflect.Descriptor instead. -func (*HTTPRule) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP(), []int{10} -} - -func (x *HTTPRule) GetParams() []string { - if x != nil { - return x.Params - } - return nil -} - -func (x *HTTPRule) GetHasQuery() bool { - if x != nil { - return x.HasQuery - } - return false -} - -func (x *HTTPRule) GetHasBody() bool { - if x != nil { - return x.HasBody - } - return false -} - -// Type is a proto type. -type Type struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name pf the type. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // File path is the path of the .proto file where message is defined at. - FilePath string `protobuf:"bytes,2,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"` -} - -func (x *Type) Reset() { - *x = Type{} - if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Type) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Type) ProtoMessage() {} - -func (x *Type) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_client_api_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 Type.ProtoReflect.Descriptor instead. -func (*Type) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP(), []int{11} -} - -func (x *Type) GetName() string { +func (x *ChainInfo) GetConfigPath() string { if x != nil { - return x.Name + return x.ConfigPath } return "" } -func (x *Type) GetFilePath() string { +func (x *ChainInfo) GetRpc() string { if x != nil { - return x.FilePath + return x.Rpc } return "" } @@ -875,130 +99,18 @@ var file_ignite_services_plugin_grpc_v1_client_api_proto_rawDesc = []byte{ 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, - 0x31, 0x22, 0x62, 0x0a, 0x0c, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, - 0x73, 0x12, 0x52, 0x0a, 0x0f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x5f, 0x69, 0x6e, 0x5f, - 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x69, 0x67, 0x6e, - 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, - 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x65, - 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x0d, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x49, - 0x6e, 0x50, 0x61, 0x74, 0x68, 0x22, 0x7e, 0x0a, 0x0a, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, - 0x6e, 0x63, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x40, 0x0a, 0x07, 0x6d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, - 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x52, 0x07, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x63, - 0x6c, 0x75, 0x64, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x63, - 0x6c, 0x75, 0x64, 0x65, 0x73, 0x22, 0xd9, 0x02, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x67, 0x6f, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x67, 0x6f, - 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x46, 0x0a, 0x07, 0x70, 0x61, - 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x69, 0x67, - 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, - 0x67, 0x65, 0x12, 0x43, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, - 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x4c, 0x0a, 0x0c, 0x68, 0x74, 0x74, 0x70, 0x5f, - 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, - 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, - 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x48, - 0x54, 0x54, 0x50, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x0b, 0x68, 0x74, 0x74, 0x70, 0x51, 0x75, - 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x06, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, - 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x22, 0xb1, 0x02, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x61, 0x63, 0x6b, 0x61, - 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x3f, 0x0a, 0x05, 0x66, 0x69, - 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x69, 0x67, 0x6e, 0x69, - 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x46, 0x69, 0x6c, 0x65, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x67, - 0x6f, 0x5f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x67, 0x6f, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x48, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x05, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, - 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x48, 0x0a, 0x08, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, - 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, - 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x08, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x22, 0x43, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x46, 0x69, - 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, - 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, - 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x22, 0xf5, 0x01, 0x0a, 0x0c, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, - 0x61, 0x74, 0x68, 0x12, 0x30, 0x0a, 0x14, 0x68, 0x69, 0x67, 0x68, 0x65, 0x73, 0x74, 0x5f, 0x66, - 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x12, 0x68, 0x69, 0x67, 0x68, 0x65, 0x73, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x50, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, - 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x22, 0x72, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4e, 0x0a, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x69, 0x67, 0x6e, 0x69, - 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, 0x75, 0x6e, 0x63, 0x52, 0x09, 0x66, 0x75, 0x6e, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xd1, 0x01, 0x0a, 0x10, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, 0x75, 0x6e, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x65, - 0x64, 0x12, 0x47, 0x0a, 0x0a, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, - 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, - 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x75, 0x6c, 0x65, 0x52, - 0x09, 0x68, 0x74, 0x74, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x22, 0x4c, 0x0a, 0x07, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x1b, 0x0a, 0x09, 0x66, - 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x66, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x22, 0x9a, 0x01, 0x0a, 0x09, 0x48, 0x54, 0x54, - 0x50, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75, - 0x6c, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, - 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x70, 0x61, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x65, 0x64, 0x12, 0x3e, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, - 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, - 0x72, 0x75, 0x6c, 0x65, 0x73, 0x22, 0x5a, 0x0a, 0x08, 0x48, 0x54, 0x54, 0x50, 0x52, 0x75, 0x6c, - 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x61, 0x73, - 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x68, 0x61, - 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x68, 0x61, 0x73, 0x5f, 0x62, 0x6f, - 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x68, 0x61, 0x73, 0x42, 0x6f, 0x64, - 0x79, 0x22, 0x37, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, - 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2f, - 0x63, 0x6c, 0x69, 0x2f, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, - 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x31, 0x22, 0x74, 0x0a, 0x09, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x19, + 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x70, 0x70, + 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, + 0x50, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x70, + 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x50, 0x61, 0x74, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x70, 0x63, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x72, 0x70, 0x63, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2f, 0x63, 0x6c, 0x69, + 0x2f, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, + 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1013,41 +125,16 @@ func file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP() []byte { return file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescData } -var file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_ignite_services_plugin_grpc_v1_client_api_proto_goTypes = []interface{}{ - (*Dependencies)(nil), // 0: ignite.services.plugin.grpc.v1.Dependencies - (*Dependency)(nil), // 1: ignite.services.plugin.grpc.v1.Dependency - (*Module)(nil), // 2: ignite.services.plugin.grpc.v1.Module - (*ProtoPackage)(nil), // 3: ignite.services.plugin.grpc.v1.ProtoPackage - (*ProtoFile)(nil), // 4: ignite.services.plugin.grpc.v1.ProtoFile - (*ProtoMessage)(nil), // 5: ignite.services.plugin.grpc.v1.ProtoMessage - (*ProtoService)(nil), // 6: ignite.services.plugin.grpc.v1.ProtoService - (*ProtoServiceFunc)(nil), // 7: ignite.services.plugin.grpc.v1.ProtoServiceFunc - (*Message)(nil), // 8: ignite.services.plugin.grpc.v1.Message - (*HTTPQuery)(nil), // 9: ignite.services.plugin.grpc.v1.HTTPQuery - (*HTTPRule)(nil), // 10: ignite.services.plugin.grpc.v1.HTTPRule - (*Type)(nil), // 11: ignite.services.plugin.grpc.v1.Type - nil, // 12: ignite.services.plugin.grpc.v1.ProtoMessage.FieldsEntry + (*ChainInfo)(nil), // 0: ignite.services.plugin.grpc.v1.ChainInfo } var file_ignite_services_plugin_grpc_v1_client_api_proto_depIdxs = []int32{ - 1, // 0: ignite.services.plugin.grpc.v1.Dependencies.modules_in_path:type_name -> ignite.services.plugin.grpc.v1.Dependency - 2, // 1: ignite.services.plugin.grpc.v1.Dependency.modules:type_name -> ignite.services.plugin.grpc.v1.Module - 3, // 2: ignite.services.plugin.grpc.v1.Module.package:type_name -> ignite.services.plugin.grpc.v1.ProtoPackage - 8, // 3: ignite.services.plugin.grpc.v1.Module.messages:type_name -> ignite.services.plugin.grpc.v1.Message - 9, // 4: ignite.services.plugin.grpc.v1.Module.http_queries:type_name -> ignite.services.plugin.grpc.v1.HTTPQuery - 11, // 5: ignite.services.plugin.grpc.v1.Module.types:type_name -> ignite.services.plugin.grpc.v1.Type - 4, // 6: ignite.services.plugin.grpc.v1.ProtoPackage.files:type_name -> ignite.services.plugin.grpc.v1.ProtoFile - 5, // 7: ignite.services.plugin.grpc.v1.ProtoPackage.messages:type_name -> ignite.services.plugin.grpc.v1.ProtoMessage - 6, // 8: ignite.services.plugin.grpc.v1.ProtoPackage.services:type_name -> ignite.services.plugin.grpc.v1.ProtoService - 12, // 9: ignite.services.plugin.grpc.v1.ProtoMessage.fields:type_name -> ignite.services.plugin.grpc.v1.ProtoMessage.FieldsEntry - 7, // 10: ignite.services.plugin.grpc.v1.ProtoService.functions:type_name -> ignite.services.plugin.grpc.v1.ProtoServiceFunc - 10, // 11: ignite.services.plugin.grpc.v1.ProtoServiceFunc.http_rules:type_name -> ignite.services.plugin.grpc.v1.HTTPRule - 10, // 12: ignite.services.plugin.grpc.v1.HTTPQuery.rules:type_name -> ignite.services.plugin.grpc.v1.HTTPRule - 13, // [13:13] is the sub-list for method output_type - 13, // [13:13] is the sub-list for method input_type - 13, // [13:13] is the sub-list for extension type_name - 13, // [13:13] is the sub-list for extension extendee - 0, // [0:13] is the sub-list for field type_name + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name } func init() { file_ignite_services_plugin_grpc_v1_client_api_proto_init() } @@ -1057,139 +144,7 @@ func file_ignite_services_plugin_grpc_v1_client_api_proto_init() { } if !protoimpl.UnsafeEnabled { file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Dependencies); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Dependency); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Module); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProtoPackage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProtoFile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProtoMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProtoService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProtoServiceFunc); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Message); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HTTPQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HTTPRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Type); i { + switch v := v.(*ChainInfo); i { case 0: return &v.state case 1: @@ -1207,7 +162,7 @@ func file_ignite_services_plugin_grpc_v1_client_api_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_ignite_services_plugin_grpc_v1_client_api_proto_rawDesc, NumEnums: 0, - NumMessages: 13, + NumMessages: 1, NumExtensions: 0, NumServices: 0, }, diff --git a/ignite/services/plugin/grpc/v1/service.pb.go b/ignite/services/plugin/grpc/v1/service.pb.go index da1a8ff66f..7cd54c135e 100644 --- a/ignite/services/plugin/grpc/v1/service.pb.go +++ b/ignite/services/plugin/grpc/v1/service.pb.go @@ -477,14 +477,14 @@ func (*ExecuteHookCleanUpResponse) Descriptor() ([]byte, []int) { return file_ignite_services_plugin_grpc_v1_service_proto_rawDescGZIP(), []int{9} } -type DependenciesRequest struct { +type GetChainInfoRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *DependenciesRequest) Reset() { - *x = DependenciesRequest{} +func (x *GetChainInfoRequest) Reset() { + *x = GetChainInfoRequest{} if protoimpl.UnsafeEnabled { mi := &file_ignite_services_plugin_grpc_v1_service_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -492,13 +492,13 @@ func (x *DependenciesRequest) Reset() { } } -func (x *DependenciesRequest) String() string { +func (x *GetChainInfoRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DependenciesRequest) ProtoMessage() {} +func (*GetChainInfoRequest) ProtoMessage() {} -func (x *DependenciesRequest) ProtoReflect() protoreflect.Message { +func (x *GetChainInfoRequest) ProtoReflect() protoreflect.Message { mi := &file_ignite_services_plugin_grpc_v1_service_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -510,21 +510,21 @@ func (x *DependenciesRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DependenciesRequest.ProtoReflect.Descriptor instead. -func (*DependenciesRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use GetChainInfoRequest.ProtoReflect.Descriptor instead. +func (*GetChainInfoRequest) Descriptor() ([]byte, []int) { return file_ignite_services_plugin_grpc_v1_service_proto_rawDescGZIP(), []int{10} } -type DependenciesResponse struct { +type GetChainInfoResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Dependencies *Dependencies `protobuf:"bytes,2,opt,name=dependencies,proto3" json:"dependencies,omitempty"` + ChainInfo *ChainInfo `protobuf:"bytes,1,opt,name=chain_info,json=chainInfo,proto3" json:"chain_info,omitempty"` } -func (x *DependenciesResponse) Reset() { - *x = DependenciesResponse{} +func (x *GetChainInfoResponse) Reset() { + *x = GetChainInfoResponse{} if protoimpl.UnsafeEnabled { mi := &file_ignite_services_plugin_grpc_v1_service_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -532,13 +532,13 @@ func (x *DependenciesResponse) Reset() { } } -func (x *DependenciesResponse) String() string { +func (x *GetChainInfoResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DependenciesResponse) ProtoMessage() {} +func (*GetChainInfoResponse) ProtoMessage() {} -func (x *DependenciesResponse) ProtoReflect() protoreflect.Message { +func (x *GetChainInfoResponse) ProtoReflect() protoreflect.Message { mi := &file_ignite_services_plugin_grpc_v1_service_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -550,14 +550,14 @@ func (x *DependenciesResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DependenciesResponse.ProtoReflect.Descriptor instead. -func (*DependenciesResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use GetChainInfoResponse.ProtoReflect.Descriptor instead. +func (*GetChainInfoResponse) Descriptor() ([]byte, []int) { return file_ignite_services_plugin_grpc_v1_service_proto_rawDescGZIP(), []int{11} } -func (x *DependenciesResponse) GetDependencies() *Dependencies { +func (x *GetChainInfoResponse) GetChainInfo() *ChainInfo { if x != nil { - return x.Dependencies + return x.ChainInfo } return nil } @@ -619,68 +619,68 @@ var file_ignite_services_plugin_grpc_v1_service_proto_rawDesc = []byte{ 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x70, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x41, 0x70, 0x69, 0x22, 0x1c, 0x0a, 0x1a, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x55, - 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x44, 0x65, 0x70, - 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x22, 0x68, 0x0a, 0x14, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x0c, 0x64, 0x65, 0x70, 0x65, - 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, - 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, - 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x52, 0x0c, 0x64, 0x65, - 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x32, 0x81, 0x05, 0x0a, 0x10, 0x49, - 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, - 0x6d, 0x0a, 0x08, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x2e, 0x69, 0x67, - 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x6e, - 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x69, - 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, - 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, - 0x0a, 0x07, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x2e, 0x2e, 0x69, 0x67, 0x6e, 0x69, - 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x69, 0x67, 0x6e, 0x69, - 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7f, 0x0a, 0x0e, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x50, 0x72, 0x65, 0x12, 0x35, 0x2e, 0x69, + 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x47, 0x65, 0x74, + 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x22, 0x60, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x50, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, + 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, + 0x66, 0x6f, 0x32, 0x81, 0x05, 0x0a, 0x10, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6d, 0x0a, 0x08, 0x4d, 0x61, 0x6e, 0x69, 0x66, + 0x65, 0x73, 0x74, 0x12, 0x2f, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, - 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, - 0x50, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x82, 0x01, 0x0a, 0x0f, - 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x50, 0x6f, 0x73, 0x74, 0x12, - 0x36, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, - 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x50, 0x6f, 0x73, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, - 0x48, 0x6f, 0x6f, 0x6b, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x8b, 0x01, 0x0a, 0x12, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, - 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x55, 0x70, 0x12, 0x39, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, + 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x07, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x65, 0x12, 0x2e, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, + 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2f, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, + 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x7f, 0x0a, 0x0e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, + 0x6b, 0x50, 0x72, 0x65, 0x12, 0x35, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, + 0x6b, 0x50, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x69, 0x67, + 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x50, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x82, 0x01, 0x0a, 0x0f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, + 0x6f, 0x6f, 0x6b, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x36, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, - 0x48, 0x6f, 0x6f, 0x6b, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x55, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x43, - 0x6c, 0x65, 0x61, 0x6e, 0x55, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x8d, - 0x01, 0x0a, 0x10, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x79, 0x0a, 0x0c, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, - 0x69, 0x65, 0x73, 0x12, 0x33, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, - 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, - 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, - 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, - 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x67, 0x6e, - 0x69, 0x74, 0x65, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2f, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x67, - 0x72, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x48, 0x6f, 0x6f, 0x6b, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x37, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, + 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x50, 0x6f, 0x73, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8b, 0x01, 0x0a, 0x12, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x55, 0x70, 0x12, + 0x39, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, + 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x43, 0x6c, 0x65, 0x61, + 0x6e, 0x55, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x69, 0x67, 0x6e, + 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x55, 0x70, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x8d, 0x01, 0x0a, 0x10, 0x43, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x41, 0x50, 0x49, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x79, 0x0a, 0x0c, 0x47, + 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x33, 0x2e, 0x69, 0x67, + 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x34, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2f, 0x63, 0x6c, 0x69, 0x2f, + 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -707,12 +707,12 @@ var file_ignite_services_plugin_grpc_v1_service_proto_goTypes = []interface{}{ (*ExecuteHookPostResponse)(nil), // 7: ignite.services.plugin.grpc.v1.ExecuteHookPostResponse (*ExecuteHookCleanUpRequest)(nil), // 8: ignite.services.plugin.grpc.v1.ExecuteHookCleanUpRequest (*ExecuteHookCleanUpResponse)(nil), // 9: ignite.services.plugin.grpc.v1.ExecuteHookCleanUpResponse - (*DependenciesRequest)(nil), // 10: ignite.services.plugin.grpc.v1.DependenciesRequest - (*DependenciesResponse)(nil), // 11: ignite.services.plugin.grpc.v1.DependenciesResponse + (*GetChainInfoRequest)(nil), // 10: ignite.services.plugin.grpc.v1.GetChainInfoRequest + (*GetChainInfoResponse)(nil), // 11: ignite.services.plugin.grpc.v1.GetChainInfoResponse (*Manifest)(nil), // 12: ignite.services.plugin.grpc.v1.Manifest (*ExecutedCommand)(nil), // 13: ignite.services.plugin.grpc.v1.ExecutedCommand (*ExecutedHook)(nil), // 14: ignite.services.plugin.grpc.v1.ExecutedHook - (*Dependencies)(nil), // 15: ignite.services.plugin.grpc.v1.Dependencies + (*ChainInfo)(nil), // 15: ignite.services.plugin.grpc.v1.ChainInfo } var file_ignite_services_plugin_grpc_v1_service_proto_depIdxs = []int32{ 12, // 0: ignite.services.plugin.grpc.v1.ManifestResponse.manifest:type_name -> ignite.services.plugin.grpc.v1.Manifest @@ -720,19 +720,19 @@ var file_ignite_services_plugin_grpc_v1_service_proto_depIdxs = []int32{ 14, // 2: ignite.services.plugin.grpc.v1.ExecuteHookPreRequest.hook:type_name -> ignite.services.plugin.grpc.v1.ExecutedHook 14, // 3: ignite.services.plugin.grpc.v1.ExecuteHookPostRequest.hook:type_name -> ignite.services.plugin.grpc.v1.ExecutedHook 14, // 4: ignite.services.plugin.grpc.v1.ExecuteHookCleanUpRequest.hook:type_name -> ignite.services.plugin.grpc.v1.ExecutedHook - 15, // 5: ignite.services.plugin.grpc.v1.DependenciesResponse.dependencies:type_name -> ignite.services.plugin.grpc.v1.Dependencies + 15, // 5: ignite.services.plugin.grpc.v1.GetChainInfoResponse.chain_info:type_name -> ignite.services.plugin.grpc.v1.ChainInfo 0, // 6: ignite.services.plugin.grpc.v1.InterfaceService.Manifest:input_type -> ignite.services.plugin.grpc.v1.ManifestRequest 2, // 7: ignite.services.plugin.grpc.v1.InterfaceService.Execute:input_type -> ignite.services.plugin.grpc.v1.ExecuteRequest 4, // 8: ignite.services.plugin.grpc.v1.InterfaceService.ExecuteHookPre:input_type -> ignite.services.plugin.grpc.v1.ExecuteHookPreRequest 6, // 9: ignite.services.plugin.grpc.v1.InterfaceService.ExecuteHookPost:input_type -> ignite.services.plugin.grpc.v1.ExecuteHookPostRequest 8, // 10: ignite.services.plugin.grpc.v1.InterfaceService.ExecuteHookCleanUp:input_type -> ignite.services.plugin.grpc.v1.ExecuteHookCleanUpRequest - 10, // 11: ignite.services.plugin.grpc.v1.ClientAPIService.Dependencies:input_type -> ignite.services.plugin.grpc.v1.DependenciesRequest + 10, // 11: ignite.services.plugin.grpc.v1.ClientAPIService.GetChainInfo:input_type -> ignite.services.plugin.grpc.v1.GetChainInfoRequest 1, // 12: ignite.services.plugin.grpc.v1.InterfaceService.Manifest:output_type -> ignite.services.plugin.grpc.v1.ManifestResponse 3, // 13: ignite.services.plugin.grpc.v1.InterfaceService.Execute:output_type -> ignite.services.plugin.grpc.v1.ExecuteResponse 5, // 14: ignite.services.plugin.grpc.v1.InterfaceService.ExecuteHookPre:output_type -> ignite.services.plugin.grpc.v1.ExecuteHookPreResponse 7, // 15: ignite.services.plugin.grpc.v1.InterfaceService.ExecuteHookPost:output_type -> ignite.services.plugin.grpc.v1.ExecuteHookPostResponse 9, // 16: ignite.services.plugin.grpc.v1.InterfaceService.ExecuteHookCleanUp:output_type -> ignite.services.plugin.grpc.v1.ExecuteHookCleanUpResponse - 11, // 17: ignite.services.plugin.grpc.v1.ClientAPIService.Dependencies:output_type -> ignite.services.plugin.grpc.v1.DependenciesResponse + 11, // 17: ignite.services.plugin.grpc.v1.ClientAPIService.GetChainInfo:output_type -> ignite.services.plugin.grpc.v1.GetChainInfoResponse 12, // [12:18] is the sub-list for method output_type 6, // [6:12] is the sub-list for method input_type 6, // [6:6] is the sub-list for extension type_name @@ -869,7 +869,7 @@ func file_ignite_services_plugin_grpc_v1_service_proto_init() { } } file_ignite_services_plugin_grpc_v1_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DependenciesRequest); i { + switch v := v.(*GetChainInfoRequest); i { case 0: return &v.state case 1: @@ -881,7 +881,7 @@ func file_ignite_services_plugin_grpc_v1_service_proto_init() { } } file_ignite_services_plugin_grpc_v1_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DependenciesResponse); i { + switch v := v.(*GetChainInfoResponse); i { case 0: return &v.state case 1: diff --git a/ignite/services/plugin/grpc/v1/service_grpc.pb.go b/ignite/services/plugin/grpc/v1/service_grpc.pb.go index 93fe6963d8..f369c94a1e 100644 --- a/ignite/services/plugin/grpc/v1/service_grpc.pb.go +++ b/ignite/services/plugin/grpc/v1/service_grpc.pb.go @@ -291,15 +291,15 @@ var InterfaceService_ServiceDesc = grpc.ServiceDesc{ } const ( - ClientAPIService_Dependencies_FullMethodName = "/ignite.services.plugin.grpc.v1.ClientAPIService/Dependencies" + ClientAPIService_GetChainInfo_FullMethodName = "/ignite.services.plugin.grpc.v1.ClientAPIService/GetChainInfo" ) // ClientAPIServiceClient is the client API for ClientAPIService 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 ClientAPIServiceClient interface { - // Dependencies returns the app dependencies. - Dependencies(ctx context.Context, in *DependenciesRequest, opts ...grpc.CallOption) (*DependenciesResponse, error) + // GetChainInfo returns basic chain info for the configured app + GetChainInfo(ctx context.Context, in *GetChainInfoRequest, opts ...grpc.CallOption) (*GetChainInfoResponse, error) } type clientAPIServiceClient struct { @@ -310,9 +310,9 @@ func NewClientAPIServiceClient(cc grpc.ClientConnInterface) ClientAPIServiceClie return &clientAPIServiceClient{cc} } -func (c *clientAPIServiceClient) Dependencies(ctx context.Context, in *DependenciesRequest, opts ...grpc.CallOption) (*DependenciesResponse, error) { - out := new(DependenciesResponse) - err := c.cc.Invoke(ctx, ClientAPIService_Dependencies_FullMethodName, in, out, opts...) +func (c *clientAPIServiceClient) GetChainInfo(ctx context.Context, in *GetChainInfoRequest, opts ...grpc.CallOption) (*GetChainInfoResponse, error) { + out := new(GetChainInfoResponse) + err := c.cc.Invoke(ctx, ClientAPIService_GetChainInfo_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -323,8 +323,8 @@ func (c *clientAPIServiceClient) Dependencies(ctx context.Context, in *Dependenc // All implementations must embed UnimplementedClientAPIServiceServer // for forward compatibility type ClientAPIServiceServer interface { - // Dependencies returns the app dependencies. - Dependencies(context.Context, *DependenciesRequest) (*DependenciesResponse, error) + // GetChainInfo returns basic chain info for the configured app + GetChainInfo(context.Context, *GetChainInfoRequest) (*GetChainInfoResponse, error) mustEmbedUnimplementedClientAPIServiceServer() } @@ -332,8 +332,8 @@ type ClientAPIServiceServer interface { type UnimplementedClientAPIServiceServer struct { } -func (UnimplementedClientAPIServiceServer) Dependencies(context.Context, *DependenciesRequest) (*DependenciesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Dependencies not implemented") +func (UnimplementedClientAPIServiceServer) GetChainInfo(context.Context, *GetChainInfoRequest) (*GetChainInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetChainInfo not implemented") } func (UnimplementedClientAPIServiceServer) mustEmbedUnimplementedClientAPIServiceServer() {} @@ -348,20 +348,20 @@ func RegisterClientAPIServiceServer(s grpc.ServiceRegistrar, srv ClientAPIServic s.RegisterService(&ClientAPIService_ServiceDesc, srv) } -func _ClientAPIService_Dependencies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DependenciesRequest) +func _ClientAPIService_GetChainInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetChainInfoRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(ClientAPIServiceServer).Dependencies(ctx, in) + return srv.(ClientAPIServiceServer).GetChainInfo(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: ClientAPIService_Dependencies_FullMethodName, + FullMethod: ClientAPIService_GetChainInfo_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClientAPIServiceServer).Dependencies(ctx, req.(*DependenciesRequest)) + return srv.(ClientAPIServiceServer).GetChainInfo(ctx, req.(*GetChainInfoRequest)) } return interceptor(ctx, in, info, handler) } @@ -374,8 +374,8 @@ var ClientAPIService_ServiceDesc = grpc.ServiceDesc{ HandlerType: (*ClientAPIServiceServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "Dependencies", - Handler: _ClientAPIService_Dependencies_Handler, + MethodName: "GetChainInfo", + Handler: _ClientAPIService_GetChainInfo_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/ignite/services/plugin/interface.go b/ignite/services/plugin/interface.go index 514225616d..6a10c8a7d8 100644 --- a/ignite/services/plugin/interface.go +++ b/ignite/services/plugin/interface.go @@ -20,7 +20,7 @@ const ( // Type aliases for the current plugin version. type ( Command = v1.Command - Dependencies = v1.Dependencies + ChainInfo = v1.ChainInfo ExecutedCommand = v1.ExecutedCommand ExecutedHook = v1.ExecutedHook Flag = v1.Flag @@ -70,5 +70,5 @@ type Interface interface { //go:generate mockery --srcpkg . --name ClientAPI --structname PluginClientAPI --filename interface.go --with-expecter type ClientAPI interface { // Dependencies returns the app dependencies. - Dependencies(context.Context) (*Dependencies, error) + GetChainInfo(context.Context) (*ChainInfo, error) } diff --git a/ignite/services/plugin/mocks/interface.go b/ignite/services/plugin/mocks/interface.go index 5d8b875835..c9bffda3e3 100644 --- a/ignite/services/plugin/mocks/interface.go +++ b/ignite/services/plugin/mocks/interface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.16.0. DO NOT EDIT. +// Code generated by mockery v2.27.1. DO NOT EDIT. package mocks @@ -23,20 +23,23 @@ func (_m *PluginClientAPI) EXPECT() *PluginClientAPI_Expecter { return &PluginClientAPI_Expecter{mock: &_m.Mock} } -// Dependencies provides a mock function with given fields: _a0 -func (_m *PluginClientAPI) Dependencies(_a0 context.Context) ([]*v1.Dependency, error) { +// GetChainInfo provides a mock function with given fields: _a0 +func (_m *PluginClientAPI) GetChainInfo(_a0 context.Context) (*v1.ChainInfo, error) { ret := _m.Called(_a0) - var r0 []*v1.Dependency - if rf, ok := ret.Get(0).(func(context.Context) []*v1.Dependency); ok { + var r0 *v1.ChainInfo + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (*v1.ChainInfo, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(context.Context) *v1.ChainInfo); ok { r0 = rf(_a0) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).([]*v1.Dependency) + r0 = ret.Get(0).(*v1.ChainInfo) } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(_a0) } else { @@ -46,29 +49,34 @@ func (_m *PluginClientAPI) Dependencies(_a0 context.Context) ([]*v1.Dependency, return r0, r1 } -// PluginClientAPI_Dependencies_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Dependencies' -type PluginClientAPI_Dependencies_Call struct { +// PluginClientAPI_GetChainInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetChainInfo' +type PluginClientAPI_GetChainInfo_Call struct { *mock.Call } -// Dependencies is a helper method to define mock.On call +// GetChainInfo is a helper method to define mock.On call // - _a0 context.Context -func (_e *PluginClientAPI_Expecter) Dependencies(_a0 interface{}) *PluginClientAPI_Dependencies_Call { - return &PluginClientAPI_Dependencies_Call{Call: _e.mock.On("Dependencies", _a0)} +func (_e *PluginClientAPI_Expecter) GetChainInfo(_a0 interface{}) *PluginClientAPI_GetChainInfo_Call { + return &PluginClientAPI_GetChainInfo_Call{Call: _e.mock.On("GetChainInfo", _a0)} } -func (_c *PluginClientAPI_Dependencies_Call) Run(run func(_a0 context.Context)) *PluginClientAPI_Dependencies_Call { +func (_c *PluginClientAPI_GetChainInfo_Call) Run(run func(_a0 context.Context)) *PluginClientAPI_GetChainInfo_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context)) }) return _c } -func (_c *PluginClientAPI_Dependencies_Call) Return(_a0 []*v1.Dependency, _a1 error) *PluginClientAPI_Dependencies_Call { +func (_c *PluginClientAPI_GetChainInfo_Call) Return(_a0 *v1.ChainInfo, _a1 error) *PluginClientAPI_GetChainInfo_Call { _c.Call.Return(_a0, _a1) return _c } +func (_c *PluginClientAPI_GetChainInfo_Call) RunAndReturn(run func(context.Context) (*v1.ChainInfo, error)) *PluginClientAPI_GetChainInfo_Call { + _c.Call.Return(run) + return _c +} + type mockConstructorTestingTNewPluginClientAPI interface { mock.TestingT Cleanup(func()) diff --git a/ignite/services/plugin/protocol.go b/ignite/services/plugin/protocol.go index f2454c6ffd..6e6200cf22 100644 --- a/ignite/services/plugin/protocol.go +++ b/ignite/services/plugin/protocol.go @@ -208,13 +208,13 @@ type clientAPIClient struct { grpc v1.ClientAPIServiceClient } -func (c clientAPIClient) Dependencies(ctx context.Context) (*Dependencies, error) { - r, err := c.grpc.Dependencies(ctx, &v1.DependenciesRequest{}) +func (c clientAPIClient) GetChainInfo(ctx context.Context) (*ChainInfo, error) { + r, err := c.grpc.GetChainInfo(ctx, &v1.GetChainInfoRequest{}) if err != nil { return nil, err } - return r.Dependencies, nil + return r.ChainInfo, nil } type clientAPIServer struct { @@ -223,11 +223,11 @@ type clientAPIServer struct { impl ClientAPI } -func (s clientAPIServer) Dependencies(ctx context.Context, _ *v1.DependenciesRequest) (*v1.DependenciesResponse, error) { - deps, err := s.impl.Dependencies(ctx) +func (s clientAPIServer) GetChainInfo(ctx context.Context, _ *v1.GetChainInfoRequest) (*v1.GetChainInfoResponse, error) { + chainInfo, err := s.impl.GetChainInfo(ctx) if err != nil { return nil, err } - return &v1.DependenciesResponse{Dependencies: deps}, nil + return &v1.GetChainInfoResponse{ChainInfo: chainInfo}, nil } diff --git a/proto/ignite/services/plugin/grpc/v1/client_api.proto b/proto/ignite/services/plugin/grpc/v1/client_api.proto index 62a52a069e..936e8591ef 100644 --- a/proto/ignite/services/plugin/grpc/v1/client_api.proto +++ b/proto/ignite/services/plugin/grpc/v1/client_api.proto @@ -4,158 +4,166 @@ package ignite.services.plugin.grpc.v1; option go_package = "github.com/ignite/cli/ignite/services/plugin/grpc/v1"; -message Dependencies { - repeated Dependency modules_in_path = 1; +message ChainInfo { + string chain_id = 1; + string app_path = 2; + string config_path = 3; + string rpc = 4; } +/* + message Dependencies { + repeated Dependency modules_in_path = 1; + } -// Dependecy keeps data about Go module dependencies. -message Dependency { - // Path is the absolute path to the Go module. - string path = 1; + // Dependecy keeps data about Go module dependencies. + message Dependency { + // Path is the absolute path to the Go module. + string path = 1; - // Modules contains the list of modules defined by the dependency. - repeated Module modules = 2; - repeated string includes = 3; -} + // Modules contains the list of modules defined by the dependency. + repeated Module modules = 2; + repeated string includes = 3; + } -// Module keeps metadata about a Cosmos SDK module. -message Module { - // Name of the module. - string name = 1; + // Module keeps metadata about a Cosmos SDK module. + message Module { + // Name of the module. + string name = 1; - // Go module path of the app where the module is defined. - string go_module_path = 2; + // Go module path of the app where the module is defined. + string go_module_path = 2; - // Package contains proto package info. - ProtoPackage package = 3; + // Package contains proto package info. + ProtoPackage package = 3; - // Messages is the list of sdk.Msg that the module implements. - repeated Message messages = 4; + // Messages is the list of sdk.Msg that the module implements. + repeated Message messages = 4; - // HTTP queries is a list of module queries. - repeated HTTPQuery http_queries = 5; + // HTTP queries is a list of module queries. + repeated HTTPQuery http_queries = 5; - // Types is a list of proto types that could be used by the module. - repeated Type types = 6; -} + // Types is a list of proto types that could be used by the module. + repeated Type types = 6; + } -// ProtoPackage represents a proto package. -message ProtoPackage { - // Name of the proto package. - string name = 1; + // ProtoPackage represents a proto package. + message ProtoPackage { + // Name of the proto package. + string name = 1; - // Path of the proto package. - string path = 2; + // Path of the proto package. + string path = 2; - // Files is list of package proto files. - repeated ProtoFile files = 3; + // Files is list of package proto files. + repeated ProtoFile files = 3; - // Go import name for the proto package. - string go_import_name = 4; + // Go import name for the proto package. + string go_import_name = 4; - // Messages is list of messages defined within the proto package. - repeated ProtoMessage messages = 5; + // Messages is list of messages defined within the proto package. + repeated ProtoMessage messages = 5; - // Services is list of services defined within the proto package. - repeated ProtoService services = 6; -} + // Services is list of services defined within the proto package. + repeated ProtoService services = 6; + } -// ProtoFile represents a proto file. -message ProtoFile { - // Path to the file. - string path = 1; + // ProtoFile represents a proto file. + message ProtoFile { + // Path to the file. + string path = 1; - // Dependencies is a list of imported proto packages. - repeated string dependencies = 2; -} + // Dependencies is a list of imported proto packages. + repeated string dependencies = 2; + } -// ProtoMessage represents a proto message. -message ProtoMessage { - // Name of the message. - string name = 1; + // ProtoMessage represents a proto message. + message ProtoMessage { + // Name of the message. + string name = 1; - // Path of the proto file where the message is defined. - string path = 2; + // Path of the proto file where the message is defined. + string path = 2; - // Highest field name is the highest field number among fields of the message. - // This allows to determine new field number when writing to proto message. - int32 highest_field_number = 3; + // Highest field name is the highest field number among fields of the message. + // This allows to determine new field number when writing to proto message. + int32 highest_field_number = 3; - // Fields contains message's field names and types. - map fields = 4; -} + // Fields contains message's field names and types. + map fields = 4; + } -// ProtoService represents a proto RPC service. -message ProtoService { - // Name of the service. - string name = 1; + // ProtoService represents a proto RPC service. + message ProtoService { + // Name of the service. + string name = 1; - // Functions is a list of RPC functions. - repeated ProtoServiceFunc functions = 2; -} + // Functions is a list of RPC functions. + repeated ProtoServiceFunc functions = 2; + } -// Proto service func represents a proto RPC function. -message ProtoServiceFunc { - // Name of the RPC function. - string name = 1; + // Proto service func represents a proto RPC function. + message ProtoServiceFunc { + // Name of the RPC function. + string name = 1; - // Request type is the request type of the RPC function. - string request_type = 2; + // Request type is the request type of the RPC function. + string request_type = 2; - // Return type is the return type of the RPC function. - string return_type = 3; + // Return type is the return type of the RPC function. + string return_type = 3; - // Paginated indicates that the function is using pagination. - bool paginated = 4; + // Paginated indicates that the function is using pagination. + bool paginated = 4; - // HTTP rules keeps info about HTTP annotations of query. - repeated HTTPRule http_rules = 5; -} + // HTTP rules keeps info about HTTP annotations of query. + repeated HTTPRule http_rules = 5; + } -// Message keeps metadata about an sdk.Msg implementation. -message Message { - // Name of the type. - string name = 1; + // Message keeps metadata about an sdk.Msg implementation. + message Message { + // Name of the type. + string name = 1; - // URI of the type. - string uri = 2; + // URI of the type. + string uri = 2; - // File path is the path of the proto file where message is defined. - string file_path = 3; -} + // File path is the path of the proto file where message is defined. + string file_path = 3; + } -// HTTPQuery is an SDK query. -message HTTPQuery { - // Name of the RPC function. - string name = 1; + // HTTPQuery is an SDK query. + message HTTPQuery { + // Name of the RPC function. + string name = 1; - // Full name of the query with service name and RPC function name. - string full_name = 2; + // Full name of the query with service name and RPC function name. + string full_name = 2; - // Paginated indicates that the query is using pagination. - bool paginated = 3; + // Paginated indicates that the query is using pagination. + bool paginated = 3; - // HTTP rules keeps info about HTTP annotations of query. - repeated HTTPRule rules = 4; -} + // HTTP rules keeps info about HTTP annotations of query. + repeated HTTPRule rules = 4; + } -// HTTP rule keeps info about a configured HTTP rule of an RPC function. -message HTTPRule { - // Params is a list of parameters defined in the HTTP endpoint itself. - repeated string params = 1; + // HTTP rule keeps info about a configured HTTP rule of an RPC function. + message HTTPRule { + // Params is a list of parameters defined in the HTTP endpoint itself. + repeated string params = 1; - // Has query indicates if there is a request query. - bool has_query = 2; + // Has query indicates if there is a request query. + bool has_query = 2; - // Has body indicates if there is a request payload. - bool has_body = 3; -} + // Has body indicates if there is a request payload. + bool has_body = 3; + } -// Type is a proto type. -message Type { - // Name pf the type. - string name = 1; + // Type is a proto type. + message Type { + // Name pf the type. + string name = 1; - // File path is the path of the .proto file where message is defined at. - string file_path = 2; -} + // File path is the path of the .proto file where message is defined at. + string file_path = 2; + } +*/ diff --git a/proto/ignite/services/plugin/grpc/v1/service.proto b/proto/ignite/services/plugin/grpc/v1/service.proto index aa2d2b492c..c80f4dab1c 100644 --- a/proto/ignite/services/plugin/grpc/v1/service.proto +++ b/proto/ignite/services/plugin/grpc/v1/service.proto @@ -73,12 +73,21 @@ message ExecuteHookCleanUpResponse {} // ClientAPIService defines the interface that allows plugins to get chain app analysis info. service ClientAPIService { + // GetChainInfo returns basic chain info for the configured app + rpc GetChainInfo(GetChainInfoRequest) returns (GetChainInfoResponse); + // Dependencies returns the app dependencies. - rpc Dependencies(DependenciesRequest) returns (DependenciesResponse); + //rpc Dependencies(DependenciesRequest) returns (DependenciesResponse); } +message GetChainInfoRequest {} -message DependenciesRequest {} - -message DependenciesResponse { - Dependencies dependencies = 2; +message GetChainInfoResponse { + ChainInfo chain_info = 1; } +/* + message DependenciesRequest {} + + message DependenciesResponse { + Dependencies dependencies = 2; + } +*/ From eaa8d28366a8140575a82bb63931319a46ac145c Mon Sep 17 00:00:00 2001 From: Clockwork Date: Mon, 4 Sep 2023 13:35:17 +0300 Subject: [PATCH 12/23] chore: Remove chain analysis code --- ignite/pkg/cosmosanalysis/chain/chain.go | 275 ----------------------- 1 file changed, 275 deletions(-) delete mode 100644 ignite/pkg/cosmosanalysis/chain/chain.go diff --git a/ignite/pkg/cosmosanalysis/chain/chain.go b/ignite/pkg/cosmosanalysis/chain/chain.go deleted file mode 100644 index 0070a13679..0000000000 --- a/ignite/pkg/cosmosanalysis/chain/chain.go +++ /dev/null @@ -1,275 +0,0 @@ -package chain - -import ( - "bytes" - "context" - "fmt" - "os" - "path/filepath" - "strings" - - "github.com/pkg/errors" - - "github.com/ignite/cli/ignite/pkg/cache" - "github.com/ignite/cli/ignite/pkg/cmdrunner" - "github.com/ignite/cli/ignite/pkg/cmdrunner/step" - "github.com/ignite/cli/ignite/pkg/cosmosanalysis/module" - "github.com/ignite/cli/ignite/pkg/cosmosver" - "github.com/ignite/cli/ignite/pkg/gomodule" - "github.com/ignite/cli/ignite/pkg/xfilepath" - gomod "golang.org/x/mod/module" -) - -const ( - moduleCacheNamespace = "analyze.setup.module" - includeProtoCacheNamespace = "analyze.includes.proto" - includeCacheNamespace = "analyze.includes.module" -) - -var protocGlobalInclude = xfilepath.List( - xfilepath.JoinFromHome(xfilepath.Path("local/include")), - xfilepath.JoinFromHome(xfilepath.Path(".local/include")), -) -var protoFound = errors.New("Proto file found") // Hacky way to terminate dir walk early - -type ModulesInPath struct { - Path string `json:"path,omitempty"` - Modules []module.Module `json:"modules,omitempty"` - HasProto bool `json:"has_proto,omitempty"` - Includes []string `json:"includes,omitempty"` -} -type AllModules struct { - ModulePaths []ModulesInPath `json:"modules_in_path,omitempty"` -} - -type Analyzer struct { - ctx context.Context - appPath string - protoDir string - sdkImport string - appModules []module.Module - cacheStorage cache.Storage - deps []gomod.Version - includeDirs []string - thirdModules map[string][]ModulesInPath // app dependency-modules pair. -} - -func GetModuleList(ctx context.Context, appPath, protoPath string, thirdPartyPaths []string) (*AllModules, error) { - cacheStorage, err := cache.NewStorage(filepath.Join(appPath, "analyzer_cache.db")) - if err != nil { - return nil, err - } - var errb bytes.Buffer - if err := cmdrunner. - New( - cmdrunner.DefaultStderr(&errb), - cmdrunner.DefaultWorkdir(appPath), - ).Run(ctx, step.New(step.Exec("go", "mod", "download"))); err != nil { - return nil, errors.Wrap(err, errb.String()) - } - - modFile, err := gomodule.ParseAt(appPath) - a := &Analyzer{ - ctx: ctx, - appPath: appPath, - protoDir: protoPath, - includeDirs: thirdPartyPaths, - thirdModules: make(map[string][]ModulesInPath), - cacheStorage: cacheStorage, - } - if err != nil { - return nil, err - } - - a.sdkImport = cosmosver.CosmosModulePath - - // Check if the Cosmos SDK import path points to a different path - // and if so change the default one to the new location. - for _, r := range modFile.Replace { - if r.Old.Path == cosmosver.CosmosModulePath { - a.sdkImport = r.New.Path - break - } - } - - // Read the dependencies defined in the `go.mod` file - a.deps, err = gomodule.ResolveDependencies(modFile, true) - if err != nil { - return nil, err - } - - // Discover any custom modules defined by the user's app - a.appModules, err = a.discoverModules(a.appPath, a.protoDir) - if err != nil { - return nil, err - } - - // Go through the Go dependencies of the user's app within go.mod, some of them might be hosting Cosmos SDK modules - // that could be in use by user's blockchain. - // - // Cosmos SDK is a dependency of all blockchains, so it's absolute that we'll be discovering all modules of the - // SDK as well during this process. - // - // Even if a dependency contains some SDK modules, not all of these modules could be used by user's blockchain. - // this is fine, we can still generate TS clients for those non modules, it is up to user to use (import in typescript) - // not use generated modules. - // - // TODO: we can still implement some sort of smart filtering to detect non used modules by the user's blockchain - // at some point, it is a nice to have. - moduleCache := cache.New[ModulesInPath](a.cacheStorage, moduleCacheNamespace) - for _, dep := range a.deps { - // Try to get the cached list of modules for the current dependency package - cacheKey := cache.Key(dep.Path, dep.Version) - modulesInPath, err := moduleCache.Get(cacheKey) - if err != nil && !errors.Is(err, cache.ErrorNotFound) { - return nil, err - } - - // Discover the modules of the dependency package when they are not cached - if errors.Is(err, cache.ErrorNotFound) { - // Get the absolute path to the package's directory - path, err := gomodule.LocatePath(a.ctx, a.cacheStorage, a.appPath, dep) - if err != nil { - return nil, err - } - hasProto, err := a.checkForProto(path) - if err != nil { - return nil, err - } - if hasProto { - // Discover any modules defined by the package - modules, err := a.discoverModules(path, "") - if err != nil { - return nil, err - } - includePaths, err := a.getProtoIncludeFolders(path) - if err != nil { - return nil, err - } - modulesInPath = ModulesInPath{ - Path: path, - Modules: modules, - HasProto: true, - Includes: includePaths, - } - } else { - modulesInPath = ModulesInPath{ - Path: path, - Modules: []module.Module{}, - HasProto: false, - } - } - if err := moduleCache.Put(cacheKey, modulesInPath); err != nil { - return nil, err - } - } - if modulesInPath.HasProto { - a.thirdModules[modulesInPath.Path] = append(a.thirdModules[modulesInPath.Path], modulesInPath) - } - } - - if err != nil { - return nil, err - } - var modulelist []ModulesInPath - modulelist = append(modulelist, ModulesInPath{Path: appPath, Modules: a.appModules}) - for _, modules := range a.thirdModules { - { - modulelist = append(modulelist, modules...) - } - } - allModules := &AllModules{ - ModulePaths: modulelist, - } - fmt.Println(allModules) - return allModules, nil -} - -func (a *Analyzer) getProtoIncludeFolders(modPath string) ([]string, error) { - // Read the mod file for this module - modFile, err := gomodule.ParseAt(modPath) - if err != nil { - return nil, err - } - includePaths := []string{} - // Get the imports/deps from the mod file (include indirect) - deps, err := gomodule.ResolveDependencies(modFile, true) - if err != nil { - return nil, err - } - // Initialize include cache for proto checking (lots of common includes across modules. No need to traverse repeatedly) - includeProtoCache := cache.New[bool](a.cacheStorage, includeProtoCacheNamespace) - - for _, dep := range deps { - - // Check for proto file in this dependency - cacheKey := cache.Key(dep.Path, dep.Version) - hasProto, err := includeProtoCache.Get(cacheKey) - - // Return unexpected error - if err != nil && !errors.Is(err, cache.ErrorNotFound) { - return nil, err - } - - // If result not already cached - if errors.Is(err, cache.ErrorNotFound) { - path, err := gomodule.LocatePath(a.ctx, a.cacheStorage, a.appPath, dep) - if err != nil { - return nil, err - } - hasProto, err = a.checkForProto(path) - if err != nil { - return nil, err - } - } - - if hasProto { - path, err := gomodule.LocatePath(a.ctx, a.cacheStorage, a.appPath, dep) - if err != nil { - return nil, err - } - includePaths = append(includePaths, path) - } - } - return includePaths, nil -} - -func (a *Analyzer) checkForProto(modpath string) (bool, error) { - err := filepath.Walk(modpath, - func(path string, _ os.FileInfo, err error) error { - if err != nil { - return err - } - if filepath.Ext(path) == ".proto" { - return protoFound - } - return nil - }) - if err == protoFound { - return true, nil - } - if err != nil { - return false, err - } - return false, nil -} - -func (a *Analyzer) discoverModules(path, protoDir string) ([]module.Module, error) { - var filteredModules []module.Module - - modules, err := module.Discover(a.ctx, a.appPath, path, protoDir) - if err != nil { - return nil, err - } - - protoPath := filepath.Join(path, a.protoDir) - - for _, m := range modules { - if !strings.HasPrefix(m.Pkg.Path, protoPath) { - continue - } - - filteredModules = append(filteredModules, m) - } - return filteredModules, nil -} From 0977ce42d467f8531b50d5e05b9e01486c8ede15 Mon Sep 17 00:00:00 2001 From: Clockwork Date: Mon, 4 Sep 2023 13:40:07 +0300 Subject: [PATCH 13/23] feat: ChainInfo API example template --- ignite/services/plugin/template/main.go.plush | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ignite/services/plugin/template/main.go.plush b/ignite/services/plugin/template/main.go.plush index 91a8cf93ad..d90b85219e 100644 --- a/ignite/services/plugin/template/main.go.plush +++ b/ignite/services/plugin/template/main.go.plush @@ -76,7 +76,7 @@ func (p) Execute(ctx context.Context, cmd *plugin.ExecutedCommand, c plugin.Clie // Calling the ClientAPI example - fmt.Println(c.Dependencies(ctx)) + fmt.Println(c.GetChainInfo(ctx)) return nil } From 8feac2452c35ec2a8a48475ac887a882a25ce222 Mon Sep 17 00:00:00 2001 From: Clockwork Date: Mon, 4 Sep 2023 13:42:36 +0300 Subject: [PATCH 14/23] chore: Update template cli reference --- ignite/services/plugin/template/go.mod.plush | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ignite/services/plugin/template/go.mod.plush b/ignite/services/plugin/template/go.mod.plush index bf2968b58e..3106b16cb7 100644 --- a/ignite/services/plugin/template/go.mod.plush +++ b/ignite/services/plugin/template/go.mod.plush @@ -4,5 +4,5 @@ go 1.19 require ( github.com/hashicorp/go-plugin v1.4.9 - github.com/ignite/cli v0.27.2-0.20230717065933-43af937a4877 + github.com/ignite/cli v0.27.2-0.20230904104007-0977ce42d467 ) From f2ef1a3a605f999390c5adbebd5eda7ff29fad3f Mon Sep 17 00:00:00 2001 From: Clockwork Date: Mon, 4 Sep 2023 13:49:40 +0300 Subject: [PATCH 15/23] chore: clean up PR --- .../services/plugin/grpc/v1/client_api.proto | 157 ------------------ .../services/plugin/grpc/v1/service.proto | 7 - 2 files changed, 164 deletions(-) diff --git a/proto/ignite/services/plugin/grpc/v1/client_api.proto b/proto/ignite/services/plugin/grpc/v1/client_api.proto index 936e8591ef..2bb7fddbe7 100644 --- a/proto/ignite/services/plugin/grpc/v1/client_api.proto +++ b/proto/ignite/services/plugin/grpc/v1/client_api.proto @@ -10,160 +10,3 @@ message ChainInfo { string config_path = 3; string rpc = 4; } -/* - message Dependencies { - repeated Dependency modules_in_path = 1; - } - - // Dependecy keeps data about Go module dependencies. - message Dependency { - // Path is the absolute path to the Go module. - string path = 1; - - // Modules contains the list of modules defined by the dependency. - repeated Module modules = 2; - repeated string includes = 3; - } - - // Module keeps metadata about a Cosmos SDK module. - message Module { - // Name of the module. - string name = 1; - - // Go module path of the app where the module is defined. - string go_module_path = 2; - - // Package contains proto package info. - ProtoPackage package = 3; - - // Messages is the list of sdk.Msg that the module implements. - repeated Message messages = 4; - - // HTTP queries is a list of module queries. - repeated HTTPQuery http_queries = 5; - - // Types is a list of proto types that could be used by the module. - repeated Type types = 6; - } - - // ProtoPackage represents a proto package. - message ProtoPackage { - // Name of the proto package. - string name = 1; - - // Path of the proto package. - string path = 2; - - // Files is list of package proto files. - repeated ProtoFile files = 3; - - // Go import name for the proto package. - string go_import_name = 4; - - // Messages is list of messages defined within the proto package. - repeated ProtoMessage messages = 5; - - // Services is list of services defined within the proto package. - repeated ProtoService services = 6; - } - - // ProtoFile represents a proto file. - message ProtoFile { - // Path to the file. - string path = 1; - - // Dependencies is a list of imported proto packages. - repeated string dependencies = 2; - } - - // ProtoMessage represents a proto message. - message ProtoMessage { - // Name of the message. - string name = 1; - - // Path of the proto file where the message is defined. - string path = 2; - - // Highest field name is the highest field number among fields of the message. - // This allows to determine new field number when writing to proto message. - int32 highest_field_number = 3; - - // Fields contains message's field names and types. - map fields = 4; - } - - // ProtoService represents a proto RPC service. - message ProtoService { - // Name of the service. - string name = 1; - - // Functions is a list of RPC functions. - repeated ProtoServiceFunc functions = 2; - } - - // Proto service func represents a proto RPC function. - message ProtoServiceFunc { - // Name of the RPC function. - string name = 1; - - // Request type is the request type of the RPC function. - string request_type = 2; - - // Return type is the return type of the RPC function. - string return_type = 3; - - // Paginated indicates that the function is using pagination. - bool paginated = 4; - - // HTTP rules keeps info about HTTP annotations of query. - repeated HTTPRule http_rules = 5; - } - - // Message keeps metadata about an sdk.Msg implementation. - message Message { - // Name of the type. - string name = 1; - - // URI of the type. - string uri = 2; - - // File path is the path of the proto file where message is defined. - string file_path = 3; - } - - // HTTPQuery is an SDK query. - message HTTPQuery { - // Name of the RPC function. - string name = 1; - - // Full name of the query with service name and RPC function name. - string full_name = 2; - - // Paginated indicates that the query is using pagination. - bool paginated = 3; - - // HTTP rules keeps info about HTTP annotations of query. - repeated HTTPRule rules = 4; - } - - // HTTP rule keeps info about a configured HTTP rule of an RPC function. - message HTTPRule { - // Params is a list of parameters defined in the HTTP endpoint itself. - repeated string params = 1; - - // Has query indicates if there is a request query. - bool has_query = 2; - - // Has body indicates if there is a request payload. - bool has_body = 3; - } - - // Type is a proto type. - message Type { - // Name pf the type. - string name = 1; - - // File path is the path of the .proto file where message is defined at. - string file_path = 2; - } -*/ diff --git a/proto/ignite/services/plugin/grpc/v1/service.proto b/proto/ignite/services/plugin/grpc/v1/service.proto index c80f4dab1c..bd1d94dc8e 100644 --- a/proto/ignite/services/plugin/grpc/v1/service.proto +++ b/proto/ignite/services/plugin/grpc/v1/service.proto @@ -84,10 +84,3 @@ message GetChainInfoRequest {} message GetChainInfoResponse { ChainInfo chain_info = 1; } -/* - message DependenciesRequest {} - - message DependenciesResponse { - Dependencies dependencies = 2; - } -*/ From 732fe0b6db08c043db22747eecd28819255e664b Mon Sep 17 00:00:00 2001 From: Clockwork Date: Mon, 4 Sep 2023 13:58:22 +0300 Subject: [PATCH 16/23] fix: Address review comments --- ignite/services/plugin/client_api.go | 41 +++++++++------------------- 1 file changed, 13 insertions(+), 28 deletions(-) diff --git a/ignite/services/plugin/client_api.go b/ignite/services/plugin/client_api.go index e4869ed55e..d2730a82d7 100644 --- a/ignite/services/plugin/client_api.go +++ b/ignite/services/plugin/client_api.go @@ -2,43 +2,28 @@ package plugin import ( "context" - - chainservice "github.com/ignite/cli/ignite/services/chain" ) +type Chainer interface { + // AppPath returns the configured App's path. + AppPath() string + // ID returns the configured App's chain id. + ID() (string, error) + // ConfigPath returns the path to the App's config file. + ConfigPath() string + // RPCPublicAddress returns the configured App's rpc endpoint. + RPCPublicAddress() (string, error) +} + // NewClientAPI creates a new app ClientAPI. -func NewClientAPI(c *chainservice.Chain) ClientAPI { +func NewClientAPI(c Chainer) ClientAPI { return clientAPI{chain: c} } type clientAPI struct { - chain *chainservice.Chain + chain Chainer } -// TODO: Implement dependency ClientAPI. - -// Deoendencies returns chain app dependencies. -/* -func (c clientAPI) Dependencies(ctx context.Context) (*Dependencies, error) { - conf, err := c.chain.Config() - if err != nil { - return nil, err - } - mods, err := chain.GetModuleList(ctx, c.chain.AppPath(), conf.Build.Proto.Path, conf.Build.Proto.ThirdPartyPaths) - if err != nil { - return nil, err - } - bz, err := json.Marshal(mods) - if err != nil { - return nil, err - } - var d Dependencies - if err := json.Unmarshal(bz, &d); err != nil { - return nil, err - } - return &d, nil -} -*/ func (c clientAPI) GetChainInfo(ctx context.Context) (*ChainInfo, error) { chain_id, err := c.chain.ID() if err != nil { From 86639782b59ea7b88a99efe339415f08b95ddee4 Mon Sep 17 00:00:00 2001 From: Clockwork Date: Mon, 4 Sep 2023 14:07:22 +0300 Subject: [PATCH 17/23] fix: address review comments --- ignite/services/plugin/client_api.go | 2 +- .../services/plugin/grpc/v1/client_api.pb.go | 23 ++++++++++--------- .../services/plugin/grpc/v1/client_api.proto | 2 +- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/ignite/services/plugin/client_api.go b/ignite/services/plugin/client_api.go index d2730a82d7..6e632df84f 100644 --- a/ignite/services/plugin/client_api.go +++ b/ignite/services/plugin/client_api.go @@ -39,6 +39,6 @@ func (c clientAPI) GetChainInfo(ctx context.Context) (*ChainInfo, error) { ChainId: chain_id, AppPath: app_path, ConfigPath: config_path, - Rpc: rpc, + RpcAddress: rpc, }, nil } diff --git a/ignite/services/plugin/grpc/v1/client_api.pb.go b/ignite/services/plugin/grpc/v1/client_api.pb.go index dac69a5702..d0a5a00f68 100644 --- a/ignite/services/plugin/grpc/v1/client_api.pb.go +++ b/ignite/services/plugin/grpc/v1/client_api.pb.go @@ -28,7 +28,7 @@ type ChainInfo struct { ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` AppPath string `protobuf:"bytes,2,opt,name=app_path,json=appPath,proto3" json:"app_path,omitempty"` ConfigPath string `protobuf:"bytes,3,opt,name=config_path,json=configPath,proto3" json:"config_path,omitempty"` - Rpc string `protobuf:"bytes,4,opt,name=rpc,proto3" json:"rpc,omitempty"` + RpcAddress string `protobuf:"bytes,4,opt,name=rpc_address,json=rpcAddress,proto3" json:"rpc_address,omitempty"` } func (x *ChainInfo) Reset() { @@ -84,9 +84,9 @@ func (x *ChainInfo) GetConfigPath() string { return "" } -func (x *ChainInfo) GetRpc() string { +func (x *ChainInfo) GetRpcAddress() string { if x != nil { - return x.Rpc + return x.RpcAddress } return "" } @@ -99,14 +99,15 @@ var file_ignite_services_plugin_grpc_v1_client_api_proto_rawDesc = []byte{ 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, - 0x31, 0x22, 0x74, 0x0a, 0x09, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x19, - 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x70, 0x70, - 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, - 0x50, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x70, - 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x50, 0x61, 0x74, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x70, 0x63, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x72, 0x70, 0x63, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x31, 0x22, 0x83, 0x01, 0x0a, 0x09, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x70, + 0x70, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, + 0x70, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, + 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x70, 0x63, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x70, 0x63, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x62, diff --git a/proto/ignite/services/plugin/grpc/v1/client_api.proto b/proto/ignite/services/plugin/grpc/v1/client_api.proto index 2bb7fddbe7..d7b76c7bc0 100644 --- a/proto/ignite/services/plugin/grpc/v1/client_api.proto +++ b/proto/ignite/services/plugin/grpc/v1/client_api.proto @@ -8,5 +8,5 @@ message ChainInfo { string chain_id = 1; string app_path = 2; string config_path = 3; - string rpc = 4; + string rpc_address = 4; } From 0f1bfa1ff1ef2b235704971b35e9436ccfcae31d Mon Sep 17 00:00:00 2001 From: Clockwork Date: Mon, 4 Sep 2023 14:54:23 +0300 Subject: [PATCH 18/23] fix: address review comments --- ignite/services/plugin/client_api.go | 10 +++++----- ignite/services/plugin/protocol.go | 20 +++++++++---------- ignite/services/plugin/template/main.go.plush | 10 +++++----- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/ignite/services/plugin/client_api.go b/ignite/services/plugin/client_api.go index 6e632df84f..ee56768fb4 100644 --- a/ignite/services/plugin/client_api.go +++ b/ignite/services/plugin/client_api.go @@ -24,14 +24,14 @@ type clientAPI struct { chain Chainer } -func (c clientAPI) GetChainInfo(ctx context.Context) (*ChainInfo, error) { - chain_id, err := c.chain.ID() +func (api clientAPI) GetChainInfo(ctx context.Context) (*ChainInfo, error) { + chain_id, err := api.chain.ID() if err != nil { return nil, err } - app_path := c.chain.AppPath() - config_path := c.chain.ConfigPath() - rpc, err := c.chain.RPCPublicAddress() + app_path := api.chain.AppPath() + config_path := api.chain.ConfigPath() + rpc, err := api.chain.RPCPublicAddress() if err != nil { return nil, err } diff --git a/ignite/services/plugin/protocol.go b/ignite/services/plugin/protocol.go index 07bd524501..ac3d638f3d 100644 --- a/ignite/services/plugin/protocol.go +++ b/ignite/services/plugin/protocol.go @@ -65,8 +65,8 @@ func (c client) Manifest(ctx context.Context) (*Manifest, error) { return r.Manifest, nil } -func (c client) Execute(ctx context.Context, cmd *ExecutedCommand, a ClientAPI) error { - brokerID, stopServer := c.startClientAPIServer(a) +func (c client) Execute(ctx context.Context, cmd *ExecutedCommand, api ClientAPI) error { + brokerID, stopServer := c.startClientAPIServer(api) _, err := c.grpc.Execute(ctx, &v1.ExecuteRequest{ Cmd: cmd, ClientApi: brokerID, @@ -75,8 +75,8 @@ func (c client) Execute(ctx context.Context, cmd *ExecutedCommand, a ClientAPI) return err } -func (c client) ExecuteHookPre(ctx context.Context, h *ExecutedHook, a ClientAPI) error { - brokerID, stopServer := c.startClientAPIServer(a) +func (c client) ExecuteHookPre(ctx context.Context, h *ExecutedHook, api ClientAPI) error { + brokerID, stopServer := c.startClientAPIServer(api) _, err := c.grpc.ExecuteHookPre(ctx, &v1.ExecuteHookPreRequest{ Hook: h, ClientApi: brokerID, @@ -85,8 +85,8 @@ func (c client) ExecuteHookPre(ctx context.Context, h *ExecutedHook, a ClientAPI return err } -func (c client) ExecuteHookPost(ctx context.Context, h *ExecutedHook, a ClientAPI) error { - brokerID, stopServer := c.startClientAPIServer(a) +func (c client) ExecuteHookPost(ctx context.Context, h *ExecutedHook, api ClientAPI) error { + brokerID, stopServer := c.startClientAPIServer(api) _, err := c.grpc.ExecuteHookPost(ctx, &v1.ExecuteHookPostRequest{ Hook: h, ClientApi: brokerID, @@ -95,8 +95,8 @@ func (c client) ExecuteHookPost(ctx context.Context, h *ExecutedHook, a ClientAP return err } -func (c client) ExecuteHookCleanUp(ctx context.Context, h *ExecutedHook, a ClientAPI) error { - brokerID, stopServer := c.startClientAPIServer(a) +func (c client) ExecuteHookCleanUp(ctx context.Context, h *ExecutedHook, api ClientAPI) error { + brokerID, stopServer := c.startClientAPIServer(api) _, err := c.grpc.ExecuteHookCleanUp(ctx, &v1.ExecuteHookCleanUpRequest{ Hook: h, ClientApi: brokerID, @@ -105,7 +105,7 @@ func (c client) ExecuteHookCleanUp(ctx context.Context, h *ExecutedHook, a Clien return err } -func (c client) startClientAPIServer(a ClientAPI) (uint32, func()) { +func (c client) startClientAPIServer(api ClientAPI) (uint32, func()) { var ( srv *grpc.Server brokerID = c.broker.NextId() @@ -113,7 +113,7 @@ func (c client) startClientAPIServer(a ClientAPI) (uint32, func()) { go c.broker.AcceptAndServe(brokerID, func(opts []grpc.ServerOption) *grpc.Server { srv = grpc.NewServer(opts...) - v1.RegisterClientAPIServiceServer(srv, &clientAPIServer{impl: a}) + v1.RegisterClientAPIServiceServer(srv, &clientAPIServer{impl: api}) return srv }) diff --git a/ignite/services/plugin/template/main.go.plush b/ignite/services/plugin/template/main.go.plush index d90b85219e..ce63b322df 100644 --- a/ignite/services/plugin/template/main.go.plush +++ b/ignite/services/plugin/template/main.go.plush @@ -41,7 +41,7 @@ func (p) Manifest(ctx context.Context) (*plugin.Manifest, error) { }, nil } -func (p) Execute(ctx context.Context, cmd *plugin.ExecutedCommand, c plugin.ClientAPI) error { +func (p) Execute(ctx context.Context, cmd *plugin.ExecutedCommand, api plugin.ClientAPI) error { // TODO: write command execution here fmt.Printf("Hello I'm the example-plugin plugin\n") fmt.Printf("My executed command: %q\n", cmd.Path) @@ -76,22 +76,22 @@ func (p) Execute(ctx context.Context, cmd *plugin.ExecutedCommand, c plugin.Clie // Calling the ClientAPI example - fmt.Println(c.GetChainInfo(ctx)) + fmt.Println(api.GetChainInfo(ctx)) return nil } -func (p) ExecuteHookPre(ctx context.Context, h *plugin.ExecutedHook, c plugin.ClientAPI) error { +func (p) ExecuteHookPre(ctx context.Context, h *plugin.ExecutedHook, api plugin.ClientAPI) error { fmt.Printf("Executing hook pre %q\n", h.Hook.GetName()) return nil } -func (p) ExecuteHookPost(ctx context.Context, h *plugin.ExecutedHook, c plugin.ClientAPI) error { +func (p) ExecuteHookPost(ctx context.Context, h *plugin.ExecutedHook, api plugin.ClientAPI) error { fmt.Printf("Executing hook post %q\n", h.Hook.GetName()) return nil } -func (p) ExecuteHookCleanUp(ctx context.Context, h *plugin.ExecutedHook, c plugin.ClientAPI) error { +func (p) ExecuteHookCleanUp(ctx context.Context, h *plugin.ExecutedHook, api plugin.ClientAPI) error { fmt.Printf("Executing hook cleanup %q\n", h.Hook.GetName()) return nil } From f1d31d1bdb485b5ddc00162e12703963cb425637 Mon Sep 17 00:00:00 2001 From: Clockwork Date: Mon, 4 Sep 2023 15:27:23 +0300 Subject: [PATCH 19/23] fix: Tests and linting --- ignite/cmd/plugin_test.go | 6 +++--- ignite/services/plugin/client_api.go | 12 ++++++------ ignite/services/plugin/plugin_test.go | 12 ++++++------ 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/ignite/cmd/plugin_test.go b/ignite/cmd/plugin_test.go index e0c7335a7c..a97a29e438 100644 --- a/ignite/cmd/plugin_test.go +++ b/ignite/cmd/plugin_test.go @@ -97,7 +97,7 @@ func TestLinkPluginCmds(t *testing.T) { }), mock.Anything, ). - Run(func(_ context.Context, execCmd *plugin.ExecutedCommand, _ plugin.Analyzer) { + Run(func(_ context.Context, execCmd *plugin.ExecutedCommand, _ plugin.ClientAPI) { // Assert execCmd is populated correctly assert.True(t, strings.HasSuffix(execCmd.Path, cmd.Use), "wrong path %s", execCmd.Path) assert.Equal(t, args, execCmd.Args) @@ -419,8 +419,8 @@ func TestLinkPluginHooks(t *testing.T) { hook.PlaceHookOn == execHook.Hook.PlaceHookOn }) } - asserter := func(hook *plugin.Hook) func(_ context.Context, hook *plugin.ExecutedHook, _ plugin.Analyzer) { - return func(_ context.Context, execHook *plugin.ExecutedHook, _ plugin.Analyzer) { + asserter := func(hook *plugin.Hook) func(_ context.Context, hook *plugin.ExecutedHook, _ plugin.ClientAPI) { + return func(_ context.Context, execHook *plugin.ExecutedHook, _ plugin.ClientAPI) { assert.True(t, strings.HasSuffix(execHook.ExecutedCommand.Path, hook.PlaceHookOn), "wrong path %q want %q", execHook.ExecutedCommand.Path, hook.PlaceHookOn) assert.Equal(t, args, execHook.ExecutedCommand.Args) assertFlags(t, expectedFlags, execHook.ExecutedCommand) diff --git a/ignite/services/plugin/client_api.go b/ignite/services/plugin/client_api.go index ee56768fb4..fcf4ee1ab4 100644 --- a/ignite/services/plugin/client_api.go +++ b/ignite/services/plugin/client_api.go @@ -25,20 +25,20 @@ type clientAPI struct { } func (api clientAPI) GetChainInfo(ctx context.Context) (*ChainInfo, error) { - chain_id, err := api.chain.ID() + chainId, err := api.chain.ID() if err != nil { return nil, err } - app_path := api.chain.AppPath() - config_path := api.chain.ConfigPath() + appPath := api.chain.AppPath() + configPath := api.chain.ConfigPath() rpc, err := api.chain.RPCPublicAddress() if err != nil { return nil, err } return &ChainInfo{ - ChainId: chain_id, - AppPath: app_path, - ConfigPath: config_path, + ChainId: chainId, + AppPath: appPath, + ConfigPath: configPath, RpcAddress: rpc, }, nil } diff --git a/ignite/services/plugin/plugin_test.go b/ignite/services/plugin/plugin_test.go index e37d8b6912..b02bcb38d1 100644 --- a/ignite/services/plugin/plugin_test.go +++ b/ignite/services/plugin/plugin_test.go @@ -190,8 +190,8 @@ func TestPluginLoad(t *testing.T) { wd, err := os.Getwd() require.NoError(t, err) - analyzer := &struct { - Analyzer + clientAPI := &struct { + ClientAPI }{} tests := []struct { @@ -359,10 +359,10 @@ func TestPluginLoad(t *testing.T) { manifest, err := p.Interface.Manifest(ctx) require.NoError(err) assert.Equal(p.binaryName, manifest.Name) - assert.NoError(p.Interface.Execute(ctx, &ExecutedCommand{}, analyzer)) - assert.NoError(p.Interface.ExecuteHookPre(ctx, &ExecutedHook{}, analyzer)) - assert.NoError(p.Interface.ExecuteHookPost(ctx, &ExecutedHook{}, analyzer)) - assert.NoError(p.Interface.ExecuteHookCleanUp(ctx, &ExecutedHook{}, analyzer)) + assert.NoError(p.Interface.Execute(ctx, &ExecutedCommand{}, clientAPI)) + assert.NoError(p.Interface.ExecuteHookPre(ctx, &ExecutedHook{}, clientAPI)) + assert.NoError(p.Interface.ExecuteHookPost(ctx, &ExecutedHook{}, clientAPI)) + assert.NoError(p.Interface.ExecuteHookCleanUp(ctx, &ExecutedHook{}, clientAPI)) }) } } From 3eaf39adeb3ee473c2b6ccbd259e53e509107a74 Mon Sep 17 00:00:00 2001 From: Clockwork Date: Mon, 4 Sep 2023 15:28:53 +0300 Subject: [PATCH 20/23] chore: add changelog --- changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog.md b/changelog.md index 16988bc6f3..011f1609d7 100644 --- a/changelog.md +++ b/changelog.md @@ -5,6 +5,7 @@ ### Features - [#3544](https://github.com/ignite/cli/pull/3544) Add bidirectional communication to plugin system +- [#3561](https://github.com/ignite/cli/pull/3561) Add GetChainInfo method to plugin system API ### Changes From 79cf45db42142d617ed17d76722585ff56948192 Mon Sep 17 00:00:00 2001 From: Clockwork Date: Mon, 4 Sep 2023 15:40:26 +0300 Subject: [PATCH 21/23] fix: linting issues --- ignite/services/plugin/client_api.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ignite/services/plugin/client_api.go b/ignite/services/plugin/client_api.go index fcf4ee1ab4..193ac93487 100644 --- a/ignite/services/plugin/client_api.go +++ b/ignite/services/plugin/client_api.go @@ -24,8 +24,8 @@ type clientAPI struct { chain Chainer } -func (api clientAPI) GetChainInfo(ctx context.Context) (*ChainInfo, error) { - chainId, err := api.chain.ID() +func (api clientAPI) GetChainInfo(_ context.Context) (*ChainInfo, error) { + chainID, err := api.chain.ID() if err != nil { return nil, err } @@ -36,7 +36,7 @@ func (api clientAPI) GetChainInfo(ctx context.Context) (*ChainInfo, error) { return nil, err } return &ChainInfo{ - ChainId: chainId, + ChainId: chainID, AppPath: appPath, ConfigPath: configPath, RpcAddress: rpc, From c6e8204f7dc82ee55fd371d6d3b3bfb8217945a1 Mon Sep 17 00:00:00 2001 From: jeronimoalbi Date: Tue, 5 Sep 2023 10:37:26 +0200 Subject: [PATCH 22/23] tests: fix issue with client api in plugin tests --- ignite/services/plugin/plugin_test.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ignite/services/plugin/plugin_test.go b/ignite/services/plugin/plugin_test.go index b02bcb38d1..ed11d037e8 100644 --- a/ignite/services/plugin/plugin_test.go +++ b/ignite/services/plugin/plugin_test.go @@ -186,13 +186,17 @@ func makeGitRepo(t *testing.T, name string) (string, *git.Repository) { return repoDir, repo } +type TestClientAPI struct{ ClientAPI } + +func (TestClientAPI) GetChainInfo(context.Context) (*ChainInfo, error) { + return &ChainInfo{}, nil +} + func TestPluginLoad(t *testing.T) { wd, err := os.Getwd() require.NoError(t, err) - clientAPI := &struct { - ClientAPI - }{} + clientAPI := &TestClientAPI{} tests := []struct { name string From fdf95a3c4d813628ca99281f3466e2c95deeafde Mon Sep 17 00:00:00 2001 From: jeronimoalbi Date: Tue, 5 Sep 2023 10:52:25 +0200 Subject: [PATCH 23/23] tests: fix plugin template for integration tests --- integration/plugin/testdata/example-plugin/main.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/integration/plugin/testdata/example-plugin/main.go b/integration/plugin/testdata/example-plugin/main.go index b4192a2e5b..4a8b177bf4 100644 --- a/integration/plugin/testdata/example-plugin/main.go +++ b/integration/plugin/testdata/example-plugin/main.go @@ -29,7 +29,7 @@ func (p) Manifest(context.Context) (*plugin.Manifest, error) { }, nil } -func (p) Execute(_ context.Context, cmd *plugin.ExecutedCommand, az plugin.Analyzer) error { +func (p) Execute(ctx context.Context, cmd *plugin.ExecutedCommand, api plugin.ClientAPI) error { fmt.Printf("Hello I'm the example-plugin plugin\n") fmt.Printf("My executed command: %q\n", cmd.Path) fmt.Printf("My args: %v\n", cmd.Args) @@ -42,20 +42,23 @@ func (p) Execute(_ context.Context, cmd *plugin.ExecutedCommand, az plugin.Analy myFlag, _ := flags.GetString("my-flag") fmt.Printf("My flags: my-flag=%q\n", myFlag) fmt.Printf("My config parameters: %v\n", cmd.With) + + fmt.Println(api.GetChainInfo(ctx)) + return nil } -func (p) ExecuteHookPre(_ context.Context, h *plugin.ExecutedHook, az plugin.Analyzer) error { +func (p) ExecuteHookPre(_ context.Context, h *plugin.ExecutedHook, _ plugin.ClientAPI) error { fmt.Printf("Executing hook pre %q\n", h.Hook.GetName()) return nil } -func (p) ExecuteHookPost(_ context.Context, h *plugin.ExecutedHook, az plugin.Analyzer) error { +func (p) ExecuteHookPost(_ context.Context, h *plugin.ExecutedHook, _ plugin.ClientAPI) error { fmt.Printf("Executing hook post %q\n", h.Hook.GetName()) return nil } -func (p) ExecuteHookCleanUp(_ context.Context, h *plugin.ExecutedHook, az plugin.Analyzer) error { +func (p) ExecuteHookCleanUp(_ context.Context, h *plugin.ExecutedHook, _ plugin.ClientAPI) error { fmt.Printf("Executing hook cleanup %q\n", h.Hook.GetName()) return nil }