v1

package
v28.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

View Source
const (
	InterfaceService_Manifest_FullMethodName           = "/ignite.services.plugin.grpc.v1.InterfaceService/Manifest"
	InterfaceService_Execute_FullMethodName            = "/ignite.services.plugin.grpc.v1.InterfaceService/Execute"
	InterfaceService_ExecuteHookPre_FullMethodName     = "/ignite.services.plugin.grpc.v1.InterfaceService/ExecuteHookPre"
	InterfaceService_ExecuteHookPost_FullMethodName    = "/ignite.services.plugin.grpc.v1.InterfaceService/ExecuteHookPost"
	InterfaceService_ExecuteHookCleanUp_FullMethodName = "/ignite.services.plugin.grpc.v1.InterfaceService/ExecuteHookCleanUp"
)
View Source
const (
	ClientAPIService_GetChainInfo_FullMethodName = "/ignite.services.plugin.grpc.v1.ClientAPIService/GetChainInfo"
)

Variables

View Source
var (
	Flag_Type_name = map[int32]string{
		0: "TYPE_FLAG_STRING_UNSPECIFIED",
		1: "TYPE_FLAG_INT",
		2: "TYPE_FLAG_UINT",
		3: "TYPE_FLAG_INT64",
		4: "TYPE_FLAG_UINT64",
		5: "TYPE_FLAG_BOOL",
		6: "TYPE_FLAG_STRING_SLICE",
	}
	Flag_Type_value = map[string]int32{
		"TYPE_FLAG_STRING_UNSPECIFIED": 0,
		"TYPE_FLAG_INT":                1,
		"TYPE_FLAG_UINT":               2,
		"TYPE_FLAG_INT64":              3,
		"TYPE_FLAG_UINT64":             4,
		"TYPE_FLAG_BOOL":               5,
		"TYPE_FLAG_STRING_SLICE":       6,
	}
)

Enum value maps for Flag_Type.

View Source
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",
}

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)

View Source
var File_ignite_services_plugin_grpc_v1_client_api_proto protoreflect.FileDescriptor
View Source
var File_ignite_services_plugin_grpc_v1_interface_proto protoreflect.FileDescriptor
View Source
var File_ignite_services_plugin_grpc_v1_service_proto protoreflect.FileDescriptor
View Source
var InterfaceService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "ignite.services.plugin.grpc.v1.InterfaceService",
	HandlerType: (*InterfaceServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Manifest",
			Handler:    _InterfaceService_Manifest_Handler,
		},
		{
			MethodName: "Execute",
			Handler:    _InterfaceService_Execute_Handler,
		},
		{
			MethodName: "ExecuteHookPre",
			Handler:    _InterfaceService_ExecuteHookPre_Handler,
		},
		{
			MethodName: "ExecuteHookPost",
			Handler:    _InterfaceService_ExecuteHookPost_Handler,
		},
		{
			MethodName: "ExecuteHookCleanUp",
			Handler:    _InterfaceService_ExecuteHookCleanUp_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "ignite/services/plugin/grpc/v1/service.proto",
}

InterfaceService_ServiceDesc is the grpc.ServiceDesc for InterfaceService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterClientAPIServiceServer

func RegisterClientAPIServiceServer(s grpc.ServiceRegistrar, srv ClientAPIServiceServer)

func RegisterInterfaceServiceServer

func RegisterInterfaceServiceServer(s grpc.ServiceRegistrar, srv InterfaceServiceServer)

Types

type ChainInfo

type ChainInfo struct {
	ChainId    string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
	AppPath    string `protobuf:"bytes,2,opt,name=app_path,json=appPath,proto3" json:"app_path,omitempty"`
	ConfigPath string `protobuf:"bytes,3,opt,name=config_path,json=configPath,proto3" json:"config_path,omitempty"`
	RpcAddress string `protobuf:"bytes,4,opt,name=rpc_address,json=rpcAddress,proto3" json:"rpc_address,omitempty"`
	Home       string `protobuf:"bytes,5,opt,name=home,proto3" json:"home,omitempty"`
	// contains filtered or unexported fields
}

func (*ChainInfo) Descriptor deprecated

func (*ChainInfo) Descriptor() ([]byte, []int)

Deprecated: Use ChainInfo.ProtoReflect.Descriptor instead.

func (*ChainInfo) GetAppPath

func (x *ChainInfo) GetAppPath() string

func (*ChainInfo) GetChainId

func (x *ChainInfo) GetChainId() string

func (*ChainInfo) GetConfigPath

func (x *ChainInfo) GetConfigPath() string

func (*ChainInfo) GetHome added in v28.2.0

func (x *ChainInfo) GetHome() string

func (*ChainInfo) GetRpcAddress

func (x *ChainInfo) GetRpcAddress() string

func (*ChainInfo) ProtoMessage

func (*ChainInfo) ProtoMessage()

func (*ChainInfo) ProtoReflect

func (x *ChainInfo) ProtoReflect() protoreflect.Message

func (*ChainInfo) Reset

func (x *ChainInfo) Reset()

func (*ChainInfo) String

func (x *ChainInfo) String() string

type ClientAPIServiceClient

type ClientAPIServiceClient interface {
	// GetChainInfo returns basic chain info for the configured app
	GetChainInfo(ctx context.Context, in *GetChainInfoRequest, opts ...grpc.CallOption) (*GetChainInfoResponse, error)
}

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 ClientAPIServiceServer

type ClientAPIServiceServer interface {
	// GetChainInfo returns basic chain info for the configured app
	GetChainInfo(context.Context, *GetChainInfoRequest) (*GetChainInfoResponse, error)
	// contains filtered or unexported methods
}

ClientAPIServiceServer is the server API for ClientAPIService service. All implementations must embed UnimplementedClientAPIServiceServer for forward compatibility

type Command

type Command struct {

	// Use is the one-line usage message.
	//
	// Recommended syntax is as follow:
	//
	//	[ ] identifies an optional argument. Arguments that are not enclosed in brackets are required.
	//	... indicates that you can specify multiple values for the previous argument.
	//	|   indicates mutually exclusive information. You can use the argument to the left of the separator or the
	//	    argument to the right of the separator. You cannot use both arguments in a single use of the command.
	//	{ } delimits a set of mutually exclusive arguments when one of the arguments is required. If the arguments are
	//	    optional, they are enclosed in brackets ([ ]).
	//
	// Example: add [-F file | -D dir]... [-f format] profile
	Use string `protobuf:"bytes,1,opt,name=use,proto3" json:"use,omitempty"`
	// Aliases is an array of aliases that can be used instead of the first word in Use.
	Aliases []string `protobuf:"bytes,2,rep,name=aliases,proto3" json:"aliases,omitempty"`
	// Short is the short description shown in the 'help' output.
	Short string `protobuf:"bytes,3,opt,name=short,proto3" json:"short,omitempty"`
	// Long is the long message shown in the 'help <this-command>' output.
	Long string `protobuf:"bytes,4,opt,name=long,proto3" json:"long,omitempty"`
	// Hidden defines, if this command is hidden and should NOT show up in the list of available commands.
	Hidden bool `protobuf:"varint,5,opt,name=hidden,proto3" json:"hidden,omitempty"`
	// Flags holds the list of command flags.
	Flags []*Flag `protobuf:"bytes,6,rep,name=flags,proto3" json:"flags,omitempty"`
	// Indicates where the command should be placed.
	// For instance `ignite scaffold` will place the command at the `scaffold` command.
	// An empty value is interpreted as `ignite` (==root).
	PlaceCommandUnder string `protobuf:"bytes,7,opt,name=place_command_under,json=placeCommandUnder,proto3" json:"place_command_under,omitempty"`
	// List of sub commands.
	Commands []*Command `protobuf:"bytes,8,rep,name=commands,proto3" json:"commands,omitempty"`
	// contains filtered or unexported fields
}

Command represents a plugin command.

func (*Command) Descriptor deprecated

func (*Command) Descriptor() ([]byte, []int)

Deprecated: Use Command.ProtoReflect.Descriptor instead.

func (*Command) GetAliases

func (x *Command) GetAliases() []string

func (*Command) GetCommands

func (x *Command) GetCommands() []*Command

func (*Command) GetFlags

func (x *Command) GetFlags() []*Flag

func (*Command) GetHidden

func (x *Command) GetHidden() bool

func (*Command) GetLong

func (x *Command) GetLong() string

func (*Command) GetPlaceCommandUnder

func (x *Command) GetPlaceCommandUnder() string

func (*Command) GetShort

func (x *Command) GetShort() string

func (*Command) GetUse

func (x *Command) GetUse() string

func (*Command) Path

func (c *Command) Path() string

Path returns the absolute command path including the binary name as prefix.

func (*Command) ProtoMessage

func (*Command) ProtoMessage()

func (*Command) ProtoReflect

func (x *Command) ProtoReflect() protoreflect.Message

func (*Command) Reset

func (x *Command) Reset()

func (*Command) String

func (x *Command) String() string

func (*Command) ToCobraCommand

func (c *Command) ToCobraCommand() (*cobra.Command, error)

ToCobraCommand returns a new Cobra command that matches the current command.

type ExecuteHookCleanUpRequest

type ExecuteHookCleanUpRequest struct {
	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"`
	// contains filtered or unexported fields
}

func (*ExecuteHookCleanUpRequest) Descriptor deprecated

func (*ExecuteHookCleanUpRequest) Descriptor() ([]byte, []int)

Deprecated: Use ExecuteHookCleanUpRequest.ProtoReflect.Descriptor instead.

func (*ExecuteHookCleanUpRequest) GetClientApi

func (x *ExecuteHookCleanUpRequest) GetClientApi() uint32

func (*ExecuteHookCleanUpRequest) GetHook

func (*ExecuteHookCleanUpRequest) ProtoMessage

func (*ExecuteHookCleanUpRequest) ProtoMessage()

func (*ExecuteHookCleanUpRequest) ProtoReflect

func (*ExecuteHookCleanUpRequest) Reset

func (x *ExecuteHookCleanUpRequest) Reset()

func (*ExecuteHookCleanUpRequest) String

func (x *ExecuteHookCleanUpRequest) String() string

type ExecuteHookCleanUpResponse

type ExecuteHookCleanUpResponse struct {
	// contains filtered or unexported fields
}

func (*ExecuteHookCleanUpResponse) Descriptor deprecated

func (*ExecuteHookCleanUpResponse) Descriptor() ([]byte, []int)

Deprecated: Use ExecuteHookCleanUpResponse.ProtoReflect.Descriptor instead.

func (*ExecuteHookCleanUpResponse) ProtoMessage

func (*ExecuteHookCleanUpResponse) ProtoMessage()

func (*ExecuteHookCleanUpResponse) ProtoReflect

func (*ExecuteHookCleanUpResponse) Reset

func (x *ExecuteHookCleanUpResponse) Reset()

func (*ExecuteHookCleanUpResponse) String

func (x *ExecuteHookCleanUpResponse) String() string

type ExecuteHookPostRequest

type ExecuteHookPostRequest struct {
	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"`
	// contains filtered or unexported fields
}

func (*ExecuteHookPostRequest) Descriptor deprecated

func (*ExecuteHookPostRequest) Descriptor() ([]byte, []int)

Deprecated: Use ExecuteHookPostRequest.ProtoReflect.Descriptor instead.

func (*ExecuteHookPostRequest) GetClientApi

func (x *ExecuteHookPostRequest) GetClientApi() uint32

func (*ExecuteHookPostRequest) GetHook

func (x *ExecuteHookPostRequest) GetHook() *ExecutedHook

func (*ExecuteHookPostRequest) ProtoMessage

func (*ExecuteHookPostRequest) ProtoMessage()

func (*ExecuteHookPostRequest) ProtoReflect

func (x *ExecuteHookPostRequest) ProtoReflect() protoreflect.Message

func (*ExecuteHookPostRequest) Reset

func (x *ExecuteHookPostRequest) Reset()

func (*ExecuteHookPostRequest) String

func (x *ExecuteHookPostRequest) String() string

type ExecuteHookPostResponse

type ExecuteHookPostResponse struct {
	// contains filtered or unexported fields
}

func (*ExecuteHookPostResponse) Descriptor deprecated

func (*ExecuteHookPostResponse) Descriptor() ([]byte, []int)

Deprecated: Use ExecuteHookPostResponse.ProtoReflect.Descriptor instead.

func (*ExecuteHookPostResponse) ProtoMessage

func (*ExecuteHookPostResponse) ProtoMessage()

func (*ExecuteHookPostResponse) ProtoReflect

func (x *ExecuteHookPostResponse) ProtoReflect() protoreflect.Message

func (*ExecuteHookPostResponse) Reset

func (x *ExecuteHookPostResponse) Reset()

func (*ExecuteHookPostResponse) String

func (x *ExecuteHookPostResponse) String() string

type ExecuteHookPreRequest

type ExecuteHookPreRequest struct {
	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"`
	// contains filtered or unexported fields
}

func (*ExecuteHookPreRequest) Descriptor deprecated

func (*ExecuteHookPreRequest) Descriptor() ([]byte, []int)

Deprecated: Use ExecuteHookPreRequest.ProtoReflect.Descriptor instead.

func (*ExecuteHookPreRequest) GetClientApi

func (x *ExecuteHookPreRequest) GetClientApi() uint32

func (*ExecuteHookPreRequest) GetHook

func (x *ExecuteHookPreRequest) GetHook() *ExecutedHook

func (*ExecuteHookPreRequest) ProtoMessage

func (*ExecuteHookPreRequest) ProtoMessage()

func (*ExecuteHookPreRequest) ProtoReflect

func (x *ExecuteHookPreRequest) ProtoReflect() protoreflect.Message

func (*ExecuteHookPreRequest) Reset

func (x *ExecuteHookPreRequest) Reset()

func (*ExecuteHookPreRequest) String

func (x *ExecuteHookPreRequest) String() string

type ExecuteHookPreResponse

type ExecuteHookPreResponse struct {
	// contains filtered or unexported fields
}

func (*ExecuteHookPreResponse) Descriptor deprecated

func (*ExecuteHookPreResponse) Descriptor() ([]byte, []int)

Deprecated: Use ExecuteHookPreResponse.ProtoReflect.Descriptor instead.

func (*ExecuteHookPreResponse) ProtoMessage

func (*ExecuteHookPreResponse) ProtoMessage()

func (*ExecuteHookPreResponse) ProtoReflect

func (x *ExecuteHookPreResponse) ProtoReflect() protoreflect.Message

func (*ExecuteHookPreResponse) Reset

func (x *ExecuteHookPreResponse) Reset()

func (*ExecuteHookPreResponse) String

func (x *ExecuteHookPreResponse) String() string

type ExecuteRequest

type ExecuteRequest struct {
	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"`
	// contains filtered or unexported fields
}

func (*ExecuteRequest) Descriptor deprecated

func (*ExecuteRequest) Descriptor() ([]byte, []int)

Deprecated: Use ExecuteRequest.ProtoReflect.Descriptor instead.

func (*ExecuteRequest) GetClientApi

func (x *ExecuteRequest) GetClientApi() uint32

func (*ExecuteRequest) GetCmd

func (x *ExecuteRequest) GetCmd() *ExecutedCommand

func (*ExecuteRequest) ProtoMessage

func (*ExecuteRequest) ProtoMessage()

func (*ExecuteRequest) ProtoReflect

func (x *ExecuteRequest) ProtoReflect() protoreflect.Message

func (*ExecuteRequest) Reset

func (x *ExecuteRequest) Reset()

func (*ExecuteRequest) String

func (x *ExecuteRequest) String() string

type ExecuteResponse

type ExecuteResponse struct {
	// contains filtered or unexported fields
}

func (*ExecuteResponse) Descriptor deprecated

func (*ExecuteResponse) Descriptor() ([]byte, []int)

Deprecated: Use ExecuteResponse.ProtoReflect.Descriptor instead.

func (*ExecuteResponse) ProtoMessage

func (*ExecuteResponse) ProtoMessage()

func (*ExecuteResponse) ProtoReflect

func (x *ExecuteResponse) ProtoReflect() protoreflect.Message

func (*ExecuteResponse) Reset

func (x *ExecuteResponse) Reset()

func (*ExecuteResponse) String

func (x *ExecuteResponse) String() string

type ExecutedCommand

type ExecutedCommand struct {

	// Use is the one-line usage message.
	Use string `protobuf:"bytes,1,opt,name=use,proto3" json:"use,omitempty"`
	// Path contains the command path, e.g. `ignite scaffold foo`.
	Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
	// Args are the command arguments.
	Args []string `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"`
	// Full list of args taken from the command line.
	OsArgs []string `protobuf:"bytes,4,rep,name=os_args,json=osArgs,proto3" json:"os_args,omitempty"`
	// With contains the plugin config parameters.
	With map[string]string `` /* 149-byte string literal not displayed */
	// Flags holds the list of command flags.
	Flags []*Flag `protobuf:"bytes,6,rep,name=flags,proto3" json:"flags,omitempty"`
	// contains filtered or unexported fields
}

ExecutedCommand represents a plugin command under execution.

func (*ExecutedCommand) Descriptor deprecated

func (*ExecutedCommand) Descriptor() ([]byte, []int)

Deprecated: Use ExecutedCommand.ProtoReflect.Descriptor instead.

func (*ExecutedCommand) GetArgs

func (x *ExecutedCommand) GetArgs() []string

func (*ExecutedCommand) GetFlags

func (x *ExecutedCommand) GetFlags() []*Flag

func (*ExecutedCommand) GetOsArgs

func (x *ExecutedCommand) GetOsArgs() []string

func (*ExecutedCommand) GetPath

func (x *ExecutedCommand) GetPath() string

func (*ExecutedCommand) GetUse

func (x *ExecutedCommand) GetUse() string

func (*ExecutedCommand) GetWith

func (x *ExecutedCommand) GetWith() map[string]string

func (*ExecutedCommand) ImportFlags

func (c *ExecutedCommand) ImportFlags(cmd *cobra.Command)

ImportFlags imports flags from a Cobra command.

func (*ExecutedCommand) NewFlags

func (c *ExecutedCommand) NewFlags() (*pflag.FlagSet, error)

NewFlags creates a new flags set initialized with the executed command's flags.

func (*ExecutedCommand) NewPersistentFlags

func (c *ExecutedCommand) NewPersistentFlags() (*pflag.FlagSet, error)

NewPersistentFlags creates a new flags set initialized with the executed command's persistent flags.

func (*ExecutedCommand) ProtoMessage

func (*ExecutedCommand) ProtoMessage()

func (*ExecutedCommand) ProtoReflect

func (x *ExecutedCommand) ProtoReflect() protoreflect.Message

func (*ExecutedCommand) Reset

func (x *ExecutedCommand) Reset()

func (*ExecutedCommand) String

func (x *ExecutedCommand) String() string

type ExecutedHook

type ExecutedHook struct {

	// Hook is a copy of the original Hook defined in the Manifest.
	Hook *Hook `protobuf:"bytes,1,opt,name=hook,proto3" json:"hook,omitempty"`
	// ExecutedCommand gives access to the command attached by the hook.
	ExecutedCommand *ExecutedCommand `protobuf:"bytes,2,opt,name=executed_command,json=executedCommand,proto3" json:"executed_command,omitempty"`
	// contains filtered or unexported fields
}

ExecutedHook represents a plugin hook under execution.

func (*ExecutedHook) Descriptor deprecated

func (*ExecutedHook) Descriptor() ([]byte, []int)

Deprecated: Use ExecutedHook.ProtoReflect.Descriptor instead.

func (*ExecutedHook) GetExecutedCommand

func (x *ExecutedHook) GetExecutedCommand() *ExecutedCommand

func (*ExecutedHook) GetHook

func (x *ExecutedHook) GetHook() *Hook

func (*ExecutedHook) ProtoMessage

func (*ExecutedHook) ProtoMessage()

func (*ExecutedHook) ProtoReflect

func (x *ExecutedHook) ProtoReflect() protoreflect.Message

func (*ExecutedHook) Reset

func (x *ExecutedHook) Reset()

func (*ExecutedHook) String

func (x *ExecutedHook) String() string

type Flag

type Flag struct {

	// Name as it appears in the command line.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// One letter abbreviation of the flag.
	Shorthand string `protobuf:"bytes,2,opt,name=shorthand,proto3" json:"shorthand,omitempty"`
	// Help message.
	Usage string `protobuf:"bytes,3,opt,name=usage,proto3" json:"usage,omitempty"`
	// Default flag value.
	DefaultValue string `protobuf:"bytes,4,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`
	// Flag type.
	Type Flag_Type `protobuf:"varint,5,opt,name=type,proto3,enum=ignite.services.plugin.grpc.v1.Flag_Type" json:"type,omitempty"`
	// Flag value.
	Value string `protobuf:"bytes,6,opt,name=value,proto3" json:"value,omitempty"`
	// Indicates wether or not the flag is propagated on children commands.
	Persistent bool `protobuf:"varint,7,opt,name=persistent,proto3" json:"persistent,omitempty"`
	// contains filtered or unexported fields
}

Flag represents of a command line flag.

func (*Flag) Descriptor deprecated

func (*Flag) Descriptor() ([]byte, []int)

Deprecated: Use Flag.ProtoReflect.Descriptor instead.

func (*Flag) GetDefaultValue

func (x *Flag) GetDefaultValue() string

func (*Flag) GetName

func (x *Flag) GetName() string

func (*Flag) GetPersistent

func (x *Flag) GetPersistent() bool

func (*Flag) GetShorthand

func (x *Flag) GetShorthand() string

func (*Flag) GetType

func (x *Flag) GetType() Flag_Type

func (*Flag) GetUsage

func (x *Flag) GetUsage() string

func (*Flag) GetValue

func (x *Flag) GetValue() string

func (*Flag) ProtoMessage

func (*Flag) ProtoMessage()

func (*Flag) ProtoReflect

func (x *Flag) ProtoReflect() protoreflect.Message

func (*Flag) Reset

func (x *Flag) Reset()

func (*Flag) String

func (x *Flag) String() string

type Flag_Type

type Flag_Type int32

Type represents the flag type.

const (
	Flag_TYPE_FLAG_STRING_UNSPECIFIED Flag_Type = 0
	Flag_TYPE_FLAG_INT                Flag_Type = 1
	Flag_TYPE_FLAG_UINT               Flag_Type = 2
	Flag_TYPE_FLAG_INT64              Flag_Type = 3
	Flag_TYPE_FLAG_UINT64             Flag_Type = 4
	Flag_TYPE_FLAG_BOOL               Flag_Type = 5
	Flag_TYPE_FLAG_STRING_SLICE       Flag_Type = 6
)

func (Flag_Type) Descriptor

func (Flag_Type) Descriptor() protoreflect.EnumDescriptor

func (Flag_Type) Enum

func (x Flag_Type) Enum() *Flag_Type

func (Flag_Type) EnumDescriptor deprecated

func (Flag_Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use Flag_Type.Descriptor instead.

func (Flag_Type) Number

func (x Flag_Type) Number() protoreflect.EnumNumber

func (Flag_Type) String

func (x Flag_Type) String() string

func (Flag_Type) Type

type GetChainInfoRequest

type GetChainInfoRequest struct {
	// contains filtered or unexported fields
}

func (*GetChainInfoRequest) Descriptor deprecated

func (*GetChainInfoRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetChainInfoRequest.ProtoReflect.Descriptor instead.

func (*GetChainInfoRequest) ProtoMessage

func (*GetChainInfoRequest) ProtoMessage()

func (*GetChainInfoRequest) ProtoReflect

func (x *GetChainInfoRequest) ProtoReflect() protoreflect.Message

func (*GetChainInfoRequest) Reset

func (x *GetChainInfoRequest) Reset()

func (*GetChainInfoRequest) String

func (x *GetChainInfoRequest) String() string

type GetChainInfoResponse

type GetChainInfoResponse struct {
	ChainInfo *ChainInfo `protobuf:"bytes,1,opt,name=chain_info,json=chainInfo,proto3" json:"chain_info,omitempty"`
	// contains filtered or unexported fields
}

func (*GetChainInfoResponse) Descriptor deprecated

func (*GetChainInfoResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetChainInfoResponse.ProtoReflect.Descriptor instead.

func (*GetChainInfoResponse) GetChainInfo

func (x *GetChainInfoResponse) GetChainInfo() *ChainInfo

func (*GetChainInfoResponse) ProtoMessage

func (*GetChainInfoResponse) ProtoMessage()

func (*GetChainInfoResponse) ProtoReflect

func (x *GetChainInfoResponse) ProtoReflect() protoreflect.Message

func (*GetChainInfoResponse) Reset

func (x *GetChainInfoResponse) Reset()

func (*GetChainInfoResponse) String

func (x *GetChainInfoResponse) String() string

type Hook

type Hook struct {

	// Identifies the hook for the client to invoke the correct hook.
	// It must be unique.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Indicates the command where to register the hooks.
	PlaceHookOn string `protobuf:"bytes,2,opt,name=place_hook_on,json=placeHookOn,proto3" json:"place_hook_on,omitempty"`
	// contains filtered or unexported fields
}

Hook represents a user defined action within a plugin.

func (*Hook) CommandPath

func (h *Hook) CommandPath() string

CommandPath returns the absolute command path including the binary name as prefix.

func (*Hook) Descriptor deprecated

func (*Hook) Descriptor() ([]byte, []int)

Deprecated: Use Hook.ProtoReflect.Descriptor instead.

func (*Hook) GetName

func (x *Hook) GetName() string

func (*Hook) GetPlaceHookOn

func (x *Hook) GetPlaceHookOn() string

func (*Hook) ProtoMessage

func (*Hook) ProtoMessage()

func (*Hook) ProtoReflect

func (x *Hook) ProtoReflect() protoreflect.Message

func (*Hook) Reset

func (x *Hook) Reset()

func (*Hook) String

func (x *Hook) String() string

type InterfaceServiceClient

type InterfaceServiceClient interface {
	// Manifest declares the plugin's Command(s) and Hook(s).
	Manifest(ctx context.Context, in *ManifestRequest, opts ...grpc.CallOption) (*ManifestResponse, error)
	// Execute will be invoked by ignite when a plugin Command is executed.
	// It is global for all commands declared in Manifest, if you have declared
	// multiple commands, use cmd.Path to distinguish them.
	Execute(ctx context.Context, in *ExecuteRequest, opts ...grpc.CallOption) (*ExecuteResponse, 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(ctx context.Context, in *ExecuteHookPreRequest, opts ...grpc.CallOption) (*ExecuteHookPreResponse, 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(ctx context.Context, in *ExecuteHookPostRequest, opts ...grpc.CallOption) (*ExecuteHookPostResponse, 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(ctx context.Context, in *ExecuteHookCleanUpRequest, opts ...grpc.CallOption) (*ExecuteHookCleanUpResponse, error)
}

InterfaceServiceClient is the client API for InterfaceService 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 InterfaceServiceServer

type InterfaceServiceServer interface {
	// Manifest declares the plugin's Command(s) and Hook(s).
	Manifest(context.Context, *ManifestRequest) (*ManifestResponse, error)
	// Execute will be invoked by ignite when a plugin Command is executed.
	// It is global for all commands declared in Manifest, if you have declared
	// multiple commands, use cmd.Path to distinguish them.
	Execute(context.Context, *ExecuteRequest) (*ExecuteResponse, 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, *ExecuteHookPreRequest) (*ExecuteHookPreResponse, 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, *ExecuteHookPostRequest) (*ExecuteHookPostResponse, 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, *ExecuteHookCleanUpRequest) (*ExecuteHookCleanUpResponse, error)
	// contains filtered or unexported methods
}

InterfaceServiceServer is the server API for InterfaceService service. All implementations must embed UnimplementedInterfaceServiceServer for forward compatibility

type Manifest

type Manifest struct {

	// Plugin name.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Commands contains the commands that will be added to the list of ignite commands.
	// Each commands are independent, for nested commands use the inner Commands field.
	SharedHost bool `protobuf:"varint,2,opt,name=shared_host,json=sharedHost,proto3" json:"shared_host,omitempty"`
	// Hooks contains the hooks that will be attached to the existing ignite commands.
	Commands []*Command `protobuf:"bytes,3,rep,name=commands,proto3" json:"commands,omitempty"`
	// Enables sharing a single plugin server across all running instances of a plugin.
	// Useful if a plugin adds or extends long running commands.
	//
	// Example: if a plugin defines a hook on `ignite chain serve`, a plugin server is
	// instanciated when the command is run. Now if you want to interact with that instance
	// from commands defined in that plugin, you need to enable shared host, or else the
	// commands will just instantiate separate plugin servers.
	//
	// When enabled, all plugins of the same path loaded from the same configuration will
	// attach it's RPC client to a an existing RPC server.
	//
	// If a plugin instance has no other running plugin servers, it will create one and it
	// will be the host.
	Hooks []*Hook `protobuf:"bytes,4,rep,name=hooks,proto3" json:"hooks,omitempty"`
	// contains filtered or unexported fields
}

Manifest represents the plugin behavior.

func (*Manifest) Descriptor deprecated

func (*Manifest) Descriptor() ([]byte, []int)

Deprecated: Use Manifest.ProtoReflect.Descriptor instead.

func (*Manifest) GetCommands

func (x *Manifest) GetCommands() []*Command

func (*Manifest) GetHooks

func (x *Manifest) GetHooks() []*Hook

func (*Manifest) GetName

func (x *Manifest) GetName() string

func (*Manifest) GetSharedHost

func (x *Manifest) GetSharedHost() bool

func (*Manifest) ImportCobraCommand

func (m *Manifest) ImportCobraCommand(cmd *cobra.Command, placeCommandUnder string)

ImportCobraCommand appends Cobra command definitions to the list of plugin commands. This method can be used in cases where a plugin defines the commands using Cobra.

func (*Manifest) ProtoMessage

func (*Manifest) ProtoMessage()

func (*Manifest) ProtoReflect

func (x *Manifest) ProtoReflect() protoreflect.Message

func (*Manifest) Reset

func (x *Manifest) Reset()

func (*Manifest) String

func (x *Manifest) String() string

type ManifestRequest

type ManifestRequest struct {
	// contains filtered or unexported fields
}

func (*ManifestRequest) Descriptor deprecated

func (*ManifestRequest) Descriptor() ([]byte, []int)

Deprecated: Use ManifestRequest.ProtoReflect.Descriptor instead.

func (*ManifestRequest) ProtoMessage

func (*ManifestRequest) ProtoMessage()

func (*ManifestRequest) ProtoReflect

func (x *ManifestRequest) ProtoReflect() protoreflect.Message

func (*ManifestRequest) Reset

func (x *ManifestRequest) Reset()

func (*ManifestRequest) String

func (x *ManifestRequest) String() string

type ManifestResponse

type ManifestResponse struct {
	Manifest *Manifest `protobuf:"bytes,1,opt,name=manifest,proto3" json:"manifest,omitempty"`
	// contains filtered or unexported fields
}

func (*ManifestResponse) Descriptor deprecated

func (*ManifestResponse) Descriptor() ([]byte, []int)

Deprecated: Use ManifestResponse.ProtoReflect.Descriptor instead.

func (*ManifestResponse) GetManifest

func (x *ManifestResponse) GetManifest() *Manifest

func (*ManifestResponse) ProtoMessage

func (*ManifestResponse) ProtoMessage()

func (*ManifestResponse) ProtoReflect

func (x *ManifestResponse) ProtoReflect() protoreflect.Message

func (*ManifestResponse) Reset

func (x *ManifestResponse) Reset()

func (*ManifestResponse) String

func (x *ManifestResponse) String() string

type UnimplementedClientAPIServiceServer

type UnimplementedClientAPIServiceServer struct {
}

UnimplementedClientAPIServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedClientAPIServiceServer) GetChainInfo

type UnimplementedInterfaceServiceServer

type UnimplementedInterfaceServiceServer struct {
}

UnimplementedInterfaceServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedInterfaceServiceServer) Execute

func (UnimplementedInterfaceServiceServer) ExecuteHookCleanUp

func (UnimplementedInterfaceServiceServer) ExecuteHookPost

func (UnimplementedInterfaceServiceServer) ExecuteHookPre

func (UnimplementedInterfaceServiceServer) Manifest

type UnsafeClientAPIServiceServer

type UnsafeClientAPIServiceServer interface {
	// contains filtered or unexported methods
}

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 UnsafeInterfaceServiceServer

type UnsafeInterfaceServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeInterfaceServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to InterfaceServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL