Documentation
¶
Index ¶
- Variables
- func RegisterOnebotPluginBaseGRPCServer(s *grpc.Server, srv OnebotPluginBaseGRPCServer)
- type OnebotPluginBase
- type OnebotPluginBaseClientStub
- func (c *OnebotPluginBaseClientStub) BeforeExit(onebotApi sdk_api.OnebotApiClientInterface) error
- func (c *OnebotPluginBaseClientStub) Description() string
- func (c *OnebotPluginBaseClientStub) Help() string
- func (c *OnebotPluginBaseClientStub) Id() string
- func (c *OnebotPluginBaseClientStub) Init(onebotApi sdk_api.OnebotApiClientInterface) error
- func (c *OnebotPluginBaseClientStub) Name() string
- type OnebotPluginBaseGRPCClient
- type OnebotPluginBaseGRPCServer
- type OnebotPluginBaseServerStub
- func (s *OnebotPluginBaseServerStub) BeforeExit(ctx context.Context, in *wrapperspb.UInt32Value) (*emptypb.Empty, error)
- func (s *OnebotPluginBaseServerStub) Description(ctx context.Context, in *emptypb.Empty) (*wrapperspb.StringValue, error)
- func (s *OnebotPluginBaseServerStub) Help(ctx context.Context, in *emptypb.Empty) (*wrapperspb.StringValue, error)
- func (s *OnebotPluginBaseServerStub) Id(ctx context.Context, in *emptypb.Empty) (*wrapperspb.StringValue, error)
- func (s *OnebotPluginBaseServerStub) Init(ctx context.Context, in *wrapperspb.UInt32Value) (*emptypb.Empty, error)
- func (s *OnebotPluginBaseServerStub) Name(ctx context.Context, in *emptypb.Empty) (*wrapperspb.StringValue, error)
- type UnimplementedOnebotPluginBaseGRPCServer
- func (*UnimplementedOnebotPluginBaseGRPCServer) BeforeExit(context.Context, *wrapperspb.UInt32Value) (*emptypb.Empty, error)
- func (*UnimplementedOnebotPluginBaseGRPCServer) Description(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error)
- func (*UnimplementedOnebotPluginBaseGRPCServer) Help(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error)
- func (*UnimplementedOnebotPluginBaseGRPCServer) Id(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error)
- func (*UnimplementedOnebotPluginBaseGRPCServer) Init(context.Context, *wrapperspb.UInt32Value) (*emptypb.Empty, error)
- func (*UnimplementedOnebotPluginBaseGRPCServer) Name(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var File_plus_base_proto protoreflect.FileDescriptor
Functions ¶
func RegisterOnebotPluginBaseGRPCServer ¶
func RegisterOnebotPluginBaseGRPCServer(s *grpc.Server, srv OnebotPluginBaseGRPCServer)
Types ¶
type OnebotPluginBase ¶
type OnebotPluginBase interface {
// 插件Id
Id() string
// 插件名称
Name() string
// 插件描述
Description() string
// 插件帮助
Help() string
// 生命周期
Init(cli api.OnebotApiClientInterface) error
// 退出前
BeforeExit(cli api.OnebotApiClientInterface) error
}
type OnebotPluginBaseClientStub ¶
type OnebotPluginBaseClientStub struct {
Broker *plugin.GRPCBroker
Client OnebotPluginBaseGRPCClient
}
func (*OnebotPluginBaseClientStub) BeforeExit ¶
func (c *OnebotPluginBaseClientStub) BeforeExit(onebotApi sdk_api.OnebotApiClientInterface) error
退出前
func (*OnebotPluginBaseClientStub) Description ¶
func (c *OnebotPluginBaseClientStub) Description() string
插件描述
func (*OnebotPluginBaseClientStub) Init ¶
func (c *OnebotPluginBaseClientStub) Init(onebotApi sdk_api.OnebotApiClientInterface) error
生命周期
type OnebotPluginBaseGRPCClient ¶
type OnebotPluginBaseGRPCClient interface {
Id(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.StringValue, error)
Name(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.StringValue, error)
Description(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.StringValue, error)
Help(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.StringValue, error)
Init(ctx context.Context, in *wrapperspb.UInt32Value, opts ...grpc.CallOption) (*emptypb.Empty, error)
BeforeExit(ctx context.Context, in *wrapperspb.UInt32Value, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
OnebotPluginBaseGRPCClient is the client API for OnebotPluginBaseGRPC service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewOnebotPluginBaseGRPCClient ¶
func NewOnebotPluginBaseGRPCClient(cc grpc.ClientConnInterface) OnebotPluginBaseGRPCClient
type OnebotPluginBaseGRPCServer ¶
type OnebotPluginBaseGRPCServer interface {
Id(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error)
Name(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error)
Description(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error)
Help(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error)
Init(context.Context, *wrapperspb.UInt32Value) (*emptypb.Empty, error)
BeforeExit(context.Context, *wrapperspb.UInt32Value) (*emptypb.Empty, error)
}
OnebotPluginBaseGRPCServer is the server API for OnebotPluginBaseGRPC service.
type OnebotPluginBaseServerStub ¶
type OnebotPluginBaseServerStub struct {
Broker *plugin.GRPCBroker
Impl OnebotPluginBase
}
func (*OnebotPluginBaseServerStub) BeforeExit ¶
func (s *OnebotPluginBaseServerStub) BeforeExit(ctx context.Context, in *wrapperspb.UInt32Value) (*emptypb.Empty, error)
func (*OnebotPluginBaseServerStub) Description ¶
func (s *OnebotPluginBaseServerStub) Description(ctx context.Context, in *emptypb.Empty) (*wrapperspb.StringValue, error)
func (*OnebotPluginBaseServerStub) Help ¶
func (s *OnebotPluginBaseServerStub) Help(ctx context.Context, in *emptypb.Empty) (*wrapperspb.StringValue, error)
func (*OnebotPluginBaseServerStub) Id ¶
func (s *OnebotPluginBaseServerStub) Id(ctx context.Context, in *emptypb.Empty) (*wrapperspb.StringValue, error)
func (*OnebotPluginBaseServerStub) Init ¶
func (s *OnebotPluginBaseServerStub) Init(ctx context.Context, in *wrapperspb.UInt32Value) (*emptypb.Empty, error)
func (*OnebotPluginBaseServerStub) Name ¶
func (s *OnebotPluginBaseServerStub) Name(ctx context.Context, in *emptypb.Empty) (*wrapperspb.StringValue, error)
type UnimplementedOnebotPluginBaseGRPCServer ¶
type UnimplementedOnebotPluginBaseGRPCServer struct {
}
UnimplementedOnebotPluginBaseGRPCServer can be embedded to have forward compatible implementations.
func (*UnimplementedOnebotPluginBaseGRPCServer) BeforeExit ¶
func (*UnimplementedOnebotPluginBaseGRPCServer) BeforeExit(context.Context, *wrapperspb.UInt32Value) (*emptypb.Empty, error)
func (*UnimplementedOnebotPluginBaseGRPCServer) Description ¶
func (*UnimplementedOnebotPluginBaseGRPCServer) Description(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error)
func (*UnimplementedOnebotPluginBaseGRPCServer) Help ¶
func (*UnimplementedOnebotPluginBaseGRPCServer) Help(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error)
func (*UnimplementedOnebotPluginBaseGRPCServer) Id ¶
func (*UnimplementedOnebotPluginBaseGRPCServer) Id(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error)
func (*UnimplementedOnebotPluginBaseGRPCServer) Init ¶
func (*UnimplementedOnebotPluginBaseGRPCServer) Init(context.Context, *wrapperspb.UInt32Value) (*emptypb.Empty, error)
func (*UnimplementedOnebotPluginBaseGRPCServer) Name ¶
func (*UnimplementedOnebotPluginBaseGRPCServer) Name(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error)
Click to show internal directories.
Click to hide internal directories.