package
0.1.0
Repository: https://github.com/manjish/slack.git
Documentation: pkg.go.dev

# README

slacktest

This package was originally copied from https://github.com/lusis/slack-test for historical reasons.
It is currently in use with some modifications.

The license of this package is as follows.


Copyright 2018 @lusis

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

# Functions

BotIDFromContext returns the bot userid from a provided context.
BotNameFromContext returns the botname from a provided context.
NewTestServer returns a slacktest.Server ready to be started.
RTMConnectHandler generates a valid connection.
RTMRespEventType retrieve the event type from the next message.
RTMRespPong decode a ping and respond with a pong event.
RTMServerSendGoodbye send a goodbye event.
Websocket handler.

# Constants

ErrEmptyServerToHub is the error when attempting an empty server address to the hub.
ErrNoQueuesRegisteredForServer is the error when there are no queues for a server in the hub.
ErrPassedEmptyServerAddr is the error when being passed an empty server address.
ServerBotChannelsContextKey is the list of channels associated with the fake server.
ServerBotGroupsContextKey is the list of channels associated with the fake server.
ServerBotHubNameContextKey is the context key for passing along the server name registered in the hub.
ServerBotIDContextKey is the bot userid.
ServerBotNameContextKey is the bot name.
ServerURLContextKey is the context key to store the server's url.
ServerWSContextKey is the context key to store the server's ws url.

# Structs

No description provided by the author
Server represents a Slack Test server.

# Interfaces

Customize the server's responses.

# Type aliases

No description provided by the author