Documentation
¶
Overview ¶
Package signald implements a simple client for the Signald protocol.
Index ¶
Constants ¶
View Source
const (
DefaultPath = "/var/run/signald/signald.sock"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a connection to a signald server.
func New ¶
New returns a client and attempts to connect on DefaultPath. If an error is returned the client is still valid and calling Encode will attempt to reconnect.
func (*Client) Disconnect ¶
type GetUser ¶
type GetUser struct { Request Username string `json:"username"` RecipientAddress JsonAddress `json:"recipientAddress,omitempty"` }
type JSONAttachment ¶
type JSONAttachment struct { ID string `json:"id,omitempty"` Blurhash string `json:"blurhash,omitempty"` Caption string `json:"caption,omitempty"` ContentType string `json:"contentType,omitempty"` CustomFilename string `json:"customFilename,omitempty"` Digest string `json:"digest,omitempty"` Filename string `json:"filename,omitempty"` Key string `json:"key,omitempty"` Size int `json:"size,omitempty"` StoredFilename string `json:"storedFilename,omitempty"` VoiceNote bool `json:"voiceNote,omitempty"` Height int `json:"heigth,omitempty"` Width int `json:"width,omitempty"` }
JSONAttachment to send with a message
type JsonAddress ¶
type Quote ¶
type Quote struct { ID int `json:"id"` Author JsonAddress `json:"author"` Text string `json:"text"` }
type Request ¶
type Send ¶
type Send struct { Request Username string `json:"username"` RecipientAddress JsonAddress `json:"recipientAddress,omitempty"` RecipientGroupID string `json:"recipientGroupId,omitempty"` MessageBody string `json:"messageBody"` Attachments []JSONAttachment `json:"attachments,omitempty"` Quote *Quote `json:"quote,omitempty"` }
Send message
type Subscribed ¶
func (Subscribed) New ¶
func (s Subscribed) New() interface{}
func (Subscribed) Type ¶
func (s Subscribed) Type() string
Click to show internal directories.
Click to hide internal directories.