Documentation ¶
Overview ¶
Package botpb is a generated protocol buffer package.
It is generated from these files:
bot.proto
It has these top-level messages:
Message SendResponse Capability Registration CommandAuth Error
Index ¶
- func RegisterRikerServer(s *grpc.Server, srv RikerServer)
- type Capability
- func (*Capability) Descriptor() ([]byte, []int)
- func (m *Capability) GetAuth() *CommandAuth
- func (m *Capability) GetDescription() string
- func (m *Capability) GetName() string
- func (m *Capability) GetUsage() string
- func (*Capability) ProtoMessage()
- func (m *Capability) Reset()
- func (m *Capability) String() string
- type CommandAuth
- type Error
- type Message
- func (*Message) Descriptor() ([]byte, []int)
- func (m *Message) GetChannel() string
- func (m *Message) GetGroups() []string
- func (m *Message) GetNickname() string
- func (m *Message) GetPayload() string
- func (m *Message) GetThreadTs() string
- func (m *Message) GetTimestamp() string
- func (*Message) ProtoMessage()
- func (m *Message) Reset()
- func (m *Message) String() string
- type Registration
- type RikerClient
- type RikerServer
- type Riker_CommandStreamClient
- type Riker_CommandStreamServer
- type Riker_SendStreamClient
- type Riker_SendStreamServer
- type SendResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterRikerServer ¶
func RegisterRikerServer(s *grpc.Server, srv RikerServer)
Types ¶
type Capability ¶
type Capability struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Usage string `protobuf:"bytes,2,opt,name=usage" json:"usage,omitempty"` Description string `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"` Auth *CommandAuth `protobuf:"bytes,4,opt,name=auth" json:"auth,omitempty"` }
func (*Capability) Descriptor ¶
func (*Capability) Descriptor() ([]byte, []int)
func (*Capability) GetAuth ¶
func (m *Capability) GetAuth() *CommandAuth
func (*Capability) GetDescription ¶
func (m *Capability) GetDescription() string
func (*Capability) GetName ¶
func (m *Capability) GetName() string
func (*Capability) GetUsage ¶
func (m *Capability) GetUsage() string
func (*Capability) ProtoMessage ¶
func (*Capability) ProtoMessage()
func (*Capability) Reset ¶
func (m *Capability) Reset()
func (*Capability) String ¶
func (m *Capability) String() string
type CommandAuth ¶
type CommandAuth struct { Users []string `protobuf:"bytes,1,rep,name=users" json:"users,omitempty"` Groups []string `protobuf:"bytes,2,rep,name=groups" json:"groups,omitempty"` }
func (*CommandAuth) Descriptor ¶
func (*CommandAuth) Descriptor() ([]byte, []int)
func (*CommandAuth) GetGroups ¶
func (m *CommandAuth) GetGroups() []string
func (*CommandAuth) GetUsers ¶
func (m *CommandAuth) GetUsers() []string
func (*CommandAuth) ProtoMessage ¶
func (*CommandAuth) ProtoMessage()
func (*CommandAuth) Reset ¶
func (m *CommandAuth) Reset()
func (*CommandAuth) String ¶
func (m *CommandAuth) String() string
type Error ¶
type Error struct {
Error string `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
}
func (*Error) Descriptor ¶
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
type Message ¶
type Message struct { // channel ID this came in on or should go out on :P Channel string `protobuf:"bytes,1,opt,name=channel" json:"channel,omitempty"` // WHen riker pushes a message the client needs the timestamp if it want to reply in a thread Timestamp string `protobuf:"bytes,2,opt,name=timestamp" json:"timestamp,omitempty"` // when client sends to riker, it needs to specify the thread_ts if its a reply. // TODO: this is a slack-specific thing .. need to think about this if we intend to abstract chat services ThreadTs string `protobuf:"bytes,3,opt,name=thread_ts,json=threadTs" json:"thread_ts,omitempty"` // the slack nickname that sent the message Nickname string `protobuf:"bytes,4,opt,name=nickname" json:"nickname,omitempty"` // a list of slack groups that the user who sent the message is a member of Groups []string `protobuf:"bytes,5,rep,name=groups" json:"groups,omitempty"` // data is the text that was sent, or to be sent Payload string `protobuf:"bytes,20,opt,name=payload" json:"payload,omitempty"` }
used to represent a slack message between riker <-> client TODO: we might need a field to let riker indicate that a message came via private message or via public channel
func (*Message) Descriptor ¶
func (*Message) GetChannel ¶
func (*Message) GetNickname ¶
func (*Message) GetPayload ¶
func (*Message) GetThreadTs ¶
func (*Message) GetTimestamp ¶
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
type Registration ¶
type Registration struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` CapabilityApplied bool `protobuf:"varint,2,opt,name=capability_applied,json=capabilityApplied" json:"capability_applied,omitempty"` }
this is a simple response
func (*Registration) Descriptor ¶
func (*Registration) Descriptor() ([]byte, []int)
func (*Registration) GetCapabilityApplied ¶
func (m *Registration) GetCapabilityApplied() bool
func (*Registration) GetName ¶
func (m *Registration) GetName() string
func (*Registration) ProtoMessage ¶
func (*Registration) ProtoMessage()
func (*Registration) Reset ¶
func (m *Registration) Reset()
func (*Registration) String ¶
func (m *Registration) String() string
type RikerClient ¶
type RikerClient interface { // Register new RedShirt with riker NewRedShirt(ctx context.Context, in *Capability, opts ...grpc.CallOption) (*Registration, error) // Client pull from riker the next message available to process for the RedShirt NextCommand(ctx context.Context, in *Registration, opts ...grpc.CallOption) (*Message, error) // Riker Push Stream to client CommandStream(ctx context.Context, in *Registration, opts ...grpc.CallOption) (Riker_CommandStreamClient, error) // client -> Riker Messaging SendStream(ctx context.Context, opts ...grpc.CallOption) (Riker_SendStreamClient, error) Send(ctx context.Context, in *Message, opts ...grpc.CallOption) (*SendResponse, error) }
func NewRikerClient ¶
func NewRikerClient(cc *grpc.ClientConn) RikerClient
type RikerServer ¶
type RikerServer interface { // Register new RedShirt with riker NewRedShirt(context.Context, *Capability) (*Registration, error) // Client pull from riker the next message available to process for the RedShirt NextCommand(context.Context, *Registration) (*Message, error) // Riker Push Stream to client CommandStream(*Registration, Riker_CommandStreamServer) error // client -> Riker Messaging SendStream(Riker_SendStreamServer) error Send(context.Context, *Message) (*SendResponse, error) }
type Riker_CommandStreamClient ¶
type Riker_CommandStreamClient interface { Recv() (*Message, error) grpc.ClientStream }
type Riker_CommandStreamServer ¶
type Riker_CommandStreamServer interface { Send(*Message) error grpc.ServerStream }
type Riker_SendStreamClient ¶
type Riker_SendStreamClient interface { Send(*Message) error CloseAndRecv() (*SendResponse, error) grpc.ClientStream }
type Riker_SendStreamServer ¶
type Riker_SendStreamServer interface { SendAndClose(*SendResponse) error Recv() (*Message, error) grpc.ServerStream }
type SendResponse ¶
type SendResponse struct { Ok bool `protobuf:"varint,1,opt,name=ok" json:"ok,omitempty"` Message string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"` }
func (*SendResponse) Descriptor ¶
func (*SendResponse) Descriptor() ([]byte, []int)
func (*SendResponse) GetMessage ¶
func (m *SendResponse) GetMessage() string
func (*SendResponse) GetOk ¶
func (m *SendResponse) GetOk() bool
func (*SendResponse) ProtoMessage ¶
func (*SendResponse) ProtoMessage()
func (*SendResponse) Reset ¶
func (m *SendResponse) Reset()
func (*SendResponse) String ¶
func (m *SendResponse) String() string
Click to show internal directories.
Click to hide internal directories.