record

package
v0.0.0-...-5349944 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// 获取语音
	// get_record
	API_GET_RECORD = "get_record"
	// 检查是否可以发送语音
	// can_send_record
	API_CAN_SEND_RECORD = "can_send_record"
)

Variables

View Source
var File_api_record_proto protoreflect.FileDescriptor

Functions

func RegisterOnebotApiRecordGRPCServiceServer

func RegisterOnebotApiRecordGRPCServiceServer(s *grpc.Server, srv OnebotApiRecordGRPCServiceServer)

Types

type ChannelApiRecordClient

type ChannelApiRecordClient struct {
	channel.ApiChannel
}

func (*ChannelApiRecordClient) CanSendRecord

func (cli *ChannelApiRecordClient) CanSendRecord() (*model.BoolYesOfResult, error)

检查是否可以发送语音 can_send_record

func (*ChannelApiRecordClient) GetRecord

func (cli *ChannelApiRecordClient) GetRecord(file string, outFormat string) (*model.RecordResult, error)

获取语音 get_record

type GetRecordRequest

type GetRecordRequest struct {
	File      string `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"`
	OutFormat string `protobuf:"bytes,2,opt,name=out_format,json=outFormat,proto3" json:"out_format,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRecordRequest) Descriptor deprecated

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

Deprecated: Use GetRecordRequest.ProtoReflect.Descriptor instead.

func (*GetRecordRequest) GetFile

func (x *GetRecordRequest) GetFile() string

func (*GetRecordRequest) GetOutFormat

func (x *GetRecordRequest) GetOutFormat() string

func (*GetRecordRequest) ProtoMessage

func (*GetRecordRequest) ProtoMessage()

func (*GetRecordRequest) ProtoReflect

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

func (*GetRecordRequest) Reset

func (x *GetRecordRequest) Reset()

func (*GetRecordRequest) String

func (x *GetRecordRequest) String() string

type OnebotApiRecordClient

type OnebotApiRecordClient interface {
	// 获取语音
	// get_record
	GetRecord(file string, outFormat string) (*model.RecordResult, error)
	// 检查是否可以发送语音
	// can_send_record
	CanSendRecord() (*model.BoolYesOfResult, error)
}

func NewChannelApiRecordClient

func NewChannelApiRecordClient(channel channel.ApiChannel) (OnebotApiRecordClient, error)

type OnebotApiRecordGRPCServiceClient

type OnebotApiRecordGRPCServiceClient interface {
	// 获取语音
	// get_record
	GetRecord(ctx context.Context, in *GetRecordRequest, opts ...grpc.CallOption) (*model.RecordResultGRPC, error)
	// 检查是否可以发送语音
	// can_send_record
	CanSendRecord(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*model.BoolYesOfResultGRPC, error)
}

OnebotApiRecordGRPCServiceClient is the client API for OnebotApiRecordGRPCService service.

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

type OnebotApiRecordGRPCServiceServer

type OnebotApiRecordGRPCServiceServer interface {
	// 获取语音
	// get_record
	GetRecord(context.Context, *GetRecordRequest) (*model.RecordResultGRPC, error)
	// 检查是否可以发送语音
	// can_send_record
	CanSendRecord(context.Context, *emptypb.Empty) (*model.BoolYesOfResultGRPC, error)
}

OnebotApiRecordGRPCServiceServer is the server API for OnebotApiRecordGRPCService service.

type UnimplementedOnebotApiRecordGRPCServiceServer

type UnimplementedOnebotApiRecordGRPCServiceServer struct {
}

UnimplementedOnebotApiRecordGRPCServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedOnebotApiRecordGRPCServiceServer) CanSendRecord

func (*UnimplementedOnebotApiRecordGRPCServiceServer) GetRecord

Jump to

Keyboard shortcuts

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