Documentation ¶
Index ¶
- Variables
- func RegisterPluginHelperServer(s grpc.ServiceRegistrar, srv PluginHelperServer)
- func RegisterPluginServer(s grpc.ServiceRegistrar, srv PluginServer)
- type Empty
- type Error
- type ErrorCode
- type EvalRequest
- type EvalResponse
- type PluginClient
- type PluginHelperClient
- type PluginHelperServer
- type PluginServer
- type UnimplementedPluginHelperServer
- type UnimplementedPluginServer
- type UnsafePluginHelperServer
- type UnsafePluginServer
Constants ¶
This section is empty.
Variables ¶
var ( ErrorCode_name = map[int32]string{ 0: "OK", } ErrorCode_value = map[string]int32{ "OK": 0, } )
Enum value maps for ErrorCode.
var File_plugin_proto protoreflect.FileDescriptor
var PluginHelper_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.PluginHelper", HandlerType: (*PluginHelperServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Eval", Handler: _PluginHelper_Eval_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "plugin.proto", }
PluginHelper_ServiceDesc is the grpc.ServiceDesc for PluginHelper service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var Plugin_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.Plugin", HandlerType: (*PluginServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Enable", Handler: _Plugin_Enable_Handler, }, { MethodName: "Disable", Handler: _Plugin_Disable_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "plugin.proto", }
Plugin_ServiceDesc is the grpc.ServiceDesc for Plugin service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPluginHelperServer ¶
func RegisterPluginHelperServer(s grpc.ServiceRegistrar, srv PluginHelperServer)
func RegisterPluginServer ¶
func RegisterPluginServer(s grpc.ServiceRegistrar, srv PluginServer)
Types ¶
type Empty ¶
type Empty struct { Helper uint32 `protobuf:"varint,1,opt,name=helper,proto3" json:"helper,omitempty"` // contains filtered or unexported fields }
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type Error ¶
type Error struct { Code ErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=proto.ErrorCode" json:"code,omitempty"` // contains filtered or unexported fields }
func (*Error) Descriptor
deprecated
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) ProtoReflect ¶
func (x *Error) ProtoReflect() protoreflect.Message
type ErrorCode ¶
type ErrorCode int32
const (
ErrorCode_OK ErrorCode = 0
)
func (ErrorCode) Descriptor ¶
func (ErrorCode) Descriptor() protoreflect.EnumDescriptor
func (ErrorCode) EnumDescriptor
deprecated
func (ErrorCode) Number ¶
func (x ErrorCode) Number() protoreflect.EnumNumber
func (ErrorCode) Type ¶
func (ErrorCode) Type() protoreflect.EnumType
type EvalRequest ¶
type EvalRequest struct { Str string `protobuf:"bytes,1,opt,name=str,proto3" json:"str,omitempty"` // eval str // contains filtered or unexported fields }
func (*EvalRequest) Descriptor
deprecated
func (*EvalRequest) Descriptor() ([]byte, []int)
Deprecated: Use EvalRequest.ProtoReflect.Descriptor instead.
func (*EvalRequest) GetStr ¶
func (x *EvalRequest) GetStr() string
func (*EvalRequest) ProtoMessage ¶
func (*EvalRequest) ProtoMessage()
func (*EvalRequest) ProtoReflect ¶
func (x *EvalRequest) ProtoReflect() protoreflect.Message
func (*EvalRequest) Reset ¶
func (x *EvalRequest) Reset()
func (*EvalRequest) String ¶
func (x *EvalRequest) String() string
type EvalResponse ¶
type EvalResponse struct { Ret string `protobuf:"bytes,1,opt,name=ret,proto3" json:"ret,omitempty"` // return value // contains filtered or unexported fields }
func (*EvalResponse) Descriptor
deprecated
func (*EvalResponse) Descriptor() ([]byte, []int)
Deprecated: Use EvalResponse.ProtoReflect.Descriptor instead.
func (*EvalResponse) GetRet ¶
func (x *EvalResponse) GetRet() string
func (*EvalResponse) ProtoMessage ¶
func (*EvalResponse) ProtoMessage()
func (*EvalResponse) ProtoReflect ¶
func (x *EvalResponse) ProtoReflect() protoreflect.Message
func (*EvalResponse) Reset ¶
func (x *EvalResponse) Reset()
func (*EvalResponse) String ¶
func (x *EvalResponse) String() string
type PluginClient ¶
type PluginClient interface { Enable(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Error, error) Disable(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Error, error) }
PluginClient is the client API for Plugin 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.
func NewPluginClient ¶
func NewPluginClient(cc grpc.ClientConnInterface) PluginClient
type PluginHelperClient ¶
type PluginHelperClient interface {
Eval(ctx context.Context, in *EvalRequest, opts ...grpc.CallOption) (*EvalResponse, error)
}
PluginHelperClient is the client API for PluginHelper 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.
func NewPluginHelperClient ¶
func NewPluginHelperClient(cc grpc.ClientConnInterface) PluginHelperClient
type PluginHelperServer ¶
type PluginHelperServer interface { Eval(context.Context, *EvalRequest) (*EvalResponse, error) // contains filtered or unexported methods }
PluginHelperServer is the server API for PluginHelper service. All implementations must embed UnimplementedPluginHelperServer for forward compatibility
type PluginServer ¶
type PluginServer interface { Enable(context.Context, *Empty) (*Error, error) Disable(context.Context, *Empty) (*Error, error) // contains filtered or unexported methods }
PluginServer is the server API for Plugin service. All implementations must embed UnimplementedPluginServer for forward compatibility
type UnimplementedPluginHelperServer ¶
type UnimplementedPluginHelperServer struct { }
UnimplementedPluginHelperServer must be embedded to have forward compatible implementations.
func (UnimplementedPluginHelperServer) Eval ¶
func (UnimplementedPluginHelperServer) Eval(context.Context, *EvalRequest) (*EvalResponse, error)
type UnimplementedPluginServer ¶
type UnimplementedPluginServer struct { }
UnimplementedPluginServer must be embedded to have forward compatible implementations.
type UnsafePluginHelperServer ¶
type UnsafePluginHelperServer interface {
// contains filtered or unexported methods
}
UnsafePluginHelperServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PluginHelperServer will result in compilation errors.
type UnsafePluginServer ¶
type UnsafePluginServer interface {
// contains filtered or unexported methods
}
UnsafePluginServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PluginServer will result in compilation errors.