21 lines
412 B
Go
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)
|
|
}
|