webserver

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2020 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearError added in v0.8.0

func ClearError()

func MessageHandler

func MessageHandler(msg *store.Message)

func RandStringBytesMaskImprSrcUnsafe added in v0.8.0

func RandStringBytesMaskImprSrcUnsafe(n int) string

func RegistrationDone

func RegistrationDone()

func RemoveClientFromList added in v0.8.0

func RemoveClientFromList(client *websocket.Conn)

func RequestInput

func RequestInput(request string) string

func Run

func Run() error

func SetGui added in v0.6.15

func SetGui()

func SetUiDarkMode added in v0.8.0

func SetUiDarkMode(client *websocket.Conn)

func ShowError

func ShowError(errorMessage string)

func UpdateActiveChat added in v0.8.0

func UpdateActiveChat()

func UpdateChatList

func UpdateChatList()

func UpdateContactList added in v0.6.8

func UpdateContactList()

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 ConfigEnvelope added in v0.6.15

type ConfigEnvelope struct {
	Type             string
	Version          string
	RegisteredNumber string
	Name             string
	Notifications    bool
	Encryption       bool
	Gui              string
}

type ContactListEnvelope

type ContactListEnvelope struct {
	ContactList []textsecure.Contact
}

type CreateChatMessage added in v0.6.7

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

type CreateGroupMessage added in v0.6.8

type CreateGroupMessage struct {
	Type    string   `json:"request"`
	Name    string   `json:"name"`
	Members []string `json:"members"`
}

type CurrentChatEnvelope added in v0.6.15

type CurrentChatEnvelope struct {
	OpenChat *OpenChat
}

type DelChatMessage added in v0.6.3

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

type DelContactMessage added in v0.6.4

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

type DelDeviceMessage

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

type DeviceListEnvelope

type DeviceListEnvelope struct {
	DeviceList []textsecure.DeviceInfo
}

type EditContactMessage added in v0.6.4

type EditContactMessage struct {
	Type  string `json:"request"`
	Name  string `json:"name"`
	Phone string `json:"phone"`
	ID    int    `json:"id"`
}

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 IdentityEnvelope added in v0.6.15

type IdentityEnvelope struct {
	Identity string
	TheirId  string
}

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 OpenChat added in v0.7.5

type OpenChat struct {
	CurrentChat *store.Session
	Contact     *textsecure.Contact
	Group       *textsecure.Group
}

type OpenChatMessage added in v0.7.5

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

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 ResetEncryptionMessage added in v0.6.15

type ResetEncryptionMessage struct {
	Type string `json:"request"`
	Chat string `json:"chat"`
}

type SendAttachmentMessage added in v0.6.15

type SendAttachmentMessage struct {
	Type    string `json:"request"`
	AType   string `json:"type"`
	Path    string `json:"path"`
	To      string `json:"to"`
	Message string `json:"message"`
}

type SendCodeMessage

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

type SendDarkmode added in v0.8.0

type SendDarkmode struct {
	DarkMode bool
}

type SendEnterChatRequest added in v0.6.8

type SendEnterChatRequest struct {
	Type string
	Chat string
}

type SendError

type SendError struct {
	Type  string
	Error string
}

type SendGui added in v0.6.15

type SendGui struct {
	Gui string
}

type SendMessageMessage

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

type SendPasswordMessage added in v0.6.15

type SendPasswordMessage struct {
	Type string `json:"request"`
	Pw   string `json:"pw"`
}

type SendPinMessage added in v0.8.0

type SendPinMessage struct {
	Type string `json:"request"`
	Pin  string `json:"pin"`
}

type SendRequest

type SendRequest struct {
	Type string
}

type SetDarkMode added in v0.8.0

type SetDarkMode struct {
	Type     string `json:"request"`
	DarkMode bool   `json:"darkMode"`
}

type SetPasswordMessage added in v0.6.15

type SetPasswordMessage struct {
	Type      string `json:"request"`
	Pw        string `json:"pw"`
	CurrentPw string `json:"CurrentPw"`
}

type ToggleNotificationsMessage added in v0.6.15

type ToggleNotificationsMessage struct {
	Type string `json:"request"`
	Chat string `json:"chat"`
}

type UpdateCurrentChat added in v0.8.0

type UpdateCurrentChat struct {
	CurrentChat *store.Session
	Contact     *textsecure.Contact
	Group       *textsecure.Group
}

type UpdateCurrentChatEnvelope added in v0.8.0

type UpdateCurrentChatEnvelope struct {
	UpdateCurrentChat *UpdateCurrentChat
}

type UpdateGroupMessage added in v0.7.5

type UpdateGroupMessage struct {
	Type    string   `json:"request"`
	Name    string   `json:"name"`
	ID      string   `json:"id"`
	Members []string `json:"members"`
}

type UploadAttachmentMessage added in v0.8.0

type UploadAttachmentMessage struct {
	Type       string `json:"request"`
	To         string `json:"to"`
	Attachment string `json:"attachment"`
	Message    string `json:"message"`
}

type UploadVcf added in v0.6.3

type UploadVcf struct {
	Type string `json:"request"`
	Vcf  string `json:"vcf"`
}

type VerifyIdentityMessage added in v0.6.15

type VerifyIdentityMessage struct {
	Type string `json:"request"`
	Chat string `json:"chat"`
}

Jump to

Keyboard shortcuts

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