Documentation ¶
Index ¶
- type PluginHelper
- func (h *PluginHelper) HTTPClient() (rpc.HTTPPluginClient, error)
- func (h *PluginHelper) HTTPClientWithContext(ctx context.Context) (rpc.HTTPPluginClient, error)
- func (h *PluginHelper) IRCClient() (rpc.IRCPluginClient, error)
- func (h *PluginHelper) IRCClientWithContext(ctx context.Context) (rpc.IRCPluginClient, error)
- func (h *PluginHelper) Ping() error
- func (h *PluginHelper) PingWithContext(ctx context.Context) error
- func (h *PluginHelper) RegisterChannelMessageHandler(channel string, handler func(message *rpc.ChannelMessage)) error
- func (h *PluginHelper) RegisterChannelMessageHandlerWithContext(ctx context.Context, channel string, handler func(message *rpc.ChannelMessage)) error
- func (h *PluginHelper) RegisterWebhook(path string, handler func(request *rpc.HttpRequest) *rpc.HttpResponse) error
- func (h *PluginHelper) RegisterWebhookWithContext(ctx context.Context, path string, ...) error
- func (h *PluginHelper) SendChannelMessage(channel string, messages ...string) error
- func (h *PluginHelper) SendChannelMessageWithContext(ctx context.Context, channel string, messages ...string) error
- func (h *PluginHelper) SendRawMessage(messages ...string) error
- func (h *PluginHelper) SendRawMessageWithContext(ctx context.Context, messages ...string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PluginHelper ¶
type PluginHelper struct { RPCTarget string RPCToken string // contains filtered or unexported fields }
func NewHelper ¶
func NewHelper(target string, rpctoken string) (*PluginHelper, error)
NewHelper returns a PluginHelper that simplifies writing plugins by managing grpc connections and exposing a simple interface. It returns a PluginHelper or any errors encountered whilst creating
func (*PluginHelper) HTTPClient ¶
func (h *PluginHelper) HTTPClient() (rpc.HTTPPluginClient, error)
func (*PluginHelper) HTTPClientWithContext ¶
func (h *PluginHelper) HTTPClientWithContext(ctx context.Context) (rpc.HTTPPluginClient, error)
func (*PluginHelper) IRCClient ¶
func (h *PluginHelper) IRCClient() (rpc.IRCPluginClient, error)
func (*PluginHelper) IRCClientWithContext ¶
func (h *PluginHelper) IRCClientWithContext(ctx context.Context) (rpc.IRCPluginClient, error)
func (*PluginHelper) Ping ¶
func (h *PluginHelper) Ping() error
func (*PluginHelper) PingWithContext ¶
func (h *PluginHelper) PingWithContext(ctx context.Context) error
func (*PluginHelper) RegisterChannelMessageHandler ¶
func (h *PluginHelper) RegisterChannelMessageHandler(channel string, handler func(message *rpc.ChannelMessage)) error
func (*PluginHelper) RegisterChannelMessageHandlerWithContext ¶
func (h *PluginHelper) RegisterChannelMessageHandlerWithContext(ctx context.Context, channel string, handler func(message *rpc.ChannelMessage)) error
func (*PluginHelper) RegisterWebhook ¶
func (h *PluginHelper) RegisterWebhook(path string, handler func(request *rpc.HttpRequest) *rpc.HttpResponse) error
func (*PluginHelper) RegisterWebhookWithContext ¶
func (h *PluginHelper) RegisterWebhookWithContext(ctx context.Context, path string, handler func(request *rpc.HttpRequest) *rpc.HttpResponse) error
func (*PluginHelper) SendChannelMessage ¶
func (h *PluginHelper) SendChannelMessage(channel string, messages ...string) error
func (*PluginHelper) SendChannelMessageWithContext ¶
func (*PluginHelper) SendRawMessage ¶
func (h *PluginHelper) SendRawMessage(messages ...string) error
func (*PluginHelper) SendRawMessageWithContext ¶
func (h *PluginHelper) SendRawMessageWithContext(ctx context.Context, messages ...string) error
Click to show internal directories.
Click to hide internal directories.