Files
Server/events/connection.go
T
2022-08-14 13:57:56 +02:00

21 lines
412 B
Go

package events
import "fmt"
type Connected struct {
Prefix string `json:"prefix"`
}
func (e Connected) EventDescription() string {
return fmt.Sprintf("Connect(prefix:%s)", e.Prefix)
}
type Disconnected struct {
Prefix string `json:"prefix"`
Reason string `json:"reason"`
}
func (e Disconnected) EventDescription() string {
return fmt.Sprintf("Disconnected(prefix:%s, reason:%s)", e.Prefix, e.Reason)
}