beehive: Index | Files

package rocketchatbee

import ""

Package rocketchatbee is a Bee that can connect to Rocketchat.

Package rocketchatbee is a Bee that can connect to Rocketchat.


Package Files

client.go rocketchatbee.go rocketchatbeefactory.go

type Client Uses

type Client struct {
    // contains filtered or unexported fields

func NewClient Uses

func NewClient(url, userID, authToken string) *Client

func (*Client) GetChannelID Uses

func (c *Client) GetChannelID(name string) (string, error)

getChannelID returns the ID of a channel

func (*Client) SendMessage Uses

func (c *Client) SendMessage(channel, text, alias string) error

func (*Client) TestConnection Uses

func (c *Client) TestConnection() error

type ErrorResponse Uses

type ErrorResponse struct {
    Error string `json:"error"`


type Message Uses

type Message struct {
    Text      string `json:"msg"`
    ChannelID string `json:"rid"`
    Alias     string `json:"alias,omitempty"`

Message defines a chat message

type MessageContainer Uses

type MessageContainer struct {
    Message Message `json:"message"`

MessageContainer is sent to Rocket.Chat to create a chat message

type RocketchatBee Uses

type RocketchatBee struct {
    // contains filtered or unexported fields

RocketchatBee is a Bee that can connect to Rocketchat.

func (*RocketchatBee) Action Uses

func (mod *RocketchatBee) Action(action bees.Action) []bees.Placeholder

Action triggers the action passed to it.

func (*RocketchatBee) ReloadOptions Uses

func (mod *RocketchatBee) ReloadOptions(options bees.BeeOptions)

ReloadOptions parses the config options and initializes the Bee.

type RocketchatBeeFactory Uses

type RocketchatBeeFactory struct {

RocketchatBeeFactory is a factory for RocketchatBees.

func (*RocketchatBeeFactory) Actions Uses

func (factory *RocketchatBeeFactory) Actions() []bees.ActionDescriptor

Actions describes the available actions provided by this Bee.

func (*RocketchatBeeFactory) Description Uses

func (factory *RocketchatBeeFactory) Description() string

Description returns the description of this Bee.

func (*RocketchatBeeFactory) ID Uses

func (factory *RocketchatBeeFactory) ID() string

ID returns the ID of this Bee.

func (*RocketchatBeeFactory) Image Uses

func (factory *RocketchatBeeFactory) Image() string

Image returns the filename of an image for this Bee.

func (*RocketchatBeeFactory) LogoColor Uses

func (factory *RocketchatBeeFactory) LogoColor() string

LogoColor returns the preferred logo background color (used by the admin interface).

func (*RocketchatBeeFactory) Name Uses

func (factory *RocketchatBeeFactory) Name() string

Name returns the name of this Bee.

func (*RocketchatBeeFactory) New Uses

func (factory *RocketchatBeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface

New returns a new Bee instance configured with the supplied options.

func (*RocketchatBeeFactory) Options Uses

func (factory *RocketchatBeeFactory) Options() []bees.BeeOptionDescriptor

Options returns the options available to configure this Bee.

type Room Uses

type Room struct {
    ID string `json:"_id"`

Room is a Channel in Rocket.Chat

type RoomResponseContainer Uses

type RoomResponseContainer struct {
    Room Room `json:"room"`

RoomResponseContainer is used to receive the ID of a room/channel

Package rocketchatbee imports 7 packages (graph) and is imported by 3 packages. Updated 2019-08-14. Refresh now. Tools for package owners.