simplex

package
v0.0.0-...-22b0f5b Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarkdownToSimplex

func MarkdownToSimplex(md string) string

MarkdownToSimplex rewrites the markdown models emit into SimpleX's: *bold*, plain links.

func SendCommand

func SendCommand(contactID, text string) string

SendCommand addresses the contact by ID; the plain "@name" form breaks on renamed contacts.

func SessionKey

func SessionKey(m Message) string

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(url string) *Client

func (*Client) Listen

func (c *Client) Listen(ctx context.Context) (<-chan Message, error)

Listen connects to the daemon; the channel closes when the connection drops.

func (*Client) Send

func (c *Client) Send(ctx context.Context, contactID, text string) error

type Message

type Message struct {
	ContactID string
	Name      string
	Text      string
	SentAt    time.Time
}

Message is one inbound text from a SimpleX contact.

func ParseEvent

func ParseEvent(data []byte) []Message

ParseEvent extracts the direct text messages received from contacts in one daemon event.

type Pipeline

type Pipeline struct {
	// contains filtered or unexported fields
}

func NewPipeline

func NewPipeline(client *Client, cfg config.SimplexConfig, enqueue func(sessionID, content string, metadata map[string]string)) *Pipeline

func (*Pipeline) Start

func (p *Pipeline) Start(ctx context.Context) error

Jump to

Keyboard shortcuts

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