plugins

package
v4.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2021 License: MIT Imports: 7 Imported by: 4

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