Documentation
¶
Overview ¶
Package protocol implements admin-only arbitrary functions.
Index ¶
- type Map
- func (m *Map) Add(idx int, p Protocol)
- func (m *Map) AddFunc(idx int, f ProtocolHandlerFunc)
- func (m *Map) MetaData(idx int) *MetaData
- func (m *Map) MetaDatas() map[int]*MetaData
- func (m *Map) Protocol(idx int) Protocol
- func (m *Map) Remove(idx int)
- func (m *Map) SetMetaData(idx int, name, description string)
- type MetaData
- type Protocol
- type ProtocolHandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Map ¶
type Map struct {
// contains filtered or unexported fields
}
Map is a simple wrapper around a map that stores protocols.
func (*Map) AddFunc ¶
func (m *Map) AddFunc(idx int, f ProtocolHandlerFunc)
AddFunc does the same as Add, except with a handler func.
func (*Map) SetMetaData ¶
SetMetaData associates metadata to a protocol.
type ProtocolHandlerFunc ¶
ProtocolHandlerFunc implements the protocol interface.
func (ProtocolHandlerFunc) Handle ¶
func (f ProtocolHandlerFunc) Handle(ctx context.Context, m *gateway.MessageCreateEvent, args []string) error
Handle implements the protocol interface.
Click to show internal directories.
Click to hide internal directories.