Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterToolServer(s grpc.ServiceRegistrar, srv ToolServer)
- type Client
- type Definition
- func (*Definition) Descriptor() ([]byte, []int)deprecated
- func (x *Definition) GetDescription() string
- func (x *Definition) GetName() string
- func (x *Definition) GetSchema() string
- func (*Definition) ProtoMessage()
- func (x *Definition) ProtoReflect() protoreflect.Message
- func (x *Definition) Reset()
- func (x *Definition) String() string
- type ExecuteRequest
- type InfoRequest
- type Option
- type Result
- type ToolClient
- type ToolServer
- type UnimplementedToolServer
- type UnsafeToolServer
Constants ¶
const ( Tool_Info_FullMethodName = "/tool.Tool/Info" Tool_Execute_FullMethodName = "/tool.Tool/Execute" )
Variables ¶
var File_tool_proto protoreflect.FileDescriptor
var Tool_ServiceDesc = grpc.ServiceDesc{ ServiceName: "tool.Tool", HandlerType: (*ToolServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Info", Handler: _Tool_Info_Handler, }, { MethodName: "Execute", Handler: _Tool_Execute_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "tool.proto", }
Tool_ServiceDesc is the grpc.ServiceDesc for Tool service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterToolServer ¶
func RegisterToolServer(s grpc.ServiceRegistrar, srv ToolServer)
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Description ¶
func (*Client) Parameters ¶
func (c *Client) Parameters() jsonschema.Definition
type Definition ¶
type Definition struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` Schema string `protobuf:"bytes,3,opt,name=schema,proto3" json:"schema,omitempty"` // contains filtered or unexported fields }
func (*Definition) Descriptor
deprecated
func (*Definition) Descriptor() ([]byte, []int)
Deprecated: Use Definition.ProtoReflect.Descriptor instead.
func (*Definition) GetDescription ¶
func (x *Definition) GetDescription() string
func (*Definition) GetName ¶
func (x *Definition) GetName() string
func (*Definition) GetSchema ¶
func (x *Definition) GetSchema() string
func (*Definition) ProtoMessage ¶
func (*Definition) ProtoMessage()
func (*Definition) ProtoReflect ¶
func (x *Definition) ProtoReflect() protoreflect.Message
func (*Definition) Reset ¶
func (x *Definition) Reset()
func (*Definition) String ¶
func (x *Definition) String() string
type ExecuteRequest ¶
type ExecuteRequest struct { Parameter string `protobuf:"bytes,1,opt,name=parameter,proto3" json:"parameter,omitempty"` // contains filtered or unexported fields }
func (*ExecuteRequest) Descriptor
deprecated
func (*ExecuteRequest) Descriptor() ([]byte, []int)
Deprecated: Use ExecuteRequest.ProtoReflect.Descriptor instead.
func (*ExecuteRequest) GetParameter ¶
func (x *ExecuteRequest) GetParameter() string
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 InfoRequest ¶
type InfoRequest struct {
// contains filtered or unexported fields
}
func (*InfoRequest) Descriptor
deprecated
func (*InfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use InfoRequest.ProtoReflect.Descriptor instead.
func (*InfoRequest) ProtoMessage ¶
func (*InfoRequest) ProtoMessage()
func (*InfoRequest) ProtoReflect ¶
func (x *InfoRequest) ProtoReflect() protoreflect.Message
func (*InfoRequest) Reset ¶
func (x *InfoRequest) Reset()
func (*InfoRequest) String ¶
func (x *InfoRequest) String() string
type Result ¶
type Result struct { Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` // contains filtered or unexported fields }
func (*Result) Descriptor
deprecated
func (*Result) GetContent ¶
func (*Result) ProtoMessage ¶
func (*Result) ProtoMessage()
func (*Result) ProtoReflect ¶
func (x *Result) ProtoReflect() protoreflect.Message
type ToolClient ¶
type ToolClient interface { Info(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*Definition, error) Execute(ctx context.Context, in *ExecuteRequest, opts ...grpc.CallOption) (*Result, error) }
ToolClient is the client API for Tool 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 NewToolClient ¶
func NewToolClient(cc grpc.ClientConnInterface) ToolClient
type ToolServer ¶
type ToolServer interface { Info(context.Context, *InfoRequest) (*Definition, error) Execute(context.Context, *ExecuteRequest) (*Result, error) // contains filtered or unexported methods }
ToolServer is the server API for Tool service. All implementations must embed UnimplementedToolServer for forward compatibility
type UnimplementedToolServer ¶
type UnimplementedToolServer struct { }
UnimplementedToolServer must be embedded to have forward compatible implementations.
func (UnimplementedToolServer) Execute ¶
func (UnimplementedToolServer) Execute(context.Context, *ExecuteRequest) (*Result, error)
func (UnimplementedToolServer) Info ¶
func (UnimplementedToolServer) Info(context.Context, *InfoRequest) (*Definition, error)
type UnsafeToolServer ¶
type UnsafeToolServer interface {
// contains filtered or unexported methods
}
UnsafeToolServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ToolServer will result in compilation errors.