Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterPluginServiceServer(s grpc.ServiceRegistrar, srv PluginServiceServer)
- type BinaryImage
- func (*BinaryImage) Descriptor() ([]byte, []int)deprecated
- func (x *BinaryImage) GetData() []byte
- func (x *BinaryImage) GetMimeType() string
- func (*BinaryImage) ProtoMessage()
- func (x *BinaryImage) ProtoReflect() protoreflect.Message
- func (x *BinaryImage) Reset()
- func (x *BinaryImage) String() string
- type DescriptionResponse
- func (*DescriptionResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DescriptionResponse) GetDescription() string
- func (*DescriptionResponse) ProtoMessage()
- func (x *DescriptionResponse) ProtoReflect() protoreflect.Message
- func (x *DescriptionResponse) Reset()
- func (x *DescriptionResponse) String() string
- type ExecuteRequest
- func (*ExecuteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ExecuteRequest) GetCtxmeta() *structpb.Struct
- func (x *ExecuteRequest) GetParameters() *structpb.Struct
- func (*ExecuteRequest) ProtoMessage()
- func (x *ExecuteRequest) ProtoReflect() protoreflect.Message
- func (x *ExecuteRequest) Reset()
- func (x *ExecuteRequest) String() string
- type ExecuteResponse
- func (*ExecuteResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ExecuteResponse) GetImageParts() []*ImagePart
- func (x *ExecuteResponse) GetResult() string
- func (x *ExecuteResponse) GetStructuredContent() *structpb.Struct
- func (*ExecuteResponse) ProtoMessage()
- func (x *ExecuteResponse) ProtoReflect() protoreflect.Message
- func (x *ExecuteResponse) Reset()
- func (x *ExecuteResponse) String() string
- type ImagePart
- func (*ImagePart) Descriptor() ([]byte, []int)deprecated
- func (x *ImagePart) GetBinary() *BinaryImage
- func (x *ImagePart) GetContent() isImagePart_Content
- func (x *ImagePart) GetImageUrl() *ImageURL
- func (*ImagePart) ProtoMessage()
- func (x *ImagePart) ProtoReflect() protoreflect.Message
- func (x *ImagePart) Reset()
- func (x *ImagePart) String() string
- type ImagePart_Binary
- type ImagePart_ImageUrl
- type ImageURL
- type NameResponse
- type PluginServiceClient
- type PluginServiceServer
- type PropertiesResponse
- func (*PropertiesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PropertiesResponse) GetProperties() []*ToolProperty
- func (*PropertiesResponse) ProtoMessage()
- func (x *PropertiesResponse) ProtoReflect() protoreflect.Message
- func (x *PropertiesResponse) Reset()
- func (x *PropertiesResponse) String() string
- type ToolProperty
- func (*ToolProperty) Descriptor() ([]byte, []int)deprecated
- func (x *ToolProperty) GetDescription() string
- func (x *ToolProperty) GetItems() *ToolProperty
- func (x *ToolProperty) GetName() string
- func (x *ToolProperty) GetProperties() []*ToolProperty
- func (x *ToolProperty) GetRequired() bool
- func (x *ToolProperty) GetType() string
- func (*ToolProperty) ProtoMessage()
- func (x *ToolProperty) ProtoReflect() protoreflect.Message
- func (x *ToolProperty) Reset()
- func (x *ToolProperty) String() string
- type UnimplementedPluginServiceServer
- func (UnimplementedPluginServiceServer) Description(context.Context, *emptypb.Empty) (*DescriptionResponse, error)
- func (UnimplementedPluginServiceServer) Execute(context.Context, *ExecuteRequest) (*ExecuteResponse, error)
- func (UnimplementedPluginServiceServer) Init(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
- func (UnimplementedPluginServiceServer) Name(context.Context, *emptypb.Empty) (*NameResponse, error)
- func (UnimplementedPluginServiceServer) Ping(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
- func (UnimplementedPluginServiceServer) Properties(context.Context, *emptypb.Empty) (*PropertiesResponse, error)
- type UnsafePluginServiceServer
Constants ¶
const ( PluginService_Init_FullMethodName = "/plugin.PluginService/Init" PluginService_Name_FullMethodName = "/plugin.PluginService/Name" PluginService_Description_FullMethodName = "/plugin.PluginService/Description" PluginService_Properties_FullMethodName = "/plugin.PluginService/Properties" PluginService_Execute_FullMethodName = "/plugin.PluginService/Execute" PluginService_Ping_FullMethodName = "/plugin.PluginService/Ping" )
Variables ¶
var File_agent_toolplugin_pb_plugin_proto protoreflect.FileDescriptor
var PluginService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "plugin.PluginService", HandlerType: (*PluginServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Init", Handler: _PluginService_Init_Handler, }, { MethodName: "Name", Handler: _PluginService_Name_Handler, }, { MethodName: "Description", Handler: _PluginService_Description_Handler, }, { MethodName: "Properties", Handler: _PluginService_Properties_Handler, }, { MethodName: "Execute", Handler: _PluginService_Execute_Handler, }, { MethodName: "Ping", Handler: _PluginService_Ping_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "agent/toolplugin/pb/plugin.proto", }
PluginService_ServiceDesc is the grpc.ServiceDesc for PluginService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPluginServiceServer ¶
func RegisterPluginServiceServer(s grpc.ServiceRegistrar, srv PluginServiceServer)
Types ¶
type BinaryImage ¶
type BinaryImage struct {
MimeType string `protobuf:"bytes,1,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"` // image/png, image/jpeg, image/webp
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
// contains filtered or unexported fields
}
func (*BinaryImage) Descriptor
deprecated
func (*BinaryImage) Descriptor() ([]byte, []int)
Deprecated: Use BinaryImage.ProtoReflect.Descriptor instead.
func (*BinaryImage) GetData ¶
func (x *BinaryImage) GetData() []byte
func (*BinaryImage) GetMimeType ¶
func (x *BinaryImage) GetMimeType() string
func (*BinaryImage) ProtoMessage ¶
func (*BinaryImage) ProtoMessage()
func (*BinaryImage) ProtoReflect ¶
func (x *BinaryImage) ProtoReflect() protoreflect.Message
func (*BinaryImage) Reset ¶
func (x *BinaryImage) Reset()
func (*BinaryImage) String ¶
func (x *BinaryImage) String() string
type DescriptionResponse ¶
type DescriptionResponse struct {
Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
// contains filtered or unexported fields
}
func (*DescriptionResponse) Descriptor
deprecated
func (*DescriptionResponse) Descriptor() ([]byte, []int)
Deprecated: Use DescriptionResponse.ProtoReflect.Descriptor instead.
func (*DescriptionResponse) GetDescription ¶
func (x *DescriptionResponse) GetDescription() string
func (*DescriptionResponse) ProtoMessage ¶
func (*DescriptionResponse) ProtoMessage()
func (*DescriptionResponse) ProtoReflect ¶
func (x *DescriptionResponse) ProtoReflect() protoreflect.Message
func (*DescriptionResponse) Reset ¶
func (x *DescriptionResponse) Reset()
func (*DescriptionResponse) String ¶
func (x *DescriptionResponse) String() string
type ExecuteRequest ¶
type ExecuteRequest struct {
Ctxmeta *structpb.Struct `protobuf:"bytes,1,opt,name=ctxmeta,proto3" json:"ctxmeta,omitempty"`
Parameters *structpb.Struct `protobuf:"bytes,2,opt,name=parameters,proto3" json:"parameters,omitempty"`
// contains filtered or unexported fields
}
func (*ExecuteRequest) Descriptor
deprecated
func (*ExecuteRequest) Descriptor() ([]byte, []int)
Deprecated: Use ExecuteRequest.ProtoReflect.Descriptor instead.
func (*ExecuteRequest) GetCtxmeta ¶
func (x *ExecuteRequest) GetCtxmeta() *structpb.Struct
func (*ExecuteRequest) GetParameters ¶
func (x *ExecuteRequest) GetParameters() *structpb.Struct
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 {
Result string `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
StructuredContent *structpb.Struct `protobuf:"bytes,2,opt,name=structured_content,json=structuredContent,proto3" json:"structured_content,omitempty"`
ImageParts []*ImagePart `protobuf:"bytes,3,rep,name=image_parts,json=imageParts,proto3" json:"image_parts,omitempty"`
// contains filtered or unexported fields
}
func (*ExecuteResponse) Descriptor
deprecated
func (*ExecuteResponse) Descriptor() ([]byte, []int)
Deprecated: Use ExecuteResponse.ProtoReflect.Descriptor instead.
func (*ExecuteResponse) GetImageParts ¶
func (x *ExecuteResponse) GetImageParts() []*ImagePart
func (*ExecuteResponse) GetResult ¶
func (x *ExecuteResponse) GetResult() string
func (*ExecuteResponse) GetStructuredContent ¶
func (x *ExecuteResponse) GetStructuredContent() *structpb.Struct
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 ImagePart ¶
type ImagePart struct {
// Types that are valid to be assigned to Content:
//
// *ImagePart_ImageUrl
// *ImagePart_Binary
Content isImagePart_Content `protobuf_oneof:"content"`
// contains filtered or unexported fields
}
func (*ImagePart) Descriptor
deprecated
func (*ImagePart) GetBinary ¶
func (x *ImagePart) GetBinary() *BinaryImage
func (*ImagePart) GetContent ¶
func (x *ImagePart) GetContent() isImagePart_Content
func (*ImagePart) GetImageUrl ¶
func (*ImagePart) ProtoMessage ¶
func (*ImagePart) ProtoMessage()
func (*ImagePart) ProtoReflect ¶
func (x *ImagePart) ProtoReflect() protoreflect.Message
type ImagePart_Binary ¶
type ImagePart_Binary struct {
Binary *BinaryImage `protobuf:"bytes,2,opt,name=binary,proto3,oneof"`
}
type ImagePart_ImageUrl ¶
type ImagePart_ImageUrl struct {
ImageUrl *ImageURL `protobuf:"bytes,1,opt,name=image_url,json=imageUrl,proto3,oneof"`
}
type ImageURL ¶
type ImageURL struct {
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
Detail string `protobuf:"bytes,2,opt,name=detail,proto3" json:"detail,omitempty"`
// contains filtered or unexported fields
}
func (*ImageURL) Descriptor
deprecated
func (*ImageURL) ProtoMessage ¶
func (*ImageURL) ProtoMessage()
func (*ImageURL) ProtoReflect ¶
func (x *ImageURL) ProtoReflect() protoreflect.Message
type NameResponse ¶
type NameResponse struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}
func (*NameResponse) Descriptor
deprecated
func (*NameResponse) Descriptor() ([]byte, []int)
Deprecated: Use NameResponse.ProtoReflect.Descriptor instead.
func (*NameResponse) GetName ¶
func (x *NameResponse) GetName() string
func (*NameResponse) ProtoMessage ¶
func (*NameResponse) ProtoMessage()
func (*NameResponse) ProtoReflect ¶
func (x *NameResponse) ProtoReflect() protoreflect.Message
func (*NameResponse) Reset ¶
func (x *NameResponse) Reset()
func (*NameResponse) String ¶
func (x *NameResponse) String() string
type PluginServiceClient ¶
type PluginServiceClient interface {
Init(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
Name(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*NameResponse, error)
Description(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*DescriptionResponse, error)
Properties(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PropertiesResponse, error)
Execute(ctx context.Context, in *ExecuteRequest, opts ...grpc.CallOption) (*ExecuteResponse, error)
Ping(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
PluginServiceClient is the client API for PluginService 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 NewPluginServiceClient ¶
func NewPluginServiceClient(cc grpc.ClientConnInterface) PluginServiceClient
type PluginServiceServer ¶
type PluginServiceServer interface {
Init(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
Name(context.Context, *emptypb.Empty) (*NameResponse, error)
Description(context.Context, *emptypb.Empty) (*DescriptionResponse, error)
Properties(context.Context, *emptypb.Empty) (*PropertiesResponse, error)
Execute(context.Context, *ExecuteRequest) (*ExecuteResponse, error)
Ping(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
// contains filtered or unexported methods
}
PluginServiceServer is the server API for PluginService service. All implementations must embed UnimplementedPluginServiceServer for forward compatibility.
type PropertiesResponse ¶
type PropertiesResponse struct {
Properties []*ToolProperty `protobuf:"bytes,1,rep,name=properties,proto3" json:"properties,omitempty"`
// contains filtered or unexported fields
}
func (*PropertiesResponse) Descriptor
deprecated
func (*PropertiesResponse) Descriptor() ([]byte, []int)
Deprecated: Use PropertiesResponse.ProtoReflect.Descriptor instead.
func (*PropertiesResponse) GetProperties ¶
func (x *PropertiesResponse) GetProperties() []*ToolProperty
func (*PropertiesResponse) ProtoMessage ¶
func (*PropertiesResponse) ProtoMessage()
func (*PropertiesResponse) ProtoReflect ¶
func (x *PropertiesResponse) ProtoReflect() protoreflect.Message
func (*PropertiesResponse) Reset ¶
func (x *PropertiesResponse) Reset()
func (*PropertiesResponse) String ¶
func (x *PropertiesResponse) String() string
type ToolProperty ¶
type ToolProperty struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` // JSON Schema type: string, integer, boolean, array, object
Required bool `protobuf:"varint,3,opt,name=required,proto3" json:"required,omitempty"`
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
Items *ToolProperty `protobuf:"bytes,5,opt,name=items,proto3" json:"items,omitempty"`
Properties []*ToolProperty `protobuf:"bytes,6,rep,name=properties,proto3" json:"properties,omitempty"`
// contains filtered or unexported fields
}
func (*ToolProperty) Descriptor
deprecated
func (*ToolProperty) Descriptor() ([]byte, []int)
Deprecated: Use ToolProperty.ProtoReflect.Descriptor instead.
func (*ToolProperty) GetDescription ¶
func (x *ToolProperty) GetDescription() string
func (*ToolProperty) GetItems ¶
func (x *ToolProperty) GetItems() *ToolProperty
func (*ToolProperty) GetName ¶
func (x *ToolProperty) GetName() string
func (*ToolProperty) GetProperties ¶
func (x *ToolProperty) GetProperties() []*ToolProperty
func (*ToolProperty) GetRequired ¶
func (x *ToolProperty) GetRequired() bool
func (*ToolProperty) GetType ¶
func (x *ToolProperty) GetType() string
func (*ToolProperty) ProtoMessage ¶
func (*ToolProperty) ProtoMessage()
func (*ToolProperty) ProtoReflect ¶
func (x *ToolProperty) ProtoReflect() protoreflect.Message
func (*ToolProperty) Reset ¶
func (x *ToolProperty) Reset()
func (*ToolProperty) String ¶
func (x *ToolProperty) String() string
type UnimplementedPluginServiceServer ¶
type UnimplementedPluginServiceServer struct{}
UnimplementedPluginServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedPluginServiceServer) Description ¶
func (UnimplementedPluginServiceServer) Description(context.Context, *emptypb.Empty) (*DescriptionResponse, error)
func (UnimplementedPluginServiceServer) Execute ¶
func (UnimplementedPluginServiceServer) Execute(context.Context, *ExecuteRequest) (*ExecuteResponse, error)
func (UnimplementedPluginServiceServer) Name ¶
func (UnimplementedPluginServiceServer) Name(context.Context, *emptypb.Empty) (*NameResponse, error)
func (UnimplementedPluginServiceServer) Properties ¶
func (UnimplementedPluginServiceServer) Properties(context.Context, *emptypb.Empty) (*PropertiesResponse, error)
type UnsafePluginServiceServer ¶
type UnsafePluginServiceServer interface {
// contains filtered or unexported methods
}
UnsafePluginServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PluginServiceServer will result in compilation errors.