proto

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2025 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_plugin_proto protoreflect.FileDescriptor

Functions

func RegisterPluginServer

func RegisterPluginServer(s *grpc.Server, srv PluginServer)

Types

type ExecuteFunctionRequest

type ExecuteFunctionRequest struct {

	// name identifies the function to call.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// arguments contains the arguments to the function, msgpack encoded.
	Arguments [][]byte `protobuf:"bytes,2,rep,name=arguments,proto3" json:"arguments,omitempty"`
	// contains filtered or unexported fields
}

ExecuteFunctionRequest is the message body for the ExecuteFunction RPC.

func (*ExecuteFunctionRequest) Descriptor deprecated

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

Deprecated: Use ExecuteFunctionRequest.ProtoReflect.Descriptor instead.

func (*ExecuteFunctionRequest) GetArguments

func (x *ExecuteFunctionRequest) GetArguments() [][]byte

func (*ExecuteFunctionRequest) GetName

func (x *ExecuteFunctionRequest) GetName() string

func (*ExecuteFunctionRequest) ProtoMessage

func (*ExecuteFunctionRequest) ProtoMessage()

func (*ExecuteFunctionRequest) ProtoReflect

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

func (*ExecuteFunctionRequest) Reset

func (x *ExecuteFunctionRequest) Reset()

func (*ExecuteFunctionRequest) String

func (x *ExecuteFunctionRequest) String() string

type ExecuteFunctionResponse

type ExecuteFunctionResponse struct {

	// result is the result of the function call, msgpack encoded.
	Result []byte `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

ExecuteFunctionResponse is the response body for the ExecuteFunction RPC.

func (*ExecuteFunctionResponse) Descriptor deprecated

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

Deprecated: Use ExecuteFunctionResponse.ProtoReflect.Descriptor instead.

func (*ExecuteFunctionResponse) GetResult

func (x *ExecuteFunctionResponse) GetResult() []byte

func (*ExecuteFunctionResponse) ProtoMessage

func (*ExecuteFunctionResponse) ProtoMessage()

func (*ExecuteFunctionResponse) ProtoReflect

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

func (*ExecuteFunctionResponse) Reset

func (x *ExecuteFunctionResponse) Reset()

func (*ExecuteFunctionResponse) String

func (x *ExecuteFunctionResponse) String() string

type Function

type Function struct {

	// The supported parameters of the function.
	Parameters        []*FunctionParameter `protobuf:"bytes,1,rep,name=parameters,proto3" json:"parameters,omitempty"`
	VariadicParameter *FunctionParameter   `protobuf:"bytes,2,opt,name=variadic_parameter,json=variadicParameter,proto3" json:"variadic_parameter,omitempty"`
	// The return type of the function, json encoded.
	ReturnType      []byte `protobuf:"bytes,3,opt,name=return_type,json=returnType,proto3" json:"return_type,omitempty"`
	Description     string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	DescriptionKind string `protobuf:"bytes,5,opt,name=description_kind,json=descriptionKind,proto3" json:"description_kind,omitempty"`
	// contains filtered or unexported fields
}

Function provides the definition of a function as it transfers via RPC.

func FromCtyFunction

func FromCtyFunction(fn function.Function) (*Function, error)

func (*Function) Descriptor deprecated

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

Deprecated: Use Function.ProtoReflect.Descriptor instead.

func (*Function) GetDescription

func (x *Function) GetDescription() string

func (*Function) GetDescriptionKind

func (x *Function) GetDescriptionKind() string

func (*Function) GetParameters

func (x *Function) GetParameters() []*FunctionParameter

func (*Function) GetReturnType

func (x *Function) GetReturnType() []byte

func (*Function) GetVariadicParameter

func (x *Function) GetVariadicParameter() *FunctionParameter

func (*Function) ProtoMessage

func (*Function) ProtoMessage()

func (*Function) ProtoReflect

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

func (*Function) Reset

func (x *Function) Reset()

func (*Function) String

func (x *Function) String() string

type FunctionParameter

type FunctionParameter struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The type of the parameter, json encoded.
	Type         []byte `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	Description  string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	AllowNull    bool   `protobuf:"varint,4,opt,name=allow_null,json=allowNull,proto3" json:"allow_null,omitempty"`
	AllowUnknown bool   `protobuf:"varint,5,opt,name=allow_unknown,json=allowUnknown,proto3" json:"allow_unknown,omitempty"`
	AllowDynamic bool   `protobuf:"varint,6,opt,name=allow_dynamic,json=allowDynamic,proto3" json:"allow_dynamic,omitempty"`
	AllowMarked  bool   `protobuf:"varint,7,opt,name=allow_marked,json=allowMarked,proto3" json:"allow_marked,omitempty"`
	// contains filtered or unexported fields
}

FunctionParameter provides the definition of a function parameter as it transfers via rpc.

func FromCtyParameter

func FromCtyParameter(parameter function.Parameter) (*FunctionParameter, error)

func (*FunctionParameter) Descriptor deprecated

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

Deprecated: Use FunctionParameter.ProtoReflect.Descriptor instead.

func (*FunctionParameter) GetAllowDynamic

func (x *FunctionParameter) GetAllowDynamic() bool

func (*FunctionParameter) GetAllowMarked

func (x *FunctionParameter) GetAllowMarked() bool

func (*FunctionParameter) GetAllowNull

func (x *FunctionParameter) GetAllowNull() bool

func (*FunctionParameter) GetAllowUnknown

func (x *FunctionParameter) GetAllowUnknown() bool

func (*FunctionParameter) GetDescription

func (x *FunctionParameter) GetDescription() string

func (*FunctionParameter) GetName

func (x *FunctionParameter) GetName() string

func (*FunctionParameter) GetType

func (x *FunctionParameter) GetType() []byte

func (*FunctionParameter) ProtoMessage

func (*FunctionParameter) ProtoMessage()

func (*FunctionParameter) ProtoReflect

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

func (*FunctionParameter) Reset

func (x *FunctionParameter) Reset()

func (*FunctionParameter) String

func (x *FunctionParameter) String() string

func (*FunctionParameter) ToCtyParameter

func (parameter *FunctionParameter) ToCtyParameter() (function.Parameter, error)

type ListFunctionsRequest

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

ListFunctionsRequest is the message body for the ListFunctions RPC.

func (*ListFunctionsRequest) Descriptor deprecated

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

Deprecated: Use ListFunctionsRequest.ProtoReflect.Descriptor instead.

func (*ListFunctionsRequest) ProtoMessage

func (*ListFunctionsRequest) ProtoMessage()

func (*ListFunctionsRequest) ProtoReflect

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

func (*ListFunctionsRequest) Reset

func (x *ListFunctionsRequest) Reset()

func (*ListFunctionsRequest) String

func (x *ListFunctionsRequest) String() string

type ListFunctionsResponse

type ListFunctionsResponse struct {

	// functions is a list of functions that are available in the plugin.
	Functions map[string]*Function `` /* 159-byte string literal not displayed */
	// contains filtered or unexported fields
}

ListFunctionsResponse is the response body for the ListFunctions RPC.

func (*ListFunctionsResponse) Descriptor deprecated

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

Deprecated: Use ListFunctionsResponse.ProtoReflect.Descriptor instead.

func (*ListFunctionsResponse) GetFunctions

func (x *ListFunctionsResponse) GetFunctions() map[string]*Function

func (*ListFunctionsResponse) ProtoMessage

func (*ListFunctionsResponse) ProtoMessage()

func (*ListFunctionsResponse) ProtoReflect

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

func (*ListFunctionsResponse) Reset

func (x *ListFunctionsResponse) Reset()

func (*ListFunctionsResponse) String

func (x *ListFunctionsResponse) String() string

type PluginClient

type PluginClient interface {
	Setup(ctx context.Context, in *PluginSetupRequest, opts ...grpc.CallOption) (*PluginSetupResponse, error)
	// ListFunctions will list all the functions that are available in the plugin.
	ListFunctions(ctx context.Context, in *ListFunctionsRequest, opts ...grpc.CallOption) (*ListFunctionsResponse, error)
	// ExecuteFunction will execute a function in the plugin.
	ExecuteFunction(ctx context.Context, in *ExecuteFunctionRequest, opts ...grpc.CallOption) (*ExecuteFunctionResponse, error)
}

PluginClient is the client API for Plugin service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewPluginClient

func NewPluginClient(cc grpc.ClientConnInterface) PluginClient

type PluginServer

type PluginServer interface {
	Setup(context.Context, *PluginSetupRequest) (*PluginSetupResponse, error)
	// ListFunctions will list all the functions that are available in the plugin.
	ListFunctions(context.Context, *ListFunctionsRequest) (*ListFunctionsResponse, error)
	// ExecuteFunction will execute a function in the plugin.
	ExecuteFunction(context.Context, *ExecuteFunctionRequest) (*ExecuteFunctionResponse, error)
}

PluginServer is the server API for Plugin service.

type PluginSetupRequest

type PluginSetupRequest struct {

	// client_capabilities should be populated by the client to indicate which
	// behaviours the client is aware of.
	ClientCapabilities *PluginSetupRequest_ClientCapabilities `protobuf:"bytes,1,opt,name=client_capabilities,json=clientCapabilities,proto3" json:"client_capabilities,omitempty"`
	// contains filtered or unexported fields
}

func (*PluginSetupRequest) Descriptor deprecated

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

Deprecated: Use PluginSetupRequest.ProtoReflect.Descriptor instead.

func (*PluginSetupRequest) GetClientCapabilities

func (x *PluginSetupRequest) GetClientCapabilities() *PluginSetupRequest_ClientCapabilities

func (*PluginSetupRequest) ProtoMessage

func (*PluginSetupRequest) ProtoMessage()

func (*PluginSetupRequest) ProtoReflect

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

func (*PluginSetupRequest) Reset

func (x *PluginSetupRequest) Reset()

func (*PluginSetupRequest) String

func (x *PluginSetupRequest) String() string

type PluginSetupRequest_ClientCapabilities

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

client_capabilities should be populated by the client to indicate which behaviours the client is aware of.

func (*PluginSetupRequest_ClientCapabilities) Descriptor deprecated

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

Deprecated: Use PluginSetupRequest_ClientCapabilities.ProtoReflect.Descriptor instead.

func (*PluginSetupRequest_ClientCapabilities) ProtoMessage

func (*PluginSetupRequest_ClientCapabilities) ProtoMessage()

func (*PluginSetupRequest_ClientCapabilities) ProtoReflect

func (*PluginSetupRequest_ClientCapabilities) Reset

func (*PluginSetupRequest_ClientCapabilities) String

type PluginSetupResponse

type PluginSetupResponse struct {

	// server_capabilities will be populated by the server to indicate which
	// behaviours the client should expect from the server.
	ServerCapabilities *PluginSetupResponse_ServerCapabilities `protobuf:"bytes,1,opt,name=server_capabilities,json=serverCapabilities,proto3" json:"server_capabilities,omitempty"`
	// contains filtered or unexported fields
}

func (*PluginSetupResponse) Descriptor deprecated

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

Deprecated: Use PluginSetupResponse.ProtoReflect.Descriptor instead.

func (*PluginSetupResponse) GetServerCapabilities

func (x *PluginSetupResponse) GetServerCapabilities() *PluginSetupResponse_ServerCapabilities

func (*PluginSetupResponse) ProtoMessage

func (*PluginSetupResponse) ProtoMessage()

func (*PluginSetupResponse) ProtoReflect

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

func (*PluginSetupResponse) Reset

func (x *PluginSetupResponse) Reset()

func (*PluginSetupResponse) String

func (x *PluginSetupResponse) String() string

type PluginSetupResponse_ServerCapabilities

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

server_capabilities will be populated by the server to indicate which behaviours the client should expect from the server.

func (*PluginSetupResponse_ServerCapabilities) Descriptor deprecated

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

Deprecated: Use PluginSetupResponse_ServerCapabilities.ProtoReflect.Descriptor instead.

func (*PluginSetupResponse_ServerCapabilities) ProtoMessage

func (*PluginSetupResponse_ServerCapabilities) ProtoReflect

func (*PluginSetupResponse_ServerCapabilities) Reset

func (*PluginSetupResponse_ServerCapabilities) String

type UnimplementedPluginServer

type UnimplementedPluginServer struct {
}

UnimplementedPluginServer can be embedded to have forward compatible implementations.

func (*UnimplementedPluginServer) ExecuteFunction

func (*UnimplementedPluginServer) ListFunctions

func (*UnimplementedPluginServer) Setup

Jump to

Keyboard shortcuts

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