You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
412 B
20 lines
412 B
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)
|
|
}
|