helpers

package
v0.0.0-...-2e2ebad Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckForMessages

func CheckForMessages(storage_path string, job *client.RequestsJob, timeout int, longPoll bool) (int, string, error)

CheckForMessages checks for messages on a single server

func HttpSendMessage

func HttpSendMessage(serverUid string, message []byte, timeout int) ([]byte, error)

func InvitationAnswer

func InvitationAnswer(cc *meowlib.ContactCard, nickname string, myNickname string, serverUids []string) (*client.Peer, string, error)

InvitationAnswer

func InvitationAnswerFile

func InvitationAnswerFile(invitationFile string, nickname string, myNickname string, serverUids []string) (string, error)

InvitationAnswerFile

func InvitationAnswerMessage

func InvitationAnswerMessage(invitationId string, invitationServerUid string, timeout int) ([]byte, string, error)

InvitationAnswerMessage

func InvitationAnswerMessageReadResponse

func InvitationAnswerMessageReadResponse(invitationData []byte, invitationServerUid string) (*meowlib.Invitation, string, error)

InvitationAnswerMessageReadResponse Called by the invitation receiver invitationData: the data received from the server invitationServerUid: the uid of the server holding the invitation

func InvitationCreateFile

func InvitationCreateFile(name string, myNickname string, invitationMessage string, serverUids []string, format string) (*client.Peer, string, error)

InvitationCreateFile creates a new peer and writes the invitation to a file Called by invitation initiator name: the name of the peer myNickname: my nickname for that peer invitationMessage: the message to send to the peer serverUids: the list of server uids format: the format of the file (qr or mwiv)

func InvitationCreateMessage

func InvitationCreateMessage(invitationId string, invitationServerUid string, timeOut int, urlLen int, password string) ([]byte, string, error)

InvitationCreateMessage creates a new invitation message for an invited peer Called by invitation initiator invitationId: the invitation id of the peer invitationServerUid: the uid of the server for sending the invitation timeOut: the timeout for the invitation urlLen: the length of the invitation url password: the password for the invitation

func InvitationCreatePeer

func InvitationCreatePeer(name string, myNickname string, invitationMessage string, serverUids []string) (*client.Peer, string, error)

InvitationCreatePeer creates a new peer and returns it Called by invitation initiator name: the name of the peer myNickname: my nickname for that peer invitationMessage: the message to send to the peer serverUids: the list of server uids

func InvitationCreateReadResponse

func InvitationCreateReadResponse(invitationServerUid string, invitationResponse []byte) (*meowlib.Invitation, string, error)

InvitationCreateReadResponse reads the response of an invitation creation (url, expiry) Called by invitation initiator invitationServerUid: the uid of the server where we sent the invitation invitationResponse: the response we got from the server

func InvitationGetMessage

func InvitationGetMessage(invitationUrl string, serverPublicKey string, invitationPassword string) ([]byte, string, error)

InvitationGetMessage Called by the invitation receiver invitationUrl: the url of server holding the invitation serverPublicKey: the public key of the server holding the invitation invitationPassword: the password of the invitation

func InvitationGetMessageReadResponse

func InvitationGetMessageReadResponse(invitationData []byte, invitationServerUid string) (*meowlib.ContactCard, string, error)

InvitationGetMessageReadResponse Called by the invitation receiver invitationData: the data received from the server invitationServerUid: the uid of the server holding the invitation

func InvitationSetUrlInfo

func InvitationSetUrlInfo(invitationId string, url string, expiry int64)

InvitationSetUrlInfo sets the url info for an invitation Called by invitation initiator invitationId: the invitation id of the peer url: the url of the invitation we got from the server

func LoadMessagesHistory

func LoadMessagesHistory(peer_id int) ([]client.InternalUserMessage, string, error)

func PrepareUserMessage

func PrepareUserMessage(message string, srvuid string, peer_idx int, replyToUid string, filelist []string) ([]byte, string, error)

func ReadMessage

func ReadMessage(messageFilename string) ([]string, []string, string, error)

ReadMessage

func SaveCheckJobs

func SaveCheckJobs() (string, error)

SaveCheckJobs

Types

type ReceivedMessage

type ReceivedMessage struct {
	Text string

	Server        string
	Sent          uint64
	Received      uint64
	LocalUuid     string
	LocalSequence uint64
	AppData       string
	Location      meowlib.Location
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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