plugins

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2020 License: MIT Imports: 7 Imported by: 3 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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 (h *PluginHelper) SendChannelMessageWithContext(ctx context.Context, channel string, messages ...string) error

func (*PluginHelper) SendRawMessage

func (h *PluginHelper) SendRawMessage(messages ...string) error

func (*PluginHelper) SendRawMessageWithContext

func (h *PluginHelper) SendRawMessageWithContext(ctx context.Context, messages ...string) error

Jump to

Keyboard shortcuts

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