diff --git a/changelog.md b/changelog.md index 47d243d181..43e766beef 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,11 @@ ## Unreleased +### 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 - [#3529](https://github.com/ignite/cli/pull/3529) Refactor plugin system to use gRPC diff --git a/docs/docs/apps/02-developing-apps.md b/docs/docs/apps/02-developing-apps.md index d900d9cbda..57d1fdd58b 100644 --- a/docs/docs/apps/02-developing-apps.md +++ b/docs/docs/apps/02-developing-apps.md @@ -48,26 +48,30 @@ type Interface interface { // Execute will be invoked by ignite when an app Command is executed. // It is global for all commands declared in Manifest, if you have declared // multiple commands, use cmd.Path to distinguish them. - Execute(context.Context, *ExecutedCommand) 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. - ExecuteHookPre(context.Context, *ExecutedHook) 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. - ExecuteHookPost(context.Context, *ExecutedHook) 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. - ExecuteHookCleanUp(context.Context, *ExecutedHook) error + // The ClientAPI argument can be used by plugins to get chain app analysis info. + ExecuteHookCleanUp(context.Context, *ExecutedHook, ClientAPI) error } ``` @@ -155,7 +159,7 @@ To update the app execution, you have to change the `Execute` command. For example: ```go -func (app) Execute(_ context.Context, cmd *plugin.ExecutedCommand) error { +func (app) Execute(_ context.Context, cmd *plugin.ExecutedCommand, _ plugin.ClientAPI) error { if len(cmd.Args) == 0 { return fmt.Errorf("oracle name missing") } @@ -217,7 +221,7 @@ func (app) Manifest(context.Context) (*plugin.Manifest, error) { }, nil } -func (app) ExecuteHookPre(_ context.Context, h *plugin.ExecutedHook) error { +func (app) 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") @@ -227,7 +231,7 @@ func (app) ExecuteHookPre(_ context.Context, h *plugin.ExecutedHook) error { return nil } -func (app) ExecuteHookPost(_ context.Context, h *plugin.ExecutedHook) error { +func (app) 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)") @@ -237,7 +241,7 @@ func (app) ExecuteHookPost(_ context.Context, h *plugin.ExecutedHook) error { return nil } -func (app) ExecuteHookCleanUp(_ context.Context, h *plugin.ExecutedHook) error { +func (app) 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 121c98229f..0c52682914 100644 --- a/ignite/cmd/plugin.go +++ b/ignite/cmd/plugin.go @@ -206,7 +206,12 @@ func linkPluginHook(rootCmd *cobra.Command, p *plugin.Plugin, hook *plugin.Hook) } } - err := p.Interface.ExecuteHookPre(ctx, newExecutedHook(hook, cmd, args)) + execHook := newExecutedHook(hook, cmd, args) + c, err := newChainWithHomeFlags(cmd) + if err != nil { + return err + } + err = p.Interface.ExecuteHookPre(ctx, execHook, plugin.NewClientAPI(c)) if err != nil { return fmt.Errorf("app %q ExecuteHookPre() error: %w", p.Path, err) } @@ -221,7 +226,12 @@ func linkPluginHook(rootCmd *cobra.Command, p *plugin.Plugin, hook *plugin.Hook) // if the command has failed the `PostRun` will not execute. here we execute the cleanup step before returnning. if err != nil { ctx := cmd.Context() - err := p.Interface.ExecuteHookCleanUp(ctx, newExecutedHook(hook, cmd, args)) + 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 { cmd.Printf("app %q ExecuteHookCleanUp() error: %v", p.Path, err) } @@ -238,8 +248,13 @@ 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) + err := p.Interface.ExecuteHookCleanUp(ctx, execHook, plugin.NewClientAPI(c)) if err != nil { cmd.Printf("app %q ExecuteHookCleanUp() error: %v", p.Path, err) } @@ -253,7 +268,7 @@ func linkPluginHook(rootCmd *cobra.Command, p *plugin.Plugin, hook *plugin.Hook) } } - err := p.Interface.ExecuteHookPost(ctx, execHook) + err = p.Interface.ExecuteHookPost(ctx, execHook, plugin.NewClientAPI(c)) if err != nil { return fmt.Errorf("app %q ExecuteHookPost() error : %w", p.Path, err) } @@ -325,7 +340,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) + 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/cmd/plugin_test.go b/ignite/cmd/plugin_test.go index c196b13198..d92683bdc3 100644 --- a/ignite/cmd/plugin_test.go +++ b/ignite/cmd/plugin_test.go @@ -95,8 +95,9 @@ func TestLinkPluginCmds(t *testing.T) { fmt.Println(cmd.Use == execCmd.Use, cmd.Use, execCmd.Use) return cmd.Use == execCmd.Use }), + mock.Anything, ). - Run(func(_ context.Context, execCmd *plugin.ExecutedCommand) { + 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) @@ -418,8 +419,8 @@ func TestLinkPluginHooks(t *testing.T) { hook.PlaceHookOn == execHook.Hook.PlaceHookOn }) } - asserter := func(hook *plugin.Hook) func(_ context.Context, hook *plugin.ExecutedHook) { - return func(_ context.Context, execHook *plugin.ExecutedHook) { + 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) @@ -429,7 +430,7 @@ func TestLinkPluginHooks(t *testing.T) { var lastPre *mock.Call for _, hook := range hooks { pre := p.EXPECT(). - ExecuteHookPre(ctx, matcher(hook)). + ExecuteHookPre(ctx, matcher(hook), mock.Anything). Run(asserter(hook)). Return(nil). Call @@ -440,12 +441,12 @@ func TestLinkPluginHooks(t *testing.T) { } for _, hook := range hooks { post := p.EXPECT(). - ExecuteHookPost(ctx, matcher(hook)). + ExecuteHookPost(ctx, matcher(hook), mock.Anything). Run(asserter(hook)). Return(nil). Call cleanup := p.EXPECT(). - ExecuteHookCleanUp(ctx, matcher(hook)). + ExecuteHookCleanUp(ctx, matcher(hook), mock.Anything). Run(asserter(hook)). Return(nil). Call diff --git a/ignite/pkg/cosmosanalysis/app/app.go b/ignite/pkg/cosmosanalysis/app/app.go index 77b956aeea..ca82b60a28 100644 --- a/ignite/pkg/cosmosanalysis/app/app.go +++ b/ignite/pkg/cosmosanalysis/app/app.go @@ -423,7 +423,7 @@ func resolveCosmosPackagePath(chainRoot string) (string, error) { return "", err } - deps, err := gomodule.ResolveDependencies(modFile) + deps, err := gomodule.ResolveDependencies(modFile, false) if err != nil { return "", err } diff --git a/ignite/pkg/cosmosanalysis/module/module.go b/ignite/pkg/cosmosanalysis/module/module.go index 16d538e847..257aca07b5 100644 --- a/ignite/pkg/cosmosanalysis/module/module.go +++ b/ignite/pkg/cosmosanalysis/module/module.go @@ -22,57 +22,58 @@ 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 is a list of sdk.Msg implementation of the module. + 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 + URI string `json:"uri,omitempty"` - // FilePath is the path of the .proto file where message is defined at. - FilePath string + // FilePath 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 keeps info about configured HTTP rules of RPC functions. + 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 + // Name of the type. + Name string `json:"name,omitempty"` // FilePath is the path of the .proto file where message is defined at. - FilePath string + FilePath string `json:"file_path,omitempty"` } type moduleDiscoverer struct { 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/cosmosgen/generate.go b/ignite/pkg/cosmosgen/generate.go index 1af5fdc71f..0aad31a8ac 100644 --- a/ignite/pkg/cosmosgen/generate.go +++ b/ignite/pkg/cosmosgen/generate.go @@ -59,7 +59,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/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/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 2d53d0e5a3..017d548452 100644 --- a/ignite/pkg/protoanalysis/package.go +++ b/ignite/pkg/protoanalysis/package.go @@ -19,32 +19,32 @@ 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 + Path string `json:"path,omitempty"` - // Dependencies is a list of imported .proto files in this package. - Dependencies []string + // Dependencies is a list of imported proto packages. + Dependencies []string `json:"dependencies,omitempty"` } func (f Files) Paths() []string { @@ -73,56 +73,56 @@ func (p Package) GoImportPath() string { // Message represents a proto message. type Message struct { // Name of the message. - Name string + Name string `json:"name,omitempty"` - // Path of the file where message is defined at. - Path string + // Path of the proto file where the message is defined. + Path string `json:"path,omitempty"` - // 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 + // 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 `json:"highest_field_number,omitempty"` - // Fields contains message's field names and types - Fields map[string]string + // 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 is a list of RPC funcs of the service. + 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 + // Params is a list of parameters defined in the HTTP endpoint itself. + Params []string `json:"params,omitempty"` // HasQuery indicates if there is a request query. - HasQuery bool + HasQuery bool `json:"has_query,omitempty"` // HasBody indicates if there is a request payload. - HasBody bool + HasBody bool `json:"has_body,omitempty"` } diff --git a/ignite/services/chain/chain.go b/ignite/services/chain/chain.go index 2bc222ab57..4e8af01382 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 diff --git a/ignite/services/plugin/client_api.go b/ignite/services/plugin/client_api.go new file mode 100644 index 0000000000..6bfde13ccf --- /dev/null +++ b/ignite/services/plugin/client_api.go @@ -0,0 +1,47 @@ +package plugin + +import ( + "context" +) + +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 Chainer) ClientAPI { + return clientAPI{chain: c} +} + +type clientAPI struct { + chain Chainer +} + +func (api clientAPI) GetChainInfo(context.Context) (*ChainInfo, error) { + chainID, err := api.chain.ID() + if err != nil { + return nil, err + } + + rpc, err := api.chain.RPCPublicAddress() + if err != nil { + return nil, err + } + + return &ChainInfo{ + ChainId: chainID, + AppPath: api.chain.AppPath(), + ConfigPath: api.chain.ConfigPath(), + 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 new file mode 100644 index 0000000000..d0a5a00f68 --- /dev/null +++ b/ignite/services/plugin/grpc/v1/client_api.pb.go @@ -0,0 +1,178 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: ignite/services/plugin/grpc/v1/client_api.proto + +package v1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ChainInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + 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"` + RpcAddress string `protobuf:"bytes,4,opt,name=rpc_address,json=rpcAddress,proto3" json:"rpc_address,omitempty"` +} + +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)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChainInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChainInfo) ProtoMessage() {} + +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)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// 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 *ChainInfo) GetChainId() string { + if x != nil { + return x.ChainId + } + return "" +} + +func (x *ChainInfo) GetAppPath() string { + if x != nil { + return x.AppPath + } + return "" +} + +func (x *ChainInfo) GetConfigPath() string { + if x != nil { + return x.ConfigPath + } + return "" +} + +func (x *ChainInfo) GetRpcAddress() string { + if x != nil { + return x.RpcAddress + } + return "" +} + +var File_ignite_services_plugin_grpc_v1_client_api_proto protoreflect.FileDescriptor + +var file_ignite_services_plugin_grpc_v1_client_api_proto_rawDesc = []byte{ + 0x0a, 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, + 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, 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, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescOnce sync.Once + file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescData = file_ignite_services_plugin_grpc_v1_client_api_proto_rawDesc +) + +func file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescGZIP() []byte { + file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescOnce.Do(func() { + file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescData = protoimpl.X.CompressGZIP(file_ignite_services_plugin_grpc_v1_client_api_proto_rawDescData) + }) + 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, 1) +var file_ignite_services_plugin_grpc_v1_client_api_proto_goTypes = []interface{}{ + (*ChainInfo)(nil), // 0: ignite.services.plugin.grpc.v1.ChainInfo +} +var file_ignite_services_plugin_grpc_v1_client_api_proto_depIdxs = []int32{ + 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() } +func file_ignite_services_plugin_grpc_v1_client_api_proto_init() { + if File_ignite_services_plugin_grpc_v1_client_api_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChainInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_ignite_services_plugin_grpc_v1_client_api_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_ignite_services_plugin_grpc_v1_client_api_proto_goTypes, + DependencyIndexes: file_ignite_services_plugin_grpc_v1_client_api_proto_depIdxs, + MessageInfos: file_ignite_services_plugin_grpc_v1_client_api_proto_msgTypes, + }.Build() + File_ignite_services_plugin_grpc_v1_client_api_proto = out.File + file_ignite_services_plugin_grpc_v1_client_api_proto_rawDesc = nil + file_ignite_services_plugin_grpc_v1_client_api_proto_goTypes = nil + file_ignite_services_plugin_grpc_v1_client_api_proto_depIdxs = nil +} diff --git a/ignite/services/plugin/grpc/v1/types.pb.go b/ignite/services/plugin/grpc/v1/interface.pb.go similarity index 60% rename from ignite/services/plugin/grpc/v1/types.pb.go rename to ignite/services/plugin/grpc/v1/interface.pb.go index d838c9f807..2c294ad841 100644 --- a/ignite/services/plugin/grpc/v1/types.pb.go +++ b/ignite/services/plugin/grpc/v1/interface.pb.go @@ -2,7 +2,7 @@ // versions: // protoc-gen-go v1.31.0 // protoc (unknown) -// source: ignite/services/plugin/grpc/v1/types.proto +// source: ignite/services/plugin/grpc/v1/interface.proto package v1 @@ -66,11 +66,11 @@ func (x Flag_Type) String() string { } func (Flag_Type) Descriptor() protoreflect.EnumDescriptor { - return file_ignite_services_plugin_grpc_v1_types_proto_enumTypes[0].Descriptor() + return file_ignite_services_plugin_grpc_v1_interface_proto_enumTypes[0].Descriptor() } func (Flag_Type) Type() protoreflect.EnumType { - return &file_ignite_services_plugin_grpc_v1_types_proto_enumTypes[0] + return &file_ignite_services_plugin_grpc_v1_interface_proto_enumTypes[0] } func (x Flag_Type) Number() protoreflect.EnumNumber { @@ -79,7 +79,7 @@ func (x Flag_Type) Number() protoreflect.EnumNumber { // Deprecated: Use Flag_Type.Descriptor instead. func (Flag_Type) EnumDescriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_types_proto_rawDescGZIP(), []int{4, 0} + return file_ignite_services_plugin_grpc_v1_interface_proto_rawDescGZIP(), []int{4, 0} } // ExecutedCommand represents a plugin command under execution. @@ -105,7 +105,7 @@ type ExecutedCommand struct { func (x *ExecutedCommand) Reset() { *x = ExecutedCommand{} if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_types_proto_msgTypes[0] + mi := &file_ignite_services_plugin_grpc_v1_interface_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -118,7 +118,7 @@ func (x *ExecutedCommand) String() string { func (*ExecutedCommand) ProtoMessage() {} func (x *ExecutedCommand) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_types_proto_msgTypes[0] + mi := &file_ignite_services_plugin_grpc_v1_interface_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -131,7 +131,7 @@ func (x *ExecutedCommand) ProtoReflect() protoreflect.Message { // Deprecated: Use ExecutedCommand.ProtoReflect.Descriptor instead. func (*ExecutedCommand) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_types_proto_rawDescGZIP(), []int{0} + return file_ignite_services_plugin_grpc_v1_interface_proto_rawDescGZIP(), []int{0} } func (x *ExecutedCommand) GetUse() string { @@ -191,7 +191,7 @@ type ExecutedHook struct { func (x *ExecutedHook) Reset() { *x = ExecutedHook{} if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_types_proto_msgTypes[1] + mi := &file_ignite_services_plugin_grpc_v1_interface_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -204,7 +204,7 @@ func (x *ExecutedHook) String() string { func (*ExecutedHook) ProtoMessage() {} func (x *ExecutedHook) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_types_proto_msgTypes[1] + mi := &file_ignite_services_plugin_grpc_v1_interface_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -217,7 +217,7 @@ func (x *ExecutedHook) ProtoReflect() protoreflect.Message { // Deprecated: Use ExecutedHook.ProtoReflect.Descriptor instead. func (*ExecutedHook) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_types_proto_rawDescGZIP(), []int{1} + return file_ignite_services_plugin_grpc_v1_interface_proto_rawDescGZIP(), []int{1} } func (x *ExecutedHook) GetHook() *Hook { @@ -266,7 +266,7 @@ type Manifest struct { func (x *Manifest) Reset() { *x = Manifest{} if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_types_proto_msgTypes[2] + mi := &file_ignite_services_plugin_grpc_v1_interface_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -279,7 +279,7 @@ func (x *Manifest) String() string { func (*Manifest) ProtoMessage() {} func (x *Manifest) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_types_proto_msgTypes[2] + mi := &file_ignite_services_plugin_grpc_v1_interface_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -292,7 +292,7 @@ func (x *Manifest) ProtoReflect() protoreflect.Message { // Deprecated: Use Manifest.ProtoReflect.Descriptor instead. func (*Manifest) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_types_proto_rawDescGZIP(), []int{2} + return file_ignite_services_plugin_grpc_v1_interface_proto_rawDescGZIP(), []int{2} } func (x *Manifest) GetName() string { @@ -363,7 +363,7 @@ type Command struct { func (x *Command) Reset() { *x = Command{} if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_types_proto_msgTypes[3] + mi := &file_ignite_services_plugin_grpc_v1_interface_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -376,7 +376,7 @@ func (x *Command) String() string { func (*Command) ProtoMessage() {} func (x *Command) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_types_proto_msgTypes[3] + mi := &file_ignite_services_plugin_grpc_v1_interface_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -389,7 +389,7 @@ func (x *Command) ProtoReflect() protoreflect.Message { // Deprecated: Use Command.ProtoReflect.Descriptor instead. func (*Command) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_types_proto_rawDescGZIP(), []int{3} + return file_ignite_services_plugin_grpc_v1_interface_proto_rawDescGZIP(), []int{3} } func (x *Command) GetUse() string { @@ -473,7 +473,7 @@ type Flag struct { func (x *Flag) Reset() { *x = Flag{} if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_types_proto_msgTypes[4] + mi := &file_ignite_services_plugin_grpc_v1_interface_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -486,7 +486,7 @@ func (x *Flag) String() string { func (*Flag) ProtoMessage() {} func (x *Flag) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_types_proto_msgTypes[4] + mi := &file_ignite_services_plugin_grpc_v1_interface_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -499,7 +499,7 @@ func (x *Flag) ProtoReflect() protoreflect.Message { // Deprecated: Use Flag.ProtoReflect.Descriptor instead. func (*Flag) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_types_proto_rawDescGZIP(), []int{4} + return file_ignite_services_plugin_grpc_v1_interface_proto_rawDescGZIP(), []int{4} } func (x *Flag) GetName() string { @@ -567,7 +567,7 @@ type Hook struct { func (x *Hook) Reset() { *x = Hook{} if protoimpl.UnsafeEnabled { - mi := &file_ignite_services_plugin_grpc_v1_types_proto_msgTypes[5] + mi := &file_ignite_services_plugin_grpc_v1_interface_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -580,7 +580,7 @@ func (x *Hook) String() string { func (*Hook) ProtoMessage() {} func (x *Hook) ProtoReflect() protoreflect.Message { - mi := &file_ignite_services_plugin_grpc_v1_types_proto_msgTypes[5] + mi := &file_ignite_services_plugin_grpc_v1_interface_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -593,7 +593,7 @@ func (x *Hook) ProtoReflect() protoreflect.Message { // Deprecated: Use Hook.ProtoReflect.Descriptor instead. func (*Hook) Descriptor() ([]byte, []int) { - return file_ignite_services_plugin_grpc_v1_types_proto_rawDescGZIP(), []int{5} + return file_ignite_services_plugin_grpc_v1_interface_proto_rawDescGZIP(), []int{5} } func (x *Hook) GetName() string { @@ -610,125 +610,125 @@ func (x *Hook) GetPlaceHookOn() string { return "" } -var File_ignite_services_plugin_grpc_v1_types_proto protoreflect.FileDescriptor +var File_ignite_services_plugin_grpc_v1_interface_proto protoreflect.FileDescriptor -var file_ignite_services_plugin_grpc_v1_types_proto_rawDesc = []byte{ - 0x0a, 0x2a, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, +var file_ignite_services_plugin_grpc_v1_interface_proto_rawDesc = []byte{ + 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, 0x74, 0x79, 0x70, 0x65, 0x73, 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, 0xa8, 0x02, 0x0a, - 0x0f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, - 0x12, 0x10, 0x0a, 0x03, 0x75, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, - 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x6f, 0x73, - 0x5f, 0x61, 0x72, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x73, 0x41, - 0x72, 0x67, 0x73, 0x12, 0x4d, 0x0a, 0x04, 0x77, 0x69, 0x74, 0x68, 0x18, 0x05, 0x20, 0x03, 0x28, - 0x0b, 0x32, 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, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x61, - 0x6e, 0x64, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x77, 0x69, - 0x74, 0x68, 0x12, 0x3a, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 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, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x1a, 0x37, - 0x0a, 0x09, 0x57, 0x69, 0x74, 0x68, 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, 0xa4, 0x01, 0x0a, 0x0c, 0x45, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x65, 0x64, 0x48, 0x6f, 0x6f, 0x6b, 0x12, 0x38, 0x0a, 0x04, 0x68, 0x6f, 0x6f, 0x6b, - 0x18, 0x01, 0x20, 0x01, 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, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x04, 0x68, 0x6f, - 0x6f, 0x6b, 0x12, 0x5a, 0x0a, 0x10, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x63, - 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x02, 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, 0x0f, 0x65, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x22, 0xc0, - 0x01, 0x0a, 0x08, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x48, 0x6f, 0x73, 0x74, - 0x12, 0x43, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x18, 0x03, 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, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x08, 0x63, 0x6f, 0x6d, - 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x12, 0x3a, 0x0a, 0x05, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x18, 0x04, - 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, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x05, 0x68, 0x6f, 0x6f, 0x6b, - 0x73, 0x22, 0xa8, 0x02, 0x0a, 0x07, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x10, 0x0a, - 0x03, 0x75, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x73, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x6f, - 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x12, - 0x12, 0x0a, 0x04, 0x6c, 0x6f, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, - 0x6f, 0x6e, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x06, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x12, 0x3a, 0x0a, 0x05, 0x66, - 0x6c, 0x61, 0x67, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x69, 0x67, 0x6e, + 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 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, + 0x22, 0xa8, 0x02, 0x0a, 0x0f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6d, + 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x75, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, + 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x12, 0x17, + 0x0a, 0x07, 0x6f, 0x73, 0x5f, 0x61, 0x72, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x06, 0x6f, 0x73, 0x41, 0x72, 0x67, 0x73, 0x12, 0x4d, 0x0a, 0x04, 0x77, 0x69, 0x74, 0x68, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 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, 0x64, 0x43, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x04, 0x77, 0x69, 0x74, 0x68, 0x12, 0x3a, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 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, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x05, 0x66, 0x6c, 0x61, + 0x67, 0x73, 0x1a, 0x37, 0x0a, 0x09, 0x57, 0x69, 0x74, 0x68, 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, 0xa4, 0x01, 0x0a, 0x0c, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x48, 0x6f, 0x6f, 0x6b, 0x12, 0x38, 0x0a, 0x04, + 0x68, 0x6f, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 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, 0x46, 0x6c, 0x61, 0x67, - 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x70, 0x6c, 0x61, 0x63, 0x65, - 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x5f, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x61, - 0x6e, 0x64, 0x55, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x43, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x61, - 0x6e, 0x64, 0x73, 0x18, 0x08, 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, 0x43, 0x6f, 0x6d, 0x6d, 0x61, - 0x6e, 0x64, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x22, 0x95, 0x03, 0x0a, - 0x04, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x68, 0x6f, - 0x72, 0x74, 0x68, 0x61, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x68, - 0x6f, 0x72, 0x74, 0x68, 0x61, 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x73, 0x61, 0x67, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x73, 0x61, 0x67, 0x65, 0x12, 0x23, 0x0a, - 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x12, 0x3d, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x29, 0x2e, 0x69, 0x67, 0x6e, 0x69, 0x74, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x6f, 0x6b, + 0x52, 0x04, 0x68, 0x6f, 0x6f, 0x6b, 0x12, 0x5a, 0x0a, 0x10, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x02, 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, 0x46, 0x6c, 0x61, 0x67, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x73, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x70, 0x65, 0x72, - 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x22, 0xaa, 0x01, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x20, 0x0a, 0x1c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x53, 0x54, - 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, - 0x49, 0x4e, 0x54, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x4c, - 0x41, 0x47, 0x5f, 0x55, 0x49, 0x4e, 0x54, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x03, 0x12, 0x14, - 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x55, 0x49, 0x4e, 0x54, - 0x36, 0x34, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x4c, 0x41, - 0x47, 0x5f, 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x05, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x4c, 0x49, - 0x43, 0x45, 0x10, 0x06, 0x22, 0x3e, 0x0a, 0x04, 0x48, 0x6f, 0x6f, 0x6b, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x22, 0x0a, 0x0d, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x5f, 0x68, 0x6f, 0x6f, 0x6b, 0x5f, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x48, 0x6f, - 0x6f, 0x6b, 0x4f, 0x6e, 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, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, + 0x64, 0x52, 0x0f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x61, + 0x6e, 0x64, 0x22, 0xc0, 0x01, 0x0a, 0x08, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x68, 0x6f, + 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, + 0x48, 0x6f, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, + 0x18, 0x03, 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, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, + 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x12, 0x3a, 0x0a, 0x05, 0x68, 0x6f, 0x6f, + 0x6b, 0x73, 0x18, 0x04, 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, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x05, + 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x22, 0xa8, 0x02, 0x0a, 0x07, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, + 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x75, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x14, 0x0a, + 0x05, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, + 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x6f, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6c, 0x6f, 0x6e, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x69, 0x64, 0x64, 0x65, + 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x12, + 0x3a, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 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, + 0x46, 0x6c, 0x61, 0x67, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x70, + 0x6c, 0x61, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x5f, 0x75, 0x6e, 0x64, + 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x43, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x55, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x43, 0x0a, 0x08, 0x63, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x18, 0x08, 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, 0x43, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, + 0x22, 0x95, 0x03, 0x0a, 0x04, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, + 0x09, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x68, 0x61, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x68, 0x61, 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x75, + 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x73, 0x61, 0x67, + 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3d, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0e, 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, 0x46, 0x6c, 0x61, 0x67, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x70, + 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0a, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x22, 0xaa, 0x01, 0x0a, 0x04, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x1c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x4c, 0x41, + 0x47, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, + 0x4c, 0x41, 0x47, 0x5f, 0x49, 0x4e, 0x54, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x55, 0x49, 0x4e, 0x54, 0x10, 0x02, 0x12, 0x13, 0x0a, + 0x0f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x49, 0x4e, 0x54, 0x36, 0x34, + 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, + 0x55, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x05, 0x12, 0x1a, 0x0a, 0x16, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, + 0x5f, 0x53, 0x4c, 0x49, 0x43, 0x45, 0x10, 0x06, 0x22, 0x3e, 0x0a, 0x04, 0x48, 0x6f, 0x6f, 0x6b, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x5f, 0x68, 0x6f, + 0x6f, 0x6b, 0x5f, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x61, + 0x63, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x4f, 0x6e, 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 ( - file_ignite_services_plugin_grpc_v1_types_proto_rawDescOnce sync.Once - file_ignite_services_plugin_grpc_v1_types_proto_rawDescData = file_ignite_services_plugin_grpc_v1_types_proto_rawDesc + file_ignite_services_plugin_grpc_v1_interface_proto_rawDescOnce sync.Once + file_ignite_services_plugin_grpc_v1_interface_proto_rawDescData = file_ignite_services_plugin_grpc_v1_interface_proto_rawDesc ) -func file_ignite_services_plugin_grpc_v1_types_proto_rawDescGZIP() []byte { - file_ignite_services_plugin_grpc_v1_types_proto_rawDescOnce.Do(func() { - file_ignite_services_plugin_grpc_v1_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_ignite_services_plugin_grpc_v1_types_proto_rawDescData) +func file_ignite_services_plugin_grpc_v1_interface_proto_rawDescGZIP() []byte { + file_ignite_services_plugin_grpc_v1_interface_proto_rawDescOnce.Do(func() { + file_ignite_services_plugin_grpc_v1_interface_proto_rawDescData = protoimpl.X.CompressGZIP(file_ignite_services_plugin_grpc_v1_interface_proto_rawDescData) }) - return file_ignite_services_plugin_grpc_v1_types_proto_rawDescData + return file_ignite_services_plugin_grpc_v1_interface_proto_rawDescData } -var file_ignite_services_plugin_grpc_v1_types_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_ignite_services_plugin_grpc_v1_types_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_ignite_services_plugin_grpc_v1_types_proto_goTypes = []interface{}{ +var file_ignite_services_plugin_grpc_v1_interface_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_ignite_services_plugin_grpc_v1_interface_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_ignite_services_plugin_grpc_v1_interface_proto_goTypes = []interface{}{ (Flag_Type)(0), // 0: ignite.services.plugin.grpc.v1.Flag.Type (*ExecutedCommand)(nil), // 1: ignite.services.plugin.grpc.v1.ExecutedCommand (*ExecutedHook)(nil), // 2: ignite.services.plugin.grpc.v1.ExecutedHook @@ -738,7 +738,7 @@ var file_ignite_services_plugin_grpc_v1_types_proto_goTypes = []interface{}{ (*Hook)(nil), // 6: ignite.services.plugin.grpc.v1.Hook nil, // 7: ignite.services.plugin.grpc.v1.ExecutedCommand.WithEntry } -var file_ignite_services_plugin_grpc_v1_types_proto_depIdxs = []int32{ +var file_ignite_services_plugin_grpc_v1_interface_proto_depIdxs = []int32{ 7, // 0: ignite.services.plugin.grpc.v1.ExecutedCommand.with:type_name -> ignite.services.plugin.grpc.v1.ExecutedCommand.WithEntry 5, // 1: ignite.services.plugin.grpc.v1.ExecutedCommand.flags:type_name -> ignite.services.plugin.grpc.v1.Flag 6, // 2: ignite.services.plugin.grpc.v1.ExecutedHook.hook:type_name -> ignite.services.plugin.grpc.v1.Hook @@ -755,13 +755,13 @@ var file_ignite_services_plugin_grpc_v1_types_proto_depIdxs = []int32{ 0, // [0:9] is the sub-list for field type_name } -func init() { file_ignite_services_plugin_grpc_v1_types_proto_init() } -func file_ignite_services_plugin_grpc_v1_types_proto_init() { - if File_ignite_services_plugin_grpc_v1_types_proto != nil { +func init() { file_ignite_services_plugin_grpc_v1_interface_proto_init() } +func file_ignite_services_plugin_grpc_v1_interface_proto_init() { + if File_ignite_services_plugin_grpc_v1_interface_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_ignite_services_plugin_grpc_v1_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_ignite_services_plugin_grpc_v1_interface_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ExecutedCommand); i { case 0: return &v.state @@ -773,7 +773,7 @@ func file_ignite_services_plugin_grpc_v1_types_proto_init() { return nil } } - file_ignite_services_plugin_grpc_v1_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_ignite_services_plugin_grpc_v1_interface_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ExecutedHook); i { case 0: return &v.state @@ -785,7 +785,7 @@ func file_ignite_services_plugin_grpc_v1_types_proto_init() { return nil } } - file_ignite_services_plugin_grpc_v1_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_ignite_services_plugin_grpc_v1_interface_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Manifest); i { case 0: return &v.state @@ -797,7 +797,7 @@ func file_ignite_services_plugin_grpc_v1_types_proto_init() { return nil } } - file_ignite_services_plugin_grpc_v1_types_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_ignite_services_plugin_grpc_v1_interface_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Command); i { case 0: return &v.state @@ -809,7 +809,7 @@ func file_ignite_services_plugin_grpc_v1_types_proto_init() { return nil } } - file_ignite_services_plugin_grpc_v1_types_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_ignite_services_plugin_grpc_v1_interface_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Flag); i { case 0: return &v.state @@ -821,7 +821,7 @@ func file_ignite_services_plugin_grpc_v1_types_proto_init() { return nil } } - file_ignite_services_plugin_grpc_v1_types_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_ignite_services_plugin_grpc_v1_interface_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Hook); i { case 0: return &v.state @@ -838,19 +838,19 @@ func file_ignite_services_plugin_grpc_v1_types_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_ignite_services_plugin_grpc_v1_types_proto_rawDesc, + RawDescriptor: file_ignite_services_plugin_grpc_v1_interface_proto_rawDesc, NumEnums: 1, NumMessages: 7, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_ignite_services_plugin_grpc_v1_types_proto_goTypes, - DependencyIndexes: file_ignite_services_plugin_grpc_v1_types_proto_depIdxs, - EnumInfos: file_ignite_services_plugin_grpc_v1_types_proto_enumTypes, - MessageInfos: file_ignite_services_plugin_grpc_v1_types_proto_msgTypes, + GoTypes: file_ignite_services_plugin_grpc_v1_interface_proto_goTypes, + DependencyIndexes: file_ignite_services_plugin_grpc_v1_interface_proto_depIdxs, + EnumInfos: file_ignite_services_plugin_grpc_v1_interface_proto_enumTypes, + MessageInfos: file_ignite_services_plugin_grpc_v1_interface_proto_msgTypes, }.Build() - File_ignite_services_plugin_grpc_v1_types_proto = out.File - file_ignite_services_plugin_grpc_v1_types_proto_rawDesc = nil - file_ignite_services_plugin_grpc_v1_types_proto_goTypes = nil - file_ignite_services_plugin_grpc_v1_types_proto_depIdxs = nil + File_ignite_services_plugin_grpc_v1_interface_proto = out.File + file_ignite_services_plugin_grpc_v1_interface_proto_rawDesc = nil + file_ignite_services_plugin_grpc_v1_interface_proto_goTypes = nil + file_ignite_services_plugin_grpc_v1_interface_proto_depIdxs = nil } diff --git a/ignite/services/plugin/grpc/v1/types_command.go b/ignite/services/plugin/grpc/v1/interface_command.go similarity index 100% rename from ignite/services/plugin/grpc/v1/types_command.go rename to ignite/services/plugin/grpc/v1/interface_command.go diff --git a/ignite/services/plugin/grpc/v1/types_flag.go b/ignite/services/plugin/grpc/v1/interface_flag.go similarity index 100% rename from ignite/services/plugin/grpc/v1/types_flag.go rename to ignite/services/plugin/grpc/v1/interface_flag.go diff --git a/ignite/services/plugin/grpc/v1/types_hook.go b/ignite/services/plugin/grpc/v1/interface_hook.go similarity index 100% rename from ignite/services/plugin/grpc/v1/types_hook.go rename to ignite/services/plugin/grpc/v1/interface_hook.go diff --git a/ignite/services/plugin/grpc/v1/types_manifest.go b/ignite/services/plugin/grpc/v1/interface_manifest.go similarity index 100% rename from ignite/services/plugin/grpc/v1/types_manifest.go rename to ignite/services/plugin/grpc/v1/interface_manifest.go diff --git a/ignite/services/plugin/grpc/v1/service.pb.go b/ignite/services/plugin/grpc/v1/service.pb.go index 1bc7825085..7cd54c135e 100644 --- a/ignite/services/plugin/grpc/v1/service.pb.go +++ b/ignite/services/plugin/grpc/v1/service.pb.go @@ -110,7 +110,8 @@ type ExecuteRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Cmd *ExecutedCommand `protobuf:"bytes,1,opt,name=cmd,proto3" json:"cmd,omitempty"` + Cmd *ExecutedCommand `protobuf:"bytes,1,opt,name=cmd,proto3" json:"cmd,omitempty"` + ClientApi uint32 `protobuf:"varint,2,opt,name=client_api,json=clientApi,proto3" json:"client_api,omitempty"` } func (x *ExecuteRequest) Reset() { @@ -152,6 +153,13 @@ func (x *ExecuteRequest) GetCmd() *ExecutedCommand { return nil } +func (x *ExecuteRequest) GetClientApi() uint32 { + if x != nil { + return x.ClientApi + } + return 0 +} + type ExecuteResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -195,7 +203,8 @@ type ExecuteHookPreRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Hook *ExecutedHook `protobuf:"bytes,1,opt,name=hook,proto3" json:"hook,omitempty"` + Hook *ExecutedHook `protobuf:"bytes,1,opt,name=hook,proto3" json:"hook,omitempty"` + ClientApi uint32 `protobuf:"varint,2,opt,name=client_api,json=clientApi,proto3" json:"client_api,omitempty"` } func (x *ExecuteHookPreRequest) Reset() { @@ -237,6 +246,13 @@ func (x *ExecuteHookPreRequest) GetHook() *ExecutedHook { return nil } +func (x *ExecuteHookPreRequest) GetClientApi() uint32 { + if x != nil { + return x.ClientApi + } + return 0 +} + type ExecuteHookPreResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -280,7 +296,8 @@ type ExecuteHookPostRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Hook *ExecutedHook `protobuf:"bytes,1,opt,name=hook,proto3" json:"hook,omitempty"` + Hook *ExecutedHook `protobuf:"bytes,1,opt,name=hook,proto3" json:"hook,omitempty"` + ClientApi uint32 `protobuf:"varint,2,opt,name=client_api,json=clientApi,proto3" json:"client_api,omitempty"` } func (x *ExecuteHookPostRequest) Reset() { @@ -322,6 +339,13 @@ func (x *ExecuteHookPostRequest) GetHook() *ExecutedHook { return nil } +func (x *ExecuteHookPostRequest) GetClientApi() uint32 { + if x != nil { + return x.ClientApi + } + return 0 +} + type ExecuteHookPostResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -365,7 +389,8 @@ type ExecuteHookCleanUpRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Hook *ExecutedHook `protobuf:"bytes,1,opt,name=hook,proto3" json:"hook,omitempty"` + Hook *ExecutedHook `protobuf:"bytes,1,opt,name=hook,proto3" json:"hook,omitempty"` + ClientApi uint32 `protobuf:"varint,2,opt,name=client_api,json=clientApi,proto3" json:"client_api,omitempty"` } func (x *ExecuteHookCleanUpRequest) Reset() { @@ -407,6 +432,13 @@ func (x *ExecuteHookCleanUpRequest) GetHook() *ExecutedHook { return nil } +func (x *ExecuteHookCleanUpRequest) GetClientApi() uint32 { + if x != nil { + return x.ClientApi + } + return 0 +} + type ExecuteHookCleanUpResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -445,6 +477,91 @@ func (*ExecuteHookCleanUpResponse) Descriptor() ([]byte, []int) { return file_ignite_services_plugin_grpc_v1_service_proto_rawDescGZIP(), []int{9} } +type GetChainInfoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +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)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetChainInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetChainInfoRequest) ProtoMessage() {} + +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)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetChainInfoRequest.ProtoReflect.Descriptor instead. +func (*GetChainInfoRequest) Descriptor() ([]byte, []int) { + return file_ignite_services_plugin_grpc_v1_service_proto_rawDescGZIP(), []int{10} +} + +type GetChainInfoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChainInfo *ChainInfo `protobuf:"bytes,1,opt,name=chain_info,json=chainInfo,proto3" json:"chain_info,omitempty"` +} + +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)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetChainInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetChainInfoResponse) ProtoMessage() {} + +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)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// 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 *GetChainInfoResponse) GetChainInfo() *ChainInfo { + if x != nil { + return x.ChainInfo + } + return nil +} + var File_ignite_services_plugin_grpc_v1_service_proto protoreflect.FileDescriptor var file_ignite_services_plugin_grpc_v1_service_proto_rawDesc = []byte{ @@ -452,90 +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, 0x2a, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x1a, 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, 0x2f, 0x74, - 0x79, 0x70, 0x65, 0x73, 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, 0x53, 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, 0x22, 0x11, 0x0a, 0x0f, - 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x59, 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, 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, 0x5a, 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, 0x64, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x04, 0x68, 0x6f, 0x6f, 0x6b, - 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, 0x5d, 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, 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, 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, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x70, 0x69, 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, 0x72, 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, 0x1d, 0x0a, 0x0a, 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, 0x11, 0x0a, 0x0f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x78, 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, 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, + 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, 0x1d, + 0x0a, 0x0a, 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, 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, 0x79, 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, 0x64, 0x48, 0x6f, 0x6f, 0x6b, 0x52, 0x04, 0x68, + 0x6f, 0x6f, 0x6b, 0x12, 0x1d, 0x0a, 0x0a, 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, 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, 0x7c, 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, 0x1d, 0x0a, 0x0a, + 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, 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, 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, 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, - 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, + 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, 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, + 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, 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, 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, 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 ( @@ -550,7 +695,7 @@ 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, 10) +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 @@ -562,31 +707,37 @@ 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 - (*Manifest)(nil), // 10: ignite.services.plugin.grpc.v1.Manifest - (*ExecutedCommand)(nil), // 11: ignite.services.plugin.grpc.v1.ExecutedCommand - (*ExecutedHook)(nil), // 12: ignite.services.plugin.grpc.v1.ExecutedHook + (*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 + (*ChainInfo)(nil), // 15: ignite.services.plugin.grpc.v1.ChainInfo } var file_ignite_services_plugin_grpc_v1_service_proto_depIdxs = []int32{ - 10, // 0: ignite.services.plugin.grpc.v1.ManifestResponse.manifest:type_name -> ignite.services.plugin.grpc.v1.Manifest - 11, // 1: ignite.services.plugin.grpc.v1.ExecuteRequest.cmd:type_name -> ignite.services.plugin.grpc.v1.ExecutedCommand - 12, // 2: ignite.services.plugin.grpc.v1.ExecuteHookPreRequest.hook:type_name -> ignite.services.plugin.grpc.v1.ExecutedHook - 12, // 3: ignite.services.plugin.grpc.v1.ExecuteHookPostRequest.hook:type_name -> ignite.services.plugin.grpc.v1.ExecutedHook - 12, // 4: ignite.services.plugin.grpc.v1.ExecuteHookCleanUpRequest.hook:type_name -> ignite.services.plugin.grpc.v1.ExecutedHook - 0, // 5: ignite.services.plugin.grpc.v1.InterfaceService.Manifest:input_type -> ignite.services.plugin.grpc.v1.ManifestRequest - 2, // 6: ignite.services.plugin.grpc.v1.InterfaceService.Execute:input_type -> ignite.services.plugin.grpc.v1.ExecuteRequest - 4, // 7: ignite.services.plugin.grpc.v1.InterfaceService.ExecuteHookPre:input_type -> ignite.services.plugin.grpc.v1.ExecuteHookPreRequest - 6, // 8: ignite.services.plugin.grpc.v1.InterfaceService.ExecuteHookPost:input_type -> ignite.services.plugin.grpc.v1.ExecuteHookPostRequest - 8, // 9: ignite.services.plugin.grpc.v1.InterfaceService.ExecuteHookCleanUp:input_type -> ignite.services.plugin.grpc.v1.ExecuteHookCleanUpRequest - 1, // 10: ignite.services.plugin.grpc.v1.InterfaceService.Manifest:output_type -> ignite.services.plugin.grpc.v1.ManifestResponse - 3, // 11: ignite.services.plugin.grpc.v1.InterfaceService.Execute:output_type -> ignite.services.plugin.grpc.v1.ExecuteResponse - 5, // 12: ignite.services.plugin.grpc.v1.InterfaceService.ExecuteHookPre:output_type -> ignite.services.plugin.grpc.v1.ExecuteHookPreResponse - 7, // 13: ignite.services.plugin.grpc.v1.InterfaceService.ExecuteHookPost:output_type -> ignite.services.plugin.grpc.v1.ExecuteHookPostResponse - 9, // 14: ignite.services.plugin.grpc.v1.InterfaceService.ExecuteHookCleanUp:output_type -> ignite.services.plugin.grpc.v1.ExecuteHookCleanUpResponse - 10, // [10:15] is the sub-list for method output_type - 5, // [5:10] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 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 + 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.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.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.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 + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name } func init() { file_ignite_services_plugin_grpc_v1_service_proto_init() } @@ -594,7 +745,8 @@ 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_types_proto_init() + file_ignite_services_plugin_grpc_v1_client_api_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{} { switch v := v.(*ManifestRequest); i { @@ -716,6 +868,30 @@ func file_ignite_services_plugin_grpc_v1_service_proto_init() { return nil } } + file_ignite_services_plugin_grpc_v1_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetChainInfoRequest); 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_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetChainInfoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -723,9 +899,9 @@ func file_ignite_services_plugin_grpc_v1_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_ignite_services_plugin_grpc_v1_service_proto_rawDesc, NumEnums: 0, - NumMessages: 10, + NumMessages: 12, NumExtensions: 0, - NumServices: 1, + NumServices: 2, }, GoTypes: file_ignite_services_plugin_grpc_v1_service_proto_goTypes, DependencyIndexes: file_ignite_services_plugin_grpc_v1_service_proto_depIdxs, diff --git a/ignite/services/plugin/grpc/v1/service_grpc.pb.go b/ignite/services/plugin/grpc/v1/service_grpc.pb.go index 9487826b42..f369c94a1e 100644 --- a/ignite/services/plugin/grpc/v1/service_grpc.pb.go +++ b/ignite/services/plugin/grpc/v1/service_grpc.pb.go @@ -289,3 +289,95 @@ var InterfaceService_ServiceDesc = grpc.ServiceDesc{ Streams: []grpc.StreamDesc{}, Metadata: "ignite/services/plugin/grpc/v1/service.proto", } + +const ( + 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 { + // GetChainInfo returns basic chain info for the configured app + GetChainInfo(ctx context.Context, in *GetChainInfoRequest, opts ...grpc.CallOption) (*GetChainInfoResponse, error) +} + +type clientAPIServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewClientAPIServiceClient(cc grpc.ClientConnInterface) ClientAPIServiceClient { + return &clientAPIServiceClient{cc} +} + +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 + } + return out, nil +} + +// ClientAPIServiceServer is the server API for ClientAPIService service. +// All implementations must embed UnimplementedClientAPIServiceServer +// for forward compatibility +type ClientAPIServiceServer interface { + // GetChainInfo returns basic chain info for the configured app + GetChainInfo(context.Context, *GetChainInfoRequest) (*GetChainInfoResponse, error) + mustEmbedUnimplementedClientAPIServiceServer() +} + +// UnimplementedClientAPIServiceServer must be embedded to have forward compatible implementations. +type UnimplementedClientAPIServiceServer struct { +} + +func (UnimplementedClientAPIServiceServer) GetChainInfo(context.Context, *GetChainInfoRequest) (*GetChainInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetChainInfo not implemented") +} +func (UnimplementedClientAPIServiceServer) mustEmbedUnimplementedClientAPIServiceServer() {} + +// 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 UnsafeClientAPIServiceServer interface { + mustEmbedUnimplementedClientAPIServiceServer() +} + +func RegisterClientAPIServiceServer(s grpc.ServiceRegistrar, srv ClientAPIServiceServer) { + s.RegisterService(&ClientAPIService_ServiceDesc, srv) +} + +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).GetChainInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClientAPIService_GetChainInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClientAPIServiceServer).GetChainInfo(ctx, req.(*GetChainInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// 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 ClientAPIService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "ignite.services.plugin.grpc.v1.ClientAPIService", + HandlerType: (*ClientAPIServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetChainInfo", + Handler: _ClientAPIService_GetChainInfo_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "ignite/services/plugin/grpc/v1/service.proto", +} diff --git a/ignite/services/plugin/interface.go b/ignite/services/plugin/interface.go index 956eab972a..9eb44b008c 100644 --- a/ignite/services/plugin/interface.go +++ b/ignite/services/plugin/interface.go @@ -19,13 +19,14 @@ const ( // Type aliases for the current plugin version. type ( - Manifest = v1.Manifest Command = v1.Command - Hook = v1.Hook + ChainInfo = v1.ChainInfo + ExecutedCommand = v1.ExecutedCommand + ExecutedHook = v1.ExecutedHook Flag = v1.Flag FlagType = v1.Flag_Type - ExecutedHook = v1.ExecutedHook - ExecutedCommand = v1.ExecutedCommand + Hook = v1.Hook + Manifest = v1.Manifest ) // Interface defines the interface that all Ignite App must implement. @@ -38,24 +39,36 @@ type Interface interface { // Execute will be invoked by ignite when an app Command is executed. // It is global for all commands declared in Manifest, if you have declared // multiple commands, use cmd.Path to distinguish them. - Execute(context.Context, *ExecutedCommand) 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. - ExecuteHookPre(context.Context, *ExecutedHook) 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. - ExecuteHookPost(context.Context, *ExecutedHook) 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. - ExecuteHookCleanUp(context.Context, *ExecutedHook) error + // The clientAPI argument can be used by plugins to get chain app analysis info. + ExecuteHookCleanUp(context.Context, *ExecutedHook, ClientAPI) error +} + +// ClientAPI defines the interface for plugins to get chain app code analysis info. +// +//go:generate mockery --srcpkg . --name ClientAPI --structname PluginClientAPI --filename client_api.go --with-expecter +type ClientAPI interface { + // GetChainInfo returns basic info for the configured blockchain app. + GetChainInfo(context.Context) (*ChainInfo, error) } diff --git a/ignite/services/plugin/mocks/client_api.go b/ignite/services/plugin/mocks/client_api.go new file mode 100644 index 0000000000..c9bffda3e3 --- /dev/null +++ b/ignite/services/plugin/mocks/client_api.go @@ -0,0 +1,93 @@ +// Code generated by mockery v2.27.1. DO NOT EDIT. + +package mocks + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" + + v1 "github.com/ignite/cli/ignite/services/plugin/grpc/v1" +) + +// PluginClientAPI is an autogenerated mock type for the ClientAPI type +type PluginClientAPI struct { + mock.Mock +} + +type PluginClientAPI_Expecter struct { + mock *mock.Mock +} + +func (_m *PluginClientAPI) EXPECT() *PluginClientAPI_Expecter { + return &PluginClientAPI_Expecter{mock: &_m.Mock} +} + +// 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.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.ChainInfo) + } + } + + if rf, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// 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 +} + +// GetChainInfo is a helper method to define mock.On call +// - _a0 context.Context +func (_e *PluginClientAPI_Expecter) GetChainInfo(_a0 interface{}) *PluginClientAPI_GetChainInfo_Call { + return &PluginClientAPI_GetChainInfo_Call{Call: _e.mock.On("GetChainInfo", _a0)} +} + +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_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()) +} + +// 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) }) + + return mock +} diff --git a/ignite/services/plugin/mocks/interface.go b/ignite/services/plugin/mocks/interface.go index 62b2adb204..e03d029aa8 100644 --- a/ignite/services/plugin/mocks/interface.go +++ b/ignite/services/plugin/mocks/interface.go @@ -1,10 +1,11 @@ -// 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" + plugin "github.com/ignite/cli/ignite/services/plugin" mock "github.com/stretchr/testify/mock" v1 "github.com/ignite/cli/ignite/services/plugin/grpc/v1" @@ -23,13 +24,13 @@ func (_m *PluginInterface) EXPECT() *PluginInterface_Expecter { return &PluginInterface_Expecter{mock: &_m.Mock} } -// Execute provides a mock function with given fields: _a0, _a1 -func (_m *PluginInterface) Execute(_a0 context.Context, _a1 *v1.ExecutedCommand) error { - ret := _m.Called(_a0, _a1) +// Execute provides a mock function with given fields: _a0, _a1, _a2 +func (_m *PluginInterface) Execute(_a0 context.Context, _a1 *v1.ExecutedCommand, _a2 plugin.ClientAPI) error { + ret := _m.Called(_a0, _a1, _a2) var r0 error - if rf, ok := ret.Get(0).(func(context.Context, *v1.ExecutedCommand) error); ok { - r0 = rf(_a0, _a1) + if rf, ok := ret.Get(0).(func(context.Context, *v1.ExecutedCommand, plugin.ClientAPI) error); ok { + r0 = rf(_a0, _a1, _a2) } else { r0 = ret.Error(0) } @@ -45,13 +46,14 @@ type PluginInterface_Execute_Call struct { // Execute is a helper method to define mock.On call // - _a0 context.Context // - _a1 *v1.ExecutedCommand -func (_e *PluginInterface_Expecter) Execute(_a0 interface{}, _a1 interface{}) *PluginInterface_Execute_Call { - return &PluginInterface_Execute_Call{Call: _e.mock.On("Execute", _a0, _a1)} +// - _a2 plugin.ClientAPI +func (_e *PluginInterface_Expecter) Execute(_a0 interface{}, _a1 interface{}, _a2 interface{}) *PluginInterface_Execute_Call { + return &PluginInterface_Execute_Call{Call: _e.mock.On("Execute", _a0, _a1, _a2)} } -func (_c *PluginInterface_Execute_Call) Run(run func(_a0 context.Context, _a1 *v1.ExecutedCommand)) *PluginInterface_Execute_Call { +func (_c *PluginInterface_Execute_Call) Run(run func(_a0 context.Context, _a1 *v1.ExecutedCommand, _a2 plugin.ClientAPI)) *PluginInterface_Execute_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*v1.ExecutedCommand)) + run(args[0].(context.Context), args[1].(*v1.ExecutedCommand), args[2].(plugin.ClientAPI)) }) return _c } @@ -61,13 +63,18 @@ func (_c *PluginInterface_Execute_Call) Return(_a0 error) *PluginInterface_Execu return _c } -// ExecuteHookCleanUp provides a mock function with given fields: _a0, _a1 -func (_m *PluginInterface) ExecuteHookCleanUp(_a0 context.Context, _a1 *v1.ExecutedHook) error { - ret := _m.Called(_a0, _a1) +func (_c *PluginInterface_Execute_Call) RunAndReturn(run func(context.Context, *v1.ExecutedCommand, plugin.ClientAPI) error) *PluginInterface_Execute_Call { + _c.Call.Return(run) + return _c +} + +// ExecuteHookCleanUp provides a mock function with given fields: _a0, _a1, _a2 +func (_m *PluginInterface) ExecuteHookCleanUp(_a0 context.Context, _a1 *v1.ExecutedHook, _a2 plugin.ClientAPI) error { + ret := _m.Called(_a0, _a1, _a2) var r0 error - if rf, ok := ret.Get(0).(func(context.Context, *v1.ExecutedHook) error); ok { - r0 = rf(_a0, _a1) + if rf, ok := ret.Get(0).(func(context.Context, *v1.ExecutedHook, plugin.ClientAPI) error); ok { + r0 = rf(_a0, _a1, _a2) } else { r0 = ret.Error(0) } @@ -83,13 +90,14 @@ type PluginInterface_ExecuteHookCleanUp_Call struct { // ExecuteHookCleanUp is a helper method to define mock.On call // - _a0 context.Context // - _a1 *v1.ExecutedHook -func (_e *PluginInterface_Expecter) ExecuteHookCleanUp(_a0 interface{}, _a1 interface{}) *PluginInterface_ExecuteHookCleanUp_Call { - return &PluginInterface_ExecuteHookCleanUp_Call{Call: _e.mock.On("ExecuteHookCleanUp", _a0, _a1)} +// - _a2 plugin.ClientAPI +func (_e *PluginInterface_Expecter) ExecuteHookCleanUp(_a0 interface{}, _a1 interface{}, _a2 interface{}) *PluginInterface_ExecuteHookCleanUp_Call { + return &PluginInterface_ExecuteHookCleanUp_Call{Call: _e.mock.On("ExecuteHookCleanUp", _a0, _a1, _a2)} } -func (_c *PluginInterface_ExecuteHookCleanUp_Call) Run(run func(_a0 context.Context, _a1 *v1.ExecutedHook)) *PluginInterface_ExecuteHookCleanUp_Call { +func (_c *PluginInterface_ExecuteHookCleanUp_Call) Run(run func(_a0 context.Context, _a1 *v1.ExecutedHook, _a2 plugin.ClientAPI)) *PluginInterface_ExecuteHookCleanUp_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*v1.ExecutedHook)) + run(args[0].(context.Context), args[1].(*v1.ExecutedHook), args[2].(plugin.ClientAPI)) }) return _c } @@ -99,13 +107,18 @@ func (_c *PluginInterface_ExecuteHookCleanUp_Call) Return(_a0 error) *PluginInte return _c } -// ExecuteHookPost provides a mock function with given fields: _a0, _a1 -func (_m *PluginInterface) ExecuteHookPost(_a0 context.Context, _a1 *v1.ExecutedHook) error { - ret := _m.Called(_a0, _a1) +func (_c *PluginInterface_ExecuteHookCleanUp_Call) RunAndReturn(run func(context.Context, *v1.ExecutedHook, plugin.ClientAPI) error) *PluginInterface_ExecuteHookCleanUp_Call { + _c.Call.Return(run) + return _c +} + +// ExecuteHookPost provides a mock function with given fields: _a0, _a1, _a2 +func (_m *PluginInterface) ExecuteHookPost(_a0 context.Context, _a1 *v1.ExecutedHook, _a2 plugin.ClientAPI) error { + ret := _m.Called(_a0, _a1, _a2) var r0 error - if rf, ok := ret.Get(0).(func(context.Context, *v1.ExecutedHook) error); ok { - r0 = rf(_a0, _a1) + if rf, ok := ret.Get(0).(func(context.Context, *v1.ExecutedHook, plugin.ClientAPI) error); ok { + r0 = rf(_a0, _a1, _a2) } else { r0 = ret.Error(0) } @@ -121,13 +134,14 @@ type PluginInterface_ExecuteHookPost_Call struct { // ExecuteHookPost is a helper method to define mock.On call // - _a0 context.Context // - _a1 *v1.ExecutedHook -func (_e *PluginInterface_Expecter) ExecuteHookPost(_a0 interface{}, _a1 interface{}) *PluginInterface_ExecuteHookPost_Call { - return &PluginInterface_ExecuteHookPost_Call{Call: _e.mock.On("ExecuteHookPost", _a0, _a1)} +// - _a2 plugin.ClientAPI +func (_e *PluginInterface_Expecter) ExecuteHookPost(_a0 interface{}, _a1 interface{}, _a2 interface{}) *PluginInterface_ExecuteHookPost_Call { + return &PluginInterface_ExecuteHookPost_Call{Call: _e.mock.On("ExecuteHookPost", _a0, _a1, _a2)} } -func (_c *PluginInterface_ExecuteHookPost_Call) Run(run func(_a0 context.Context, _a1 *v1.ExecutedHook)) *PluginInterface_ExecuteHookPost_Call { +func (_c *PluginInterface_ExecuteHookPost_Call) Run(run func(_a0 context.Context, _a1 *v1.ExecutedHook, _a2 plugin.ClientAPI)) *PluginInterface_ExecuteHookPost_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*v1.ExecutedHook)) + run(args[0].(context.Context), args[1].(*v1.ExecutedHook), args[2].(plugin.ClientAPI)) }) return _c } @@ -137,13 +151,18 @@ func (_c *PluginInterface_ExecuteHookPost_Call) Return(_a0 error) *PluginInterfa return _c } -// ExecuteHookPre provides a mock function with given fields: _a0, _a1 -func (_m *PluginInterface) ExecuteHookPre(_a0 context.Context, _a1 *v1.ExecutedHook) error { - ret := _m.Called(_a0, _a1) +func (_c *PluginInterface_ExecuteHookPost_Call) RunAndReturn(run func(context.Context, *v1.ExecutedHook, plugin.ClientAPI) error) *PluginInterface_ExecuteHookPost_Call { + _c.Call.Return(run) + return _c +} + +// ExecuteHookPre provides a mock function with given fields: _a0, _a1, _a2 +func (_m *PluginInterface) ExecuteHookPre(_a0 context.Context, _a1 *v1.ExecutedHook, _a2 plugin.ClientAPI) error { + ret := _m.Called(_a0, _a1, _a2) var r0 error - if rf, ok := ret.Get(0).(func(context.Context, *v1.ExecutedHook) error); ok { - r0 = rf(_a0, _a1) + if rf, ok := ret.Get(0).(func(context.Context, *v1.ExecutedHook, plugin.ClientAPI) error); ok { + r0 = rf(_a0, _a1, _a2) } else { r0 = ret.Error(0) } @@ -159,13 +178,14 @@ type PluginInterface_ExecuteHookPre_Call struct { // ExecuteHookPre is a helper method to define mock.On call // - _a0 context.Context // - _a1 *v1.ExecutedHook -func (_e *PluginInterface_Expecter) ExecuteHookPre(_a0 interface{}, _a1 interface{}) *PluginInterface_ExecuteHookPre_Call { - return &PluginInterface_ExecuteHookPre_Call{Call: _e.mock.On("ExecuteHookPre", _a0, _a1)} +// - _a2 plugin.ClientAPI +func (_e *PluginInterface_Expecter) ExecuteHookPre(_a0 interface{}, _a1 interface{}, _a2 interface{}) *PluginInterface_ExecuteHookPre_Call { + return &PluginInterface_ExecuteHookPre_Call{Call: _e.mock.On("ExecuteHookPre", _a0, _a1, _a2)} } -func (_c *PluginInterface_ExecuteHookPre_Call) Run(run func(_a0 context.Context, _a1 *v1.ExecutedHook)) *PluginInterface_ExecuteHookPre_Call { +func (_c *PluginInterface_ExecuteHookPre_Call) Run(run func(_a0 context.Context, _a1 *v1.ExecutedHook, _a2 plugin.ClientAPI)) *PluginInterface_ExecuteHookPre_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*v1.ExecutedHook)) + run(args[0].(context.Context), args[1].(*v1.ExecutedHook), args[2].(plugin.ClientAPI)) }) return _c } @@ -175,11 +195,20 @@ func (_c *PluginInterface_ExecuteHookPre_Call) Return(_a0 error) *PluginInterfac return _c } +func (_c *PluginInterface_ExecuteHookPre_Call) RunAndReturn(run func(context.Context, *v1.ExecutedHook, plugin.ClientAPI) error) *PluginInterface_ExecuteHookPre_Call { + _c.Call.Return(run) + return _c +} + // Manifest provides a mock function with given fields: _a0 func (_m *PluginInterface) Manifest(_a0 context.Context) (*v1.Manifest, error) { ret := _m.Called(_a0) var r0 *v1.Manifest + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (*v1.Manifest, error)); ok { + return rf(_a0) + } if rf, ok := ret.Get(0).(func(context.Context) *v1.Manifest); ok { r0 = rf(_a0) } else { @@ -188,7 +217,6 @@ func (_m *PluginInterface) Manifest(_a0 context.Context) (*v1.Manifest, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(_a0) } else { @@ -221,6 +249,11 @@ func (_c *PluginInterface_Manifest_Call) Return(_a0 *v1.Manifest, _a1 error) *Pl return _c } +func (_c *PluginInterface_Manifest_Call) RunAndReturn(run func(context.Context) (*v1.Manifest, error)) *PluginInterface_Manifest_Call { + _c.Call.Return(run) + return _c +} + type mockConstructorTestingTNewPluginInterface interface { mock.TestingT Cleanup(func()) diff --git a/ignite/services/plugin/plugin_test.go b/ignite/services/plugin/plugin_test.go index 5a15d3547d..01eb160a6f 100644 --- a/ignite/services/plugin/plugin_test.go +++ b/ignite/services/plugin/plugin_test.go @@ -186,10 +186,18 @@ 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 := &TestClientAPI{} + tests := []struct { name string buildPlugin func(t *testing.T) Plugin @@ -355,10 +363,10 @@ func TestPluginLoad(t *testing.T) { manifest, err := p.Interface.Manifest(ctx) require.NoError(err) assert.Equal(p.name, manifest.Name) - assert.NoError(p.Interface.Execute(ctx, &ExecutedCommand{})) - assert.NoError(p.Interface.ExecuteHookPre(ctx, &ExecutedHook{})) - assert.NoError(p.Interface.ExecuteHookPost(ctx, &ExecutedHook{})) - assert.NoError(p.Interface.ExecuteHookCleanUp(ctx, &ExecutedHook{})) + 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)) }) } } diff --git a/ignite/services/plugin/protocol.go b/ignite/services/plugin/protocol.go index 56c2502483..0423e2e9b6 100644 --- a/ignite/services/plugin/protocol.go +++ b/ignite/services/plugin/protocol.go @@ -29,57 +29,102 @@ func NewGRPC(impl Interface) hplugin.Plugin { } type grpcPlugin struct { - // This is required by the Hashicorp plugin implementation for gRPC plugins - hplugin.Plugin + hplugin.NetRPCUnsupportedPlugin impl Interface } // GRPCServer returns a new server that implements the plugin interface over gRPC. -func (p grpcPlugin) GRPCServer(_ *hplugin.GRPCBroker, s *grpc.Server) error { - v1.RegisterInterfaceServiceServer(s, &server{impl: p.impl}) +func (p grpcPlugin) GRPCServer(broker *hplugin.GRPCBroker, s *grpc.Server) error { + v1.RegisterInterfaceServiceServer(s, &server{ + impl: p.impl, + broker: broker, + }) return nil } // GRPCClient returns a new plugin client that allows calling the plugin interface over gRPC. -func (p grpcPlugin) GRPCClient(_ context.Context, _ *hplugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error) { - return &client{grpc: v1.NewInterfaceServiceClient(c)}, nil +func (p grpcPlugin) GRPCClient(_ context.Context, broker *hplugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error) { + return &client{ + grpc: v1.NewInterfaceServiceClient(c), + broker: broker, + }, nil } -type client struct{ grpc v1.InterfaceServiceClient } +type client struct { + grpc v1.InterfaceServiceClient + broker *hplugin.GRPCBroker +} func (c client) Manifest(ctx context.Context) (*Manifest, error) { r, err := c.grpc.Manifest(ctx, &v1.ManifestRequest{}) if err != nil { return nil, err } + return r.Manifest, nil } -func (c client) Execute(ctx context.Context, cmd *ExecutedCommand) error { - _, err := c.grpc.Execute(ctx, &v1.ExecuteRequest{Cmd: cmd}) +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, + }) + stopServer() return err } -func (c client) ExecuteHookPre(ctx context.Context, h *ExecutedHook) error { - _, err := c.grpc.ExecuteHookPre(ctx, &v1.ExecuteHookPreRequest{Hook: h}) +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, + }) + stopServer() return err } -func (c client) ExecuteHookPost(ctx context.Context, h *ExecutedHook) error { - _, err := c.grpc.ExecuteHookPost(ctx, &v1.ExecuteHookPostRequest{Hook: h}) +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, + }) + stopServer() return err } -func (c client) ExecuteHookCleanUp(ctx context.Context, h *ExecutedHook) error { - _, err := c.grpc.ExecuteHookCleanUp(ctx, &v1.ExecuteHookCleanUpRequest{Hook: h}) +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, + }) + stopServer() return err } +func (c client) startClientAPIServer(api ClientAPI) (uint32, func()) { + var ( + srv *grpc.Server + brokerID = c.broker.NextId() + ) + + go c.broker.AcceptAndServe(brokerID, func(opts []grpc.ServerOption) *grpc.Server { + srv = grpc.NewServer(opts...) + v1.RegisterClientAPIServiceServer(srv, &clientAPIServer{impl: api}) + return srv + }) + + return brokerID, func() { srv.Stop() } +} + type server struct { v1.UnimplementedInterfaceServiceServer - impl Interface + impl Interface + broker *hplugin.GRPCBroker } func (s server) Manifest(ctx context.Context, _ *v1.ManifestRequest) (*v1.ManifestResponse, error) { @@ -92,7 +137,14 @@ func (s server) Manifest(ctx context.Context, _ *v1.ManifestRequest) (*v1.Manife } func (s server) Execute(ctx context.Context, r *v1.ExecuteRequest) (*v1.ExecuteResponse, error) { - err := s.impl.Execute(ctx, r.GetCmd()) + conn, err := s.broker.Dial(r.ClientApi) + if err != nil { + return nil, err + } + + defer conn.Close() + + err = s.impl.Execute(ctx, r.GetCmd(), newClientAPIClient(conn)) if err != nil { return nil, err } @@ -101,7 +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) { - err := s.impl.ExecuteHookPre(ctx, r.GetHook()) + conn, err := s.broker.Dial(r.ClientApi) + if err != nil { + return nil, err + } + + defer conn.Close() + + err = s.impl.ExecuteHookPre(ctx, r.GetHook(), newClientAPIClient(conn)) if err != nil { return nil, err } @@ -110,7 +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) { - err := s.impl.ExecuteHookPost(ctx, r.GetHook()) + conn, err := s.broker.Dial(r.ClientApi) + if err != nil { + return nil, err + } + + defer conn.Close() + + err = s.impl.ExecuteHookPost(ctx, r.GetHook(), newClientAPIClient(conn)) if err != nil { return nil, err } @@ -119,10 +185,49 @@ func (s server) ExecuteHookPost(ctx context.Context, r *v1.ExecuteHookPostReques } func (s server) ExecuteHookCleanUp(ctx context.Context, r *v1.ExecuteHookCleanUpRequest) (*v1.ExecuteHookCleanUpResponse, error) { - err := s.impl.ExecuteHookCleanUp(ctx, r.GetHook()) + conn, err := s.broker.Dial(r.ClientApi) + if err != nil { + return nil, err + } + + defer conn.Close() + + err = s.impl.ExecuteHookCleanUp(ctx, r.GetHook(), newClientAPIClient(conn)) if err != nil { return nil, err } return &v1.ExecuteHookCleanUpResponse{}, nil } + +func newClientAPIClient(c *grpc.ClientConn) *clientAPIClient { + return &clientAPIClient{v1.NewClientAPIServiceClient(c)} +} + +type clientAPIClient struct { + grpc v1.ClientAPIServiceClient +} + +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.ChainInfo, nil +} + +type clientAPIServer struct { + v1.UnimplementedClientAPIServiceServer + + impl ClientAPI +} + +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.GetChainInfoResponse{ChainInfo: chainInfo}, nil +} diff --git a/ignite/services/plugin/template/go.mod.plush b/ignite/services/plugin/template/go.mod.plush index b02d422c12..97ea5b9955 100644 --- a/ignite/services/plugin/template/go.mod.plush +++ b/ignite/services/plugin/template/go.mod.plush @@ -4,5 +4,5 @@ go 1.21 require ( github.com/hashicorp/go-plugin v1.4.9 - github.com/ignite/cli v0.27.1 + github.com/ignite/cli v0.27.2-0.20230905140057-d3918a77b607 ) diff --git a/ignite/services/plugin/template/main.go.plush b/ignite/services/plugin/template/main.go.plush index abec154c2d..83181ccd76 100644 --- a/ignite/services/plugin/template/main.go.plush +++ b/ignite/services/plugin/template/main.go.plush @@ -16,7 +16,7 @@ type app struct{} func (app) Manifest(ctx context.Context) (*plugin.Manifest, error) { return &plugin.Manifest{ Name: "<%= Name %>", - // Add commands here + // TODO: Add commands here Commands: []*plugin.Command{ // Example of a command { @@ -28,22 +28,20 @@ func (app) Manifest(ctx context.Context) (*plugin.Manifest, error) { }, PlaceCommandUnder: "ignite", // Examples of adding subcommands: - /* - Commands: []*plugin.Command{ - {Use: "add"}, - {Use: "list"}, - {Use: "delete"}, - }, - */ + // Commands: []*plugin.Command{ + // {Use: "add"}, + // {Use: "list"}, + // {Use: "delete"}, + // }, }, }, - // Add hooks here + // TODO: Add hooks here Hooks: []*plugin.Hook{}, SharedHost: <%= SharedHost %>, }, nil } -func (app) Execute(ctx context.Context, cmd *plugin.ExecutedCommand) error { +func (app) 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) @@ -60,6 +58,9 @@ func (app) Execute(ctx context.Context, cmd *plugin.ExecutedCommand) error { // This is how the plugin can access the chain: // c, err := getChain(cmd) + // if err != nil { + // return err + // } // According to the number of declared commands, you may need a switch: /* @@ -72,20 +73,24 @@ func (app) Execute(ctx context.Context, cmd *plugin.ExecutedCommand) error { fmt.Println("Deleting stuff...") } */ + + // ClientAPI call example + fmt.Println(api.GetChainInfo(ctx)) + return nil } -func (app) ExecuteHookPre(ctx context.Context, h *plugin.ExecutedHook) error { +func (app) ExecuteHookPre(ctx context.Context, h *plugin.ExecutedHook, api plugin.ClientAPI) error { fmt.Printf("Executing hook pre %q\n", h.Hook.GetName()) return nil } -func (app) ExecuteHookPost(ctx context.Context, h *plugin.ExecutedHook) error { +func (app) ExecuteHookPost(ctx context.Context, h *plugin.ExecutedHook, api plugin.ClientAPI) error { fmt.Printf("Executing hook post %q\n", h.Hook.GetName()) return nil } -func (app) ExecuteHookCleanUp(ctx context.Context, h *plugin.ExecutedHook) error { +func (app) ExecuteHookCleanUp(ctx context.Context, h *plugin.ExecutedHook, api plugin.ClientAPI) error { fmt.Printf("Executing hook cleanup %q\n", h.Hook.GetName()) return nil } diff --git a/integration/plugin/testdata/example-plugin/main.go b/integration/plugin/testdata/example-plugin/main.go index f531231a0f..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) 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) error { 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) 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) 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) error { +func (p) ExecuteHookCleanUp(_ context.Context, h *plugin.ExecutedHook, _ plugin.ClientAPI) error { fmt.Printf("Executing hook cleanup %q\n", h.Hook.GetName()) return nil } diff --git a/proto/ignite/services/plugin/grpc/v1/client_api.proto b/proto/ignite/services/plugin/grpc/v1/client_api.proto new file mode 100644 index 0000000000..d7b76c7bc0 --- /dev/null +++ b/proto/ignite/services/plugin/grpc/v1/client_api.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; + +package ignite.services.plugin.grpc.v1; + +option go_package = "github.com/ignite/cli/ignite/services/plugin/grpc/v1"; + +message ChainInfo { + string chain_id = 1; + string app_path = 2; + string config_path = 3; + string rpc_address = 4; +} diff --git a/proto/ignite/services/plugin/grpc/v1/types.proto b/proto/ignite/services/plugin/grpc/v1/interface.proto similarity index 100% rename from proto/ignite/services/plugin/grpc/v1/types.proto rename to proto/ignite/services/plugin/grpc/v1/interface.proto diff --git a/proto/ignite/services/plugin/grpc/v1/service.proto b/proto/ignite/services/plugin/grpc/v1/service.proto index 10ed6282cb..e35d89f2f5 100644 --- a/proto/ignite/services/plugin/grpc/v1/service.proto +++ b/proto/ignite/services/plugin/grpc/v1/service.proto @@ -2,7 +2,8 @@ syntax = "proto3"; package ignite.services.plugin.grpc.v1; -import "ignite/services/plugin/grpc/v1/types.proto"; +import "ignite/services/plugin/grpc/v1/client_api.proto"; +import "ignite/services/plugin/grpc/v1/interface.proto"; option go_package = "github.com/ignite/cli/ignite/services/plugin/grpc/v1"; @@ -44,24 +45,40 @@ message ManifestResponse { message ExecuteRequest { ExecutedCommand cmd = 1; + uint32 client_api = 2; } message ExecuteResponse {} message ExecuteHookPreRequest { ExecutedHook hook = 1; + uint32 client_api = 2; } message ExecuteHookPreResponse {} message ExecuteHookPostRequest { ExecutedHook hook = 1; + uint32 client_api = 2; } message ExecuteHookPostResponse {} message ExecuteHookCleanUpRequest { ExecutedHook hook = 1; + uint32 client_api = 2; } 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); +} + +message GetChainInfoRequest {} + +message GetChainInfoResponse { + ChainInfo chain_info = 1; +}