Documentation
¶
Index ¶
- Constants
- func Handlers(channelRuntime channel.Runtime, tunnel *webhooktunnel.Manager) map[string]runtimeRpc.Handler
- type Client
- func (c *Client) ConnectionStatusesByBot(botID string) []channel.ConnectionStatus
- func (c *Client) DeleteBotChannelConfig(ctx context.Context, botID string, typ channel.ChannelType) error
- func (c *Client) React(ctx context.Context, botID string, typ channel.ChannelType, ...) error
- func (c *Client) Send(ctx context.Context, botID string, typ channel.ChannelType, ...) error
- func (c *Client) SetBotChannelStatus(ctx context.Context, botID string, typ channel.ChannelType, disabled bool) (channel.ChannelConfig, error)
- func (c *Client) SetWebhookEndpoint(ctx context.Context, botID string, typ channel.ChannelType, ...) (channel.SetWebhookEndpointResponse, error)
- func (c *Client) Status() webhooktunnel.Status
- func (c *Client) UpsertBotChannelConfig(ctx context.Context, botID string, typ channel.ChannelType, ...) (channel.ChannelConfig, error)
Constants ¶
View Source
const ( MethodUpsertConfig = "channel.config.upsert" MethodSetStatus = "channel.config.status" MethodDeleteConfig = "channel.config.delete" MethodSetWebhook = "channel.webhook.set" MethodSend = "channel.message.send" MethodReact = "channel.message.react" MethodStatuses = "channel.connection.statuses" MethodTunnelStatus = "channel.tunnel.status" )
Variables ¶
This section is empty.
Functions ¶
func Handlers ¶
func Handlers(channelRuntime channel.Runtime, tunnel *webhooktunnel.Manager) map[string]runtimeRpc.Handler
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(rpc *runtimeRpc.Client) *Client
func (*Client) ConnectionStatusesByBot ¶
func (c *Client) ConnectionStatusesByBot(botID string) []channel.ConnectionStatus
func (*Client) DeleteBotChannelConfig ¶
func (*Client) React ¶
func (c *Client) React(ctx context.Context, botID string, typ channel.ChannelType, req channel.ReactRequest) error
func (*Client) Send ¶
func (c *Client) Send(ctx context.Context, botID string, typ channel.ChannelType, req channel.SendRequest) error
func (*Client) SetBotChannelStatus ¶
func (c *Client) SetBotChannelStatus(ctx context.Context, botID string, typ channel.ChannelType, disabled bool) (channel.ChannelConfig, error)
func (*Client) SetWebhookEndpoint ¶
func (c *Client) SetWebhookEndpoint(ctx context.Context, botID string, typ channel.ChannelType, req channel.SetWebhookEndpointRequest) (channel.SetWebhookEndpointResponse, error)
func (*Client) Status ¶
func (c *Client) Status() webhooktunnel.Status
func (*Client) UpsertBotChannelConfig ¶
func (c *Client) UpsertBotChannelConfig(ctx context.Context, botID string, typ channel.ChannelType, req channel.UpsertConfigRequest) (channel.ChannelConfig, error)
Click to show internal directories.
Click to hide internal directories.