webserver

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2019 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MessageHandler

func MessageHandler(msg *store.Message)

func RegistrationDone

func RegistrationDone()

func RequestInput

func RequestInput(request string) string

func Run

func Run() error

func ShowError

func ShowError(errorMessage string)

func UpdateChatList

func UpdateChatList()

Types

type AddContactMessage

type AddContactMessage struct {
	Type  string `json:"request"`
	Name  string `json:"name"`
	Phone string `json:"phone"`
}

type AddDeviceMessage

type AddDeviceMessage struct {
	Type string `json:"request"`
	Url  string `json:"url"`
}

type ChatListEnvelope

type ChatListEnvelope struct {
	ChatList []*store.Session
}

type ContactListEnvelope

type ContactListEnvelope struct {
	ContactList []textsecure.Contact
}

type DelDeviceMessage

type DelDeviceMessage struct {
	Type string `json:"request"`
	Id   int    `json:"id"`
}

type DeviceListEnvelope

type DeviceListEnvelope struct {
	DeviceList []textsecure.DeviceInfo
}

type GetMessageListMessage

type GetMessageListMessage struct {
	Type string `json:"request"`
	ID   string `json:"id"`
}

type GetMoreMessages

type GetMoreMessages struct {
	Type   string `json:"request"`
	LastID string `json:"lastId"`
}

type Message

type Message struct {
	Type string                 `json:"request"`
	Data map[string]interface{} `json:"-"` // Rest of the fields should go here.
}

type MessageListEnvelope

type MessageListEnvelope struct {
	MessageList *store.MessageList
}

type MessageRecieved

type MessageRecieved struct {
	MessageRecieved *store.Message
}

type MoreMessageListEnvelope

type MoreMessageListEnvelope struct {
	MoreMessageList *store.MessageList
}

type RefreshContactsMessage

type RefreshContactsMessage struct {
	Type string `json:"request"`
	Url  string `json:"url"`
}

type RequestCodeMessage

type RequestCodeMessage struct {
	Type string `json:"request"`
	Tel  string `json:"tel"`
}

type SendCodeMessage

type SendCodeMessage struct {
	Type string `json:"request"`
	Code string `json:"code"`
}

type SendError

type SendError struct {
	Type  string
	Error string
}

type SendMessageMessage

type SendMessageMessage struct {
	Type    string `json:"request"`
	To      string `json:"to"`
	Message string `json:"message"`
}

type SendRequest

type SendRequest struct {
	Type string
}

Jump to

Keyboard shortcuts

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