webserver

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: GPL-3.0 Imports: 22 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()

RegistrationDone sets restration status to done and sends registration status to axoltol-web

func RequestInput

func RequestInput(request string) string

func Run

func Run() error

Run runs the webserver and the websocket

func SetGui added in v0.6.15

func SetGui()

SetGui sets the gui

func SetUiDarkMode added in v0.8.0

func SetUiDarkMode()

func ShowError

func ShowError(errorMessage string)

func UpdateActiveChat added in v0.8.0

func UpdateActiveChat()

UpdateActiveChat checks if there is an active chat an if yes it updates it on axolotl web

func UpdateChatList

func UpdateChatList()

UpdateChatList updates the chatlist if not entered a chat + registered

func UpdateContactList added in v0.6.8

func UpdateContactList()

UpdateContactList updates the contactlist if not entered a chat + registered

func UpdateMessageHandler added in v0.9.0

func UpdateMessageHandler(msg *store.Message)

UpdateMessageHandler sents message receipts to all connected clients for the activeChat

func UpdateMessageHandlerWithSource added in v0.9.0

func UpdateMessageHandlerWithSource(msg *store.Message)

UpdateMessageHandlerWithSource checks if the message belongs to the current chat and if yes triggers an update on axolotl web

Types

type AddContactMessage

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

type AddDeviceMessage

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

type ChatListEnvelope

type ChatListEnvelope struct {
	ChatList     []*store.SessionV2
	LastMessages []store.Message
	SessionNames []store.SessionV2Name
}

type ConfigEnvelope added in v0.6.15

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

type ContactListEnvelope

type ContactListEnvelope struct {
	ContactList []textsecureContacts.Contact
}

type CreateChatForRecipientMessage added in v1.6.0

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

type CreateChatMessage added in v0.6.7

type CreateChatMessage struct {
	Type string `json:"request"`
	UUID string `json:"uuid"`
}

type CreateGroupMessage added in v0.6.8

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

type CreateRecipientAndAddToGroupMessage added in v1.6.0

type CreateRecipientAndAddToGroupMessage struct {
	Type      string `json:"request"`
	Recipient string `json:"recipient"`
	Group     string `json:"group"`
}

type CreateRecipientMessage added in v1.6.0

type CreateRecipientMessage struct {
	Type      string `json:"request"`
	Recipient string `json:"recipient"`
}

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   int64  `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 DelMessageMessage added in v0.9.9

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

type DeviceListEnvelope

type DeviceListEnvelope struct {
	DeviceList []textsecure.DeviceInfo
}

type EditContactMessage added in v0.6.4

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

type GetMessageListMessage

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

type GetMoreMessages

type GetMoreMessages struct {
	Type   string `json:"request"`
	SentAt uint64 `json:"sentAt"`
}

type GetProfileMessage added in v1.6.0

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

type Group added in v1.0.9

type Group struct {
	HexId      string
	Name       string
	Members    []*store.Recipient
	JoinStatus int
}

type IdentityEnvelope added in v0.6.15

type IdentityEnvelope struct {
	FingerprintNumbers []string
	FingerprintQRCode  []int
}

type JoinGroupMessage added in v1.0.9

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

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.Message
}

type MessageReceived added in v1.6.0

type MessageReceived struct {
	MessageReceived *store.Message
}

type MoreMessageListEnvelope

type MoreMessageListEnvelope struct {
	MoreMessageList *store.MessageList
}

type OpenChat added in v0.7.5

type OpenChat struct {
	CurrentChat *store.SessionV2
	Contact     *textsecureContacts.Contact
	Group       *Group
}

type OpenChatMessage added in v0.7.5

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

type ProfileMessage added in v1.6.0

type ProfileMessage struct {
	Recipient *store.Recipient
	Contact   *textsecureContacts.Contact
}

type ProfileMessageEnvelope added in v1.6.0

type ProfileMessageEnvelope struct {
	ProfileMessage *ProfileMessage
}

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 int64  `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      int64  `json:"to"`
	Message string `json:"message"`
}

type SendCaptchaTokenMessage added in v0.9.7

type SendCaptchaTokenMessage struct {
	Type  string `json:"request"`
	Token string `json:"token"`
}

type SendCodeMessage

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

type SendEnterChatRequest added in v0.6.8

type SendEnterChatRequest struct {
	Type string
	Chat int64
}

type SendError

type SendError struct {
	Type  string
	Error string
}

type SendGui added in v0.6.15

type SendGui struct {
	Gui string
}

SendGui sends to axolotl the gui to trigger ubuntu touch specific parts

type SendMessageMessage

type SendMessageMessage struct {
	Type    string `json:"request"`
	To      int64  `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 SendUsernameMessage added in v1.0.0

type SendUsernameMessage struct {
	Type     string `json:"request"`
	Username string `json:"username"`
}

type SendVoiceNoteMessage added in v1.0.9

type SendVoiceNoteMessage struct {
	Type      string `json:"request"`
	To        int64  `json:"to"`
	VoiceNote string `json:"voiceNote"`
}

type SetDarkMode added in v0.8.0

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

type SetLogLevelMessage added in v1.2.0

type SetLogLevelMessage struct {
	Type  string `json:"request"`
	Level string `json:"level"`
}

type SetPasswordMessage added in v0.6.15

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

type UpdateCurrentChat added in v0.8.0

type UpdateCurrentChat struct {
	CurrentChat *store.SessionV2
	Contact     *store.Recipient
	Group       *Group
}

type UpdateCurrentChatEnvelope added in v0.8.0

type UpdateCurrentChatEnvelope struct {
	UpdateCurrentChat *UpdateCurrentChat
}

type UpdateMessage added in v0.9.0

type UpdateMessage struct {
	UpdateMessage *store.Message
}

type UpdateProfileNameMessage added in v1.6.0

type UpdateProfileNameMessage struct {
	Type string `json:"request"`
	Name string `json:"name"`
	ID   int64  `json:"id"`
}

type UploadAttachmentMessage added in v0.8.0

type UploadAttachmentMessage struct {
	Type       string `json:"request"`
	To         int64  `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"`
}

Jump to

Keyboard shortcuts

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