language

package module
v0.0.2-6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2021 License: MIT Imports: 1 Imported by: 4

README

townland/language

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EVENT      = "event"
	MAIL       = "MAIL"
	AUTH       = "auth"
	TOWNNAME   = "townland"
	MAYOR      = "mayor"
	CONNECT    = "connect"    // civilian connect on getway
	DISCONNECT = "disconnect" // civilian disconnect on getway
	EXPRESS    = "express"    // send express mail (for http)
	FROM       = Building{
		Home: &TOWNNAME,
		Room: &MAYOR,
	}
)
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 Building

type Building struct {
	Home *string `json:"home"`
	Room *string `json:"room"`
}

type Speak

type Speak struct {
	Token string    `json:"token,omitempty"` // human access token
	MUID  string    `json:"muid"`            // mail unique id
	UUID  *string   `json:"uuid,omitempty"`  // user/human id from access token
	RUID  *string   `json:"ruid,omitempty"`  // road unique id
	CUID  *string   `json:"cuid,omitempty"`  // civilian unique id
	Type  *string   `json:"type"`            // "event", "mail", "auth", "express"
	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
}

func (*Speak) Reverse

func (speak *Speak) Reverse() *Speak

reverse listener and speaker

func (*Speak) SetAtNow

func (speak *Speak) SetAtNow() *Speak

set said unix time

func (*Speak) SetCUID

func (lanauage *Speak) SetCUID(cuid *string) *Speak

change civilian unique id

func (*Speak) SetEvent

func (lanauage *Speak) SetEvent(name string) *Speak

set event name

func (*Speak) SetFrom

func (speak *Speak) SetFrom(building *Building) *Speak

set home and room of who saying

func (*Speak) SetGuest

func (speak *Speak) SetGuest(value bool) *Speak

set civilian is guest and temporary

func (*Speak) SetMUID

func (lanauage *Speak) SetMUID(muid string) *Speak

change mail unique id

func (*Speak) SetRUID

func (lanauage *Speak) SetRUID(ruid *string) *Speak

change road unique id

func (*Speak) SetTo

func (speak *Speak) SetTo(building *Building) *Speak

set home and room of who listen what i am saying

func (*Speak) SetToken

func (lanauage *Speak) SetToken(token string) *Speak

set human access token

func (*Speak) SetUUID

func (lanauage *Speak) SetUUID(uuid *string) *Speak

change user/human unique id from token

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL