Init
This commit is contained in:
commit
508a04cf4c
30 changed files with 1545 additions and 0 deletions
52
json_types.go
Normal file
52
json_types.go
Normal file
|
@ -0,0 +1,52 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type WSRequest struct {
|
||||
Type string `json:"type"`
|
||||
Request json.RawMessage `json:"request"`
|
||||
}
|
||||
|
||||
type WSResponse struct {
|
||||
Type string `json:"type"`
|
||||
Response *json.RawMessage `json:"response"`
|
||||
}
|
||||
|
||||
type Connect struct {
|
||||
Server string `json:"server"`
|
||||
Nick string `json:"nick"`
|
||||
Username string `json:"username"`
|
||||
}
|
||||
|
||||
type Join struct {
|
||||
Server string `json:"server"`
|
||||
User string `json:"user"`
|
||||
Channels []string `json:"channels"`
|
||||
}
|
||||
|
||||
type Chat struct {
|
||||
Server string `json:"server"`
|
||||
From string `json:"from"`
|
||||
To string `json:"to"`
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
type Topic struct {
|
||||
Server string `json:"server"`
|
||||
Channel string `json:"channel"`
|
||||
Topic string `json:"topic"`
|
||||
}
|
||||
|
||||
type Userlist struct {
|
||||
Server string `json:"server"`
|
||||
Channel string `json:"channel"`
|
||||
Users []string `json:"users"`
|
||||
}
|
||||
|
||||
type MOTD struct {
|
||||
Server string `json:"server"`
|
||||
Title string `json:"title"`
|
||||
Content string `json:"content"`
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue