Categorygithub.com/ckingdev/gobot
modulepackage
1.0.0
Repository: https://github.com/ckingdev/gobot.git
Documentation: pkg.go.dev

# README

gobot

A basic bot library for the chat service euphoria.io in golang.

GoDoc

Build Status Coverage Status

# Packages

No description provided by the author
Package handlers provides several pre-baked gobot.Handlers for convenience.
Package main provides some sample code for setting up a bot.

# Functions

MakePacket is a convenience function that takes a payload and a PacketType and returns a Packet.
NewBot creates a bot with the given configuration.

# Constants

MAXRETRIES is the number of times to retry a connection to euphoria.

# Structs

Bot is the highest level abstraction- it contains and controls multiple Room structs.
BotConfig controls the configuration of a new Bot when it is created by the user.
Room contains a connection to a euphoria room and uses Handlers to process packets and optionally reply to them.
RoomConfig controls the configuration of a new Room when it is added to a Bot.
WSConnection is a type that satisfies the Connection interface and manages a websocket connection to a euphoria room.

# Interfaces

Connection is an interface primarily designed to allow for a mock connecting during testing.
Handler is an interface that processes incoming packets and optionally returns a packet to be sent by the bot.