Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { Username string DeviceID int Filename string Registered bool HasKeys bool `json:"has_keys"` Subscribed bool }
Account represents a user account registered to signald
type DataMessage ¶
type DataMessage struct { Timestamp float64 Message string ExpiresInSeconds float64 GroupInfo IncomingGroupInfo }
DataMessage is the main component of incoming text messages
type IncomingGroupInfo ¶
IncomingGroupInfo is information about a particular group
type JsonAttachment ¶
type Request ¶
type Request struct { Type string `json:"type"` ID string `json:"id,omitempty"` Username string `json:"username,omitempty"` MessageBody string `json:"messageBody,omitempty"` RecipientAddress v1.JsonAddress `json:"recipientAddress,omitempty"` RecipientGroupID string `json:"recipientGroupId,omitempty"` Voice bool `json:"voice,omitempty"` Code string `json:"code,omitempty"` DeviceName string `json:"deviceName,omitempty"` AttachmentFilenames []string `json:"attachmentFilenames,omitempty"` URI string `json:"uri,omitempty"` Attachments []JsonAttachment `json:"attachments,omitempty"` GroupName string `json:"groupName,omitempty"` Members []string `json:"members,omitempty"` Avatar string `json:"avatar,omitempty"` }
Request represents a message sent to signald
type Response ¶
type Response struct { ID string Data ResponseData Type string }
Response is a response to a request to signald, or a new inbound message
type ResponseData ¶
type ResponseData struct { Groups []Group Accounts []Account URI string DataMessage DataMessage Message string Username string Source v1.JsonAddress SourceDevice int Type string IsReceipt bool Timestamp float64 ServerTimestamp float64 }
ResponseData is where most of the data in the response is stored.
type Signald ¶
type Signald struct { SocketPath string // contains filtered or unexported fields }
Signald is a connection to a signald instance.
func (*Signald) SendRequest ¶
SendRequest sends a request to signald. Mostly used interally.
Click to show internal directories.
Click to hide internal directories.