Documentation
¶
Index ¶
- Constants
- Variables
- func Capitalize(s ...string) []string
- type Action
- type Channel
- type Handler
- type Message
- type Option
- type Server
- func (s *Server) Accept(conn *websocket.Conn)
- func (s *Server) AddAction(action Action)
- func (s *Server) AddChannel(channel *Channel)
- func (s *Server) Connect(broker string) error
- func (s *Server) Handler() http.Handler
- func (s *Server) List() []*User
- func (s *Server) ListActions() []Action
- func (s *Server) ListChannels() []*Channel
- type User
Constants ¶
View Source
const ( PriorityHigh = "primary" PriorityLow = "muted" )
Variables ¶
View Source
var (
DefaultActions = []Action{
{
Name: "help",
Description: "Show help information",
Invoke: showHelp,
},
{
Name: "users",
Description: "List users in channel",
Invoke: listUsers,
},
{
Name: "channels",
Description: "List channels on server",
Invoke: listChannels,
},
}
)
Functions ¶
func Capitalize ¶
Types ¶
type Channel ¶
type Channel struct { Name string // contains filtered or unexported fields }
func NewChannel ¶
type Option ¶
type Option func(s *Server)
func WithAction ¶
func WithChannels ¶
func WithMainChannel ¶
func WithTextInterval ¶
func WithTextLimit ¶
type Server ¶
type Server struct { Name string // contains filtered or unexported fields }
func (*Server) AddChannel ¶
func (*Server) ListActions ¶
func (*Server) ListChannels ¶
Click to show internal directories.
Click to hide internal directories.