Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterOnebotApiImageGRPCServiceServer(s *grpc.Server, srv OnebotApiImageGRPCServiceServer)
- type ChannelApiImageClient
- type OnebotApiImageClient
- type OnebotApiImageGRPCServiceClient
- type OnebotApiImageGRPCServiceServer
- type UnimplementedOnebotApiImageGRPCServiceServer
- func (*UnimplementedOnebotApiImageGRPCServiceServer) CanSendImage(context.Context, *emptypb.Empty) (*model.BoolYesOfResultGRPC, error)
- func (*UnimplementedOnebotApiImageGRPCServiceServer) GetImage(context.Context, *wrapperspb.StringValue) (*model.ImageResultGRPC, error)
- func (*UnimplementedOnebotApiImageGRPCServiceServer) OcrImage(context.Context, *wrapperspb.StringValue) (*model.OcrImageResultGRPC, error)
Constants ¶
View Source
const ( // 获取图片 // get_image API_GET_IMAGE = "get_image" // 检查是否可以发送图片 // can_send_image API_CAN_SEND_IMAGE = "can_send_image" // 图片ORC识别 // ocr_image API_OCR_IMAGE = "ocr_image" )
Variables ¶
View Source
var File_api_image_proto protoreflect.FileDescriptor
Functions ¶
func RegisterOnebotApiImageGRPCServiceServer ¶
func RegisterOnebotApiImageGRPCServiceServer(s *grpc.Server, srv OnebotApiImageGRPCServiceServer)
Types ¶
type ChannelApiImageClient ¶
type ChannelApiImageClient struct {
channel.ApiChannel
}
func (*ChannelApiImageClient) CanSendImage ¶
func (cli *ChannelApiImageClient) CanSendImage() (*model.BoolYesOfResult, error)
检查是否可以发送图片 can_send_image
func (*ChannelApiImageClient) GetImage ¶
func (cli *ChannelApiImageClient) GetImage(file string) (*model.ImageResult, error)
获取图片 get_image
func (*ChannelApiImageClient) OcrImage ¶
func (cli *ChannelApiImageClient) OcrImage(image string) (*model.OcrImageResult, error)
图片ORC识别 ocr_image
type OnebotApiImageClient ¶
type OnebotApiImageClient interface { // 获取图片 // get_image GetImage(file string) (*model.ImageResult, error) // 检查是否可以发送图片 // can_send_image CanSendImage() (*model.BoolYesOfResult, error) // 图片ORC识别 // ocr_image OcrImage(image string) (*model.OcrImageResult, error) }
func NewChannelApiImageClient ¶
func NewChannelApiImageClient(channel channel.ApiChannel) (OnebotApiImageClient, error)
type OnebotApiImageGRPCServiceClient ¶
type OnebotApiImageGRPCServiceClient interface { // 获取图片 // get_image GetImage(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*model.ImageResultGRPC, error) // 检查是否可以发送图片 // can_send_image CanSendImage(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*model.BoolYesOfResultGRPC, error) // 图片ORC识别 // ocr_image OcrImage(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*model.OcrImageResultGRPC, error) }
OnebotApiImageGRPCServiceClient is the client API for OnebotApiImageGRPCService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewOnebotApiImageGRPCServiceClient ¶
func NewOnebotApiImageGRPCServiceClient(cc grpc.ClientConnInterface) OnebotApiImageGRPCServiceClient
type OnebotApiImageGRPCServiceServer ¶
type OnebotApiImageGRPCServiceServer interface { // 获取图片 // get_image GetImage(context.Context, *wrapperspb.StringValue) (*model.ImageResultGRPC, error) // 检查是否可以发送图片 // can_send_image CanSendImage(context.Context, *emptypb.Empty) (*model.BoolYesOfResultGRPC, error) // 图片ORC识别 // ocr_image OcrImage(context.Context, *wrapperspb.StringValue) (*model.OcrImageResultGRPC, error) }
OnebotApiImageGRPCServiceServer is the server API for OnebotApiImageGRPCService service.
type UnimplementedOnebotApiImageGRPCServiceServer ¶
type UnimplementedOnebotApiImageGRPCServiceServer struct { }
UnimplementedOnebotApiImageGRPCServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedOnebotApiImageGRPCServiceServer) CanSendImage ¶
func (*UnimplementedOnebotApiImageGRPCServiceServer) CanSendImage(context.Context, *emptypb.Empty) (*model.BoolYesOfResultGRPC, error)
func (*UnimplementedOnebotApiImageGRPCServiceServer) GetImage ¶
func (*UnimplementedOnebotApiImageGRPCServiceServer) GetImage(context.Context, *wrapperspb.StringValue) (*model.ImageResultGRPC, error)
func (*UnimplementedOnebotApiImageGRPCServiceServer) OcrImage ¶
func (*UnimplementedOnebotApiImageGRPCServiceServer) OcrImage(context.Context, *wrapperspb.StringValue) (*model.OcrImageResultGRPC, error)
Click to show internal directories.
Click to hide internal directories.