Documentation
¶
Index ¶
- Variables
- type Building
- type Speak
- func (speak *Speak) Reverse() *Speak
- func (speak *Speak) SetAtNow() *Speak
- func (lanauage *Speak) SetCUID(Cuid *string) *Speak
- func (lanauage *Speak) SetEvent(name string) *Speak
- func (speak *Speak) SetFrom(building *Building) *Speak
- func (speak *Speak) SetGuest(value bool) *Speak
- func (speak *Speak) SetTo(building *Building) *Speak
Constants ¶
This section is empty.
Variables ¶
View Source
var ( EVENT = "event" REQUEST = "request" HANDSHAKE = "handshake" AUTH = "auth" TOWNNAME = "townland" ROOM = "mayor" FROM = Building{ Home: &TOWNNAME, Room: &ROOM, } )
View Source
var Default defaults = defaults{ BadMessage: Speak{ Type: &EVENT, From: &FROM, Event: "bad-message", }, BadToken: Speak{ Type: &EVENT, From: &FROM, Event: "bad-token", }, Authed: Speak{ Type: &EVENT, From: &FROM, Event: "authed", }, ReAuth: Speak{ Type: &EVENT, From: &FROM, Event: "reauth", }, UnAuth: Speak{ Type: &EVENT, From: &FROM, Event: "unauth", }, Handshaked: Speak{ Type: &EVENT, From: &FROM, Event: "handshaked", }, NotHandshaked: Speak{ Type: &EVENT, From: &FROM, Event: "not-handshaked", }, }
Functions ¶
This section is empty.
Types ¶
type Speak ¶
type Speak struct {
CUID *string `json:"cuid,omitempty"` // civilian unique id
Type *string `json:"type"` // "event", "request", "auth", "handshake"
At int64 `json:"at,omitempty"` // send timestamp
Event string `json:"event,omitempty"` // event name in Type "event" and "request"
From *Building `json:"from,omitempty"` // from who
To *Building `json:"to,omitempty"` // to who
Guest *bool `json:"guest,omitempty"` // is temp user
Data string `json:"data,omitempty"` // sended data
}
Click to show internal directories.
Click to hide internal directories.