Documentation ¶
Overview ¶
Package botrpc is a generated protocol buffer package.
It is generated from these files:
botrpc.proto
It has these top-level messages:
Func FuncStatus ChatMessage
Index ¶
- Variables
- func RegisterBotFuncsServer(s *grpc.Server, srv BotFuncsServer)
- func RegisterBotServer(s *grpc.Server, srv BotServer)
- type BotClient
- type BotFuncsClient
- type BotFuncsServer
- type BotFuncs_SendMessageClient
- type BotFuncs_SendMessageServer
- type BotServer
- type Bot_SendMessageClient
- type Bot_SendMessageServer
- type ChatMessage
- type Func
- type FuncStatus
- type FuncStatus_Status
Constants ¶
This section is empty.
Variables ¶
View Source
var FuncStatus_Status_name = map[int32]string{
0: "ERROR",
1: "OK",
}
View Source
var FuncStatus_Status_value = map[string]int32{
"ERROR": 0,
"OK": 1,
}
Functions ¶
func RegisterBotFuncsServer ¶
func RegisterBotFuncsServer(s *grpc.Server, srv BotFuncsServer)
func RegisterBotServer ¶
Types ¶
type BotClient ¶
type BotClient interface { // Register registers a function service to the bot. Information about // the registration including the success is returned in the // Registration. Add(ctx context.Context, in *Func, opts ...grpc.CallOption) (*FuncStatus, error) Remove(ctx context.Context, in *Func, opts ...grpc.CallOption) (*FuncStatus, error) SendMessage(ctx context.Context, in *ChatMessage, opts ...grpc.CallOption) (Bot_SendMessageClient, error) }
func NewBotClient ¶
func NewBotClient(cc *grpc.ClientConn) BotClient
type BotFuncsClient ¶
type BotFuncsClient interface {
SendMessage(ctx context.Context, in *ChatMessage, opts ...grpc.CallOption) (BotFuncs_SendMessageClient, error)
}
func NewBotFuncsClient ¶
func NewBotFuncsClient(cc *grpc.ClientConn) BotFuncsClient
type BotFuncsServer ¶
type BotFuncsServer interface {
SendMessage(*ChatMessage, BotFuncs_SendMessageServer) error
}
type BotFuncs_SendMessageClient ¶
type BotFuncs_SendMessageClient interface { Recv() (*ChatMessage, error) grpc.ClientStream }
type BotFuncs_SendMessageServer ¶
type BotFuncs_SendMessageServer interface { Send(*ChatMessage) error grpc.ServerStream }
type BotServer ¶
type BotServer interface { // Register registers a function service to the bot. Information about // the registration including the success is returned in the // Registration. Add(context.Context, *Func) (*FuncStatus, error) Remove(context.Context, *Func) (*FuncStatus, error) SendMessage(*ChatMessage, Bot_SendMessageServer) error }
type Bot_SendMessageClient ¶
type Bot_SendMessageClient interface { Recv() (*ChatMessage, error) grpc.ClientStream }
type Bot_SendMessageServer ¶
type Bot_SendMessageServer interface { Send(*ChatMessage) error grpc.ServerStream }
type ChatMessage ¶
type ChatMessage struct { Body string `protobuf:"bytes,1,opt,name=body" json:"body,omitempty"` User string `protobuf:"bytes,2,opt,name=user" json:"user,omitempty"` Channel string `protobuf:"bytes,3,opt,name=channel" json:"channel,omitempty"` FuncName string `protobuf:"bytes,4,opt,name=func_name,json=funcName" json:"func_name,omitempty"` }
func (*ChatMessage) Descriptor ¶
func (*ChatMessage) Descriptor() ([]byte, []int)
func (*ChatMessage) ProtoMessage ¶
func (*ChatMessage) ProtoMessage()
func (*ChatMessage) Reset ¶
func (m *ChatMessage) Reset()
func (*ChatMessage) String ¶
func (m *ChatMessage) String() string
type Func ¶
type Func struct { Addr string `protobuf:"bytes,1,opt,name=addr" json:"addr,omitempty"` Trigger string `protobuf:"bytes,2,opt,name=trigger" json:"trigger,omitempty"` FuncName string `protobuf:"bytes,3,opt,name=func_name,json=funcName" json:"func_name,omitempty"` Usage string `protobuf:"bytes,4,opt,name=usage" json:"usage,omitempty"` }
func (*Func) Descriptor ¶
func (*Func) ProtoMessage ¶
func (*Func) ProtoMessage()
type FuncStatus ¶
type FuncStatus struct {
Status FuncStatus_Status `protobuf:"varint,1,opt,name=status,enum=botrpc.FuncStatus_Status" json:"status,omitempty"`
}
func (*FuncStatus) Descriptor ¶
func (*FuncStatus) Descriptor() ([]byte, []int)
func (*FuncStatus) ProtoMessage ¶
func (*FuncStatus) ProtoMessage()
func (*FuncStatus) Reset ¶
func (m *FuncStatus) Reset()
func (*FuncStatus) String ¶
func (m *FuncStatus) String() string
type FuncStatus_Status ¶
type FuncStatus_Status int32
const ( FuncStatus_ERROR FuncStatus_Status = 0 FuncStatus_OK FuncStatus_Status = 1 )
func (FuncStatus_Status) EnumDescriptor ¶
func (FuncStatus_Status) EnumDescriptor() ([]byte, []int)
func (FuncStatus_Status) String ¶
func (x FuncStatus_Status) String() string
Click to show internal directories.
Click to hide internal directories.